CN108055312A - Method for routing and its device and computer installation and its readable storage medium storing program for executing - Google Patents

Method for routing and its device and computer installation and its readable storage medium storing program for executing Download PDF

Info

Publication number
CN108055312A
CN108055312A CN201711288135.2A CN201711288135A CN108055312A CN 108055312 A CN108055312 A CN 108055312A CN 201711288135 A CN201711288135 A CN 201711288135A CN 108055312 A CN108055312 A CN 108055312A
Authority
CN
China
Prior art keywords
routing
service request
routing policy
sent
mark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711288135.2A
Other languages
Chinese (zh)
Other versions
CN108055312B (en
Inventor
王加位
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHANJET INFORMATION TECHNOLOGY Co Ltd
Original Assignee
CHANJET INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CHANJET INFORMATION TECHNOLOGY Co Ltd filed Critical CHANJET INFORMATION TECHNOLOGY Co Ltd
Priority to CN201711288135.2A priority Critical patent/CN108055312B/en
Publication of CN108055312A publication Critical patent/CN108055312A/en
Application granted granted Critical
Publication of CN108055312B publication Critical patent/CN108055312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The present invention proposes a kind of method for routing, route device, computer installation and computer readable storage medium, wherein, method for routing is applied to multi-tenant system, including:Receive the service request that client is sent;Judge whether identified in service request comprising routing policy;When judging result is no, service request is sent to any service node, and routing policy mark is distributed for any server node, routing policy mark is sent to client;When judging result is to be, service request is sent to and the corresponding any service node of Route Distinguisher according to Route Distinguisher.Method for routing proposed by the present invention, when receiving the service request that client is sent, whether judge includes routing policy in service request identifies, and then during routing is realized, it only need to be by calling routing policy mark that can realize on-demand routing on demand, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.

Description

Method for routing and its device and computer installation and its readable storage medium storing program for executing
Technical field
The present invention relates to soft route technology field, in particular to a kind of method for routing, a kind of route device, one kind Computer installation and a kind of computer readable storage medium.
Background technology
At present, although there are many soft route implementing schemes, it is substantially in windows, Linux/bsd stage+module one Then corresponding request is routed to different servers by a software, the request that this software supervision receives, present is very much Or route implementation method is that routing policy is configured in Routing Software, cannot flexibly define;By the URL for changing request It realizes and is forwarded by URL request, and the URL by changing request seriously affects user experience, it is unfriendly to user.
Also, in many cases, because business needs, it would be desirable to adjust routing policy, and mesh according to service application Preceding solution is modification configuration file, time-consuming and laborious.
Also some cases are, it is necessary to A/B tests or the operating condition according to system, the service condition of user and user's purchase The request of user is routed on different servers by the service bought.Present solution is according to the source IP of user point Stream, such case is very common on application on site, and O&M technical staff is required for adjust routing policy every time, time-consuming and laborious, High labor cost.
The content of the invention
It is contemplated that at least solve one of technical problem in the prior art.
For this purpose, embodiment, the present invention propose a kind of method for routing of simple and flexible according to the first aspect of the invention.
Embodiment according to the second aspect of the invention, the present invention propose a kind of route device of simple and flexible.
Embodiment according to the third aspect of the invention we, the present invention propose a kind of computer installation.
Embodiment according to the fourth aspect of the invention, the present invention propose a kind of computer readable storage medium.
In view of this, embodiment, the present invention propose a kind of method for routing according to a first aspect of the present invention, are rented applied to more Family system, including:Receive the service request that client is sent;Judge whether identified in service request comprising routing policy;When sentencing When disconnected result is no, service request is sent to any service node, and routing policy mark is distributed for any server node, Routing policy mark is sent to client;When judging result when being, to be sent to service request and road according to Route Distinguisher By identifying corresponding any service node.
Method for routing proposed by the present invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is sent to unallocated routing Any server node of strategy mark, meanwhile, routing policy mark is distributed for the server node, and by the routing policy mark Knowledge is sent to client, so that the service request sent after the user carries routing policy mark, when in service request When being identified containing routing policy, directly service request is sent to and identifies corresponding clothes with the routing policy carried in service request Business device node, and then during routing is realized, it only need to be by calling routing policy mark that can realize road on demand on demand By, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
In addition, the method for routing in above-described embodiment provided by the invention can also have following additional technical feature:
In the above-mentioned technical solutions, it is preferable that further include:The database instance that inquiry matches with routing policy mark, Establish the session of database instance and service request.
In the technical scheme, after service request is sent to any server node, inquiry is taken with service request The routing policy of band identifies corresponding database instance, so as to establish the session of service request and database instance, completes road By program, it is achieved thereby that the one-to-one matching of database instance and service request, realizes and sends different user to database Service request, be routed to different database instances.
In any of the above-described technical solution, it is preferable that and routing policy mark is distributed for any server node, it will route Strategy mark is sent to client, specifically includes:Parse service request;Extract the specific information in analysis result;According to specific Information query routing strategy in policy library identifies;Routing policy mark is sent to any server node and client.
In the technical scheme, when receiving the service request that user sends, service request is parsed, extracts industry Specific information in business request, further according to specific information, query routing strategy identifies in policy library, finally by routing policy mark Knowledge is sent to any server node and client, realizes any server node and the one-to-one matching of active user, and then It when updating routing policy, need to only be identified by adjusting the routing policy in routing policy storehouse, realize flexibly routing.
In any of the above-described technical solution, it is preferable that the step for the database instance that inquiry matches with routing policy mark Suddenly, specifically include:Database instance is associated with specific information;Specific letter is inquired about in routing storehouse according to routing policy mark Breath;Further according to specific information, corresponding database instance is inquired about.
In the technical scheme, the specific information during disparate databases example is asked with different business associates, Jin Ergen It is identified according to the routing policy inquired in service request, inquires corresponding database instance, and then realize different user Service request and the one-to-one corresponding of disparate databases example.
In any of the above-described technical solution, it is preferable that specific information is user information or set of books information.
In technical solution, by establishing mapping relations between set of books information or user information and database instance, realize The service request that different user is sent is sent in different database instances.
Embodiment according to the second aspect of the invention, the present invention propose a kind of route device, including:Receiving unit connects Receive the service request that client is sent;Judging unit judges whether identified in service request comprising routing policy;First performs list Service request when judging result is no, is sent to any service node, and is any server node distribution routing plan by member It slightly identifies, routing policy mark is sent to client;When judging result is to be, service request is sent according to Route Distinguisher To with the corresponding any service node of Route Distinguisher.
Route device proposed by the present invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is sent to unallocated routing Any server node of strategy mark, meanwhile, routing policy mark is distributed for the server node, and by the routing policy mark Knowledge is sent to client, so that the service request sent after the user carries routing policy mark, when in service request When being identified containing routing policy, directly service request is sent to and identifies corresponding clothes with the routing policy carried in service request Business device node, and then during routing is realized, it only need to be by calling routing policy mark that can realize road on demand on demand By, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
In the above-mentioned technical solutions, it is preferable that further include:First query unit, inquiry match with routing policy mark Database instance;Conversation element is established, establishes the session of database instance and service request.
In the technical scheme, after service request is sent to any server node, inquiry is taken with service request The routing policy of band identifies corresponding database instance, so as to establish the session of service request and database instance, completes road By program, it is achieved thereby that the one-to-one matching of database instance and service request, realizes and sends different user to database Service request, be routed to different database instances.
In any of the above-described technical solution, it is preferable that the first execution unit includes:Resolution unit, parsing the business please It asks;Extraction unit extracts the specific information in analysis result;Second query unit is inquired about according to specific information in policy library Routing policy identifies;Routing policy mark is sent to any server node and client by the second execution unit.
In the technical scheme, when receiving the service request that user sends, service request is parsed, extracts industry Specific information in business request, further according to specific information, query routing strategy identifies in policy library, finally by routing policy mark Knowledge is sent to any server node and client, realizes any server node and the one-to-one matching of active user, and then It when updating routing policy, need to only be identified by adjusting the routing policy in routing policy storehouse, realize flexibly routing.
In any of the above-described technical solution, it is preferable that the first execution unit further includes:Associative cell, by database instance It is associated with specific information;First query unit specifically includes:3rd query unit, according to routing policy mark in routing storehouse Queries for specific information;4th query unit according to specific information, inquires about corresponding database instance.
In the technical scheme, the specific information during disparate databases example is asked with different business associates, Jin Ergen It is identified according to the routing policy inquired in service request, inquires corresponding database instance, and then realize different user Service request and the one-to-one corresponding of disparate databases example.
In any of the above-described technical solution, it is preferable that specific information is user information or set of books information.
In technical solution, by establishing mapping relations between set of books information or user information and database instance, realize The service request that different user is sent is sent in different database instances.
Embodiment according to a third aspect of the present invention, the present invention propose a kind of computer installation, and computer installation includes place Device is managed, the road as any one of above-mentioned technical proposal is realized when processor is for performing the computer program stored in memory The step of by method.
Computer installation proposed by the present invention, because including for performing when realize as any one of above-mentioned technical proposal Therefore the computer program of the step of method for routing, has the whole of the method for routing as any one of above-mentioned technical proposal Advantageous effect, no longer state one by one herein.
Embodiment according to a fourth aspect of the present invention, the present invention propose a kind of computer readable storage medium, store thereon There is computer program, realized when computer program is executed by processor such as method for routing any one of above-mentioned technical proposal Step.
Computer readable storage medium proposed by the present invention, because being realized for storing to perform as any in above-mentioned technical proposal Therefore the computer program of the step of item method for routing, has the method for routing as any one of above-mentioned technical proposal Whole advantageous effects, no longer state one by one herein.
The additional aspect and advantage of the present invention will become practice apparent or by the present invention in following description section Recognize.
Description of the drawings
The above-mentioned and/or additional aspect and advantage of the present invention will become in the description from combination accompanying drawings below to embodiment Substantially and it is readily appreciated that, wherein:
Fig. 1 shows the flow chart for the method for routing that one first aspect embodiment of the present invention provides;
Fig. 2 shows the flow chart for the method for routing that another first aspect embodiment of the invention provides;
Fig. 3 shows the flow chart for the method for routing that another first aspect embodiment of the invention provides;
Fig. 4 shows the flow chart for the method for routing that another first aspect embodiment of the invention provides;
Fig. 5 shows the schematic block diagram for the route device that one second aspect embodiment of the present invention provides;
Fig. 6 shows the schematic block diagram for the route device that another second aspect embodiment of the invention provides;
Fig. 7 shows the schematic block diagram for the route device that another second aspect embodiment of the invention provides;
Fig. 8 shows the schematic block diagram for the route device that another second aspect embodiment of the invention provides;
Fig. 9 shows that method for routing provided by one embodiment of the present invention applies the middle model schematic in system;
Figure 10 shows that method for routing provided by one embodiment of the present invention performs the schematic diagram of service request;
Figure 11 shows that the association of set of books information and database instance in method for routing provided by one embodiment of the present invention is closed The schematic diagram of system.
Specific embodiment
It is to better understand the objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and specific real Mode is applied the present invention is further described in detail.It should be noted that in the case where there is no conflict, the implementation of the application Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also To be implemented using other different from other modes described here, therefore, protection scope of the present invention and from described below Specific embodiment limitation.
Method for routing provided by the invention provides a kind of general treatment mechanism, applied to multi-tenant system (such as SAAS moulds Formula ERP), it can solve to realize the demand of routing by business scenario, also, during user's use, can realize in user Routing forwarding is carried out in the case of not perceiving.
Fig. 1 shows the flow chart for the method for routing that one first aspect embodiment of the present invention provides.
As shown in Figure 1, the flow for the method for routing that one first aspect embodiment of the present invention provides, specifically includes:
Step 102, the service request that client is sent is received;
Step 104, judge whether identified in service request comprising routing policy;Wherein, performed when judging result is no Step 106, it is execution step 108 when being when judging result;
Step 106, service request is sent to any service node, and routing policy mark is distributed for any server node Know, routing policy mark is sent to client;
Step 108, service request is sent to and the corresponding any service node of Route Distinguisher according to Route Distinguisher.
Method for routing provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is sent to unallocated routing Any server node of strategy mark, meanwhile, routing policy mark is distributed for the server node, and by the routing policy mark Knowledge is sent to client, so that the service request sent after the user carries routing policy mark, when in service request When being identified containing routing policy, directly service request is sent to and identifies corresponding clothes with the routing policy carried in service request Business device node, and then during routing is realized, it only need to be by calling routing policy mark that can realize road on demand on demand By, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
Fig. 2 shows the flow chart for the method for routing that another first aspect embodiment of the invention provides.
As shown in Fig. 2, the flow for the method for routing that another first aspect embodiment of the invention provides, specifically includes:
Step 202, the service request that client is sent is received;
Step 204, judge whether identified in service request comprising routing policy;Wherein, performed when judging result is no Step 206, it is execution step 208 when being when judging result;
Step 206, service request is sent to any service node, and routing policy mark is distributed for any server node Know, routing policy mark is sent to client;
Step 208, service request is sent to and the corresponding any service node of Route Distinguisher according to Route Distinguisher;
Step 210, the database instance that inquiry matches with routing policy mark, establishes database instance and service request Session.
Method for routing provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is sent to unallocated routing Any server node of strategy mark, meanwhile, routing policy mark is distributed for the server node, and by the routing policy mark Knowledge is sent to client, so that the service request sent after the user carries routing policy mark, when in service request When being identified containing routing policy, directly service request is sent to and identifies corresponding clothes with the routing policy carried in service request Business device node, after service request is sent to any server node, inquiry and the routing policy mark entrained by service request Sensible corresponding database instance so as to establish the session of service request and database instance, completes routing program, so as to fulfill The one-to-one matching of database instance and service request, realizes the service request for sending different user to database, route It, only need to be by calling routing policy mark can be real on demand to different database instances, and during routing is realized Existing on-demand routing, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
Fig. 3 shows the flow chart for the method for routing that another first aspect embodiment of the invention provides.
As shown in figure 3, the flow for the method for routing that another first aspect embodiment of the invention provides, specifically includes:
Step 302, the service request that client is sent is received;
Step 304, judge whether identified in service request comprising routing policy;Wherein, performed when judging result is no Step 306, it is execution step 314 when being when judging result;
Step 306, service request is parsed;
Step 308, the specific information in analysis result is extracted;
Step 310, according to specific information, query routing strategy identifies in policy library;
Step 312, routing policy mark is sent to any server node and client;
Step 314, service request is sent to and the corresponding any service node of Route Distinguisher according to Route Distinguisher;
Step 316, the database instance that inquiry matches with routing policy mark, establishes database instance and service request Session.
Method for routing provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is parsed, extracts business Specific information in request, further according to specific information, query routing strategy identifies in policy library, finally identifies routing policy Any server node and client are sent to, realizes any server node and the one-to-one matching of active user, Jin Er It when updating routing policy, need to only be identified by adjusting the routing policy in routing policy storehouse, realize flexibly routing;Work as business When in request containing routing policy mark, directly service request is sent to and is identified relatively with the routing policy carried in service request The server node answered, after service request is sent to any server node, inquiry and the routing entrained by service request Strategy identifies corresponding database instance, so as to establish the session of service request and database instance, completes routing program, from And the one-to-one matching of database instance and service request is realized, realize that the business for sending different user to database please It asks, is routed to different database instances, and during routing is realized, it only need to be by calling routing policy mark on demand just It can realize on-demand routing, and then improve the flexibility of routing mode, reliability, security, also, be easily modified routing plan Slightly.
Fig. 4 shows the flow chart for the method for routing that another first aspect embodiment of the invention provides.
As shown in figure 4, the flow for the method for routing that another first aspect embodiment of the invention provides, specifically includes:
Step 402, the service request that client is sent is received;
Step 404, judge whether identified in service request comprising routing policy;Wherein, performed when judging result is no Step 406, it is execution step 416 when being when judging result;
Step 406, service request is parsed;
Step 408, the specific information in analysis result is extracted;
Step 410, according to specific information, query routing strategy identifies in policy library;
Step 412, routing policy mark is sent to any server node and client;
Step 414, it is database instance is associated with user information or set of books information
Step 416, service request is sent to and the corresponding any service node of Route Distinguisher according to Route Distinguisher;
Step 418, searching user's information or set of books information in routing storehouse are identified according to routing policy;
Step 420, according to user information or set of books information, corresponding database instance is inquired about.
Method for routing provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is parsed, extracts business User information or set of books information in request, further according to user information or set of books information in policy library query routing strategy mark Know, finally by routing policy mark be sent to any server node and client, meanwhile, by disparate databases example from it is different User information or set of books information association in service request realize any server node and the one-to-one matching of active user, It and then when updating routing policy, need to only be identified by adjusting the routing policy in routing policy storehouse, realize flexibly routing; When containing routing policy mark in service request, service request is directly sent to the routing policy mark with being carried in service request Sensible corresponding server node, after service request is sent to any server node, is looked into further according in service request The routing policy mark ask, inquires corresponding database instance, and then realizes the service request of different user and different numbers According to the one-to-one corresponding of storehouse example, so as to establish the session of service request and database instance, routing program is completed, it is achieved thereby that The one-to-one matching of database instance and service request, realizes the service request for sending different user to database, is routed to Different database instances, and during routing is realized, it only need to be by calling routing policy mark that can realize on demand On-demand routing, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
Fig. 5 shows the schematic block diagram for the route device that one second aspect embodiment of the present invention provides.
As shown in figure 5, the route device 500 that one second aspect embodiment of the present invention provides includes:
Receiving unit 502 receives the service request that client is sent;Judging unit 504 judges whether wrapped in service request It is identified containing routing policy;Service request when judging result is no, is sent to any service node by the first execution unit 506, And routing policy mark is distributed for any server node, routing policy mark is sent to client;When judging result is yes When, service request is sent to and the corresponding any service node of Route Distinguisher according to Route Distinguisher.
Route device provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is sent to unallocated routing Any server node of strategy mark, meanwhile, routing policy mark is distributed for the server node, and by the routing policy mark Knowledge is sent to client, so that the service request sent after the user carries routing policy mark, when in service request When being identified containing routing policy, directly service request is sent to and identifies corresponding clothes with the routing policy carried in service request Business device node, and then during routing is realized, it only need to be by calling routing policy mark that can realize road on demand on demand By, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
Fig. 6 shows the schematic block diagram for the route device that another second aspect embodiment of the invention provides.
As shown in fig. 6, the route device 600 that another second aspect embodiment of the invention provides includes:
Receiving unit 602 receives the service request that client is sent;Judging unit 604 judges whether wrapped in service request It is identified containing routing policy;Service request when judging result is no, is sent to any service node by the first execution unit 606, And routing policy mark is distributed for any server node, routing policy mark is sent to client;When judging result is yes When, service request is sent to and the corresponding any service node of Route Distinguisher, the first query unit according to Route Distinguisher 608, the database instance that inquiry matches with routing policy mark;Conversation element 610 is established, establishes database instance and business The session of request.
Route device provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is sent to unallocated routing Any server node of strategy mark, meanwhile, routing policy mark is distributed for the server node, and by the routing policy mark Knowledge is sent to client, so that the service request sent after the user carries routing policy mark, when in service request When being identified containing routing policy, directly service request is sent to and identifies corresponding clothes with the routing policy carried in service request Business device node, after service request is sent to any server node, inquiry and the routing policy mark entrained by service request Sensible corresponding database instance so as to establish the session of service request and database instance, completes routing program, so as to fulfill The one-to-one matching of database instance and service request, realizes the service request for sending different user to database, route It, only need to be by calling routing policy mark can be real on demand to different database instances, and during routing is realized Existing on-demand routing, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
Fig. 7 shows the schematic block diagram for the route device that another second aspect embodiment of the invention provides.
As shown in fig. 7, the route device 700 that another second aspect embodiment of the invention provides includes:
Receiving unit 702 receives the service request that client is sent;Judging unit 704 judges whether wrapped in service request It is identified containing routing policy;First execution unit 706 includes:Resolution unit 7062 when judging result is no, parses the business Request;Extraction unit 7064 extracts the specific information in analysis result;Second query unit 7066, according to specific information in plan Slightly query routing strategy identifies in storehouse;Second execution unit 7068, by routing policy mark be sent to any server node with Client;When judging result is to be, service request is sent to and the corresponding any clothes of Route Distinguisher according to Route Distinguisher Business node, the first query unit 708, the database instance that inquiry matches with routing policy mark;Conversation element 710 is established, Establish the session of database instance and service request.
Route device provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is parsed, extracts business Specific information in request, further according to specific information, query routing strategy identifies in policy library, finally identifies routing policy Any server node and client are sent to, realizes any server node and the one-to-one matching of active user, Jin Er It when updating routing policy, need to only be identified by adjusting the routing policy in routing policy storehouse, realize flexibly routing;Work as business When in request containing routing policy mark, directly service request is sent to and is identified relatively with the routing policy carried in service request The server node answered, after service request is sent to any server node, inquiry and the routing entrained by service request Strategy identifies corresponding database instance, so as to establish the session of service request and database instance, completes routing program, from And the one-to-one matching of database instance and service request is realized, realize that the business for sending different user to database please It asks, is routed to different database instances, and during routing is realized, it only need to be by calling routing policy mark on demand just It can realize on-demand routing, and then improve the flexibility of routing mode, reliability, security, also, be easily modified routing plan Slightly.
Fig. 8 shows the schematic block diagram for the route device that another second aspect embodiment of the invention provides.
As shown in figure 8, the route device 800 that another second aspect embodiment of the invention provides includes:
Receiving unit 802 receives the service request that client is sent;Judging unit 804 judges whether wrapped in service request It is identified containing routing policy;First execution unit 806 includes:Resolution unit 8062 when judging result is no, parses the business Request;Extraction unit 8064 extracts the specific information in analysis result;Second query unit 8066, according to specific information in plan Slightly query routing strategy identifies in storehouse;Second execution unit 8068, by routing policy mark be sent to any server node with Client;Associative cell 8070, database instance is associated with specific information;When judging result is to be, marked according to routing Service request is sent to and the corresponding any service node of Route Distinguisher by knowledge;First query unit 808 includes:3rd inquiry Unit 8082 is routeing queries for specific information in storehouse according to routing policy mark;4th query unit 8084, according to specific letter Breath, inquires about corresponding database instance;Conversation element 810 is established, establishes the session of database instance and service request.
Route device provided by the invention, when receiving the service request that client is sent, judge be in service request It is no to be identified including routing policy, when being free of routing policy mark in service request, service request is parsed, extracts business User information or set of books information in request, further according to user information or set of books information in policy library query routing strategy mark Know, finally by routing policy mark be sent to any server node and client, meanwhile, by disparate databases example from it is different User information or set of books information association in service request realize any server node and the one-to-one matching of active user, It and then when updating routing policy, need to only be identified by adjusting the routing policy in routing policy storehouse, realize flexibly routing; When containing routing policy mark in service request, service request is directly sent to the routing policy mark with being carried in service request Sensible corresponding server node, after service request is sent to any server node, is looked into further according in service request The routing policy mark ask, inquires corresponding database instance, and then realizes the service request of different user and different numbers According to the one-to-one corresponding of storehouse example, so as to establish the session of service request and database instance, routing program is completed, it is achieved thereby that The one-to-one matching of database instance and service request, realizes the service request for sending different user to database, is routed to Different database instances, and during routing is realized, it only need to be by calling routing policy mark that can realize on demand On-demand routing, and then the flexibility of routing mode, reliability, security are improved, also, it is easily modified routing policy.
As shown in figure 9, the model of present invention application in systems, routing, service application system are asked including client, user System, database routing component and data-storage system;Corresponding soft route device, which includes user, asks route system and database Routing component two parts.
As shown in Figure 10, user after the service request of client reaches forwarding module, forwards mould in login system Block judges current service request, judges whether current service request has routing policy mark, if without routing policy The service request, then is directly forwarded to the server node for providing route service by mark, the application on routing server node Program finds corresponding set of books library name according to current user information from routing policy storehouse, is found pair further according to set of books library name The routing policy answered identifies and returns to client;According to business needs, routing policy can also be set as needed for user.
After client receives routing policy mark, by the routing policy identification record in client;User is subsequent In service request, the value of client is attached in the data packet of service request, the routing of forwarding module in data packet Service request login is forwarded to corresponding application system node by strategy mark;During service operation, by adjusting on demand The routing policy mark routeing in whole policy library can realize on-demand routing.
In a particular embodiment, client can be the smart machines such as browser, mobile phone, pad or forms journey Sequence;If browser, by routing according to routing policy mark write-in Cookie, setting browser allows cookie, subsequent Above-mentioned Cookie values can be all added in the HEAD parts of Http requests by request;If the APP applications of mobile terminal, in user the It records routing policy when once logging in identify, in the subsequent request sent in APP, which is added to HTTP request by program HEAD parts;If other types of client, can identify the routing policy increases in the database bag of request, Forwarding module parses routing policy mark from the data packet received, and route distribution is realized by above-mentioned method.
In a particular embodiment, route service includes two parts:Ask route service and database routing component.
Route service provides routing policy mark, in different application systems, can there is different design methods. In ERP system, by set of books routing policy can be set to identify, user logs in different sets of books, and route service returns to different roads It is identified by strategy;According to the needs of system, we can also be by user setting routing policy mark etc..Database routing component root The different system and same user that the system logged according to different user and same user log in need the data accessed, will apply Server is routed to database different on different database instances to the access of database server.
In a particular embodiment, the process flow of service request:For the service request received, repeater system first judges Whether current service request has routing policy mark, if there is routing policy mark then forwards requests to road according to forwarding rule By server node, service request is transmitted to routing policy service, routing policy service if no routing policy identifies According to current user information by routing policy algorithms, obtain routing policy and identify and return to client.
In a particular embodiment, routing policy algorithms are:After routing policy service module is connected to service request, parsing receives Service request, extraction user information, user's set of books information to be accessed, then inquired about further according to these information from policy library Routing policy identifies, and by this routing policy mark back to client, is used for next service request.
In a particular embodiment, the execution flow of database routing component is that caller sends acquisition database session Request after, routing component first according to currently incoming parameter from routing library inquiry set of books information, then route library inquiry set of books pass The database instance information of connection regenerates database access session, which is returned client.As shown in figure 11, phase That answers is designed as, and corresponding incidence relation is established between set of books information and database instance, and each set of books corresponds to a data Storehouse example.
Wherein, routing policy can on demand define in storage system (such as database), flexibly simple;Applied business is asked The combination of forwarding module and self-defined route service, the method for realizing personalized routing, by adjusting the road in routing policy storehouse Flexibly routing is realized by strategy mark, also, the present invention is used by establishing mapping relations between set of books storehouse and database instance Mapping relations are established between family and set of books storehouse, when realizing that the user of different enterprises accesses system, the request of database is routed to Different database instances.
Embodiment according to a third aspect of the present invention, the present invention provides a kind of computer installation, computer installation includes place Device is managed, processor realizes the routing side provided such as above-mentioned any embodiment when being used to perform the computer program stored in memory The step of method.
Computer installation proposed by the present invention, because including for performing when realize as above-mentioned any embodiment provide routing Therefore the computer program of the step of method, has whole beneficial effects of the method for routing provided such as above-mentioned any embodiment Fruit is no longer stated one by one herein.
Embodiment according to a fourth aspect of the present invention, the present invention propose a kind of computer readable storage medium, store thereon There is computer program, the step of the method for routing provided such as above-mentioned any embodiment is provided when computer program is executed by processor Suddenly.
Computer readable storage medium proposed by the present invention, because realizing that above-mentioned any embodiment such as provides for storing to perform Method for routing the step of computer program, therefore, have as above-mentioned any embodiment provide method for routing whole Advantageous effect is no longer stated one by one herein.
In conclusion method for routing provided by the invention, route device, computer installation and computer-readable storage medium Matter, when receiving the service request that client is sent, whether judge includes routing policy in service request identifies, when business please When in asking without routing policy mark, service request is sent to any server node of unallocated routing policy mark, together When, for the server node distribute routing policy mark, and by the routing policy mark be sent to client, so as to the user with The service request sent afterwards carries routing policy mark, when containing routing policy mark in service request, directly by business Request, which is sent to, identifies corresponding server node with the routing policy carried in service request, and then in the mistake for realizing routing Cheng Zhong, only need to be by calling routing policy mark that can realize on-demand routing on demand, and then improves the flexible of routing mode Property, reliability, security, also, it is easily modified routing policy.
In the present invention, the terms such as term " installation ", " connected ", " connection ", " fixation " should all be interpreted broadly, for example, " connection " can be fixedly connected or be detachably connected or be integrally connected;" connected " can be directly connected, It can be indirectly connected by intermediary.For the ordinary skill in the art, on can understanding as the case may be State the concrete meaning of term in the present invention.
In the description of this specification, the description of term " one embodiment ", " some embodiments ", " specific embodiment " etc. Mean to combine at least one reality that the particular features, structures, materials, or characteristics that the embodiment or example describe are contained in the present invention It applies in example or example.In the present specification, schematic expression of the above terms is not necessarily referring to identical embodiment or reality Example.Moreover, description particular features, structures, materials, or characteristics can in any one or more embodiments or example with Suitable mode combines.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.

Claims (12)

1. a kind of method for routing, applied to multi-tenant system, which is characterized in that including:
Receive the service request that client is sent;
Judge whether identified in the service request comprising routing policy;
When judging result is no, the service request is sent to any service node, and is any server node Routing policy mark is distributed, routing policy mark is sent to the client;
When judging result when being, to be sent to the service request according to the Route Distinguisher corresponding with the Route Distinguisher Any service node.
2. method for routing according to claim 1, which is characterized in that further include:
The database instance that inquiry matches with routing policy mark, establishes the database instance and the service request Session.
3. method for routing according to claim 1, which is characterized in that it is described and for any server node distribute road The step of being identified by strategy, routing policy mark is sent to the client, specifically includes:
Parse the service request;
Extract the specific information in the analysis result;
The routing policy mark is inquired about in policy library according to the specific information;
Routing policy mark is sent to any server node and the client.
4. method for routing according to claim 3, which is characterized in that the inquiry matches with routing policy mark Database instance the step of, specifically include:
The database instance is associated with the specific information;
The specific information is inquired about in routing storehouse according to routing policy mark;
Further according to the specific information, the corresponding database instance is inquired about.
5. the method for routing according to claim 3 or 4, which is characterized in that the specific information is user information or set of books Information.
6. a kind of route device, which is characterized in that including:
Receiving unit receives the service request that client is sent;
Judging unit judges whether identified in the service request comprising routing policy;
The service request when judging result is no, is sent to any service node, and appointed to be described by the first execution unit One server node distribution routing policy mark, the client is sent to by routing policy mark;
When judging result when being, to be sent to the service request according to the Route Distinguisher corresponding with the Route Distinguisher Any service node.
7. route device according to claim 6, which is characterized in that further include:
First query unit, the database instance that inquiry matches with routing policy mark;
Conversation element is established, establishes the session of the database instance and the service request.
8. route device according to claim 6, which is characterized in that first execution unit includes:
Resolution unit parses the service request;
Extraction unit extracts the specific information in the analysis result;
Second query unit is inquired about the routing policy according to the specific information in policy library and is identified;
Routing policy mark is sent to any server node and the client by the second execution unit.
9. route device according to claim 8, which is characterized in that first execution unit further includes:
Associative cell, the database instance is associated with the specific information;
First query unit specifically includes:
3rd query unit inquires about the specific information according to routing policy mark in the routing storehouse;
4th query unit according to the specific information, inquires about the corresponding database instance.
10. route device according to claim 8 or claim 9, which is characterized in that
The specific information is user information or set of books information.
11. a kind of computer installation, which is characterized in that the computer installation includes processor, and the processor is used to perform The step of method for routing is used for as any one of claim 1 to 5 is realized during the computer program stored in memory.
12. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that:The computer program It is realized when being executed by processor as any one of claim 1 to 5 the step of method for routing.
CN201711288135.2A 2017-12-07 2017-12-07 Routing method and device thereof, computer device and readable storage medium thereof Active CN108055312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711288135.2A CN108055312B (en) 2017-12-07 2017-12-07 Routing method and device thereof, computer device and readable storage medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711288135.2A CN108055312B (en) 2017-12-07 2017-12-07 Routing method and device thereof, computer device and readable storage medium thereof

Publications (2)

Publication Number Publication Date
CN108055312A true CN108055312A (en) 2018-05-18
CN108055312B CN108055312B (en) 2021-07-09

Family

ID=62123410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711288135.2A Active CN108055312B (en) 2017-12-07 2017-12-07 Routing method and device thereof, computer device and readable storage medium thereof

Country Status (1)

Country Link
CN (1) CN108055312B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981350A (en) * 2019-03-01 2019-07-05 畅捷通信息技术股份有限公司 A kind of continual upgrade method of cloud service and system
CN110336742A (en) * 2019-06-20 2019-10-15 网联清算有限公司 Method for sending information, device, computer equipment and storage medium
CN110389748A (en) * 2019-06-17 2019-10-29 平安银行股份有限公司 Business data processing method and terminal device
CN110572451A (en) * 2019-09-04 2019-12-13 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN110866243A (en) * 2019-10-25 2020-03-06 北京达佳互联信息技术有限公司 Login authority verification method, device, server and storage medium
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
CN111787094A (en) * 2020-06-29 2020-10-16 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and equipment
WO2020232895A1 (en) * 2019-05-23 2020-11-26 平安科技(深圳)有限公司 Dynamic sub-database routing method and device, server, and storage medium
CN113010224A (en) * 2021-03-03 2021-06-22 南方电网数字电网研究院有限公司 Front-end micro-service method, device, computer equipment and storage medium
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment
CN115858885A (en) * 2023-02-28 2023-03-28 美云智数科技有限公司 Account set data query method and device, computer equipment and storage medium

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842084A (en) * 2005-03-28 2006-10-04 华为技术有限公司 Method for realizing terminal ability interaction and route control when IMS and CS service concurrence
CN101026515A (en) * 2006-02-22 2007-08-29 华为技术有限公司 Equal access and initial route filtering method for packet network
CN101296169A (en) * 2007-04-26 2008-10-29 华为技术有限公司 Method, system and equipment for establishing user conversation bearer service
CN101610279A (en) * 2008-06-19 2009-12-23 中国移动通信集团公司 The method for routing of database manipulation, route entity and data storage network
CN102594695A (en) * 2012-03-08 2012-07-18 北京神州数码思特奇信息技术股份有限公司 Message routing method and system of enterprise service bus (ESB)
CN102752465A (en) * 2012-06-12 2012-10-24 深圳市深海捷科技有限公司 Calling system and calling method of intelligent router
CN103269294A (en) * 2013-04-26 2013-08-28 广东电网公司电力科学研究院 Message router testing method and system based on ESB bus
CN103425684A (en) * 2012-05-18 2013-12-04 中兴通讯股份有限公司 Method and device for database operation
CN104468805A (en) * 2014-12-12 2015-03-25 用友软件股份有限公司 Message routing device and method
CN104794249A (en) * 2015-05-15 2015-07-22 乐得科技有限公司 Realization method and realization device of database
CN104811488A (en) * 2015-04-13 2015-07-29 深信服网络科技(深圳)有限公司 Load balancing equipment-based session keeping method and system and load balancing equipment
US9197552B1 (en) * 2012-10-15 2015-11-24 Cisco Technology, Inc. Indexed access to a forwarding table in a network device
CN105095317A (en) * 2014-05-23 2015-11-25 中国银联股份有限公司 Distributive database service management system
CN106789989A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 A kind of user right verification method and device
CN106775486A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Data access system, method and routing server, configuration center server
CN106802932A (en) * 2016-12-28 2017-06-06 华为技术有限公司 A kind of method for routing of database, device and Database Systems
CN106851763A (en) * 2015-12-07 2017-06-13 中兴通讯股份有限公司 Message route method, system and gateway in LTE network
CN107360251A (en) * 2017-08-16 2017-11-17 中国工商银行股份有限公司 Method, system and the load balancing apparatus that session is kept

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842084A (en) * 2005-03-28 2006-10-04 华为技术有限公司 Method for realizing terminal ability interaction and route control when IMS and CS service concurrence
CN101026515A (en) * 2006-02-22 2007-08-29 华为技术有限公司 Equal access and initial route filtering method for packet network
CN101296169A (en) * 2007-04-26 2008-10-29 华为技术有限公司 Method, system and equipment for establishing user conversation bearer service
CN101610279A (en) * 2008-06-19 2009-12-23 中国移动通信集团公司 The method for routing of database manipulation, route entity and data storage network
CN102594695A (en) * 2012-03-08 2012-07-18 北京神州数码思特奇信息技术股份有限公司 Message routing method and system of enterprise service bus (ESB)
CN103425684A (en) * 2012-05-18 2013-12-04 中兴通讯股份有限公司 Method and device for database operation
CN102752465A (en) * 2012-06-12 2012-10-24 深圳市深海捷科技有限公司 Calling system and calling method of intelligent router
US9197552B1 (en) * 2012-10-15 2015-11-24 Cisco Technology, Inc. Indexed access to a forwarding table in a network device
CN103269294A (en) * 2013-04-26 2013-08-28 广东电网公司电力科学研究院 Message router testing method and system based on ESB bus
CN105095317A (en) * 2014-05-23 2015-11-25 中国银联股份有限公司 Distributive database service management system
CN104468805A (en) * 2014-12-12 2015-03-25 用友软件股份有限公司 Message routing device and method
CN104811488A (en) * 2015-04-13 2015-07-29 深信服网络科技(深圳)有限公司 Load balancing equipment-based session keeping method and system and load balancing equipment
CN104794249A (en) * 2015-05-15 2015-07-22 乐得科技有限公司 Realization method and realization device of database
CN106851763A (en) * 2015-12-07 2017-06-13 中兴通讯股份有限公司 Message route method, system and gateway in LTE network
CN106789989A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 A kind of user right verification method and device
CN106775486A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Data access system, method and routing server, configuration center server
CN106802932A (en) * 2016-12-28 2017-06-06 华为技术有限公司 A kind of method for routing of database, device and Database Systems
CN107360251A (en) * 2017-08-16 2017-11-17 中国工商银行股份有限公司 Method, system and the load balancing apparatus that session is kept

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981350A (en) * 2019-03-01 2019-07-05 畅捷通信息技术股份有限公司 A kind of continual upgrade method of cloud service and system
WO2020232895A1 (en) * 2019-05-23 2020-11-26 平安科技(深圳)有限公司 Dynamic sub-database routing method and device, server, and storage medium
CN110389748A (en) * 2019-06-17 2019-10-29 平安银行股份有限公司 Business data processing method and terminal device
CN110336742A (en) * 2019-06-20 2019-10-15 网联清算有限公司 Method for sending information, device, computer equipment and storage medium
CN110572451A (en) * 2019-09-04 2019-12-13 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN110572451B (en) * 2019-09-04 2021-04-30 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN110866243A (en) * 2019-10-25 2020-03-06 北京达佳互联信息技术有限公司 Login authority verification method, device, server and storage medium
CN110866243B (en) * 2019-10-25 2022-11-22 北京达佳互联信息技术有限公司 Login authority verification method, device, server and storage medium
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
CN111600930B (en) * 2020-04-09 2022-12-09 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
CN111787094A (en) * 2020-06-29 2020-10-16 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and equipment
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment
CN114531492B (en) * 2020-11-05 2024-05-10 网联清算有限公司 Service calling method, device, storage medium and computer equipment
CN113010224A (en) * 2021-03-03 2021-06-22 南方电网数字电网研究院有限公司 Front-end micro-service method, device, computer equipment and storage medium
CN113010224B (en) * 2021-03-03 2024-01-30 南方电网数字平台科技(广东)有限公司 Front-end micro-servitization method, front-end micro-servitization device, computer equipment and storage medium
CN115858885A (en) * 2023-02-28 2023-03-28 美云智数科技有限公司 Account set data query method and device, computer equipment and storage medium
CN115858885B (en) * 2023-02-28 2023-06-30 美云智数科技有限公司 Account book data query method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108055312B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN108055312A (en) Method for routing and its device and computer installation and its readable storage medium storing program for executing
CN106856434A (en) The method and apparatus of access request conversion
CN103581213B (en) A kind of application process of shared Hosts files, equipment and system
CN104410546B (en) The method of testing and device of real time processing system
CN106790420B (en) A kind of more session channel method for building up and system
CN105228140B (en) A kind of data access method and device
CN104823470A (en) System and method for correlating network information with subscriber information in mobile network environment
CN106105154B (en) The method, apparatus and system of data upload
US9398075B2 (en) Communication system, communication apparatus, communication method, and storage medium
CN106685949A (en) Container access method, container access device and container access system
US11936755B2 (en) Systems and methods for determining a destination location for transmission of packetized data in a network system based on an application server attribute
CN109597854A (en) A kind of method for routing of service request, device, computer equipment and computer storage medium
CN107809383A (en) A kind of map paths method and device based on MVC
CN107534690A (en) Gather domain name system flow
CN109246078B (en) Data interaction method and server
CN106169963A (en) The access method of service page and system, proxy server
CN107231445A (en) A kind of dynamic domain name system DNS reorientation methods, apparatus and system
CN104618388B (en) Fast registration login method and corresponding resetting server, information server
US8713088B2 (en) Identifying users of remote sessions
CN103634111B (en) Single-point logging method and system and single sign-on client-side
CN109151025A (en) Load-balancing method, device, computer storage medium and equipment based on URL
CN105554136B (en) Backup Data restoring method, apparatus and system
CN106453349A (en) An account number login method and apparatus
CN105281987B (en) Router and data uploading method, device, system
CN108737407A (en) A kind of method and device for kidnapping network flow

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant