A flow control method and device

By constructing a multi-level flow control structure, counting data traffic and configuring flow control thresholds according to the correlation between flow control targets, the problem of flow control in the existing technology being unsuitable for complex scenarios is solved, and efficient and real-time control of data flow is achieved.

CN113055300BActive Publication Date: 2024-09-10ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911375000.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-27
Publication Date
2024-09-10
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

Existing traffic control methods are difficult to adapt to the uneven traffic of different service nodes in complex business scenarios, and cannot effectively coordinate traffic control between nodes in distributed scenarios, resulting in poor overall results.

Method used

By building a multi-level flow control structure, based on the correlation between flow control targets, data traffic is counted layer by layer from the bottom to the top, and flow control thresholds are configured from the top to the bottom based on the top-level traffic and quotas to achieve each flow control Associative configuration and real-time control of targets.

Benefits of technology

It improves the adaptability and efficiency of traffic control, can be applied to complex and changeable business scenarios, and achieves rapid statistics and real-time control of data traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113055300B
    Figure CN113055300B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a flow control method and device, which includes: constructing a multi-level flow control structure according to the association relationship of flow control targets, in which the bottom-level flow control target is the basic unit for generating data flow; according to the association relationship between the flow control targets between the levels, the bottom-level flow control target determines the data flow of the upper-level flow control target, until the data flow of the top-level flow control target is determined; according to the data flow and flow quota of the top-level flow control target, the flow control threshold of the next-level flow control target associated with the top-level flow control target is configured; and the flow control target controls the corresponding data flow according to the configured flow control threshold. The above scheme is used to realize overall flow control of the associated targets, thereby improving the adaptability of the targets to flow changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a flow control method and device. Background Art

[0002] With the continuous development of Internet technology, in practical applications, traffic needs to be controlled due to limited network load capacity or other reasons such as to ensure service quality. The current traffic control method is mainly based on traffic information. When the traffic information indicates that the traffic is greater than the preset threshold, the traffic is controlled to ensure the availability of the system.

[0003] However, for increasingly complex business scenarios, the current common flow control methods can no longer meet the needs. Among them, the common flow control methods are mainly divided into static flow control and dynamic flow control. Static flow control is to allocate a certain flow control threshold to the service node based on the number of service nodes and quota conditions. When the number of service nodes remains unchanged, the flow control threshold of each service node remains stable. Although the control method of this static flow control is simple, it is not flexible enough and cannot adapt to the situation of uneven traffic on different service nodes. Dynamic flow control dynamically collects the traffic conditions of each service node, calculates a new traffic allocation strategy, and controls the flow of each service node according to the new traffic allocation strategy. Although dynamic flow control has certain flexibility, when the above two flow control methods are applied to distributed scenarios, flow control can only be performed on a single service node or a single flow control target. The lack of associated and coordinated processing capabilities between nodes or targets makes the overall flow control effect poor. Summary of the invention

[0004] In view of the above problems, an embodiment of the present invention proposes a flow control method and device to perform overall flow control on associated targets and improve the adaptability of the targets to flow changes.

[0005] The embodiment of the present invention provides the following technical solutions:

[0006] In one aspect, the present invention provides a flow control method, comprising:

[0007] The flow control targets are constructed into a multi-level flow control structure according to the association relationship, wherein the bottom-level flow control target in the flow control structure is a basic unit for generating data traffic;

[0008] According to the association relationship between the flow control targets of the layers, the data flow of the flow control target of the upper layer is determined by the flow control target of the bottom layer, until the data flow of the flow control target of the top layer is determined;

[0009] According to the data flow and flow quota of the top-level flow control target, configure the flow control threshold of the next-level flow control target associated with the top-level flow control target;

[0010] The flow control target controls the corresponding data flow according to the configured flow control threshold.

[0011] On the other hand, the present invention provides a flow control method, which is applied to a flow control target and specifically includes:

[0012] Acquiring data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure to determine the data flow of the first flow control target, wherein the flow control structure is constructed according to the association relationship between the flow control targets;

[0013] Uploading the data traffic of the first flow control target to the associated upper-level flow control target;

[0014] Receiving the flow quota configured by the upper-level flow control target to determine the flow control threshold of the first flow control target;

[0015] The flow control threshold is used to control the data flow of the next level of flow control target.

[0016] In another aspect, the present invention provides a flow control device, specifically comprising:

[0017] A construction unit, used to construct a multi-level flow control structure according to the association relationship of the flow control targets, wherein the bottom-level flow control target in the flow control structure is a basic unit for generating data traffic;

[0018] A flow determination unit, configured to determine the data flow of the upper layer flow control target from the bottom layer flow control target according to the association relationship between the flow control targets between the layers determined by the multi-layer flow control structure constructed by the construction unit, until the data flow of the top layer flow control target is determined;

[0019] a threshold configuration unit, configured to configure a flow control threshold of a next-layer flow control target associated with the top-level flow control target according to the data flow and flow quota of the top-level flow control target determined by the flow determination unit;

[0020] The flow control unit is used to control the corresponding data flow according to the configured flow control threshold by the flow control target.

[0021] In another aspect, the present invention provides a flow control device, specifically comprising:

[0022] an acquisition unit, configured to acquire data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure to determine the data flow of the first flow control target, wherein the flow control structure is constructed according to an association relationship between flow control targets;

[0023] an uploading unit, configured to upload the data flow of the first flow control target to an associated upper-level flow control target;

[0024] A receiving unit, configured to receive the flow quota configured by the flow control target at the previous level to determine the flow control threshold of the first flow control target;

[0025] A flow control unit is used to control the data flow of the next level flow control target using the flow control threshold.

[0026] On the other hand, the present invention provides a processor, which is used to run a computer program, wherein the program executes the above-mentioned flow control method when running.

[0027] On the other hand, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is coupled to the memory to run the computer program to execute the above-mentioned flow control method.

[0028] Through the above technical scheme, a flow control method and device provided by an embodiment of the present invention analyzes the flow control targets and constructs a flow control structure with a multi-level structure according to their association relationship, and based on the flow control structure, the data flow of the flow control targets in each layer is counted layer by layer from the bottom layer to the top layer, and then according to the corresponding data flow and flow quota, the flow control thresholds of the flow control targets in each layer are configured layer by layer from the top layer to the bottom layer, so that the flow control threshold set for each flow control target is associated with the flow control target associated with it, thereby achieving the purpose of associating and configuring the flow control thresholds of each flow control target based on the overall control requirements of the flow control target. At the same time, according to the flow control structure, it is also possible to realize rapid statistics of the data flow of the flow control target, thereby achieving the purpose of real-time control of the data flow. It can be seen that the data flow control method proposed in the embodiment of the present invention can be applied to complex and changeable business scenarios.

[0029] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0031] Figure 1 A flow chart of a flow control method proposed in an embodiment of the present invention is shown;

[0032] Figure 2A flow chart of a flow control method based on a directed acyclic topology graph proposed in an embodiment of the present invention is shown;

[0033] Figure 3 A schematic diagram showing the structure of a traffic topology diagram in an embodiment of the present invention is shown;

[0034] Figure 4 A flow chart of a flow control method for a flow control target proposed in an embodiment of the present invention is shown;

[0035] Figure 5 A flow chart of a flow control method for a flow control target and based on a directed acyclic topology graph proposed in an embodiment of the present invention is shown;

[0036] Figure 6 A block diagram of a flow control device according to an embodiment of the present invention is shown;

[0037] Figure 7 A block diagram showing another flow control device according to an embodiment of the present invention is shown;

[0038] Figure 8 A block diagram showing another flow control device according to an embodiment of the present invention is shown;

[0039] Fig. 9 A block diagram showing the composition of another flow control device proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0040] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0041] The embodiment of the present invention provides a flow control method, such as Figure 1 As shown, the method includes:

[0042] Step 101: construct a multi-level flow control structure according to the association relationship of the flow control targets.

[0043] The association between the flow control targets includes the association between the data flow changes generated by the target entities, or the linkage between the target entities when controlling the data flow. For example, for two flow control targets A and B, when the data flow of B changes, the data flow of A will change with the change of B. The change can be proportional or linear, or nonlinear, or when A reduces its data flow threshold, the data flow threshold of B will also decrease accordingly.

[0044] In this embodiment, the flow control target may refer to a logical entity that needs to perform flow control, such as a tenant in a multi-tenant system, a file in a distributed file system, etc. It may also be a combination of multiple logical entities, that is, the flow of multiple logical entities can be jointly controlled by managing the flow control target.

[0045] The constructed multi-level flow control structure can be represented as a node relationship graph with flow control targets as nodes and associations as edges. In this embodiment, the flow control targets are layered according to preset dimensions (such as flow, transmission rate, etc.), and the flow control targets in the same layer do not have a flow association relationship. That is to say, for a flow control target, other flow control targets with which it has an association relationship must be located in other layers. In this way, the flow control targets in the same layer will not interfere with each other. The data flow of a flow control target can be regarded as the sum of the data flow of the lower-level nodes associated with it, and the flow control threshold of the flow control target can also be regarded as the upper limit of the flow control threshold of the lower-level nodes associated with it. In addition, the nodes in the flow control structure do not have a ring structure, wherein the bottom-level flow control target in the flow control structure is the basic unit for generating data flow, and the basic unit cannot be split again. For the flow control management system, the bottom-level flow control target can also be called a flow control access point, and the non-bottom-level flow control target is a flow control group composed of at least one basic unit.

[0046] Since the flow control target in the multi-level flow control structure is a directed acyclic structure, and the flow control targets at the same level have no association relationship, the data flow of a flow control target is the sum of the data flows of the flow control targets in the lower level associated with it. When the flow control target performs flow control operations, the flow control purpose is achieved by controlling the flow control thresholds of multiple flow control targets under it.

[0047] Step 102: According to the correlation relationship between the flow control targets between the layers, the data flow of the flow control target of the upper layer is determined by the flow control target of the bottom layer, until the data flow of the flow control target of the top layer is determined.

[0048] Since the bottom-level flow control target in the multi-level flow control structure is the basic unit for generating data traffic, the total data traffic in the flow control process can be obtained by collecting the sum of the data traffic of each flow control target in this layer. By collecting the data traffic of each flow control target in this layer, and then based on the association relationship in the flow control structure, the data traffic of the flow control targets in each level is counted layer by layer from bottom to top.

[0049] This step is to determine the data flow corresponding to the bottom-level flow control target in the multi-level flow control structure by collecting the data flow of the basic unit. Then, according to the correlation relationship between the flow control targets between the levels, the data flow of the flow control target on the previous level is counted. By counting layer by layer, the data flow of the flow control targets in each level can be determined from the bottom level to the top level according to the correlation relationship between the flow control targets in the multi-level flow control structure.

[0050] Step 103: According to the data flow and flow quota of the top-level flow control target, configure the flow control threshold of the next-level flow control target associated with the top-level flow control target.

[0051] After counting the data traffic corresponding to all flow control targets, the flow control thresholds of each level of flow control targets will be configured in order from the top to the bottom in the flow control structure. Among them, when configuring the top-level flow control target, the flow control thresholds of each flow control target are obtained by configuring the preset flow control strategy based on the data traffic of each flow control target and the given flow quota.

[0052] When a flow control target is configured with a corresponding flow control threshold, the flow control threshold will be used as the flow control quota for configuring the next layer of flow control targets associated with the flow control target, and the corresponding flow control thresholds will be configured for the flow control targets in the lower layer. And so on, until the flow control target at the bottom layer of the flow control structure is configured, thus realizing the flow control threshold configuration for all flow control targets.

[0053] Step 104: The flow control target controls the corresponding data flow according to the configured flow control threshold.

[0054] After obtaining the corresponding flow control threshold, the flow control target will determine its current data flow based on the flow control threshold. If it does not exceed the flow control threshold, no processing will be performed. Otherwise, if it exceeds the flow control threshold, the data flow will be controlled not to exceed the flow control threshold.

[0055] It can be seen from the above examples that a flow control method provided by an embodiment of the present invention, when performing flow control management on multiple flow control targets with associated relationships, needs to first build a flow control structure with multiple levels based on the associated system. The flow control structure is a directed acyclic structure. Based on the flow control structure, the actual data flow of each flow control target is counted from bottom to top, and then the flow control threshold of each flow control target is configured from top to bottom, so that the configuration of the flow control threshold is determined based on the control result of the associated flow control target. In this way, the flow control thresholds of all flow control targets can change with the adjustment of the associated relationship, so that it is suitable for flow control business scenarios with complex and changeable associations.

[0056] Further, corresponding to the flow control method in the above embodiment, in a preferred embodiment of the present invention, a flow topology diagram is used to represent a multi-level flow control structure, and a specific implementation process of executing flow control based on the flow topology diagram is as follows: Figure 2 As shown, the steps include:

[0057] Step 201: construct a traffic topology map based on the association relationship between flow control targets.

[0058] The traffic topology graph is a directed acyclic graph, and any two nodes with an association relationship in the traffic topology graph are located in different levels, that is, there is no association relationship between any two nodes in the same level.

[0059] Specifically, Figure 3 An example of the structure of the traffic topology diagram is shown in the figure. The traffic topology diagram is divided into three layers, among which the flow control target at the bottom layer is the flow control access point, which can collect the data traffic actually generated by the logical entity. This layer is generally defined as the flow control access layer, and the middle layer in the figure is defined as the flow control unit layer. The nodes in this layer are defined as flow control units. Generally, one flow control unit will correspond to a flow control access point, but one flow control access point only corresponds to one and only one flow control unit. The top layer in the figure is defined as the flow control group layer, and the nodes in this layer are defined as flow control groups. Generally, one flow control group will correspond to multiple flow control units, or multiple flow control access points, and one flow control unit can correspond to multiple flow control groups. Based on the traffic topology diagram, it can be known that the flow control target in the embodiment of the present invention can be a flow control access point, a flow control unit, or a flow control group. Of course, according to the specific structure of the association relationship, there can be multiple flow control group layers and flow control unit layers.

[0060] Step 202: According to the association relationship between the flow control targets between the layers, the data flow of the flow control target of the upper layer is determined by the flow control target of the bottom layer, until the data flow of the flow control target of the top layer is determined.

[0061] for Figure 3 In the traffic topology diagram shown, the solid arrow indicates the feedback direction of the traffic, that is, the node in the flow control access layer collects the data traffic generated in real time, which is used as the data traffic of the node, and for the node in the flow control unit layer, its data traffic is the sum of the data traffic of the nodes in the flow control access layer associated with the node, for example, the data traffic of U1 is the sum of the data traffic of the P1, P2, and P3 nodes. In this way, the data traffic of each node in the flow control unit layer can be counted, and then the data traffic of each node in the flow control group layer can be counted based on the data traffic of each node in the flow control unit layer, such as: the data traffic of G1 is the sum of the data traffic of the U1 and U2 nodes. In this way, the data traffic of each node in the traffic topology diagram can be determined by statistics layer by layer.

[0062] Afterwards, according to Figure 3 The direction of the dotted arrow in the middle configures the flow control threshold of each node from top to bottom.

[0063] Step 203: Determine the traffic quota of the node based on the traffic quota configured by the parent node of the node in the traffic topology graph.

[0064] Generally, the traffic quota is a numerical value given for all flow control targets, and the overall data traffic is controlled within the quota range. Therefore, for the traffic topology diagram in this embodiment, the traffic quota will be used to configure the nodes in the top layer. After the nodes in the top layer are configured with the traffic threshold, they will be configured layer by layer downwards, and the traffic quota of the nodes in each layer will depend on the traffic threshold configured by the parent node of the node, and its traffic threshold will be used as the total traffic quota, and the traffic quota that the node can be allocated is determined by the configuration strategy.

[0065] Furthermore, when a node in the traffic topology has multiple parent nodes, the traffic quota with the lowest configuration among the multiple parent nodes is selected as the traffic quota of the node. Figure 3 The U2 node in the example can obtain a traffic quota based on the traffic threshold of the G1 node when determining the traffic quota. At the same time, the traffic threshold of the G2 node can also obtain a traffic quota. At this time, in order to ensure that the total data traffic does not exceed the total quota, the traffic quota with a lower traffic quota will be selected as the traffic quota of the U2 node.

[0066] Step 204: Determine the number of child nodes of the node according to the structure of the traffic topology graph.

[0067] Step 205: Determine the flow control threshold of the sub-node according to the number of sub-nodes and the flow quota.

[0068] The above steps 203-205 illustrate the process of configuring a flow control threshold for a child node, where the flow control threshold of a node will be used as the total flow quota of the flow control threshold configured for its child nodes. The configuration process of the flow control threshold can be regarded as the process of allocating the flow quota of the node to multiple child nodes. Therefore, the more child nodes there are, the less flow quota is allocated to each child node, and the lower the value of the corresponding flow control threshold is.

[0069] This embodiment does not make any specific limitation on the allocation strategy. For example, when the data traffic corresponding to all sub-nodes is similar to each other, the traffic quota corresponding to each sub-node can be evenly allocated, and then the flow control threshold can be determined based on the traffic quota. When the data traffic corresponding to the sub-nodes varies greatly, the traffic quota can be allocated proportionally according to the actual data traffic, and then the flow control threshold can be determined.

[0070] It should be noted that the traffic quota allocated to a node is not the same as its final flow control threshold. In actual applications, the traffic quota of a node refers to the maximum data traffic of the node. Since the actual data traffic of some individual nodes may exceed the traffic quota, in order to ensure that the overall data traffic does not exceed the total traffic quota, the flow control threshold is generally determined to be lower than the traffic quota.

[0071] Among them, a simplified way to configure the flow control threshold in this embodiment can be: based on the flow control quota or flow control threshold of the node, a flow control threshold for all its child nodes is determined, and when the data flow of a child node exceeds the flow control threshold, the data flow of the child node is controlled below the flow control threshold.

[0072] For setting the corresponding flow control threshold for each child node, since a lower flow control threshold may be selected according to different parent nodes, the sum of the flow thresholds of multiple nodes with the same parent node will be lower than the flow quota or flow threshold of the parent node, resulting in waste of the configured flow. That is, after flow control, the total data flow will be much lower than the total flow quota.

[0073] In order to avoid this situation, in a preferred embodiment of the invention, by determining the difference between the sum of the flow thresholds of multiple nodes with the same parent node and the flow quota or flow threshold of the parent node, when the difference reaches a preset threshold, the flow control threshold value of the designated node will be adjusted, including increasing or decreasing the flow control threshold value. The designated node can be determined based on the data flow of the node, such as determining a node with high data flow as a designated node, or it can be a node that has a unique association with a node in the hierarchy of its parent node, such as Figure 3 In the flow control unit layer, the U1 and U3 nodes.

[0074] Furthermore, when configuring the flow control threshold of the next layer of flow control target associated with the flow control target, that is, when configuring the flow control threshold of the sub-node according to the flow control quota of the node, a preferred embodiment of the present invention is implemented as follows: setting a priority for each sub-node, and the priority is used to indicate the importance of the sub-node for data transmission, that is, important sub-nodes need to be configured with higher traffic thresholds. When configuring, first obtain the priority of each sub-node, and configure the flow control threshold of the sub-node in order from high to low priority, or adjust the already configured flow control threshold from large to small.

[0075] In addition, combined with the above-mentioned priority, the priority can be further combined with the data flow of the child node to obtain the corresponding configuration strategy, that is, the priority is represented by a factor coefficient. The higher the priority, the lower the factor coefficient. The corresponding configuration strategy is: determine the product of the factor coefficient and the data flow. The higher the product value, the lower the corresponding flow threshold.

[0076] Step 206: The flow control target controls the corresponding data flow according to the configured flow control threshold.

[0077] Furthermore, when the flow control method described in the above embodiment is applied to a distributed system, since there is no association between multiple flow control targets in the same layer of the multi-level flow control structure, when configuring the flow control thresholds of multiple flow control targets in the same layer, multiple parent nodes with an association relationship can be assigned to multiple computing nodes in the distributed system for configuration calculation, thereby improving the configuration efficiency.

[0078] Above Figure 1-2 The embodiments shown are all explained from the perspective of the entire flow control structure, how each flow control target in the flow control structure controls the data flow to improve management efficiency. Based on the above embodiments, the following independently explains from the perspective of a certain flow control target in the flow control structure, the data flow control process of the flow control target and the associated upper-layer flow control target and / or lower-layer flow control target.

[0079] Specific as Figure 4 As shown, including:

[0080] Step 301: Acquire the data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure to determine the data flow of the first flow control target.

[0081] The multi-level flow control structure is constructed based on the relationship between multiple flow control targets, and the underlying flow control target is the basic unit for generating data traffic. Figure 1 The multi-level fluidic structure in the illustrated embodiment.

[0082] Step 302: Upload the data traffic of the first flow control target to the associated upper-level flow control target.

[0083] Through the above two steps, in a multi-level flow control structure, data traffic is aggregated layer by layer from the bottom-level flow control target to the top-level flow control target.

[0084] It should be noted that when the first flow control target sends data traffic to the flow control target of the upper layer, when there are multiple flow control targets of the upper layer, the data traffic of the first flow control target can also be split according to the actual association relationship, so as to ensure that the flow control target of the upper layer does not repeat the data traffic of the underlying flow control target. For example, the weights of multiple flow control targets of the upper layer are pre-determined in the multi-level flow control structure, and the uploaded data traffic is determined according to the weights.

[0085] Step 303: Receive the flow quota configured by the upper-level flow control target to determine the flow control threshold of the first flow control target.

[0086] Step 304: Use the flow control threshold to control the data flow of the next level of flow control target.

[0087] In practical applications, if the first flow control target is a basic unit in a multi-level flow control structure, the flow control threshold is used to control its own data flow. If the first flow control target is a non-bottom-level flow control target in a multi-level flow control structure, the flow control threshold is used to control the sum of the data flows of the flow control targets at the next level to prevent the sum from exceeding the flow control threshold.

[0088] Combining the above steps, it can be seen that steps 301 and 302 are the process of the first flow control target transmitting data traffic from bottom to top in the multi-level flow control structure, while steps 303 and 304 are the process of the flow control target controlling data traffic from top to bottom in the multi-level flow control structure. For each flow control target, it is necessary to aggregate and upload the data traffic of the lower-level flow control targets, and to control the data traffic of itself and the lower-level flow control targets according to the traffic quota configured by the upper-level flow control target. In this way, the control of each flow control target changes with the adjustment of the association relationship, so that it can be applied to flow control business scenarios with complex and changeable associations.

[0089] Furthermore, corresponding to the above Figure 4 In the flow control method of the embodiment, in a preferred embodiment of the present invention, a flow topology diagram is used to represent the multi-level flow control structure, and the flow topology diagram is as follows Figure 3 In the directed acyclic topology shown in the flow topology, any two nodes with an associated relationship in the flow topology are located in different levels. The following is a description of the above in conjunction with the flow topology. Figure 4 The flow control method shown in the figure has the following specific steps: Figure 5 As shown, including:

[0090] Step 401: determine the child nodes of the traffic node according to the association relationship of the nodes in the topology graph, and determine the sum of the data traffic of the child nodes as the data traffic of the traffic node.

[0091] This step is to determine the data flow of the traffic node, which is the sum of the data flow of all child nodes, for example, Figure 3 The data flow of U1 is the sum of the data flow of P1, P2 and P3, and P1 is the basic unit without child nodes, and its data flow is the actual data flow generated by the node.

[0092] Step 402: Upload the data traffic of the traffic node to the parent node.

[0093] for Figure 3 The U2 node in the network can upload the sum of the data traffic of P4 and P5 to G1 and G2 at the same time, or it can upload the data traffic separately according to a certain weight, such as uploading 60% of the data traffic to G1 and 40% of the data traffic to G2.

[0094] Step 403: Receive the flow control quota configured by the parent node for the flow node.

[0095] Since the multi-level flow control structure will configure the flow control quota of each node layer by layer from the top node downward, each flow node will receive the flow control quota configured for it by its associated parent node, that is, U1 will receive the flow control quota configured by G1, U3 will receive the flow control quota configured by G2, and U2 will receive the flow control quotas configured by G1 and G2 respectively because it has two parent nodes. At this time, U2 will select the flow control quota with the lowest configuration as the flow control quota of the flow node.

[0096] Step 404: Determine the flow control quota of the child node according to the flow control quota and the number of child nodes, and send the flow control quota to the corresponding child node.

[0097] In this step, the flow control quota can be evenly distributed according to the number of sub-nodes, or the corresponding distribution weight can be determined according to the priority of each sub-node, and then the flow control quota of each sub-node is determined based on the distribution weight and the flow control quota. The priority set for the sub-node is used to indicate the importance of the sub-node for data transmission, that is, important sub-nodes need to be configured with higher flow control quotas.

[0098] After the flow control quota is sent to the corresponding child node, each child node determines the flow control threshold according to the flow control quota to control the data flow in the child node. In this way, the top-down configuration process of the flow control quota in the multi-level flow control structure is realized, and each node determines the flow control threshold according to the configured flow control quota to control the data flow.

[0099] Furthermore, after each traffic node sends the flow control quota downward, since its associated child nodes will determine their corresponding flow control thresholds, in this embodiment, the traffic node can further adjust the flow control threshold of each child node according to the flow control threshold of its child node. Generally, the flow control threshold determined by the child node will be less than the flow control quota, so the sum of the flow control thresholds of each child node counted by the traffic node will also be less than the flow control quota of the traffic node. However, when the difference between the two is too large, it means that the flow control threshold set by the child node is too low. Therefore, the traffic node will determine whether the difference between the sum of the flow control thresholds of all child nodes and their flow control quotas reaches the preset threshold. If it reaches, it will send an adjustment instruction to the designated child node to adjust the value of the flow control threshold of the designated child node, wherein the designated child node refers to a node that has a unique association with the traffic node. For example, when G1 finds that the flow control threshold determined by U1 and U2 is too low and needs to be adjusted, since U2 is also associated with G2, G1 will only send an adjustment instruction to U1.

[0100] Furthermore, as a response to the above Figure 1-2 In order to realize the method shown in the figure, the embodiment of the present invention provides a flow control device, which is mainly used to control the overall flow of the associated target and improve the adaptability of the target to flow changes. For the sake of ease of reading, this device embodiment will no longer repeat the details of the above method embodiments one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the above method embodiments. The device is as follows Figure 6 As shown, specifically including:

[0101] A construction unit 51 is used to construct a multi-level flow control structure according to the association relationship of the flow control targets, wherein the bottom-level flow control target in the flow control structure is a basic unit for generating data traffic;

[0102] A flow determination unit 52, configured to determine the data flow of the upper layer flow control target from the bottom layer flow control target according to the association relationship between the flow control targets between the layers determined by the multi-layer flow control structure constructed by the construction unit 51, until the data flow of the top layer flow control target is determined;

[0103] A threshold configuration unit 53, configured to configure a flow control threshold of a next-layer flow control target associated with the top-layer flow control target according to the data flow and flow quota of the top-layer flow control target determined by the flow determination unit 52;

[0104] The flow control unit 54 is used to control the corresponding data flow according to the flow control threshold configured by the threshold configuration unit 53 by the flow control target.

[0105] Furthermore, the construction unit 51 is specifically used to construct a traffic topology graph according to the association relationship between flow control targets, and the traffic topology graph is a directed acyclic graph, wherein any two nodes with an association relationship in the traffic topology graph are located in different levels.

[0106] Further, such as Figure 7 As shown, the threshold configuration unit 53 includes:

[0107] A quota determination module 531, configured to determine the traffic quota of the node based on the traffic quota configured by the parent node of the node in the traffic topology graph;

[0108] A quantity determination module 532, configured to determine the number of child nodes of the node according to the structure of the traffic topology graph;

[0109] The threshold determination module 533 is used to determine the flow control threshold of the sub-node according to the number of sub-nodes determined by the number determination module 532 and the flow quota determined by the quota determination module 531.

[0110] Furthermore, the quota determination module 531 is also used for, when a node in the traffic topology graph has multiple parent nodes, selecting the traffic quota with the lowest configuration among the multiple parent nodes as the traffic quota of the node.

[0111] Furthermore, the threshold determination module 533 is also used to increase the value of the flow control threshold of a specified node when the difference between the sum of the traffic thresholds of multiple nodes having the same parent node and the traffic quota of the parent node reaches a preset threshold. The specified node is a node that has a unique association with the nodes in the hierarchy of the parent node.

[0112] Further, such as Figure 7 As shown, when configuring the flow control threshold of the next layer of flow control target associated with the top layer of flow control target until the flow control threshold of the bottom layer of flow control target is determined, the threshold configuration unit 53 also includes:

[0113] An acquisition module 534, used to acquire the priority of the next layer of flow control target;

[0114] The adjustment module 535 is used to adjust the flow control threshold of the next layer of flow control target from large to small according to the priority obtained by the acquisition module 534 from high to low.

[0115] Further, such as Figure 7 As shown, the device also includes:

[0116] The allocation unit 55 is used to use multiple computing nodes in the distributed system to respectively configure the flow control thresholds of multiple flow control targets in the same layer.

[0117] In addition, an embodiment of the present invention further provides a flow control device, which can be arranged in a service node to which a flow control target belongs. Figure 8 As shown, including:

[0118] A flow acquisition unit 61, configured to acquire data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure to determine the data flow of the flow control target, wherein the flow control structure is constructed according to the association relationship between the flow control targets;

[0119] A traffic uploading unit 62, configured to upload the data traffic of the flow control target to the associated upper-level flow control target;

[0120] A quota receiving unit 63, configured to receive the flow quota configured by the upper-level flow control target to determine the flow control threshold of the flow control target;

[0121] The flow control unit 64 is used to control the data flow of the next level flow control target by using the flow control threshold.

[0122] Furthermore, the multi-level flow control structure is a directed acyclic flow topology graph, in which any two nodes with an associated relationship in the flow topology graph are located in different levels, the bottom-level nodes are the basic units for generating data flow, and the flow control target is any flow node in the flow topology graph.

[0123] Further, such as Fig. 9 As shown, the acquisition unit 61 includes:

[0124] A node determination module 611 is used to determine a subnode of a flow node corresponding to the first flow control target according to an association relationship of nodes in the topology graph;

[0125] The traffic determination module 612 is used to determine the sum of the data traffic of the sub-nodes determined by the node determination module 611 as the data traffic of the traffic node.

[0126] Further, such as Fig. 9 As shown, the device also includes:

[0127] The quota receiving unit 63 is further used to receive the flow control quota configured by the parent node for the flow node;

[0128] A quota determination unit 65, configured to determine the flow control quota of the child node according to the flow control quota obtained by the quota receiving unit 63 and the number of child nodes;

[0129] The quota sending unit 66 is used to send the flow control quota determined by the quota determining unit 65 to the corresponding child node.

[0130] Further, such as Fig. 9 As shown, the quota determination unit 65 is also used to select the flow control quota with the lowest configuration among the parent nodes as the flow control quota of the traffic node when there are multiple parent nodes.

[0131] Further, such as Fig. 9 As shown, the device also includes:

[0132] A threshold acquisition unit 67, configured to acquire a flow control threshold of the child node, wherein the flow control threshold is determined based on a configured flow control quota;

[0133] The instruction sending unit 68 is used to send an adjustment instruction to the designated child node to adjust the value of the flow control threshold of the designated child node when the difference between the sum of the flow control thresholds of all child nodes obtained by the threshold acquisition unit 67 and the flow control quota reaches a preset threshold, wherein the designated child node is a node having a unique association with the traffic node.

[0134] Further, such as Fig. 9 As shown, the quota determination unit 65 includes:

[0135] The weight determination module 651 is used to obtain the priority of each sub-node and determine the allocation weight of the sub-node according to the priority;

[0136] The quota determination module 652 is used to determine the flow control quota of the child node according to the allocation weight determined by the weight determination module 651 and the flow control quota.

[0137] Furthermore, an embodiment of the present invention further provides a processor, the processor being used to run a program, wherein when the program is run, the following is performed: Figure 1 , 2 and Figure 4 , 5 The flow control method described.

[0138] In addition, an embodiment of the present invention further provides an electronic device, the electronic device includes a processor and a memory, the memory is used to store a program, the processor is coupled to the memory, and is used to run the program to perform the following steps: Figure 1 , 2 and Figure 4 , 5 The flow control method described.

[0139] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0140] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.

[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0142] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0143] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0148] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0149] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0150] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0151] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0152] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0153] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A flow control method, characterized in that: include: Constructing a multi-level flow control structure according to the association relationship of the flow control targets, wherein the bottom-level flow control target in the flow control structure is a basic unit for generating data traffic; According to the association relationship between the flow control targets between the layers, the data flow of the flow control target of the upper layer is determined by the flow control target of the bottom layer, until the data flow of the flow control target of the top layer is determined; According to the data flow and flow quota of the top-level flow control target, configure the flow control threshold of the next-level flow control target associated with the top-level flow control target; The flow control target controls the corresponding data flow according to the configured flow control threshold.

2. The method according to claim 1, characterized in that: The multi-level flow control structure is constructed according to the association relationship of the flow control targets, including: A flow topology graph is constructed according to the association relationship between flow control targets, wherein the flow topology graph is a directed acyclic graph, wherein any two nodes with an association relationship in the flow topology graph are located in different levels.

3. The method according to claim 2, characterized in that The configuring, according to the data flow and flow quota of the top-level flow control target, a flow control threshold of a next-level flow control target associated with the flow control target comprises: Determine the traffic quota of the node based on the traffic quota configured by the parent node of the node in the traffic topology graph; Determining the number of child nodes of the node according to the structure of the traffic topology graph; The flow control threshold of the sub-node is determined according to the number of the sub-nodes and the flow quota.

4. The method according to claim 3, characterized in that The method further comprises: When a node in the traffic topology graph has multiple parent nodes, the traffic quota with the lowest configuration among the multiple parent nodes is selected as the traffic quota of the node.

5. The method according to claim 4, characterized in that The method further comprises: When the difference between the sum of the traffic thresholds of multiple nodes with the same parent node and the traffic quota of the parent node reaches a preset threshold, the value of the flow control threshold of the designated node is adjusted. The designated node is a node that has a unique association with the nodes in the level where the parent node is located.

6. The method according to any one of claims 1 to 5, characterized in that When configuring the flow control threshold of the next layer of flow control target associated with the top layer of flow control target, the method further includes: Obtaining the priority of the next layer of flow control target; According to the priority from high to low, the flow control threshold of the next layer of flow control target is adjusted from large to small.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Multiple computing nodes in a distributed system are used to respectively configure flow control thresholds of multiple flow control targets in the same layer.

8. A flow control method, characterized in that: include: Acquiring data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure to determine the data flow of the first flow control target, wherein the multi-level flow control structure is constructed according to the association relationship between the flow control targets; Uploading the data traffic of the first flow control target to the associated upper-level flow control target; Receiving the flow quota configured by the upper-level flow control target to determine the flow control threshold of the first flow control target; The flow control threshold is used to control the data flow of the next level of flow control target.

9. The method according to claim 8, characterized in that The multi-level flow control structure is a directed acyclic flow topology graph, in which any two nodes with an associated relationship in the flow topology graph are located in different levels, the bottom-level nodes are the basic units for generating data traffic, and the first flow control target is any flow node in the flow topology graph.

10. The method according to claim 9, characterized in that Acquiring data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure to determine the data flow of the flow control target includes: Determine a child node of the traffic node corresponding to the first flow control target according to the association relationship of the nodes in the topology graph; The sum of the data flows of the sub-nodes is determined as the data flow of the flow node.

11. The method according to claim 9, characterized in that The method further comprises: Receive the flow control quota configured by the parent node for the flow node; Determine the flow control quota of the child node according to the flow control quota and the number of child nodes; The flow control quota is sent to the corresponding child node.

12. The method according to claim 11, characterized in that Also includes: When there are multiple parent nodes, the flow control quota with the lowest configuration among the parent nodes is selected as the flow control quota of the traffic node.

13. The method according to claim 11, characterized in that The method further comprises: Obtaining a flow control threshold of the child node, where the flow control threshold is determined based on a configured flow control quota; If the difference between the sum of the flow control thresholds of all child nodes and the flow control quota reaches a preset threshold, an adjustment instruction is sent to the designated child node to adjust the value of the flow control threshold of the designated child node, wherein the designated child node is a node that has a unique association with the traffic node.

14. The method according to claim 11, characterized in that Determining the flow control quota of the child node according to the flow control quota and the number of child nodes includes: Obtaining the priority of each child node, and determining the allocation weight of the child node according to the priority; The flow control quota of the child node is determined according to the allocation weight and the flow control quota.

15. A flow control device, characterized in that: The device comprises: A construction unit, used to construct a multi-level flow control structure according to the association relationship of the flow control targets, wherein the bottom-level flow control target in the flow control structure is a basic unit for generating data traffic; A flow determination unit, configured to determine the data flow of the upper layer flow control target from the bottom layer flow control target according to the association relationship between the flow control targets between the layers determined by the multi-layer flow control structure constructed by the construction unit, until the data flow of the top layer flow control target is determined; a threshold configuration unit, configured to configure a flow control threshold of a next-layer flow control target associated with the top-level flow control target according to the data flow and flow quota of the top-level flow control target determined by the flow determination unit; The flow control unit is used to control the corresponding data flow according to the configured flow control threshold by the flow control target.

16. A flow control device, characterized in that: The device comprises: a flow acquisition unit, configured to acquire data flow of a next-level flow control target associated with a first flow control target based on a multi-level flow control structure, so as to determine the data flow of the first flow control target, wherein the multi-level flow control structure is constructed according to the association relationship between the flow control targets; A traffic uploading unit, configured to upload the data traffic of the first traffic control target to an associated upper-level traffic control target; A quota receiving unit, configured to receive the flow quota configured by the upper-level flow control target to determine the flow control threshold of the first flow control target; A flow control unit is used to control the data flow of the next level flow control target using the flow control threshold.

17. A processor, characterized in that: The processor is used to run a computer program, wherein the program executes the flow control method according to any one of claims 1 to 14 when running.

18. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, coupled to the memory, is configured to run the computer program to execute the flow control method according to any one of claims 1 to 14.