A flow control method and device, electronic equipment and computer readable medium

By determining the flow control nodes and the total traffic limit in the distributed transaction orchestration cluster, and adjusting the traffic limit of the nodes, the transaction blocking problem caused by excessive inbound traffic to the nodes is solved, and the processing efficiency of the nodes is improved.

CN118748658BActive Publication Date: 2026-03-17CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing distributed implementations of transaction orchestration, excessive inbound traffic to a node can severely impact its processing performance, causing transaction blockage and affecting the processing efficiency of other nodes.

Method used

By responding to flow control requests, the flow control nodes are identified, the architecture data of the distributed transaction orchestration cluster is obtained, the total flow limit is determined based on the flow control nodes and the architecture data, and the flow limit of each node is adjusted according to the node type to achieve flow control of the transaction orchestration cluster.

Benefits of technology

This effectively avoids the impact of excessive inbound traffic on the processing efficiency of other nodes, thereby improving the processing efficiency of nodes in the transaction orchestration cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748658B_ABST
    Figure CN118748658B_ABST
Patent Text Reader

Abstract

The application discloses a flow control method and device, electronic equipment and computer readable medium, and relates to the technical field of computers, and the method comprises the following steps: in response to a flow control request, determining a flow control node, and acquiring architecture data of a distributed transaction arrangement cluster; in response to the number of nodes in the distributed transaction arrangement cluster being greater than a preset threshold, determining a total flow upper limit according to the flow control node and the architecture data; determining a first type of the node corresponding to the total flow upper limit, and determining a second type corresponding to the flow control node; determining a target adjustment node according to the first type and the second type; determining a third type of the target adjustment node, acquiring a flow upper limit of each node in the distributed transaction arrangement cluster, and adjusting the flow upper limit of the target adjustment node based on the third type, the flow upper limit of each node and the total flow upper limit. The processing efficiency of the nodes in the transaction arrangement cluster is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a flow control method, apparatus, electronic device, and computer-readable medium. Background Technology

[0002] Currently, existing distributed implementations of transaction orchestration lack flow control capabilities. When the inbound traffic to a node is too high, it will severely impact the processing performance of that node, causing transaction congestion. In scenarios where transactions depend on each other across different nodes, it will also affect the processing efficiency of other nodes. Summary of the Invention

[0003] In view of this, embodiments of this application provide a flow control method, apparatus, electronic device, and computer-readable medium, which can solve the problem in existing distributed implementation methods of transaction orchestration that when the inbound traffic of a certain node is too large, it will seriously affect the processing performance of that node and cause transaction blocking. If there are scenarios where different nodes depend on each other for transactions, it will affect the processing efficiency of other nodes.

[0004] To achieve the above objectives, according to one aspect of the embodiments of this application, a flow control method is provided, comprising: in response to a flow control request, determining a flow control node and obtaining architecture data of a distributed transaction orchestration cluster; in response to the number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold, determining a total flow limit based on the flow control node and the architecture data; determining a first type of node corresponding to the total flow limit and determining a second type of flow control node; determining a target adjustment node based on the first and second types; determining a third type of target adjustment node, obtaining the flow limit of each node in the distributed transaction orchestration cluster, and adjusting the flow limit of the target adjustment node based on the third type, the flow limit of each node, and the total flow limit.

[0005] Optionally, determining the total traffic limit includes: when the flow control node is a downstream node, determining the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being 1, obtaining the configured traffic limit corresponding to the upstream node, and determining the configured traffic limit as the total traffic limit.

[0006] Optionally, determining the total traffic limit includes: when the flow control node is a downstream node, determining the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being greater than 1, obtaining the configured traffic limit corresponding to the downstream node, and determining the configured traffic limit as the total traffic limit.

[0007] Optionally, determining the target adjustment node includes: when the first type is an upstream node and the second type is a downstream node, determining the flow control node as the target adjustment node; when both the first type and the second type are downstream nodes, determining the upstream node corresponding to the flow control node as the target adjustment node.

[0008] Optionally, adjusting the traffic limit of the target adjustment node includes: in response to the third type being a downstream node, adjusting the traffic limit of the target adjustment node so that the sum of the adjusted traffic limit of the target adjustment node and the traffic limits of the other nodes in each node, excluding the target adjustment node, is not greater than the total traffic limit.

[0009] Optionally, adjusting the traffic limit of the target adjustment node includes: determining the number of target adjustment nodes in response to the third type being an upstream node; determining the traffic adjustment direction based on the traffic limit of each node; and adjusting the traffic limit of each target adjustment node based on the number, traffic adjustment direction, and total traffic limit, so that the sum of the adjusted traffic limits of each target adjustment node is not greater than the total traffic limit.

[0010] Optionally, the method further includes: in response to the number of nodes in the distributed transaction orchestration cluster being 1, executing an adaptive flow control strategy based on preset orchestration rules and the processing efficiency of different nodes.

[0011] In addition, this application also provides a flow control device, comprising: an acquisition unit configured to, in response to a flow control request, determine a flow control node and acquire architecture data of a distributed transaction orchestration cluster; a total flow limit determination unit configured to, in response to a number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold, determine a total flow limit based on the flow control node and the architecture data; a type determination unit configured to determine a first type of node corresponding to the total flow limit and determine a second type corresponding to the flow control node; a target adjustment node determination unit configured to determine a target adjustment node based on the first type and the second type; and an adjustment unit configured to determine a third type of the target adjustment node, acquire the flow limit of each node in the distributed transaction orchestration cluster, and adjust the flow limit of the target adjustment node based on the third type, the flow limit of each node, and the total flow limit.

[0012] Optionally, the total traffic limit determination unit is further configured to: when the flow control node is a downstream node, determine the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being 1, obtain the configured traffic limit corresponding to the upstream node, and determine the configured traffic limit as the total traffic limit.

[0013] Optionally, the total traffic limit determination unit is further configured to: when the flow control node is a downstream node, determine the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being greater than 1, obtain the configured traffic limit corresponding to the downstream node, and determine the configured traffic limit as the total traffic limit.

[0014] Optionally, the target adjustment node determination unit is further configured to: determine the flow control node as the target adjustment node when the first type is an upstream node and the second type is a downstream node; and determine the upstream node corresponding to the flow control node as the target adjustment node when both the first type and the second type are downstream nodes.

[0015] Optionally, the adjustment unit is further configured to: in response to the third type being a downstream node, adjust the traffic limit of the target adjustment node so that the sum of the adjusted traffic limit of the target adjustment node and the traffic limits of the other nodes in each node, excluding the target adjustment node, is not greater than the total traffic limit.

[0016] Optionally, the adjustment unit is further configured to: determine the number of target adjustment nodes in response to the third type being an upstream node; determine the flow adjustment direction based on the flow limit of each node; and adjust the flow limit of each target adjustment node based on the number, flow adjustment direction, and total flow limit, so that the sum of the flow limits of each target adjustment node after adjustment is not greater than the total flow limit.

[0017] Optionally, the flow control device further includes an adaptive flow control unit, configured to execute an adaptive flow control strategy based on preset orchestration rules and the processing efficiency of different nodes, in response to the number of nodes in the distributed transaction orchestration cluster being 1.

[0018] In addition, this application also provides a flow control electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the flow control method as described above.

[0019] In addition, this application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the flow control method as described above.

[0020] To achieve the above objectives, according to another aspect of the embodiments of this application, a computer program product is provided.

[0021] A computer program product according to an embodiment of this application includes a computer program that, when executed by a processor, implements the flow control method provided in an embodiment of this application.

[0022] One embodiment of the above invention has the following advantages or beneficial effects: In response to a flow control request, this application determines a flow control node and obtains the architecture data of a distributed transaction orchestration cluster; in response to the number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold, it determines the total flow limit based on the flow control node and the architecture data; it determines a first type of node corresponding to the total flow limit and a second type corresponding to the flow control node; based on the first and second types, it determines a target adjustment node; it determines a third type of the target adjustment node, obtains the flow limit of each node in the distributed transaction orchestration cluster, and adjusts the flow limit of the target adjustment node based on the third type, the flow limit of each node, and the total flow limit. This achieves flow control over nodes in the transaction orchestration cluster, preventing excessive inbound traffic to one node from affecting the processing efficiency of other nodes and improving the processing efficiency of nodes in the transaction orchestration cluster.

[0023] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0024] The accompanying drawings are provided to better understand this application and do not constitute an undue limitation thereof. Wherein:

[0025] Figure 1 This is a schematic diagram of the main flow of a flow control method according to an embodiment of this application;

[0026] Figure 2 This is a schematic diagram of the main flow of a flow control method according to an embodiment of this application;

[0027] Figure 3 This is a schematic flowchart of a flow control method according to an embodiment of this application;

[0028] Figure 4a This is a schematic diagram of a transaction orchestration cluster architecture for a flow control method according to an embodiment of this application;

[0029] Figure 4b This is a schematic diagram of a transaction orchestration cluster architecture for a flow control method according to an embodiment of this application;

[0030] Figure 5 This is a schematic flowchart of a flow control method according to an embodiment of this application;

[0031] Figure 6 This is a schematic diagram of the main units of a flow control device according to an embodiment of this application;

[0032] Figure 7 This is an exemplary system architecture diagram to which embodiments of this application can be applied;

[0033] Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers in the embodiments of this application. Detailed Implementation

[0034] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solutions of this application comply with relevant national laws and regulations. It should also be noted that certain software, components, models, and other existing industry solutions may be mentioned in the embodiments of this application. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions. The collection, analysis, use, transmission, and storage of user personal information involved in the technical solutions of this application all comply with relevant laws and regulations, are used for legal and reasonable purposes, are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to user personal information data, ensure that personnel authorized to access such data comply with relevant laws and regulations, and safeguard user personal information security. Once this user personal information data is no longer needed, risks should be minimized by restricting or even prohibiting data collection and / or deleting the data.

[0035] When used, including in certain relevant applications, data is deidentified to protect user privacy, for example by removing specific identifiers, controlling the amount or specificity of stored data, controlling how data is stored, and / or other methods.

[0036] Figure 1 This is a schematic diagram of the main flow of a flow control method according to an embodiment of this application, as shown below. Figure 1 As shown, the flow control method mainly includes the following steps S101-S105.

[0037] Step S101: In response to the flow control request, determine the flow control node and obtain the architecture data of the distributed transaction orchestration cluster.

[0038] In this embodiment, the execution entity of the flow control method (e.g., a server) can receive flow control requests via wired or wireless connections. After receiving the flow control request, the execution entity can determine the flow control node based on the node identifier carried in the request.

[0039] A flow control node is the node that triggers flow control, but it is not necessarily the node that requires flow limit adjustment. After identifying the flow control node, the executing entity can obtain the architecture data of the distributed transaction orchestration cluster containing that flow control node. The architecture data of this distributed transaction orchestration cluster can be as follows: Figure 4a The diagram shows an architecture where the flow control node is the downstream node and has only one upstream node; it can also be as follows: Figure 4b The diagram shows the architecture data with this flow control node as the downstream node and multiple upstream nodes.

[0040] Step S102: In response to the number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold, the total traffic limit is determined based on the flow control nodes and architecture data.

[0041] A preset threshold, for example, could be 1. When the number of nodes in the distributed transaction orchestration cluster is greater than 1, it indicates that there is more than one node in the cluster, meaning there is an upstream or downstream node corresponding to the flow control node. For example, the executing entity can determine the total traffic limit based on the flow control node, the upstream nodes in the architecture data, and the number of upstream nodes.

[0042] Specifically, determining the total traffic limit includes: when the flow control node is a downstream node, determining the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to a number of 1, obtaining the configured traffic limit corresponding to the upstream node, and determining the configured traffic limit as the total traffic limit.

[0043] like Figure 4a As shown, when the flow control node is a downstream node (e.g., Component2) and there is only one upstream node (e.g., Component1), the flow limit of the upstream node (e.g., Component1) is the total flow limit.

[0044] Specifically, the method also includes: in response to the fact that the number of nodes in the distributed transaction orchestration cluster is 1, an adaptive flow control strategy is executed according to the preset orchestration rules and the processing efficiency of different nodes.

[0045] like Figure 5 As shown, when there is only one node in the distributed transaction orchestration cluster, that is, only Component1 (i.e., transaction orchestration unit 1), an adaptive flow control strategy is executed according to the preset orchestration rules and the processing efficiency of different nodes.

[0046] For example, such as Figure 5 In the transaction orchestration unit 1 shown, the flow control node module has a flow control limit of 400 (in this embodiment, the flow control limit is the same as the traffic limit, and the two have the same meaning). If A=1 in the message, node 1 is triggered (outbound call); otherwise, it is skipped. If B=1 in the message, node 2 is triggered (internal processing); otherwise, it is skipped. Node 1 processes each transaction in 200ms, and node 2 processes each transaction in 10ms. It is evident that the processing efficiency of node 2 is 10 times that of node 1.

[0047] When the number of external calls reaches the flow control limit of 400 (i.e., when the number of external call messages accessed by the access module of transaction orchestration unit 1 reaches the flow control limit of 400), the flow control node can perform flow control based on the number of transactions with A=1 and B=1 in the current transaction, specifically by determining the branch based on the number of transactions with A=1 and B=1 in the current transaction, and selecting the corresponding outgoing module to outgoing to the corresponding branch for flow control. Specifically, the following strategies (1)-(4) can be selected for flow control.

[0048] (1) Efficiency optimization strategy: Strengthen the restriction on transactions with A=1, and allow more transactions with B=1 to access the site. The strategy is to reduce the traffic limit for A=1 and increase the traffic limit for B=1.

[0049] (2) Node 1 optimization strategy: Prioritize allowing transactions with A=1 to access the network, and restrict transactions with A≠1 to access the network. The strategy is to gradually reduce the traffic limit for A≠1, while keeping the total traffic limit of 400 unchanged;

[0050] (3) Node 2 optimization strategy: Prioritize allowing transactions with B=1 to access the network, and restrict transactions with B≠1 to access the network. The strategy is to gradually reduce the traffic limit for transactions with B≠1, while keeping the total traffic limit of 400 unchanged;

[0051] (4) Priority strategy: Prioritize transactions with A≠1 or B≠1, and the transactions will be directly approved. The strategy is to reduce the traffic limit for A≠1 or B≠1, while keeping the total traffic limit of 400 unchanged.

[0052] Step S103: Determine the first type of node corresponding to the total flow limit and determine the second type of flow control node.

[0053] The first type can be either an upstream node or a downstream node. The second type can be either an upstream node or a downstream node.

[0054] Step S104: Determine the target adjustment node based on the first type and the second type.

[0055] Based on the first and second types, the upstream and downstream relationships between the nodes corresponding to the total flow limit and the flow control nodes are determined. Based on these determined upstream and downstream relationships, the target adjustment node is identified. The target adjustment node is the node whose flow limit needs to be adjusted; it can be a flow control node or an upstream node of a flow control node. The target adjustment node is determined by the first and second types.

[0056] Step S105: Determine the third type of the target adjustment node, obtain the traffic limit of each node in the distributed transaction orchestration cluster, and adjust the traffic limit of the target adjustment node based on the third type, the traffic limit of each node, and the total traffic limit.

[0057] The third type can be either an upstream node or a downstream node.

[0058] Specifically, adjusting the traffic limit of the target adjustment node includes: in response to the third type being a downstream node, adjusting the traffic limit of the target adjustment node so that the sum of the adjusted traffic limit of the target adjustment node and the traffic limits of other nodes in each node, excluding the target adjustment node, does not exceed the total traffic limit.

[0059] If the third type is a downstream node, such as Figure 4a As shown, if the target adjustment node is a downstream node (e.g., Component2), then the node corresponding to the total traffic limit (e.g., Component1) can be an upstream node. The traffic limit of the target adjustment node (e.g., Component2) is adjusted so that the sum of the traffic limit of the adjusted target adjustment node (e.g., the traffic limit of Component2 is 400) and the traffic limit of other downstream nodes in the architecture data of the corresponding distributed transaction orchestration cluster (e.g., the traffic limit of Component3 is 500) (e.g., 400+500=900) is less than or equal to (i.e., not greater than) the total traffic limit (e.g., the traffic limit of Component1 is 1000).

[0060] This embodiment, in response to a traffic control request, identifies a flow control node and obtains the architecture data of the distributed transaction orchestration cluster. In response to a situation where the number of nodes in the distributed transaction orchestration cluster exceeds a preset threshold, it determines the total traffic limit based on the flow control node and the architecture data. It then determines a first type of node corresponding to the total traffic limit and a second type corresponding to the flow control node. Based on the first and second types, it identifies a target adjustment node. Finally, it determines a third type of the target adjustment node, obtains the traffic limit of each node in the distributed transaction orchestration cluster, and adjusts the traffic limit of the target adjustment node based on the third type, the traffic limits of each node, and the total traffic limit. This achieves traffic control over nodes in the transaction orchestration cluster, preventing excessive inbound traffic to one node from affecting the processing efficiency of other nodes and improving the overall processing efficiency of the nodes in the transaction orchestration cluster.

[0061] Figure 2 This is a schematic diagram of the main flow of a flow control method according to an embodiment of this application, as shown below. Figure 2 As shown, the flow control method mainly includes the following steps S201-S206.

[0062] Step S201: In response to the flow control request, determine the flow control node and obtain the architecture data of the distributed transaction orchestration cluster.

[0063] Flow control requests can be requests to control the flow limit. A flow control node is the node that triggers flow control, but it is not necessarily the node that needs to adjust the flow limit. After identifying the flow control node, the executing entity can obtain the architecture data of the distributed transaction orchestration cluster containing that flow control node. The architecture data of this distributed transaction orchestration cluster can be as follows: Figure 4a The diagram shows an architecture where the flow control node is the downstream node and has only one upstream node; it can also be as follows: Figure 4b The diagram shows the architecture data with this flow control node as the downstream node and multiple upstream nodes.

[0064] In step S202, in response to the number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold, the total traffic limit is determined based on the flow control nodes and architecture data.

[0065] Specifically, determining the total traffic limit includes: when the flow control node is a downstream node, determining the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to a number greater than 1, obtaining the configured traffic limit corresponding to the downstream node, and determining the configured traffic limit as the total traffic limit.

[0066] like Figure 4b As shown, when the flow control node is a downstream node (e.g., Component2) and the number of corresponding upstream nodes (e.g., Component1.1 and Component1.2) is greater than one, that is, there are multiple upstream nodes, then the flow control node (e.g., Component2) can be used as the node corresponding to the total traffic limit. The configured traffic limit of the flow control node (i.e., the downstream node) (e.g., Component2) can be obtained, and the configured traffic limit of the flow control node (i.e., the downstream node) (e.g., Component2) (e.g., 400) can be determined as the total traffic limit.

[0067] Step S203: Determine the first type of node corresponding to the total flow limit and determine the second type of flow control node.

[0068] The first type can be either an upstream node or a downstream node. The second type can be either an upstream node or a downstream node.

[0069] Step S204: When the first type is an upstream node and the second type is a downstream node, the flow control node is determined as the target adjustment node.

[0070] like Figure 4a As shown, the first type is the upstream node, that is, the node corresponding to the total traffic limit (e.g., 1000) (e.g., Component1) is the upstream node; the second type is the downstream node, that is, the flow control node (e.g., Component2) is the downstream node. Then the downstream node (i.e., the flow control node) (e.g., Component2) is determined as the target adjustment node, that is, the node whose traffic limit needs to be adjusted.

[0071] Step S205: When both the first type and the second type are downstream nodes, the upstream node corresponding to the flow control node is determined as the target adjustment node.

[0072] like Figure 4b As shown, when both the first and second types are downstream nodes, that is, when the node corresponding to the total traffic limit (e.g., Component2) and the flow control node (e.g., Component2) are both downstream nodes, the upstream node corresponding to the flow control node (e.g., Component1.1 and Component1.2) is determined as the target adjustment node. For example, based on the total traffic limit (e.g., 400) of the flow control node (downstream node), the traffic limits of upstream nodes Component1.1 and Component1.2 are both reduced from 400 to 200, so that the sum of the traffic limits of upstream nodes Component1.1 and Component1.2 does not exceed the total traffic limit of the flow control node (downstream node) (e.g., Component2) of 400, in order to meet the flow control requirements of the flow control node (downstream node) (e.g., Component2).

[0073] Step S206: Determine the third type of the target adjustment node, obtain the traffic limit of each node in the distributed transaction orchestration cluster, and adjust the traffic limit of the target adjustment node based on the third type, the traffic limit of each node, and the total traffic limit.

[0074] The third type can be either an upstream node or a downstream node.

[0075] Specifically, adjusting the traffic limit of the target adjustment nodes includes: determining the number of target adjustment nodes in response to the third type being an upstream node; determining the traffic adjustment direction based on the traffic limit of each node; and adjusting the traffic limit of each target adjustment node based on the number, traffic adjustment direction, and total traffic limit, so that the sum of the adjusted traffic limits of each target adjustment node is not greater than the total traffic limit.

[0076] If the third type is an upstream node, such as Figure 4b As shown, if the target adjustment nodes (e.g., Component1.1 and Component1.2) are upstream nodes, then the node corresponding to the total traffic limit (e.g., Component2) can be a downstream node. Determine the number of target adjustment nodes (e.g., 2, Component1.1 and Component1.2 respectively). Based on the traffic limit of each node in the distributed transaction orchestration cluster (e.g., the traffic limit of Component1.1 is 400 and the traffic limit of Component1.2 is 400), determine the traffic adjustment direction (e.g., downward adjustment). Based on the quantity (e.g., 2), the direction of traffic adjustment (e.g., downward adjustment), and the total traffic limit (e.g., 400), adjust the traffic limit of each target adjustment node (e.g., Component1.1 and Component1.2) (e.g., reduce the traffic limit of Component1.1 from 400 to 200 and reduce the traffic limit of Component1.2 from 400 to 200) so that the sum of the adjusted traffic limits of each target adjustment node (e.g., Component1.1 and Component1.2) (e.g., the traffic limit of Component1.1 is 200 and the traffic limit of Component1.2 is 200) (200+200=400) is not greater than the total traffic limit (e.g., the traffic limit of Component2 is 400).

[0077] The embodiments of this application can realize traffic control of nodes in a transaction orchestration cluster, avoid the impact of excessive inbound traffic of a certain node on the processing efficiency of other nodes, and improve the processing efficiency of nodes in the transaction orchestration cluster.

[0078] Figure 3 This is a schematic flowchart of a flow control method according to an embodiment of this application. This embodiment adds a flow control node module to a distributed transaction orchestration component, such as... Figure 3 As shown in ①. For example, in Figure 3In this process, the access module of transaction orchestration unit 1 receives call messages sent by external calls. When the flow reaches the flow control node module ①, this flow control node module ① can connect to various processing programs, including: 1. internal processing and 2. outbound calls. Outbound calls can be made through process node 1, internal processing can be made through process node 2, and branches can be determined through branch nodes, which can then connect to the outbound module. The outbound module can connect to the access modules of transaction orchestration unit 2 and transaction orchestration unit 3. The access module of transaction orchestration unit 2 connects to flow control node module ① - node 3 (outbound call processing program) - node 4 (internal processing processing program) - outbound module - (return) external call. The access module of transaction orchestration unit 3 (internal processing processing program) connects to flow control node module ① - node 5 - outbound module - (return) external call.

[0079] In this embodiment, the flow control node module is described as follows:

[0080] This module can implement basic traffic control capabilities through static configuration, such as total traffic limit, interface traffic limit, and user traffic limit.

[0081] This module can implement static flow control capabilities within this unit based on transaction orchestration rules. For example, in transaction orchestration unit 1, the transaction orchestration rule is: if A=1 in the input message, node 1 is invoked; if A=2, node 2 is invoked; if A≠1 or 2, nodes 1 and 2 are skipped. In this unit, the flow control module can configure flow limit thresholds based on the value of A.

[0082] The following are the configuration parameters:

[0083] Total traffic limit: 1000 TPS

[0084] A=1, traffic limit 300 TPS

[0085] A=2, traffic limit 300 TPS

[0086] A≠1 or 2, traffic limit 400 TPS

[0087] This module can implement weighted flow control capabilities within the unit based on transaction orchestration rules. For example, in transaction orchestration unit 1, the transaction orchestration rule is: if A=1, then node 1 is invoked; if A=2, then node 2 is invoked; if A≠1 or 2, then nodes 1 and 2 are skipped. Furthermore, transactions with A=1 are prioritized for passage, followed by transactions with A=2, and finally transactions with A≠1 or 2. This priority can be represented by configured weights.

[0088] The following are the configuration parameters:

[0089] Total traffic limit: 1000 TPS

[0090] A=1 Traffic limit weight 6

[0091] A=2, traffic limit weight 3

[0092] A≠1 or 2 Traffic limit weight 1

[0093] When the total traffic exceeds the 1000 TPS limit, the flow control module will allocate different A values ​​for the traffic limit based on the weight. The specific algorithm is: Traffic limit = Total traffic limit X (weight value / 10).

[0094] This module enables routing and flow control within this unit based on transaction orchestration rules. Example: Adding a flow control cap (i.e., a flow limit) to the system's configured routing table, as shown below:

[0095] Router ID: 001; Router Name: Company Initial Inspection; Deployment Component Number: Component1; Access Address: 128.0.0.1; Traffic Limit: 1000;

[0096] Router ID: 002; Router Name: Company Re-inspection; Deployment Component Number: Component2; Access Address: 128.0.0.2; Traffic Limit: 400. Corresponds to A=1 or 2;

[0097] Router ID: 003; Router Name: Company Exit; Deployment Component Number: Component3; Access Address: 128.0.0.3; Traffic Limit: 500. Corresponds to A≠1 or 2.

[0098] The flow control modules can communicate with each other and implement dynamic flow control adjustment strategies according to the transaction orchestration rules.

[0099] Strategy 1: When downstream nodes implement flow control, notify upstream nodes to restrict the traffic of the corresponding rules.

[0100] Figure 4a This is a schematic diagram of a transaction orchestration cluster architecture for a flow control method according to an embodiment of this application, as shown below. Figure 4a As shown, when Component2 experiences flow control, this node notifies Component2 to limit the transaction flow for A=1 or 2. That is, Component1's flow limit of 1000 is increased by 400 for A=1 or 2.

[0101] Strategy 2: When there are multiple upstream nodes, notify the upstream nodes to limit the overall traffic.

[0102] Figure 4b This is a schematic diagram of a transaction orchestration cluster architecture for a flow control method according to an embodiment of this application. Figure 4b As shown:

[0103] Router ID: 001.1; Router Name: Company Initial Inspection; Deployment Component Number: Component1.1; Access Address: 128.0.0.1; Traffic Limit: 400.

[0104] Router ID: 001.2; Router Name: Company Re-inspection; Deployment Component Number: Component1.2; Access Address: 128.0.0.1; Traffic Limit: 400.

[0105] Router ID: 002; Router Name: Company Exit; Deployment Component Number: Component2; Access Address: 128.0.0.2; Traffic Limit: 400.

[0106] When Component2 implements flow control, it notifies Component1.1 and Component1.2 to limit the transaction traffic of the two upstream nodes. Specifically, Component1.1 and Component1.2 lower their traffic cap to 200 to comply with Component2's control requirements.

[0107] Figure 5 This is a schematic diagram of the main flow of a flow control method according to an embodiment of this application. In the transaction orchestration unit 1, the flow control node module has a flow control limit of 400 (in this embodiment, the flow control limit is the same as the traffic limit, and the two have the same meaning). If A=1 in the message, node 1 is triggered (outbound call); otherwise, it is skipped. If B=1 in the message, node 2 is triggered (internal processing); otherwise, it is skipped. Node 1 processes each transaction in 200ms, and node 2 processes each transaction in 10ms. It can be seen that the processing efficiency of node 2 is 10 times that of node 1.

[0108] When the number of external calls reaches the flow control limit of 400 (i.e., when the number of external call messages accessed by the access module of transaction orchestration unit 1 reaches the flow control limit of 400), the flow control node can perform flow control based on the number of transactions with A=1 and B=1 in the current transaction, specifically by determining the branch based on the number of transactions with A=1 and B=1 in the current transaction, and selecting the corresponding outgoing module to outgoing to the corresponding branch for flow control. Specifically, the following strategies (1)-(4) can be selected for flow control.

[0109] (1) Efficiency optimization strategy: Strengthen the restriction on transactions with A=1, and allow more transactions with B=1 to access the site. The strategy is to reduce the traffic limit for A=1 and increase the traffic limit for B=1.

[0110] (2) Node 1 optimization strategy: Prioritize allowing transactions with A=1 to access the network, and restrict transactions with A≠1 to access the network. The strategy is to gradually reduce the traffic limit for A≠1, while keeping the total traffic limit of 400 unchanged;

[0111] (3) Node 2 optimization strategy: Prioritize allowing transactions with B=1 to access the network, and restrict transactions with B≠1 to access the network. The strategy is to gradually reduce the traffic limit for transactions with B≠1, while keeping the total traffic limit of 400 unchanged;

[0112] (4) Priority strategy: Prioritize transactions with A≠1 or B≠1, and the transactions will be directly approved. The strategy is to reduce the traffic limit for A≠1 or B≠1, while keeping the total traffic limit of 400 unchanged.

[0113] The flow control method in this application embodiment adds a transaction orchestration flow control module to achieve flow control for each node in a distributed transaction orchestration cluster. The flow control module is deployed on each distributed node, and each node has the same flow control function, achieving flow control for its own node. In addition to basic flow control capabilities, the flow control module can perform personalized flow management based on the current node's transaction orchestration rules. Distributed transaction orchestration is a method that distributes transaction orchestration capabilities across different units through distributed deployment of application units. Flow control refers to a mechanism for controlling inbound requests and information flow to prevent system congestion, playing a crucial role in maintaining the availability and stability of computer systems. This application embodiment provides a flow control module for this scenario based on distributed transaction orchestration. This flow control module is bound to the transaction orchestration project and also supports distributed deployment. It can not only achieve inbound flow control for deployed units but also achieve flow control under different rules based on transaction orchestration rules. The flow control method based on the distributed transaction orchestration cluster in this application embodiment supports flow control of the transaction orchestration cluster at the local and global levels through static, weighted, and dynamic adjustment methods. This solves the problem that distributed transaction orchestration clusters currently cannot implement flow control or that flow control is unrelated to transaction encoding rules, making flow control strategies better adaptable to the business scenarios of the cluster.

[0114] Figure 6 This is a schematic diagram of the main units of a flow control device according to an embodiment of this application. Figure 6 As shown, the flow control device 600 includes an acquisition unit 601, a total flow upper limit determination unit 602, a type determination unit 603, a target adjustment node determination unit 604, and an adjustment unit 605.

[0115] The acquisition unit 601 is configured to respond to a flow control request, determine the flow control node, and acquire the architecture data of the distributed transaction orchestration cluster.

[0116] The total traffic limit determination unit 602 is configured to determine the total traffic limit based on the flow control nodes and architecture data in response to the number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold.

[0117] The type determination unit 603 is configured to determine the first type of the node corresponding to the total flow limit and the second type of the flow control node.

[0118] The target adjustment node determination unit 604 is configured to determine the target adjustment node based on a first type and a second type.

[0119] Adjustment unit 605 is configured to determine the third type of the target adjustment node, obtain the traffic limit of each node in the distributed transaction orchestration cluster, and adjust the traffic limit of the target adjustment node based on the third type, the traffic limit of each node, and the total traffic limit.

[0120] In some embodiments, the total traffic limit determination unit 602 is further configured to: when the flow control node is a downstream node, determine the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being 1, obtain the configuration traffic limit corresponding to the upstream node, and determine the configuration traffic limit as the total traffic limit.

[0121] In some embodiments, the total traffic limit determination unit 602 is further configured to: when the flow control node is a downstream node, determine the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being greater than 1, obtain the configuration traffic limit corresponding to the downstream node, and determine the configuration traffic limit as the total traffic limit.

[0122] In some embodiments, the target adjustment node determination unit 604 is further configured to: determine the flow control node as the target adjustment node when the first type is an upstream node and the second type is a downstream node; and determine the upstream node corresponding to the flow control node as the target adjustment node when both the first type and the second type are downstream nodes.

[0123] In some embodiments, the adjustment unit 605 is further configured to: adjust the traffic limit of the target adjustment node in response to the third type being a downstream node, such that the sum of the adjusted traffic limit of the target adjustment node and the traffic limits of the other nodes in each node, excluding the target adjustment node, is not greater than the total traffic limit.

[0124] In some embodiments, the adjustment unit 605 is further configured to: determine the number of target adjustment nodes in response to the third type being an upstream node; determine the flow adjustment direction based on the flow limit of each node; and adjust the flow limit of each target adjustment node based on the number, flow adjustment direction, and total flow limit, so that the sum of the flow limits of each target adjustment node after adjustment is not greater than the total flow limit.

[0125] In some embodiments, the flow control device further includes Figure 6The adaptive flow control unit, not shown, is configured to execute an adaptive flow control strategy based on preset orchestration rules and the processing efficiency of different nodes, in response to a single node in the distributed transaction orchestration cluster.

[0126] It should be noted that the flow control method and flow control device in this application are related in terms of specific implementation, so repeated content will not be described again.

[0127] Figure 7 An exemplary system architecture 700 is shown that can be applied to the flow control method or flow control device of the present application embodiments.

[0128] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, and 703, a network 704, and a server 705. Network 704 serves as the medium for providing communication links between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0129] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0130] Terminal devices 701, 702, and 703 can be various electronic devices with a flow control processing screen and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0131] Server 705 can be a server providing various services, such as a backend management server supporting traffic control requests submitted by users using terminal devices 701, 702, and 703 (for example only). In response to a traffic control request, the backend management server can determine the flow control node and obtain the architecture data of the distributed transaction orchestration cluster; in response to a situation where the number of nodes in the distributed transaction orchestration cluster exceeds a preset threshold, it determines the total traffic limit based on the flow control node and the architecture data; it determines the first type of node corresponding to the total traffic limit and the second type corresponding to the flow control node; based on the first and second types, it determines the target adjustment node; it determines the third type of the target adjustment node, obtains the traffic limit of each node in the distributed transaction orchestration cluster, and adjusts the traffic limit of the target adjustment node based on the third type, the traffic limits of each node, and the total traffic limit. This achieves traffic control over the nodes in the transaction orchestration cluster, preventing excessive inbound traffic to one node from affecting the processing efficiency of other nodes and improving the processing efficiency of the nodes in the transaction orchestration cluster.

[0132] It should be noted that the flow control method provided in this application embodiment is generally executed by server 705, and correspondingly, the flow control device is generally set in server 705.

[0133] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0134] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 800 suitable for implementing a terminal device according to the embodiments of this application. Figure 8 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0135] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the computer system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0136] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.

[0137] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this application.

[0138] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, including but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0140] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit, a total traffic limit determination unit, a type determination unit, a target adjustment node determination unit, and an adjustment unit. The names of these units do not necessarily constitute a limitation on the unit itself.

[0141] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to, in response to a flow control request, determine a flow control node and obtain architecture data of a distributed transaction orchestration cluster; in response to the number of nodes in the distributed transaction orchestration cluster exceeding a preset threshold, determine a total flow limit based on the flow control node and the architecture data; determine a first type of node corresponding to the total flow limit and a second type corresponding to the flow control node; determine a target adjustment node based on the first and second types; determine a third type of the target adjustment node, obtain the flow limit of each node in the distributed transaction orchestration cluster, and adjust the flow limit of the target adjustment node based on the third type, the flow limit of each node, and the total flow limit.

[0142] The computer program product of this application includes a computer program that, when executed by a processor, implements the flow control method in the embodiments of this application.

[0143] According to the technical solution of the embodiments of this application, traffic control of nodes in a transaction orchestration cluster can be realized, so as to avoid the processing efficiency of other nodes being affected by excessive inbound traffic of a certain node, thereby improving the processing efficiency of nodes in the transaction orchestration cluster.

[0144] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A flow control method, characterized by, The method comprises: in response to a flow control request, determining a flow control node, and obtaining architecture data of a distributed transaction orchestration cluster; in response to the number of nodes in the distributed transaction orchestration cluster being greater than a preset threshold, determining a total flow upper limit according to the flow control node and the architecture data, comprising: when the flow control node is a downstream node, determining the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being 1, obtaining a configured flow upper limit corresponding to the upstream node, and determining the configured flow upper limit as the total flow upper limit; when the flow control node is a downstream node, determining the number of upstream nodes corresponding to the downstream node based on the architecture data; in response to the number being greater than 1, obtaining a configured flow upper limit corresponding to the downstream node, and determining the configured flow upper limit as the total flow upper limit; determining a first type of node corresponding to the total flow upper limit, and determining a second type corresponding to the flow control node; determining a target adjustment node according to the first type and the second type, comprising: when the first type is an upstream node and the second type is a downstream node, determining the flow control node as the target adjustment node; when the first type and the second type are both downstream nodes, determining the upstream node corresponding to the flow control node as the target adjustment node; determining a third type of the target adjustment node, obtaining flow upper limits of each node in the distributed transaction orchestration cluster, and adjusting the flow upper limit of the target adjustment node based on the third type, the flow upper limits of each node, and the total flow upper limit, the third type being an upstream node or a downstream node.

2. The method of claim 1, wherein, The method further comprises: in response to the third type being a downstream node, adjusting the flow upper limit of the target adjustment node so that the sum of the flow upper limits of the other downstream nodes except the target adjustment node in the each node is not greater than the total flow upper limit.

3. The method of claim 1, wherein, The method further comprises: in response to the third type being an upstream node, determining the number of target adjustment nodes; determining a flow adjustment direction according to the flow upper limits of each node; adjusting the flow upper limit of each target adjustment node according to the number, the flow adjustment direction, and the total flow upper limit, so that the sum of the adjusted flow upper limits of each target adjustment node is not greater than the total flow upper limit.

4. The method of claim 1, wherein, The method further comprises: in response to the number of nodes in the distributed transaction orchestration cluster being 1, executing an adaptive flow control strategy according to a preset orchestration rule and processing efficiency of different nodes.

5. A flow control device, characterized by The method comprises: an obtaining unit configured to, in response to a flow control request, determine a flow control node, and obtain architecture data of a distributed transaction orchestration cluster; a total flow upper limit determining unit configured to, in response to the number of nodes in the distributed transaction orchestration cluster being greater than a preset threshold, determine a total flow upper limit according to the flow control node and the architecture data; The type determination unit is configured to determine a first type of a node corresponding to the total traffic upper limit, and determine a second type of the flow control node; The target adjustment node determination unit is configured to determine a target adjustment node according to the first type and the second type; The adjustment unit is configured to determine a third type of the target adjustment node, obtain a traffic upper limit of each node in the distributed transaction scheduling cluster, and adjust the traffic upper limit of the target adjustment node based on the third type, the traffic upper limit of each node, and the total traffic upper limit, the third type being an upstream node or a downstream node; The total traffic upper limit determination unit is further configured to: when the flow control node is a downstream node, determine a number of upstream nodes corresponding to the downstream node based on the architecture data; and in response to the number being 1, obtain a configured traffic upper limit corresponding to the upstream node, and determine the configured traffic upper limit as the total traffic upper limit. The total traffic upper limit determination unit is further configured to: when the flow control node is a downstream node, determine a number of upstream nodes corresponding to the downstream node based on the architecture data; and in response to the number being greater than 1, obtain a configured traffic upper limit corresponding to the downstream node, and determine the configured traffic upper limit as the total traffic upper limit. The target adjustment node determination unit is further configured to: when the first type is an upstream node and the second type is a downstream node, determine the flow control node as the target adjustment node; and when the first type and the second type are both downstream nodes, determine an upstream node corresponding to the flow control node as the target adjustment node.

6. The apparatus of claim 5, wherein, The adjustment unit is further configured to: in response to the third type being a downstream node, adjust the traffic upper limit of the target adjustment node, so that the adjusted traffic upper limit of the target adjustment node and a sum of traffic upper limits of other downstream nodes except the target adjustment node in the each node are not greater than the total traffic upper limit.

7. The apparatus of claim 5, wherein, The adjustment unit is further configured to: in response to the third type being an upstream node, determine a number of the target adjustment nodes; determine a traffic adjustment direction according to the traffic upper limit of each node; adjust the traffic upper limit of each target adjustment node according to the number, the traffic adjustment direction, and the total traffic upper limit, so that a sum of the adjusted traffic upper limits of each target adjustment node is not greater than the total traffic upper limit.

8. A flow control electronic device, characterized by The apparatus comprises: one or more processors; a memory 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 of any one of claims 1-4.

9. A computer readable medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1-4.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Message traffic control method and device and related system

    CN106921587A

  • Traffic control method and device

    CN113055300A