Summary of the invention
In view of this, the invention provides the method and system of realizing the data route, application system only need be carried out and professional relevant logical operation, and the operation unification relevant with route managed by EIS, thereby data can be separated with route, reduce the complexity of application system.
At first goal of the invention, the technical scheme that the present invention proposes is:
A kind of method that realizes the data route sets in advance the integrated system EIS of enterprise that is used for being responsible for the data route, and routing rule is kept among the EIS, and this method may further comprise the steps: the source application system sends to EIS with the data passes order; If described data passes order is to carry the data that active application system need issue and the data issue an order of data model sign, described routing rule is a subscription rules, subscription rules is preserved the data model sign, the subscription condition of the application system of subscription data, and the sign of the application system of subscription data, so, after EIS reads the data that will issue, earlier according to the sign of the data model in described data issue an order query subscription rule, from subscription rules, determine the sign of the application system of the subscription data corresponding with the data model sign in the data issue an order, with the application system of the described subscription data determined as the purpose application system, and judge whether the data that read satisfy the subscription condition of purpose application system, if satisfy, then these data be distributed to described purpose application system; If described data passes order is the data query order that carries the data model sign, described routing rule is a registration rule, registration rule is preserved the data model sign, the registration condition of the application system of log-on data, and the sign of the application system of log-on data, so, EIS is earlier according to the sign of the data model in data query order inquiry and registration rule, from registration rule, determine the sign of the application system of the log-on data corresponding with the data model sign in the data query order, as the purpose application system, described purpose application system is returned the data of the registration condition that satisfies described purpose application system to the source of data query application system when receiving the data query order with the application system of this log-on data of determining.
In the such scheme, if described data passes order is described data issue an order, described routing rule is a subscription rules, so, subscription rules is kept at before the step of EIS, this method further comprises: the application system of subscription data sends to EIS and carries the data model sign, the subscription condition of the application system of subscription data, and the subscription of the application system self identification of subscription data instruction, EIS identifies described data model, the subscription condition of the application system of subscription data, and the corresponding relation of the sign of the application system of subscription data is recorded in the subscription rules.
In the such scheme, if described data passes order is described data query order, described routing rule is a registration rule, so, routing rule is kept at before the step of EIS, this method further comprises: the application system of log-on data sends to EIS and carries the data model sign, the registration condition of the application system of log-on data, and the register instruction of the application system self identification of log-on data, EIS identifies described data model, the registration condition of the application system of log-on data, and the corresponding relation of the sign of the application system of log-on data is recorded in the registration rule.
At second goal of the invention, the technical scheme that the present invention proposes is:
A kind of system that realizes the data route comprises source application system and purpose application system at least, and this system further comprises:
The integrated system EIS of enterprise is used to preserve routing rule; Reception is from the data passes order of source application system, if described data passes order is to carry the data that active application system need issue and the data issue an order of data model sign, described routing rule is a subscription rules, subscription rules is preserved the data model sign, the subscription condition of the application system of subscription data, and the sign of the application system of subscription data, so, after EIS reads the data that will issue, earlier according to the sign of the data model in described data issue an order query subscription rule, from subscription rules, determine the sign of the application system of the subscription data corresponding with the data model sign in the data issue an order, with the application system of the described subscription data determined as the purpose application system, and judge whether the data that read satisfy the subscription condition of described purpose application system, if satisfy, then these data be distributed to described purpose application system; If described data passes order is the data query order that carries the data model sign, described routing rule is a registration rule, registration rule is preserved the data model sign, the registration condition of the application system of log-on data, and the sign of the application system of log-on data, so, EIS is earlier according to the sign of the data model in data query order inquiry and registration rule, from registration rule, determine the sign of the application system of the log-on data corresponding with the data model sign in the data query order, as the purpose application system, described purpose application system is returned the data of the registration condition that satisfies described purpose application system to the source of data query application system when receiving the data query order with the application system of this log-on data of determining.
In the such scheme,, described EIS comprises:
Data-interface is used to transmit data passes order mutual between application system and data processing and the routing module;
Data processing and routing module are used to receive the data passes order from data-interface, determine the purpose application system according to routing rule, and give data-interface with the data passes command transfer.
In the such scheme,, described EIS further comprises:
The bus data storehouse is used to preserve routing rule;
Bus coordination service module is used for the data interaction relation between coordination data interface, bus data storehouse and the metadata cache;
Metadata cache is used for reading the routing rule in bus data storehouse, and offers data processing and route pattern.
In the such scheme,, described data-interface is API API.
In sum, the present invention proposes a kind of method and system of realizing the data route, because the associative operation unification of route is managed by EIS, application system only need be carried out and professional relevant logical operation, and need not to relate to route, the complexity of application system be can reduce significantly, the realization and the popularization of application system helped.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.
Basic thought of the present invention is: set in advance enterprise's integrated system (EIS) is set between source application system and purpose application system, be used to be responsible for specially the data route.When needs carried out data passes, the source application system only was responsible for service logic part, and need not to relate to route.
Fig. 1 is the present invention program's a flow chart.As shown in Figure 1, the present invention sets in advance the integrated system EIS of enterprise that is used for being responsible for the data route, and routing rule is kept among the EIS, and when carrying out data passes, this method may further comprise the steps:
Step 101: the source application system sends to EIS with the data passes order;
Step 102:EIS determines the purpose application system according to described routing rule;
Step 103:EIS sends to the purpose application system with the data passes order.
Among the present invention, described data passes order can be data issue an order, data query order or service message, but no matter be the data passes order of the sort of type, all by EIS is unified route is managed.
If the data passes order is the data issue an order, promptly the source application system is distributed to the purpose application system with data, and this needs purpose application system subscription data from EIS in advance, and the source application system only is distributed to the application system of subscribing to data.In order to write down the relevant information of subscription, a subscription rules can be set in advance, be used to preserve the sign of the application system of data model sign and subscription data, the method of subscription data is specially: application system sends the subscription instruction that carries data model sign and application system self identification to EIS, and EIS is recorded in the corresponding relation of described data model sign and application system sign in the subscription rules.
After this, when the application system distributing data of source, EIS determines that according to described routing rule the method for purpose application system is: EIS is earlier according to the sign of the data model in data issue an order query subscription rule, from subscription rules, determine to identify the sign of the application system of corresponding subscription data with data model, and with the application system of this subscription data as the purpose application system.
If the data passes order is the data query order, be the data that the source application system need be inquired about self from the purpose application system need, this needs purpose application system log-on data in EIS in advance, and the source application system is data query from the application system of registering only.In order to write down the relevant information of registration, a registration rule can be set in advance, described registration rule is used to preserve the sign of the application system of data model sign and log-on data, the method of log-on data is specially: application system sends the register instruction that carries data model sign and application system self identification to EIS, and EIS is recorded in the corresponding relation of described data model sign and application system sign in the registration rule.
After this, when the application system data query of source, described EIS determines that according to routing rule the method for purpose application system is: described EIS is earlier according to the sign of the data model in data query order inquiry and registration rule, from registration rule, determine to identify the sign of the application system of corresponding log-on data with data model, and with the application system of this log-on data as the purpose application system.
If data passes is a service message, promptly the source application system needs this service message is transferred to the purpose application system, and the route function of a definite application system sign can be set in EIS in advance.
When the application system transmission operation message of source, described EIS determines that the method for purpose application system is: described EIS with the routed keyword in the service message as parameter, call described route function, and obtaining the application system sign, again that the application system sign of obtaining is corresponding system is as the purpose application system.
The present invention program be described in detail below with embodiment in order to illustrate better.
Method embodiment one
In the present embodiment, comprise n application system in the network; Application system n has registered data in EIS, promptly registered certain data model; Suppose that this data model represents customer information, comprise essential informations such as name, address, phone number; Application system 1 and application system 2 are subscribed to this data model in EIS, the schematic diagram of subscription data as shown in Figure 2; The form of subscription rules is as shown in Table 1:
Table one
The method of application system 1 subscription data is: application system 1 sends to EIS and subscribes to instruction, described subscription instruction carries the sign 001 of data model sign User and application system 1 self, the sign 001 that EIS identifies data model User and application system 1 again is recorded in the subscription rules, promptly has corresponding relation between the User and 001.In the practical application, application system can also be carried the subscription condition, promptly only subscribes to the data that satisfy the subscription condition.Such as: the subscription condition of application system 1 is address=" Shanghai ", and after this, when application system n distributing data, just a customer information with address=" Shanghai " is distributed to application system 1.
Certainly, application system also can not carried the subscription condition, and so, all customer informations that application system n will produce all will send to application system 1.
Application system 2 also can be adopted the subscription customer information that uses the same method.
In addition, in the practical application, application system 1 can be subscribed to a plurality of different data models from other a plurality of different application systems, that is to say, may exist a plurality of different application systems simultaneously to application system 1 distributing data.In this case, can in EIS, a formation be set, be used to preserve the data that need send to application system 1 for application system 1.
Fig. 3 is the flow chart of present embodiment distributing data.In the present embodiment, when application system n has produced a collection of customer information, the method for issuing described customer information may further comprise the steps:
Step 301: application system n sends to EIS with the data issue an order, and described data issue an order carries data and the corresponding data model sign that application system n need issue.
Step 302:EIS reads data that need issue.
Step 203:EIS obtains subscription rules according to the data model sign corresponding with these data.
Step 304:EIS inquires about described subscription rules, determines the sign of application corresponding system from subscription rules, promptly determines the sign of application system 1 or application system 2.
If application system 1 and application system 2 have the subscription condition when subscribing to, so, in the query subscription process of rule, this step also needs further to comprise: EIS judges whether the data that read satisfy the subscription condition, if satisfy, then continues to carry out.
Step 305:EIS is medium to be released with the formation that reading of data is placed on definite application system.
In this step,, then need these data are placed on respectively in a plurality of application systems if there are a plurality of application systems to satisfy same subscription condition.After this, EIS sends to corresponding application system with the data in each formation respectively by the data issue an order.That is to say, if in the formation 1 that EIS is an application system 1 to be set up 5 data are arranged, in the formation 2 for application system 2 foundation 4 formations are arranged, so, the module of being responsible for data-driven among the EIS sends to application system 1 successively with 5 data in the formation 1, and 4 data in the formation 2 are sent to application system 2 successively.
Certainly, can not set up formation yet, and set up a unified formation, perhaps do not set up any formation, but the data that read are directly sent to the application corresponding system for each application system.So, in the practical application, whether need to set up formation for application system, perhaps set up several formations and can determine voluntarily by the user of application invention scheme, repeat no more herein.
Step 306:EIS judges whether to have read data all in the issue an order, finishes if read, and then withdraws from this flow process; Otherwise, return step 302.
Method embodiment two
In the present embodiment, comprise n application system in the network; Application system 1 and application system 2 have been registered certain data model in EIS, the schematic diagram of log-on data as shown in Figure 4; Similar to embodiment one, suppose that the data model of registration is a customer information, comprise essential informations such as name, address, phone number; EIS with the registration relevant information records in registration rule, the form of described registration rule as shown in Table 2:
Table two
The method of application system 1 log-on data is: application system 1 sends register instruction to EIS, described register instruction carries data model sign User and application system 1 self identification 001, the sign 001 that EIS identifies data model User and application system 1 again is recorded in the registration rule, promptly has corresponding relation between the User and 001.In the practical application, application system can also be carried registration condition, promptly only returns the data that satisfy registration condition to the application system of data query.Such as: the registration condition of application system 1 is phone number=" 138
*", after this, when certain application system during to application system 1 inquiring customer information, 1 application system to data query of application system is returned the customer information of phone number with " 138 " beginning.
Certainly, application system also can not carried registration condition, and so, application system 1 will be returned all customer informations to the application system of inquiring customer information.
Application system 2 also can be adopted the registered client's information that uses the same method.
In the present embodiment, a plurality of application systems can be registered identical data model in EIS.That is to say, when certain application system is inquired about these data, need send the data query order simultaneously to a plurality of application systems.In this case, can be used to preserve the data query order that need send to application system for each application system of registering is provided with a formation in EIS.
Fig. 5 is the flow chart of present embodiment data query.As shown in Figure 4, when application system n inquiring customer information, the method for data query may further comprise the steps:
Step 501: application system n sends the data query order to EIS, and described data query order carries data model sign User.
Step 502:EIS is according to the sign of the data model in data query order User inquiry and registration rule, from registration rule, determine the sign of the application system corresponding with data model sign User, promptly determine the sign 001 of application system 1, and the sign 002 of application system 2.
Step 503:EIS is placed on the data query order in application system 1 corresponding queues 1, simultaneously, querying command is placed in application system 2 corresponding queues 2.
Step 504:EIS sends to application system 1 with the data query order in the formation 1, and the data query order in the formation 2 is sent to application system 2.
After this, when application system 1 receives the data query order, will return the customer information that phone number is 138 beginnings to application system n; When application system 2 receives the data query order, will return the customer information that phone number is 139 beginnings to application system n.
Method embodiment three
In the present embodiment, comprise n application system in the network; Application system 1 need be to application system 2 certain service message of transmission, this service message comprises: the keyword key value of source application system sign, message id, News Category (synchronous/asynchronous), purpose application system sign, routing tag, message, message contents etc., its message format is shown in Figure 6.Wherein, News Category represents whether message needs to reply, and replys if desired, then is wheel synchronization type, otherwise, then be asynchronous type; Routing tag is represented the type of the route that current message need be used, and EIS determines the type of route earlier, calls the route function in the route-type again; Keyword key is the route function parameters, such as being phone number etc.Certainly, in the practical application, service message also can not be above-mentioned form, can be determined voluntarily by the user.Such as: if having only a kind of type of route, then need not routing tag.
For with the prior art compatibility, comprised one of purpose application system sign in the described message of present embodiment.If message comprises purpose application system sign, just need not EIS and determine the purpose application identities, directly the message transmission is got final product; If one of purpose application system sign is empty, then can utilize the method in the present embodiment to have EIS to determine, send to the purpose application system again.
In the present embodiment, suppose that the keyword key value in the message is phone number " 13823387096 "; The routing tag name is called " RouteLabel ", is worth to be " CBP ", and setting in advance be used to corresponding with routing tag, to handle the class of route be CBPRoute, and the route function in the CBPRoute class is " analyseRoute ().Here, described routing tag and the corresponding relation of handling between the class of route can be kept in the database of EIS in advance, its form as shown in Table 3:
Field name |
Type |
Whether allow for sky |
Explanation |
Label (
*Label)
|
Varchar (64) |
Do not allow |
Routing tag |
Class name (ClassName) |
Varchar (64) |
Do not allow |
The class corresponding with routing tag |
Table three
Fig. 7 is the flow chart of the method for present embodiment transmission operation message.As shown in Figure 7, present embodiment may further comprise the steps:
Step 701: application system 1 sends service message to EIS.
The described service message of this step comprises: source application system sign 001, message id, News Category, the value CBP of routing tag RouteLabel, the keyword key value " 13823387096 " and the message content of message.
Step 702:EIS determines one of purpose application system sign according to the service message that receives and is sky.
In the practical application,, just can omit this step if do not comprise this in the service message form.
Step 703:EIS determines the class of corresponding processing route according to routing tag.
In this step, EIS is according to the corresponding relation between the class of routing tag in the table three and processing route, and the class of determining the processing route corresponding with routing tag CBP is CBPRoute.
Step 704:EIS again with the keyword in the message as parameter, call the route function in the class of handling route, obtain the sign of purpose application system.
In this step, EIS as parameter, calls the route function analyseRoute in the CBPRoute class with " 13823387096 ", promptly carries out CBPRoute.analyseRoute (13823387096).
Here, the present invention emphasizes is to utilize the route function to obtain the sign of purpose application system, then can determine voluntarily by being used for as for route function self.Such as: the false code of route function can for
The false code of route function can also for:
It is medium to be sent that step 705:EIS is placed on definite pairing formation of purpose application system with service message.
If EIS is not provided with formation, just service message can be sent to the purpose application system, promptly can omit this step.
Step 706:EIS sends to the purpose application system with the service message in the formation.
Use the present invention program, when needs carried out data passes, the source application system only need be carried out and professional relevant logical operation, and need not to relate to route, and all operations relevant with route are all by the EIS unified management.Like this, the complexity of application system be can reduce significantly, the realization and the popularization of application system helped.
At the method that realizes the data route, the present invention also proposes a kind of system that realizes the data route.
Fig. 8 is a basic structure schematic diagram of realizing the system of data route among the present invention.As shown in Figure 8, this system comprises source application system 801, purpose application system 802, EIS803 at least, described EIS803 is used to receive the data passes order from source application system 801, determine purpose application system 802 according to routing rule, and the data passes order is sent to purpose application system 802.
The inside of EIS803 comprises:
Data-interface 8031 is used to transmit mutual data passes order between application system and data processing and the routing module 8032;
Data processing and routing module 8032 are used to receive the data passes order from data-interface 8031, determine the purpose application system according to routing rule, and give data-interface 8031 with the data passes command transfer.
Fig. 9 is a preferred embodiment that comprises above-mentioned module, and as shown in Figure 9, except the module identical with Fig. 8, EIS803 also comprises:
Bus data storehouse 8033 is used to preserve routing rule;
Bus coordination service module 8034 is used for the data interaction relation between coordination data interface 8031, bus data storehouse 8033 and the metadata cache 8035;
Metadata cache 8035 is used for reading the routing rule in bus data storehouse 8033, and offers data processing and route pattern 8032.
When needs carried out data passes, source application system 801 sent to data-interface 8031 among the EIS803 with the data passes order; Data-interface 8031 is transmitted to data processing and routing module 8032 with the data passes order; Bus data storehouse 8033 will be preserved routing rule in advance and will be kept in the metadata cache 8035 by bus coordination service module 8034; Data processing and routing module 8032 extract routing rule from metadata cache 8035, and determine the purpose application system according to routing rule, then the data passes order are sent to purpose application system 802 by data-interface 8031.
Certainly, in the practical application, do not have the number of strict regulations application system in the network, and which application system is the source application system, which system is the purpose application system, as long as the order of initiation data passes is exactly the source application system, what receive the data passes order then is the purpose application system.
In addition, the data-interface in the present embodiment 7031 can be API (API).
In sum, more than be preferred embodiment of the present invention only, be not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.