A data flow control method, device and system
By configuring the traffic management and control tags required by the application in the gateway front-end server, the problem of inability to personalized control of data traffic in the existing technology is solved, and flexible and dynamic traffic management is achieved.
Patent Information
- Application Number
- CN202210905543.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing method of unified management of data traffic through gateways cannot perform personalized traffic control for different applications, resulting in the inability to flexibly adjust and dynamically adjust traffic control.
By determining the management and control information required by the application, grouping service nodes, configuring traffic control labels according to traffic control policies, and sending them to the gateway front-end server to achieve personalized control of data traffic, supporting priority and traffic allocation weight strategies.
It realizes personalized traffic control for different applications, and can flexibly adjust and dynamically adjust traffic control to meet the needs of different applications.
Smart Images

Figure CN115348214B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data flow control method, device and system. Background Art
[0002] At present, service systems based on Enterprise Service Bus (ESB), such as bank management systems and medical systems built by hospitals, mainly control data traffic by configuring control strategies in the gateways set up in each computer room to uniformly manage the data traffic of service nodes in the computer room.
[0003] For various applications configured in various service nodes in the computer room, the existing method of indiscriminately controlling data traffic through the gateway cannot perform personalized traffic control for different applications. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a data flow control method, device and system, which can perform personalized flow control for different applications.
[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a data traffic control method is provided, including:
[0006] Determine the control information required for traffic control for the application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and a traffic control strategy for the application;
[0007] Grouping node information of multiple service nodes to which the application belongs according to one or more of the computer room information;
[0008] For each of the computer rooms to which the application belongs, according to the traffic control strategy, a traffic control label corresponding to the computer room is configured for the grouping result, and the application information and the grouping result configured with the traffic control label are sent to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label accordingly, and enables the gateway front-end server to control the data traffic of the application according to the grouping result configured with the traffic control label.
[0009] Optionally, the gateway front-end server controls the data traffic of the application, including:
[0010] In view of the situation where the traffic control label represents the priority of each instance address combination included in the grouping result,
[0011] Each gateway front-end server in the computer room performs the following operations:
[0012] The gateway front-end server responds to the start trigger of the data flow and determines the target group result to which the data flow belongs according to the application information included in the data flow;
[0013] Determine the instance address combination with the highest priority according to the traffic control label representing the priority of each instance address combination included in the stored target grouping result;
[0014] The data traffic is transmitted to the application under the instance address combination with the highest priority.
[0015] Optionally, the gateway front-end server controls the data traffic of the application, including:
[0016] With respect to the traffic control label characterization grouping result including the traffic distribution weight of each instance address combination,
[0017] Each gateway front-end server in the computer room performs the following operations:
[0018] The gateway front-end server responds to the start trigger of the data traffic and determines the target grouping result to which the data traffic belongs and the historical traffic carrying capacity of each instance address combination included in the target grouping result within a set time period according to the application information included in the data traffic;
[0019] Determine the target instance address combination according to the traffic control label representing the traffic allocation weight of each instance address combination included in the stored target grouping result and the historical traffic carrying capacity of each instance address combination included in the target grouping result;
[0020] The data traffic is transmitted to the application under the target instance address combination.
[0021] Optionally, grouping the node information of the multiple service nodes to which the application belongs includes:
[0022] The node information of one or more service nodes belonging to the same computer room is divided into an instance address combination.
[0023] Optionally, the traffic control strategy includes:
[0024] A first routing strategy of preferentially routing to a computer room closest to a gateway front-end server receiving the data traffic;
[0025] or,
[0026] A second routing strategy for allocating the data traffic to multiple computer rooms to which the application belongs according to the traffic ratio.
[0027] Optionally, configuring a traffic control label corresponding to the computer room for the grouping result includes:
[0028] For each first computer room in each computer room to which the application belongs, in which the first routing policy is configured, the following operations are performed:
[0029] Determine a target instance address combination belonging to the first computer room from each instance address combination included in the grouping result;
[0030] Configuring a traffic control label representing the highest priority for the target instance address combination;
[0031] A traffic control label indicating a low priority is configured for other instance address combinations other than the target instance address combination.
[0032] Optionally, sending the grouping result configured with the traffic control label to the gateway front-end server of the computer room includes:
[0033] The target instance address combination configured with the traffic control label representing the highest priority and the other instance address combinations configured with the traffic control labels representing the low priority are sent to the gateway front-end server of the first computer room to which the target instance address combination belongs.
[0034] Optionally, configuring a traffic control label corresponding to the computer room for the grouping result includes:
[0035] For each second computer room configured with the second routing policy in each computer room to which the application belongs, perform the following operations:
[0036] According to the preset traffic ratio, a corresponding traffic control label representing the location weight is configured for each instance address combination included in the grouping result.
[0037] Optionally, sending the grouping result configured with the traffic control label to the gateway front-end server of the computer room includes:
[0038] Each of the instance address combinations configured with a traffic control label representing the location weight is sent to the gateway front-end server of the second computer room.
[0039] Optionally, the above-mentioned data flow control method is applied to service systems belonging to multiple computer rooms and connected through an enterprise service bus communication.
[0040] In a second aspect, an embodiment of the present invention provides a data flow control device, including: an interaction module and a control module, wherein:
[0041] The interaction module is used to determine the control information required for traffic control for the application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and a traffic control strategy for the application;
[0042] The control module is used to group the node information of multiple service nodes to which the application belongs according to the information of one or more of the computer rooms; for each of the computer rooms to which the application belongs, execute the traffic control strategy, configure a traffic control label corresponding to the computer room for the grouping result, send the application information and the grouping result configured with the traffic control label to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label accordingly, and enables the gateway front-end server to control the data traffic of the application according to the grouping result configured with the traffic control label.
[0043] In a third aspect, an embodiment of the present invention provides a data flow control system, comprising: a plurality of computer rooms, a gateway front-end server distributed in each of the computer rooms, and a data flow control device provided by the embodiment of the second aspect above, wherein:
[0044] The plurality of computer rooms are connected via an enterprise service bus;
[0045] The data traffic control device is used to send the obtained application information and the traffic control label configured by the grouped service node to the gateway front-end server;
[0046] Each of the gateway front-end servers is used to store the application information and the service node of the group configured with the traffic control label accordingly upon receiving the application information sent by the data traffic control device and the traffic control label configured by the service node of the group, and control the data traffic of the application according to the service node of the group configured with the traffic control label.
[0047] An embodiment of the above invention has the following advantages or beneficial effects: by determining the control information and grouping the node information of multiple service nodes to which the application included in the control information belongs, and according to the traffic control policy of the application included in the control information, for each computer room to which the application belongs, a traffic control label corresponding to the computer room is configured for the grouping result. Since the traffic control policy can be obtained through the control information, and the traffic control label is for each computer room, which is determined by the traffic control policy, the traffic control label can be flexibly configured for each computer room to which the application belongs through the traffic control policy. The application information stored in the gateway front-end server and the grouping result configured with the traffic control label are used to control the data traffic of the application, thereby realizing personalized traffic control for different applications.
[0048] In addition, the traffic control strategy of the application of the control information can be modified later, and the traffic control label of the grouping result can be modified accordingly to adjust the traffic control, so that the traffic control can be adjusted flexibly and dynamically.
[0049] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0051] Figure 1 is a schematic diagram of a system architecture according to the prior art;
[0052] Figure 2 is a schematic diagram of the main process of the data flow control method according to an embodiment of the present invention;
[0053] Figure 3 is a schematic diagram of a service system architecture according to an embodiment of the present invention;
[0054] Figure 4 is a schematic diagram of the main process of another data flow control method according to an embodiment of the present invention;
[0055] Figure 5 is a schematic diagram of the main process of another data flow control method according to an embodiment of the present invention;
[0056] Figure 6 is a schematic diagram of the main process of data flow control configuration according to an embodiment of the present invention;
[0057] Figure 7 is a schematic diagram of main modules of a data flow control device according to an embodiment of the present invention;
[0058] Figure 8is a schematic diagram of main devices of a data traffic control system according to an embodiment of the present invention;
[0059] Fig. 9 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0060] Fig.10 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0062] against Figure 1 The exemplary system architecture 100 is currently mainly used in banking systems, medical systems, e-commerce systems, etc., which have a large amount of data and require decentralized deployment of computer rooms to reduce the pressure of one computer room to handle data traffic. Figure 1 As shown, in the prior art, a system architecture 100 with multiple computer rooms may include: an enterprise service bus 101, multiple computer rooms 102, and a gateway 103 set for each computer room.
[0063] Each computer room 102 may be deployed with multiple servers 1021, and each server may be deployed with one or more applications. The same application may be deployed on multiple servers 1021 in one computer room, or may be deployed on multiple servers in multiple computer rooms.
[0064] In the prior art, data traffic is uniformly allocated to each gateway mainly through the enterprise service bus 101, and each gateway allocates data traffic to the application in the corresponding server according to its own configuration. Since the prior art allocates data traffic through the gateway, and the configuration of the gateway has limitations, it cannot configure differentiated traffic control for different applications, resulting in the inability to personalize traffic control.
[0065] In order to solve the problem of personalized configuration of data traffic control, Figure 2 FIG. 1 is a schematic diagram showing the main flow of a data flow control method provided by an embodiment of the present invention. Figure 2 As shown, the data flow control method may include the following steps:
[0066] Step S201: determining control information required for traffic control for an application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and a strategy required for traffic control for the application;
[0067] Step S202: grouping node information of multiple service nodes to which the application belongs according to one or more computer room information;
[0068] Step S203: For each computer room to which the application belongs, execute the traffic control strategy, configure the traffic control label corresponding to the computer room for the grouping result, send the application information and the grouping result configured with the traffic control label to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label accordingly, and enables the gateway front-end server to control the data traffic of the application according to the grouping result configured with the traffic control label.
[0069] The specific implementation method of determining the control information required for traffic control for the application in the above step S201 may be to receive the control information required for traffic control for the application sent by the client, or to obtain the control information input by the user through the browser or front-end interface or page. The client or browser or front-end interface or page may provide the user with optional computer rooms, servers, applications, and traffic control options to facilitate the user to construct control information for the application.
[0070] Among them, the traffic control strategy required for traffic control for applications can be the same traffic control strategy set for the same application in different servers; it can also be multiple traffic control sub-strategies for the same application in different servers; it can also be multiple traffic control sub-strategies for different applications; it can also be different traffic control sub-strategies for different services in the application, etc.
[0071] The computer room information may be information that can uniquely identify the computer room, such as a computer room identifier and a computer room location that are pre-allocated to the computer room.
[0072] The node information may be a node identifier pre-assigned to the node, an instance IP address of the node, and a gateway port information of the node.
[0073] Among them, the gateway front-end server is configured for each computer room, and each computer room is equipped with a corresponding gateway front-end server.
[0074] The specific implementation of the above step S202 may include: grouping the node information of one or more service nodes belonging to the same computer room into one instance address combination.
[0075] by Figure 3 The multiple computer rooms shown are, for example, computer room 1 in area A, computer room 2 in area B, computer room 3 in area C, computer room 4 in area D, and computer room 5 in area E, wherein computer room 1 includes servers 11, 12, 13, 14, 15, 16, computer room 2 includes servers 21, 22, 23, 24, 25, computer room 3 includes servers 31, 32, 33, 34, 35, computer room 4 includes servers 41, 42, 43, 44, and computer room 5 includes servers 51, 52, 53. Among them, application a is deployed on servers 11, 12, 14, 16, 23, 25, 31, 33, 35, 41, 42, 44 and 51, application b is deployed on servers 12, 13, 14, 15, 21, 22, 24, 25, 32, 34, 35, 43, 44, 51, 52, application c is deployed on servers 11, 12, 13, 15, 21, 22, 25, 31, 32, 33, 42, 43, 52, 53, application d is deployed on servers 12, 13, 14, 16, 22, 23, 24, 25, 32, 33, 34, 35, 41, 43, 51, 53, etc. It is worth noting that Figure 3The deployment of computer rooms, servers and applications is only given as an example, and is not a limitation on the deployment of computer rooms, servers and applications themselves. For example, for application a, the specific implementation of the above step S202 is as follows: for application a, the instance address combination 1a of computer room 1 corresponding to area A is divided: {instance address of server 11, instance address of server 12, instance address of server 14, instance address of server 16}; the instance address combination 2a of computer room 2 corresponding to area B is: {instance address of server 23, instance address of server 25}; the instance address combination 3a of computer room 3 corresponding to area C is: {instance address of server 31, instance address of server 33, instance address of server 35}; the instance address combination 4a of computer room 4 corresponding to area D is: {instance address of server 41, instance address of server 42}; the instance address combination 5a of computer room 5 corresponding to area E is: {instance address of server 51}. For another example, with respect to application c, the specific implementation of the above step S202 is as follows: an instance address combination 1c of the computer room 1 corresponding to area A is divided for application c: {the instance address of server 11, the instance address of server 12, the instance address of server 13, the instance address of server 15}; an instance address combination 2c of the computer room 2 corresponding to area B: {the instance address of server 21, the instance address of server 22, the instance address of server 25}; an instance address combination 3c of the computer room 3 corresponding to area C: {the instance address of server 31, the instance address of server 32, the instance address of server 33}; an instance address combination 4c of the computer room 4 corresponding to area D: {the instance address of server 42, the instance address of server 43}; an instance address combination 5c of the computer room 5 corresponding to area E: {the instance address of server 52, the instance address of server 53}.
[0076] Among them, taking application a as an example, the specific implementation of sending the application information and the grouping results configured with the traffic control label to the gateway front-end server of the computer room is: sending the instance address combination 1a, instance address combination 2a, instance address combination 3a, instance address combination 4a and instance address combination 5a and the traffic control labels corresponding to each computer room to the gateway front-end servers in computer rooms 1 to 5.
[0077] exist Figure 2In the illustrated embodiment, the node information of multiple service nodes to which the application included in the control information belongs is grouped by determining the control information and grouping the node information, and according to the traffic control policy of the application included in the control information, for each computer room to which the application belongs, a traffic control label corresponding to the computer room is configured for the grouping result. Since the traffic control policy can be obtained through the control information, and the traffic control label is for each computer room, which is determined by the traffic control policy, the traffic control label can be flexibly configured for each computer room to which the application belongs through the traffic control policy. The application information stored corresponding to the gateway front-end and the grouping result configured with the traffic control label are used to control the data traffic of the application, thereby realizing personalized traffic control for different applications.
[0078] In addition, the traffic control strategy of the application of the control information can be modified later, and the traffic control label of the grouping result can be modified accordingly to adjust the traffic control, so that the traffic control can be adjusted flexibly and dynamically.
[0079] In the embodiment of the present invention, for the situation where the traffic control label represents the priority of each instance address combination included in the grouping result, each gateway front-end server in the computer room executes Figure 4 The steps shown are:
[0080] Step S401: the gateway front-end server responds to the start trigger of the data flow and determines the target group result to which the data flow belongs according to the application information included in the data flow;
[0081] Step S402: determining the instance address combination with the highest priority according to the traffic control label representing the priority of each instance address combination included in the stored target grouping result;
[0082] Step S403: Transmit the data traffic to the application under the instance address combination with the highest priority.
[0083] Among them, the gateway front-end server responds to the start trigger of the data flow and mainly realizes: when the data flow is sent to the gateway of the computer room, the data flow first reaches the gateway front-end server deployed for the computer room and the gateway of the computer room.
[0084] The priority of each instance address combination included in the grouping result represented by the traffic control label is specifically that the priority of each instance address combination included in the grouping results allocated to different computer rooms is different. For example, for application a, among the grouping results allocated to computer room 1: instance address combination 1a, instance address combination 2a, instance address combination 3a, instance address combination 4a and instance address combination 5a, instance address combination 1a located in computer room 1 has the highest priority label, such as label 1, and instance address combination 2a, instance address combination 3a, instance address combination 4a and instance address combination 5a have ordinary level labels, such as label 0. For another example, for application a, among the grouping results allocated to computer room 2: instance address combination 1a, instance address combination 2a, instance address combination 3a, instance address combination 4a and instance address combination 5a, instance address combination 2a located in computer room 2 has the highest priority label, such as label 1, and instance address combination 1a, instance address combination 3a, instance address combination 4a and instance address combination 5 have ordinary level labels, such as label 0. For example, for application a, the grouping results allocated to computer room 3 are: instance address combination 1a, instance address combination 2a, instance address combination 3a, instance address combination 4a and instance address combination 5a. Instance address combination 3a located in computer room 3 has the highest priority label, such as label 1, and instance address combination 1a, instance address combination 2a, instance address combination 4a and instance address combination 5a have ordinary level labels, such as label 0. Then, for the data flow of application a distributed to the gateway front-end server in computer room 1, the gateway front-end server in computer room 1 sends the data flow of application a to application a deployed on the server in computer room 1; for the data flow of application a distributed to the gateway front-end server in computer room 2, the gateway front-end server in computer room 2 sends the data flow of application a to application a deployed on the server in computer room 2; for the data flow of application a distributed to the gateway front-end server in computer room 4, the gateway front-end server in computer room 4 sends the data flow of application a to application a deployed on the server in computer room 4. It is worth noting that in the case where there are multiple applications in the computer room, the gateway can distribute the data flow belonging to the same application to multiple servers deployed on the application according to the traffic balancing strategy. That is, the gateway only needs to execute the balancing strategy, so that the gateway does not need a complex traffic control strategy, which is convenient for the management of the gateway.
[0085] Among them, the priority of each instance address combination included in the grouping result represented by the traffic control label is mainly for the traffic control strategy of the computer room priority. Specifically, the data traffic distributed to the gateway front-end server is preferentially distributed to the application in the computer room where the gateway front-end server is located. Then, by configuring the corresponding priorities for different instance address combinations in different computer rooms, the computer room is selected according to the priority, and the traffic control strategy and data traffic of the application in the computer room are conveniently managed and maintained through the gateway front-end server.
[0086] In the embodiment of the present invention, for the situation where the traffic control label represents the traffic distribution weight of each instance address combination included in the grouping result, the gateway front-end server of each computer room executes Figure 5 The steps shown are:
[0087] Step S501: the gateway front-end server responds to the start trigger of the data flow and determines the target grouping result to which the data flow belongs and the historical flow carrying capacity of each instance address combination included in the target grouping result within a set time period according to the application information included in the data flow;
[0088] The set time period may be set or adjusted accordingly according to actual needs.
[0089] Step S502: determining a target instance address combination according to a traffic control label representing a traffic allocation weight of each instance address combination included in the stored target grouping result and a historical traffic carrying capacity of each instance address combination included in the target grouping result;
[0090] Among them, determining the target instance address combination mainly involves selecting the instance address combination with the largest remaining traffic carrying capacity.
[0091] For example, the target grouping results for the data traffic of the above-mentioned application d are: instance address combination 1d of computer room 1 in area A {instance address of server 12, instance address of server 13, instance address of server 14, instance address of server 16}, instance address combination 2d of computer room 2 corresponding to area B {instance address of server 22, instance address of server 23, instance address of server 24, instance address of server 25}, instance address combination 3d of computer room 3 corresponding to area C {instance address of server 32, instance address of server 33, instance address of server 34, instance address of server 35}, instance address combination 4d of computer room 4 corresponding to area D {instance address of server 41, instance address of server 43} and instance address combination 5d of computer room 5 corresponding to area E {instance address of server 51, instance address of server 53}. Among them, the traffic allocation weights of instance address combination 1d, instance address combination 2d, instance address combination 3d, instance address combination 4d and instance address combination 5d are 3, 3, 2, 1, 1 respectively, that is, the traffic allocation percentages of instance address combination 1d, instance address combination 2d, instance address combination 3d, instance address combination 4d and instance address combination 5d are 30%, 30%, 20%, 10% and 10% respectively. For example, the historical traffic carrying capacity of each instance address combination is 15% of the historical carrying capacity of instance address combination 1d, 20% of the historical carrying capacity of instance address combination 2d, 15% of the historical carrying capacity of instance address combination 3d, 5% of the historical carrying capacity of instance address combination 4d and 5% of the historical carrying capacity of instance address combination 5d. Among them, the historical carrying capacity of instance address combination 1d, 15%, has the largest remaining carrying capacity relative to its traffic allocation percentage. Therefore, the instance address combination 1d is the target instance address combination.
[0092] Step S503: Transmit the data traffic to the application under the target instance address combination.
[0093] For example, with respect to the data traffic of the above-mentioned application d, the data traffic of the application d is transmitted to the application d of the instance address combination 1d.
[0094] In an embodiment of the present invention, the traffic control strategy may include: a first routing strategy that preferentially routes to the computer room closest to the gateway front-end server that receives the data traffic; or a second routing strategy that distributes data traffic to multiple computer rooms to which the application belongs according to the traffic ratio.
[0095] Among them, the first routing strategy of preferentially routing to the computer room closest to the gateway front-end server receiving the data traffic is mainly to send the data traffic distributed to the gateway front-end server to the computer room where the gateway front-end server is located.
[0096] The specific implementation of configuring the traffic control label corresponding to the computer room for the grouping result may include:
[0097] For each first computer room configured with the first routing strategy in each computer room to which the application belongs, execute the following Figure 6 The steps shown are:
[0098] Step S601: Determine a target instance address combination belonging to the first computer room from each instance address combination included in the grouping result;
[0099] Step S602: configuring a traffic control label representing the highest priority for the target instance address combination;
[0100] Step S603: configuring a traffic control label indicating a low priority for other instance address combinations except the target instance address combination.
[0101] by Figure 3 Taking application a shown as an example, the traffic control strategy of application a is: configure a computer room proximity strategy for application a (i.e., give priority to applications in the computer room that is closest). Specifically, for application a, computer room 1 is the first computer room, and instance address combination 1a in the gateway front-end server of computer room 1 is determined to be the target instance address combination. Then, a highest priority label such as label 1 is configured for the instance address combination 1a, and ordinary level labels such as label 0 are set for instance address combination 2a, instance address combination 3a, instance address combination 4a, and instance address combination 5a in the gateway front-end server of computer room 1. For another example, if computer room 2 is the first computer room and instance address combination 2a in the gateway front-end server of computer room 2 is determined to be the target instance address combination, a highest priority label, such as label 1, is configured for instance address combination 2a, and ordinary level labels, such as label 0, are set for instance address combination 1a, instance address combination 3a, instance address combination 4a, and instance address combination 5a in the gateway front-end server of computer room 1; if computer room 1 is the first computer room and instance address combination 3a in the gateway front-end server of computer room 1 is determined to be the target instance address combination, a highest priority label, such as label 1, is configured for instance address combination 3a, and ordinary level labels, such as label 0, are set for instance address combination 1a, instance address combination 2a, instance address combination 4a, and instance address combination 5a in the gateway front-end server of computer room 1.
[0102] Accordingly, for Figure 6In an embodiment, the specific implementation method of sending the grouping results configured with traffic control labels to the gateway front-end server of the computer room may include: sending the target instance address combination configured with the traffic control label representing the highest priority and other instance address combinations configured with the traffic control label representing the low priority to the gateway front-end server of the first computer room to which the target instance address combination belongs. For example, the instance address combination 1a configured with the highest priority label such as label 1, the instance address combination 2a, instance address combination 3a, instance address combination 4a and instance address combination 5a configured with ordinary level labels such as label 0 are sent to the gateway front-end server of computer room 1. For another example, the instance address combination 2a configured with the highest priority label such as label 1, the instance address combination 1a, instance address combination 3a, instance address combination 4a and instance address combination 5a configured with ordinary level labels such as label 0 are sent to the gateway front-end server of computer room 2, etc.
[0103] In an embodiment of the present invention, the specific implementation of configuring the traffic control label corresponding to the computer room for the grouping result may include:
[0104] For each second computer room configured with the second routing strategy in each computer room to which the application belongs, perform the following operations: according to the preset traffic ratio, configure a corresponding traffic control label representing the location weight for each instance address combination included in the grouping result.
[0105] by Figure 3 Taking application c as shown, the traffic control strategy of application c is: configure traffic percentages of 30%, 30%, 20%, 10% and 10% for computer rooms 1, 2, 3, 4 and 5 where application c is located, respectively. Accordingly, configure traffic control label 3 for instance address combination 1c corresponding to computer room 1 in area A, configure traffic control label 3 for instance address combination 2c corresponding to computer room 2 in area B, configure traffic control label 2 for instance address combination 3c corresponding to computer room 3 in area C, configure traffic control label 1 for instance address combination 4c corresponding to computer room 4 in area D, and configure traffic control label 1 for instance address combination 5c corresponding to computer room 5 in area E, etc.
[0106] Accordingly, the specific implementation of sending the grouping results configured with traffic control labels to the gateway front-end server in the computer room may include: sending each instance address combination of traffic control labels representing location weights to the gateway front-end server in the second computer room.
[0107] The data flow control method provided in the above embodiments is applied to Figure 3 The service systems shown belong to multiple computer rooms and are connected via an enterprise service bus.
[0108] It is worth noting that the application traffic control strategies in the above-mentioned embodiments are mainly described by taking applications as examples. Accordingly, different traffic control strategies can also be configured for services in the application in the same way as the above-mentioned application configuration control strategies, which will not be repeated here.
[0109] In addition, different traffic control strategies generally have different labels to effectively distinguish traffic control strategies. The above embodiments are merely exemplary illustrations of labels and are not intended to limit the labels themselves.
[0110] In addition, the gateway front-end server of each of the above-mentioned computer rooms can be built based on the independent process Envoy.
[0111] like Figure 7 As shown, an embodiment of the present invention provides a data flow control device 700, which may include: an interaction module 701 and a control module 702, wherein:
[0112] The interaction module 701 is used to determine the control information required for traffic control for the application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and a traffic control strategy for the application;
[0113] The control module 702 is used to group the node information of multiple service nodes to which the application belongs according to the information of one or more computer rooms; for each computer room to which the application belongs, according to the traffic control strategy, execute the configuration of a traffic control label corresponding to the computer room for the grouping result, and send the application information and the grouping result configured with the traffic control label to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label accordingly, and enables the gateway front-end server to control the data traffic of the application according to the grouping result configured with the traffic control label.
[0114] In the embodiment of the present invention, the control module 702 is used to divide the node information of one or more service nodes belonging to the same computer room into an instance address combination.
[0115] In an embodiment of the present invention, the traffic control strategy may include:
[0116] A first routing strategy of preferentially routing to the computer room closest to the gateway front-end server receiving the data traffic; or a second routing strategy of allocating data traffic to multiple computer rooms to which the application belongs according to traffic ratio.
[0117] In an embodiment of the present invention, the control module 702 is further used to perform operations for each first computer room configured with a first routing policy in each computer room to which the application belongs: determining a target instance address combination belonging to the first computer room from each instance address combination included in the grouping result; configuring a traffic control label representing the highest priority for the target instance address combination; and configuring a traffic control label representing a low priority for other instance address combinations other than the target instance address combination.
[0118] In an embodiment of the present invention, the control module 702 is further used to send a target instance address combination configured with a traffic control label representing the highest priority and other instance address combinations configured with a traffic control label representing a low priority to the gateway front-end server of the first computer room to which the target instance address combination belongs.
[0119] In an embodiment of the present invention, the control module 702 is further used to perform operations for each second computer room configured with a second routing strategy in each computer room to which the application belongs: according to a preset traffic ratio, a corresponding traffic control label representing the location weight is configured for each instance address combination included in the grouping result.
[0120] In the embodiment of the present invention, the control module 702 is further configured to send each instance address combination configured with a traffic control label representing the location weight to the gateway front-end server in the second computer room.
[0121] like Figure 8 As shown, an embodiment of the present invention provides a data flow control system 800, including: multiple computer rooms 801 and the data flow control device 700 provided in the above embodiment.
[0122] Each computer room 801 is equipped with a gateway front-end server 8011;
[0123] Multiple computer rooms 801 are connected via an enterprise service bus;
[0124] The data flow control device 700 is used to send the obtained application information and the flow control label configured by the grouped service node to the gateway front-end server 8011;
[0125] Each gateway front-end server 8011 is used to store the application information and the service node of the group configured with the traffic control label correspondingly upon receiving the application information sent by the data traffic control device 700 and the traffic control label configured by the service node of the group, and control the data traffic of the application according to the service node of the group configured with the traffic control label.
[0126] In an embodiment of the present invention, the gateway front-end server 8011 is further used to determine, in response to the start trigger of data traffic, the target grouping result to which the data traffic belongs according to the application information included in the data traffic, with respect to the situation in which the traffic control label represents the priority of each instance address combination included in the grouping result; determine the instance address combination with the highest priority according to the traffic control label representing the priority of each instance address combination included in the stored target grouping result; and transmit the data traffic to the application under the instance address combination with the highest priority.
[0127] In an embodiment of the present invention, the gateway front-end server 8011 is further used to determine, in response to the start trigger of data traffic, the target grouping result to which the data traffic belongs and the historical traffic carrying capacity of each instance address combination included in the target grouping result within a set time period according to the application information included in the data traffic, based on the traffic control label characterizing the traffic allocation weights of each instance address combination included in the grouping result; determine the target instance address combination according to the stored traffic control label characterizing the traffic allocation weights of each instance address combination included in the target grouping result and the historical traffic carrying capacity of each instance address combination included in the target grouping result; and transmit the data traffic to the application under the target instance address combination.
[0128] Fig. 9 The system architecture for implementing the above-mentioned data flow control method or device is shown by way of example.
[0129] like Fig. 9 As shown, the system architecture 900 may include terminal devices 901, 902, 903, a network 904, an enterprise service bus 905, a data traffic control server 906, and computer rooms 907, 908, and 909, wherein the computer room 907 is equipped with a gateway front-end server 9071, a gateway 9072, and multiple application servers 9073, 9074, and 9075, the computer room 908 is equipped with a gateway front-end server 9081, a gateway 9082, and multiple application servers 9083, 9084, and 9085, and the computer room 909 is equipped with a gateway front-end server 9091, a gateway 9092, and multiple application servers 9093, 9094, and 9095. The network 904 is used to provide a medium for a communication link between the terminal devices 901, 902, and 903 and the enterprise service bus 905. The network 904 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0130] Users can use terminal devices 901, 902, and 903 to interact with applications deployed on servers in various computer rooms through network 904 and enterprise service bus 905 to receive or send messages, etc. Various communication clients can be installed on terminal devices 901, 902, and 903, such as shopping clients, web browsers, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0131] The terminal devices 901 , 902 , and 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0132] The data traffic server 906 may be a server that provides various services, such as a background management server that provides support for the traffic control policy configured by the user for the application (only as an example). The background management server may analyze and process the received control information and other data related to traffic control, and deploy the processing results (such as instance address combinations for applications, traffic control labels for instance address combinations - only as an example) to the corresponding gateway front-end server.
[0133] The gateway front-end server in each computer room can allocate the received data traffic to the computer room according to the instance address combination of the deployed application and the traffic control label of the instance address combination. The gateway can evenly distribute the data traffic for the applications included in the computer room.
[0134] It should be noted that the data flow control method provided in the embodiment of the present invention is generally executed jointly by the data flow control server 906 and the gateway front-end server set up in each computer room. Accordingly, the data flow control device is generally composed of the data flow control server 906 and the gateway front-end server set up in each computer room.
[0135] It should be understood that Fig. 9 The number of terminal devices, networks, data traffic control servers, computer rooms, gateway front-end servers, gateways, etc. in the embodiment is only for illustration. Any number of terminal devices, networks, data traffic control servers, computer rooms, gateway front-end servers, gateways may be provided as required.
[0136] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 of a terminal device suitable for implementing an embodiment of the present invention. Fig.10 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0137] like Fig.10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0138] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0139] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present invention are executed.
[0140] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes an interaction module and a control module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the interaction module may also be described as a "module for determining the control information required for traffic control for an application."
[0143] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: determining the control information required for traffic control for the application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and the strategy required for traffic control for the application; grouping the node information of multiple service nodes to which the application belongs according to the one or more computer room information; for each computer room to which the application belongs, according to the traffic control strategy, executing the configuration of a traffic control label corresponding to the computer room for the grouping result, sending the application information and the grouping result configured with the traffic control label to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label correspondingly, and enables the gateway front-end server to control the data traffic of the application according to the grouping result configured with the traffic control label.
[0144] According to the technical solution of the embodiment of the present invention, the node information of multiple service nodes to which the application included in the control information belongs is grouped by determining the control information and grouping them, and according to the traffic control policy of the application included in the control information, for each computer room to which the application belongs, a traffic control label corresponding to the computer room is configured for the grouping result. Since the traffic control policy can be obtained through the control information, and the traffic control label is for each computer room, which is determined by the traffic control policy, the traffic control label can be flexibly configured for each computer room to which the application belongs through the traffic control policy. The application information stored corresponding to the gateway front-end and the grouping result configured with the traffic control label are used to control the data traffic of the application, thereby realizing personalized traffic control for different applications.
[0145] In addition, the traffic control strategy of the application of the control information can be modified later, and the traffic control label of the grouping result can be modified accordingly to adjust the traffic control, so that the traffic control can be adjusted flexibly and dynamically.
[0146] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data flow control method, It is characterized in that include: Determine the control information required for traffic control for the application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and a traffic control strategy for the application; Grouping node information of multiple service nodes to which the application belongs according to one or more of the computer room information; For each of the computer rooms to which the application belongs, according to the traffic control strategy, a traffic control label corresponding to the computer room is configured for the grouping result, and the application information and the grouping result configured with the traffic control label are sent to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label correspondingly, and the gateway front-end server controls the data traffic of the application according to the grouping result configured with the traffic control label; The traffic control label represents the priority of each instance address combination included in the grouping result, and / or the traffic control label represents the traffic distribution weight of each instance address combination included in the grouping result.
2. The data flow control method according to claim 1, It is characterized in that The gateway front-end server controls the data traffic of the application, including: In view of the situation where the traffic control label represents the priority of each instance address combination included in the grouping result, Each gateway front-end server in the computer room performs the following operations: The gateway front-end server responds to the start trigger of the data flow and determines the target group result to which the data flow belongs according to the application information included in the data flow; Determine the instance address combination with the highest priority according to the traffic control label representing the priority of each instance address combination included in the stored target grouping result; The data traffic is transmitted to the application under the instance address combination with the highest priority.
3. The data flow control method according to claim 1, It is characterized in that The gateway front-end server controls the data traffic of the application, and further includes: With respect to the traffic control label characterization grouping result including the traffic distribution weight of each instance address combination, Each gateway front-end server in the computer room performs the following operations: The gateway front-end server responds to the start trigger of the data traffic and determines the target grouping result to which the data traffic belongs and the historical traffic carrying capacity of each instance address combination included in the target grouping result within a set time period according to the application information included in the data traffic; Determine the target instance address combination according to the traffic control label representing the traffic allocation weight of each instance address combination included in the stored target grouping result and the historical traffic carrying capacity of each instance address combination included in the target grouping result; The data traffic is transmitted to the application under the target instance address combination.
4. The data flow control method according to claim 1, It is characterized in that The grouping of node information of a plurality of service nodes to which the application belongs includes: The node information of one or more service nodes belonging to the same computer room is divided into an instance address combination.
5. The data flow control method according to claim 1, It is characterized in that The traffic control strategy includes: A first routing strategy of preferentially routing to a computer room closest to a gateway front-end server receiving the data traffic; or, A second routing strategy for allocating the data traffic to multiple computer rooms to which the application belongs according to the traffic ratio.
6. The data flow control method according to claim 5, It is characterized in that The configuring a traffic control label corresponding to the computer room for the grouping result includes: For each first computer room configured with the first routing policy in each computer room to which the application belongs, perform the following operations: Determine a target instance address combination belonging to the first computer room from each instance address combination included in the grouping result; Configuring a traffic control label representing the highest priority for the target instance address combination; A traffic control label indicating a low priority is configured for other instance address combinations other than the target instance address combination.
7. The data flow control method according to claim 6, It is characterized in that The sending of the grouping result configured with the traffic control label to the gateway front-end server of the computer room includes: The target instance address combination configured with the traffic control label representing the highest priority and the other instance address combinations configured with the traffic control labels representing the low priority are sent to the gateway front-end server of the first computer room to which the target instance address combination belongs.
8. The data flow control method according to claim 5, It is characterized in that The configuring a traffic control label corresponding to the computer room for the grouping result includes: For each second computer room configured with the second routing policy in each computer room to which the application belongs, perform the following operations: According to the preset traffic ratio, a corresponding traffic control label representing the location weight is configured for each instance address combination included in the grouping result.
9. The data flow control method according to claim 8, It is characterized in that The sending of the grouping result configured with the traffic control label to the gateway front-end server of the computer room includes: Each of the instance address combinations configured with a traffic control label representing the location weight is sent to the gateway front-end server of the second computer room.
10. The data flow control method according to any one of claims 1 to 9, It is characterized in that Applicable to service systems that belong to multiple computer rooms and are connected through an enterprise service bus.
11. A data flow control device, It is characterized in that include: Interaction module and control module, wherein, The interaction module is used to determine the control information required for traffic control for the application, wherein the control information includes application information, computer room information of one or more computer rooms to which the application belongs, node information of multiple service nodes to which the application belongs, and a traffic control strategy for the application; The control module is used to group the node information of the multiple service nodes to which the application belongs according to the information of one or more computer rooms; for each computer room to which the application belongs, according to the traffic control strategy, configure a traffic control label corresponding to the computer room for the grouping result, send the application information and the grouping result configured with the traffic control label to the gateway front-end server of the computer room, so that the gateway front-end server stores the application information and the grouping result configured with the traffic control label correspondingly, and enables the gateway front-end server to control the data traffic of the application according to the grouping result configured with the traffic control label; The traffic control label represents the priority of each instance address combination included in the grouping result, and / or the traffic control label represents the traffic distribution weight of each instance address combination included in the grouping result.
12. A data flow control system, It is characterized in that The device comprises a plurality of computer rooms, a gateway front-end server distributed in each of the computer rooms, and the data flow control device according to claim 11, wherein: The plurality of computer rooms are connected via an enterprise service bus; The data traffic control device is used to send the obtained application information and the traffic control label configured by the grouped service node to the gateway front-end server; Each of the gateway front-end servers is used to store the application information and the service node of the group configured with the traffic control label accordingly upon receiving the application information sent by the data traffic control device and the traffic control label configured by the service node of the group, and control the data traffic of the application according to the service node of the group configured with the traffic control label.
13. An electronic device, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
14. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
