Flow control method and device, equipment and storage medium
By dynamically adjusting the target traffic threshold in distributed table storage, the problem of low resource utilization of storage nodes is solved, and the overall performance and user experience are improved.
Patent Information
- Application Number
- CN202411364526.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-10
AI Technical Summary
In distributed table storage, due to different user data access situations and business needs, the resources of some storage nodes are difficult to fully utilize, thereby reducing overall performance.
By obtaining the actual use traffic of the target object on each target node, dynamically determine the target traffic threshold based on the total target traffic, the number of target nodes and the actual use traffic, adjust the traffic usage in real time to ensure reasonable scheduling and utilization of resources.
It effectively improves resource utilization, improves overall performance, and lays the foundation for providing stable and reliable services and improving user experience.
Smart Images

Figure CN119109869A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to technical fields such as artificial intelligence, cloud computing, big data, and big models. Background Art
[0002] In distributed table storage, a multi-tenant isolation mechanism is a common requirement, that is, in a table storage cluster, the traffic of each user does not exceed the limit, and the traffic of multiple users does not affect each other. For example, in a specific business scenario, the total traffic limit threshold of each user (which can be referred to as Quota) is usually evenly distributed to each storage node in the cluster. However, due to the differences in users' actual data access conditions and business needs, the traffic distribution of users on each storage node is often uneven. Therefore, it is difficult to fully utilize the resources of some storage nodes, thereby reducing the overall performance. Summary of the invention
[0003] The present disclosure provides a flow control method, apparatus, device and storage medium.
[0004] According to one aspect of the present disclosure, there is provided a flow control method, comprising:
[0005] Obtaining the actual usage flow of the target object on each of the N target nodes; the N target nodes are all nodes used to undertake the total target flow of the target object; N is an integer greater than or equal to 2;
[0006] Based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, a target traffic threshold of the target object on each target node is determined to limit the traffic used by the target object on the target node using the target traffic threshold.
[0007] According to another aspect of the present disclosure, there is provided a flow control device, comprising:
[0008] A traffic acquisition unit, used to acquire the actual usage traffic of the target object on each of the N target nodes; the N target nodes are all nodes used to undertake the total target traffic of the target object; N is an integer greater than or equal to 2;
[0009] The traffic control unit is used to determine the target traffic threshold of the target object on each target node based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, so as to use the target traffic threshold to limit the traffic used by the target object on the target node.
[0010] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0011] at least one processor; and
[0012] a memory communicatively connected to the at least one processor; wherein,
[0013] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0014] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.
[0015] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.
[0016] The disclosed scheme can timely determine the target traffic threshold used to limit the traffic usage of the target object on each target node according to the actual traffic usage of the target object on each target node. In this way, the disclosed scheme can not only reflect the actual load situation of each node in real time, but also use the actual load situation as the basis for subsequent reasonable adjustment of the resources of each node, thereby avoiding the problem of low overall resource utilization due to overload of a single node, effectively improving resource utilization while improving overall performance, thereby laying a foundation for providing more stable and reliable services and improving user experience.
[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0019] FIG. 1( a ) and FIG. 1( b ) are schematic diagrams of distributed table storage in a specific scenario;
[0020] Figure 2 1 is a schematic diagram of a flow chart of a method for controlling a flow rate according to an embodiment of the present disclosure;
[0021] Figure 3 The flow chart of the flow control method according to the embodiment of the present disclosure is as follows: Figure 2 ;
[0022] Figure 4 is a schematic diagram of an application scenario of a flow control method in a specific example according to an embodiment of the present disclosure;
[0023] Figure 5 The flow chart of the flow control method according to the embodiment of the present disclosure is as follows: Figure 3 ;
[0024] Figure 6 is a schematic diagram of an application scenario of the flow control method in another specific example according to an embodiment of the present disclosure;
[0025] FIG. 7( a ) and FIG. 7( b ) are schematic diagrams of application scenarios of the flow control method in another specific example according to an embodiment of the present disclosure;
[0026] FIG8( a ) and FIG8( b ) are comparison diagrams of the effects before and after flow control using the disclosed solution;
[0027] Fig. 9 is a schematic structural diagram of a flow control device according to an embodiment of the present disclosure;
[0028] Fig.10 It is a block diagram of an electronic device used to implement the flow control method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0030] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this article refer to multiple similar technical terms and distinguish them. They do not mean to limit the order or to limit them to only two. For example, the first feature and the second feature refer to two types / two features. The first feature can be one or more, and the second feature can also be one or more.
[0031] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the specific embodiments below. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0032] The following is a description of the related technologies of the embodiments of the present disclosure. The following related technologies are optional solutions that can be arbitrarily combined with the technical solutions of the embodiments of the present disclosure, and they all belong to the protection scope of the embodiments of the present disclosure.
[0033] In distributed table storage, a multi-tenant isolation mechanism is a common requirement, that is, in a table storage cluster, the traffic of each user does not exceed the limit, and the traffic of multiple users does not affect each other. For example, in a specific business scenario, the total traffic limit threshold of each user (which can be referred to as Quota) is usually evenly distributed to each storage node in the cluster to limit the traffic on each storage node. As shown in Figure 1(a), the total traffic quota of object A is 100, and the total traffic quota of object B is 200. There are 4 storage nodes that receive the traffic of object A and object B, which can be recorded as node 1 to node 4 respectively. Then the total traffic quota of each object can be evenly distributed to each storage node, and then corresponding restrictions can be made on each storage node. For example, after the total traffic quota of object A is evenly distributed to the 4 storage nodes, the traffic quota on each storage node (that is, node 1, node 2, node 3 or node 4) is 25. Similarly, the traffic quota of object B on the 4 storage nodes (that is, node 1, node 2, node 3 or node 4) is 50. In other words, based on the above distribution, it can be guaranteed that the traffic used by object A on each storage node does not exceed 25, and the traffic used by object B on each storage node does not exceed 50. When the traffic used by the objects is relatively uniform, the solution can meet business needs. In this way, effective isolation between different objects is achieved.
[0034] However, when the traffic used by a single object (such as object A or object B) on each storage node is uneven, the total traffic quota of the object cannot be fully utilized. For example, for the scenario shown in Figure 1(a), in one case, the situation shown in Figure 1(b) may occur: the actual traffic used by object A on nodes 1 to 4 is 25, 24, 25, and 24, respectively, that is, the total traffic actually used by object A on the four storage nodes is 98. Relative to the total traffic quota of object A of 100, the resource utilization rate of object A is 98%; the actual traffic used by object B on nodes 1 to 4 is 25, 25, 50, and 25, respectively, that is, the total traffic actually used by object B on the four storage nodes is 125. Relative to the total traffic quota of object B of 200, the resource utilization rate of object B is only 62.5%. This is because the traffic on node 3 has reached the single-machine limit (that is, it has reached the traffic quota of 50 of node 3). Although the other three nodes have excess traffic quotas, node 3 cannot use it. Therefore, the resources that can be used by object B account for a low proportion of the total resources, that is, the utilization rate of system resources is low.
[0035] Based on this, the disclosed solution provides a flow control method to adjust the flow quota of the object on each storage node in real time according to the load of the object on each storage node, thereby improving the resource utilization of the object on each storage node.
[0036] Specifically, Figure 2 1 is a schematic flow chart of a flow control method according to an embodiment of the present application. The method can be optionally applied to electronic devices, such as personal computers, servers, server clusters and other electronic devices.
[0037] Further, the method includes at least part of the following contents. Figure 2 As shown, including:
[0038] Step S201: obtaining the actual usage flow of the target object on each of the N target nodes.
[0039] Here, the N target nodes are all nodes for receiving the total target traffic (eg, the total traffic quota described above) of the target object. For example, in one example, the target node may specifically be a storage node in a distributed table storage scenario.
[0040] Further, in one example, N is an integer greater than or equal to 2.
[0041] Here, it should be noted that the actual traffic used by the target object on the target node may specifically refer to the traffic actually used on the target node to execute the target object's business (such as search, map and other businesses, or large model reasoning and other businesses).
[0042] Step S202: Based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, determine the target traffic threshold of the target object on each target node, so as to use the target traffic threshold to limit the traffic used by the target object on the target node.
[0043] It should be noted that the target traffic threshold (for example, which can be recorded as traffic quota) of the target object on each target node can be dynamically determined by using the target traffic threshold determined in real time to limit the traffic used by the target object on the target node. For example, the traffic used by the target object on the target node is limited to not exceed the target traffic threshold of the target node.
[0044] In this way, the disclosed scheme can timely determine the target traffic threshold used to limit the traffic usage of the target object on each target node according to the actual traffic usage of the target object on each target node. In this way, the disclosed scheme can not only reflect the actual load situation of each node in real time, but also use the actual load situation as the basis for subsequent reasonable adjustment of the resources of each node, thereby avoiding the problem of low overall resource utilization due to overload of a single node, effectively improving resource utilization while improving overall performance, thereby laying the foundation for providing more stable and reliable services and improving user experience.
[0045] Furthermore, in practical applications, the disclosed solution can determine a target traffic threshold suitable for each target node based on the uneven distribution of actual traffic of the target object on each target node, so that the resources on each target node can be fully utilized. At the same time, the total resources are fully utilized, effectively avoiding the situation where some nodes are overloaded while other nodes are idle, thereby improving the overall performance of the system, meeting the different business needs of users, and thus improving the user experience.
[0046] Furthermore, in a specific example, when it is detected that the actual traffic usage of the target object on the target node exceeds the current traffic threshold of the target object on the target node, the traffic threshold adjustment process can be triggered. That is, when it is detected that the actual traffic usage of the target object on the target node exceeds the current traffic threshold of the target object on the target node, the above-mentioned step S202 is executed. In this way, the traffic situation on each target node is discovered in time, and the threshold adjustment is made quickly according to the traffic situation, thereby ensuring that the target object can enjoy stable and reliable services, thereby improving the user experience.
[0047] Further, in a specific example, the target flow threshold of the target object on each target node can be obtained in the following manner; specifically, the above-mentioned determination of the target flow threshold of the target object on each target node based on the total target flow of the target object, the number of target nodes, and the actual flow used by the target object on each target node (for example, step S202) specifically includes:
[0048] Step S202 - 1 : Based on the total target traffic of the target object and the number of target nodes, obtain the theoretical usage traffic of the target object on each target node.
[0049] Here, the theoretical usage traffic of the target object on each target node (also called the theoretical traffic threshold) can be specifically understood as the theoretical traffic threshold given for the regular business needs of the target object and the expected traffic distribution pattern (for example, a uniform traffic distribution). In this way, it is theoretically ensured that the user's business needs are met, and at the same time, it is theoretically ensured that the system resources are fully utilized and run efficiently. Furthermore, it is also convenient to make more reasonable resource allocation on this basis in the future, so as to quickly meet the user's business needs, laying the foundation for effectively improving the user experience.
[0050] Step S202 - 2 : based on the actual usage flow of the target object on each target node and the total target flow of the target object, the actual load flow of the target object on each target node is obtained.
[0051] It should be noted that, compared with the theoretical usage flow determined in the previous step, the actual load flow determined in the current step is determined based on the actual usage of the flow of the target object on each target node.
[0052] For example, in one example, the actual load flow of the target object on the target node (also referred to as the load flow threshold) is a flow threshold determined based on the load condition of the target object on the target node (such as the actual used flow) and the on-demand allocation principle.
[0053] Here, the "on-demand allocation" principle in this example can be specifically understood as lowering the traffic threshold on nodes with light loads and raising the traffic threshold on nodes with heavy loads based on the load of the target object on each target node. In this way, it is effective to avoid the situation where some nodes are overloaded while other nodes are idle, ensuring that the resources of each node can be reasonably scheduled and used, thereby providing strong support for improving the utilization of system resources.
[0054] Step S202 - 3 : Based on the theoretical usage flow and actual load flow of the target object on the target node, a target flow threshold of the target object on the target node is obtained to obtain the target flow threshold of the target object on each target node.
[0055] For example, in one example, for step S202-3, the target flow threshold can be obtained in the following manner, specifically including: weighting the theoretical usage flow and the actual load flow of the target object on the target node to obtain the target flow threshold of the target object on the target node. In this way, the target flow threshold is determined quickly and reasonably.
[0056] For example, for node i (i=1, 2, ..., N) among N target nodes, the theoretical usage flow of the target object on node i can be recorded as TheoQuota i , the actual load flow of the target object on node i is TrafficQuota i , the target traffic threshold of the target object on node i is Server Quota i , then the target traffic threshold Server Quota of the target object on node i i It can be expressed as:
[0057] ServerQuota i =TheoQuota i ×Rate+TrafficQuota i ×(1―Rate);
[0058] Here, Rate is the weight coefficient.
[0059] At this point, the target flow threshold of the target object on each target node can be quickly obtained according to the above method.
[0060] Here, it should be noted that, in an example, when the weight coefficient Rate is 1, it indicates the process of determining the target traffic threshold on the current node, for example, Server Quota i The determination process does not consider the load situation at all, that is, the theoretical usage flow can be determined by using the conventional flow threshold allocation method, and the theoretical usage flow is directly used as the target flow threshold of the target object on the current node. Or, in another example, when the weight coefficient Rate is 0, it indicates the target flow threshold on the current node, for example, Server Quota i , is determined completely according to the actual load. At this time, the actual load flow can be determined and the actual load flow can be directly used as the target flow threshold of the target object on the current node.
[0061] In practical applications, considering that the traffic usage of the target object on each target node may fluctuate, in order to make the threshold adjustment smoother, the weight coefficient Rate can be specifically a value in the range of 0.3 to 0.5. In this way, the theoretical usage traffic and actual load traffic are comprehensively considered to effectively cope with the impact of traffic fluctuations, thereby effectively ensuring the rational use of resources and ensuring the provision of stable and reliable services, thereby providing strong support for improving user experience.
[0062] In this way, the disclosed solution fully combines the theoretical usage traffic and actual load traffic of the target object on the target node to determine the target traffic threshold of the target object on the target node. In this way, it can effectively realize more refined and dynamic traffic management, and provide data basis for the subsequent reasonable adjustment of the resources of each target node.
[0063] Furthermore, the dual considerations of the disclosed solution make the traffic limiting strategy more reasonable, which not only ensures that the target object can obtain sufficient traffic on each target node so that resources are fully utilized, but also can adjust the actual status of each target node according to the load situation, effectively avoiding the situation where some nodes are overloaded while other nodes are idle, thereby ensuring the efficient use of resources while further improving the overall performance of the system.
[0064] Further, in a specific example, the theoretical usage flow of the target object on the target node can be obtained in the following manner; specifically, the above-mentioned total target flow of the target object and the number of target nodes are used to obtain the theoretical usage flow of the target object on the target node (for example, step S202-1), which specifically includes:
[0065] Step S202-1-1: Based on the total target traffic of the target object and the number of target nodes, the average traffic required to be carried by the target node is obtained.
[0066] Step S202-1-2: The average flow rate that the target node needs to carry is used as the theoretical flow rate used by the target object on each target node.
[0067] That is to say, in this example, without considering the actual usage of the target object's traffic on each target node, the total target traffic of the target object can be evenly distributed to each target node based on the number of all target nodes that undertake the total target traffic of the target object, thereby obtaining the theoretical usage traffic of the target object on each target node.
[0068] For example, let's take node i (i=1, 2, ..., N) among N target nodes as an example. At this time, the total target flow of the target object can be recorded as TotalQuota, and the number of all nodes that receive the total target flow of the target object can be recorded as ServerNumber. Then the theoretical usage flow of the target object on node i is TheoQuota i It can be expressed as:
[0069]
[0070] At this point, the theoretical usage flow of the target object on each target node can be obtained, for example, it can be recorded as {TheoQuota1, TheoQuota2, …, TheoQuota i ,…,TheoQuota N}.
[0071] In this way, the disclosed scheme provides a specific calculation scheme for the theoretical usage traffic of the target object on the target node. The scheme is simple and efficient, and can quickly determine the theoretical usage traffic, thereby providing a basis for the subsequent reasonable adjustment of the resources of each target node. At the same time, it also lays the foundation for the subsequent improvement of resource utilization.
[0072] Further, in a specific example, the actual load flow of the target object on each target node can be obtained in the following manner; specifically, the above-mentioned actual load flow of the target object on each target node based on the actual usage flow of the target object on each target node and the total target flow of the target object (for example, step S202-2) specifically includes:
[0073] Step S202-2-1: Based on the actual usage traffic of the target object on each target node, the total usage traffic of the target object is obtained.
[0074] Step S202-2-2: Based on the total usage flow and total target flow of the target object, and the actual usage flow of the target object on each target node, the actual load flow of the target object on each target node is obtained.
[0075] For example, in one example, the actual load rate of the target object on each target node can be obtained based on the total traffic used by the target object and the actual traffic used by the target object on each target node. For example, the actual load rate of the target object on the target node can be obtained based on the ratio of the actual traffic used by the target object on the target node to the total traffic used by the target object. Furthermore, the actual load traffic of the target object on each target node can be obtained based on the total target traffic of the target object and the actual load rate of the target object on each target node.
[0076] For example, let's take node i among N target nodes as an example. At this time, the actual usage flow of the target object on node i can be recorded as UsageOnServer i , (i=1,2,…,N), let the total usage flow of the target object be TotalUsage, then the total usage flow of the target object TotalUsage can be expressed as:
[0077]
[0078] Furthermore, the actual load rate of the target object on node i is TrafficRate i , then the actual load rate of the target object on node i is TrafficRate i It can be expressed as:
[0079]
[0080] Furthermore, the actual load flow of the target object on node i is TrafficQuota i It can be expressed as:
[0081]
[0082] At this point, the actual load flow of the target object on each target node can be obtained, for example, it can be recorded as {TrafficQuota1, TrafficQuota2,…, TrafficQuota i ,…,TrafficQuota N}.
[0083] In this way, the disclosed scheme provides a solution for calculating the actual load flow of the target object on the target node. The solution is simple and efficient, and can quickly determine the actual load flow on each node according to the load conditions of the target object on each node, thereby helping to configure reasonable flow thresholds, providing data basis for subsequent updates of the flow thresholds of each target node, and also laying the foundation for subsequent improvements in resource utilization.
[0084] In a specific example of the disclosed solution, after determining the target traffic threshold of the target object on each target node, it is further possible to determine whether the traffic threshold on the target node needs to be adjusted; for example, in an example, after step S202, it may further include:
[0085] Step S203: Determine the current flow threshold of the target object on each target node.
[0086] Here, it should be noted that the current traffic threshold of the target object on the target node may specifically be the theoretical usage traffic of the target object on the target node, or may specifically be the traffic threshold of the target object on the target node after the last adjustment.
[0087] Step S204: Based on the current flow threshold of the target object on each target node and the target flow threshold, determine whether the current flow threshold on the target node needs to be adjusted.
[0088] In this way, the disclosed solution can determine whether it is necessary to adjust the current traffic threshold on the target node based on the target traffic threshold and the current traffic threshold of the target object on the target node. In this way, it can make reasonable decisions on the traffic threshold on the target node based on the actual traffic usage of the target object on the target node, effectively avoiding invalid regulation. At the same time, it also provides strong support for improving the resource utilization of the system.
[0089] Figure 3 This is a schematic flow chart of a flow control method according to an embodiment of the present application. Figure 2 The method can be optionally applied to electronic devices, such as personal computers, servers, server clusters, and other electronic devices. It can be understood that the above Figure 2 The relevant contents of the method shown can also be applied to this example, and the relevant contents will not be described in detail in this example.
[0090] Further, the method includes at least part of the following contents. Figure 3 As shown, including:
[0091] Step S301: Obtain the actual usage flow of the target object on each of the N target nodes.
[0092] Here, the N target nodes are all nodes for receiving the total target traffic of the target object. Further, N is an integer greater than or equal to 2.
[0093] Here, for the relevant description of the target node, please refer to the above example, which will not be repeated here.
[0094] Step S302: Based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, determine the target traffic threshold of the target object on each target node, so as to use the target traffic threshold to limit the traffic used by the target object on the target node.
[0095] Step S303: Determine the current flow threshold of the target object on each target node.
[0096] Step S304: Determine whether the difference between the current flow threshold of the target object on the target node and the target flow threshold is greater than a preset threshold. If so, proceed to step S305; otherwise, proceed to step S306.
[0097] Step S305: When the difference between the current flow threshold of the target object on the target node and the target flow threshold is greater than the preset threshold, the current flow threshold on the target node is adjusted, and the target flow threshold of the target object on the target node is used as the new current flow threshold on the target node. Then, the process proceeds to step S306.
[0098] Step S306: determine the next target node of the target node, and return to step S304 to make a judgment until all target nodes are traversed.
[0099] It should be noted that after obtaining the target flow threshold of the target object on each target node, it is also possible to determine whether the current flow threshold and the target flow threshold of the target object on the current target node are greater than the preset threshold; if greater, the target flow threshold of the target object on the current target node is used as the new current flow threshold on the current target node; otherwise, that is, when it is less than or equal to the preset threshold, no adjustment is required, in other words, the target flow threshold on the current target node can be ignored. Further, the next target node of the current target node is determined, and the judgment continues until all target nodes are traversed.
[0100] Furthermore, in one example, under the premise of ensuring that the total target traffic of the target object is not exceeded, if the target object is overloaded on a node (such as node 1), for example, due to the large actual traffic usage, the difference between the determined target traffic threshold and the current traffic threshold is greater than the preset threshold, for example, the determined target traffic threshold is much greater than the current traffic threshold, while the actual traffic usage on other nodes (such as node 2) is small, resulting in the determined target traffic threshold being much smaller than the current traffic threshold. At this time, the current traffic threshold of node 1 with overloaded traffic can be increased, for example, increased to the target traffic threshold corresponding to node 1, and at the same time, the current traffic threshold of node 2 with smaller traffic can be reduced, for example, reduced to the target traffic threshold corresponding to node 2. In this way, the traffic thresholds on the target nodes are re-allocated reasonably, so that users can use sufficient traffic on each target node, thereby improving the overall utilization of system resources.
[0101] In this way, the disclosed scheme provides a detailed scheme for adjusting the current traffic threshold by using the target traffic threshold of the target object on the target node. This effectively ensures that the traffic usage of the target object on each target node is more reasonable, and ensures that the resources on the target node are fully utilized. While effectively improving the utilization of resources, users can enjoy stable and reliable services, thereby improving the user experience.
[0102] For example, if Figure 4 As shown, first, the central node distributes the total traffic quota of object A (that is, the total target traffic corresponding to the above) 100 evenly to 4 storage nodes (that is, node 1, node 2, node 3 and node 4 in the figure). At this time, the traffic quota of object A on each storage node (that is, the current traffic threshold corresponding to the above) is 25; similarly, the central node distributes the total traffic quota of object B 200 evenly to 4 storage nodes. At this time, the traffic quota of object B on each storage node is 50; secondly, each storage node regularly reports the traffic information of each object to the central node, for example, reporting the actual usage traffic of each object B on the storage node.
[0103] Further, through Figure 4 As shown, the actual usage flow of object A on each storage node is relatively balanced and does not need to be adjusted. However, the actual usage flow of object B on each storage node is not balanced, so the disclosed solution can be used for adjustment.
[0104] Furthermore, the target flow threshold of object B on storage node i (i = 1, 2, 3, 4) is The total traffic quota of object B is TotalQuota B , in this example, TotalQuota B =200; the number of nodes that undertake the total traffic quota of object B is ServerNumber B , in this example, ServerNumber B =4; the actual usage flow of object B on storage node i is like Figure 4 As shown, in this example, there are:
[0105]
[0106] Furthermore, the total usage of object B is recorded as TotalUsage B , then in this example there are:
[0107]
[0108] Furthermore, the theoretical usage flow of object B on storage node i is In one example, the theoretical usage flow of object B on storage node i is It can be expressed as:
[0109]
[0110] Furthermore, the actual load rate of object B on storage node i is The actual load flow of object B on storage node i is In one example, the actual load flow of object B on storage node i is It can be expressed as:
[0111]
[0112] in,
[0113]
[0114] Furthermore, the target traffic threshold of object B on storage node i is It can be obtained by the following formula:
[0115]
[0116] Here, Rate represents a weight coefficient, which can be a value in the range of 0.3 to 0.5 in one example. The target traffic threshold Server on node 2 is 30. The target traffic threshold Server on node 3 is 30. is 110, and the target traffic threshold Server on node 4 is 30.
[0117] Finally, by comparing the difference between the current traffic threshold of object B on the storage node and the target traffic threshold and the preset threshold, the following adjustments can be made: adjust the current traffic threshold 50 of object B on node 1 to the target traffic threshold 30 of object B on node 1, adjust the current traffic threshold 50 of object B on node 2 to the target traffic threshold 30 of object B on node 2, adjust the current traffic threshold 50 of object B on node 3 to the target traffic threshold 110 of object B on node 3, and adjust the current traffic threshold 50 of object B on node 4 to the target traffic threshold 30 of object B on node 4.
[0118] At this time, after adjusting the current traffic threshold of object B on each storage node, its resource utilization can reach 87.5%, which is significantly higher than 62.5% before adjustment. In this way, the current traffic threshold of the object on each node is adjusted in real time according to the load of the object on each node, thereby effectively improving the utilization of resources, providing stable and reliable services, and effectively improving the user experience.
[0119] In a specific example of the disclosed solution, the target object may also include multiple sub-objects. In other words, the total target flow of the target object may also be allocated to the multiple sub-objects included in the target object; further, the current flow threshold of the target object on a single target node may also be allocated to each sub-object included in the target object, thereby meeting different business requirements. For example, the same business line may include multiple different sub-business lines. In this case, for the scenario where the target object also includes multiple sub-objects, the following flow control may also be performed:
[0120] Step S501: obtaining the actual usage flow of each sub-object in M (M is an integer greater than or equal to 2) sub-objects contained in the target object on the target node.
[0121] Here, the actual traffic usage of the sub-object on the target node can be specifically understood as the traffic actually used on the target node to execute the business of the sub-object (such as the database building sub-business in the search business, etc.).
[0122] Step S502: Determine the initial flow sub-threshold of each sub-object on the target node.
[0123] Here, the initial traffic sub-threshold of the sub-object on the target node can be used to limit the traffic used by the sub-object on the target node. In other words, the actual traffic that the sub-object can use on the target node should not exceed the initial traffic sub-threshold of the sub-object on the target node.
[0124] Furthermore, the sum of the initial traffic sub-thresholds of each sub-object in the M sub-objects included in the target object on the target node does not exceed the current traffic threshold of the target object on the target node.
[0125] For example, in one example, based on FIG1(a), object A can further subdivide its total traffic quota; specifically, Figure 6As shown in the figure, the total traffic quota of object A (for example, 100) is allocated to sub-object 1 and sub-object 2. At this time, the total quota of sub-object 1 is 40, and the total quota of sub-object 2 is 60. Furthermore, the total quota of sub-object 1 can be evenly distributed to the four storage nodes to obtain the sub-quota of sub-object 1 on each storage node (that is, corresponding to the initial traffic sub-threshold above), such as the sub-quota of sub-object 1 on each storage node is 10. Similarly, the total quota of sub-object 2 is evenly distributed to each storage node to obtain the sub-quota of sub-object 2 on each storage node, that is, the sub-quota of sub-object 2 on each storage node is 15. This lays the foundation for the subsequent refined management of traffic within the target object.
[0126] Step S503: Based on the relationship between the actual usage flow of each sub-object included in the target object on the target node and the initial flow sub-threshold, determine whether the initial flow sub-threshold of the sub-object needs to be adjusted.
[0127] In this way, the disclosed solution utilizes a multi-level solution of the target object to perform more fine-grained resource allocation for the target object's traffic, thereby ensuring that the traffic requirements of each sub-object under the target object are met, thereby effectively realizing the refined management and allocation of traffic within the target object, improving resource utilization, and providing the target object with a more flexible traffic management strategy, thereby further meeting business needs, enriching usage scenarios, and further improving user experience.
[0128] Further, in a specific example, the above-mentioned determination of whether it is necessary to adjust the current traffic sub-threshold of the sub-object based on the relationship between the actual usage traffic of each sub-object included in the target object on the target node and the initial traffic sub-threshold (for example, step S503) may also specifically include:
[0129] When the actual traffic usage of the first sub-object on the target node among the M sub-objects included in the target object exceeds the initial traffic sub-threshold of the first sub-object, and the actual traffic usage of the second sub-object on the target node among the M sub-objects included in the target object does not exceed the initial traffic sub-threshold of the second sub-object, at least the following adjustments can be made:
[0130] When the sum of the initial traffic sub-thresholds of each sub-object in the M sub-objects contained in the target object on the target node does not exceed the current traffic threshold of the target object on the target node, the initial traffic sub-threshold of the first sub-object on the target node is increased, and the initial traffic sub-threshold of the second sub-object on the target node is decreased.
[0131] That is to say, in this example, for the M sub-objects contained in the target object, if the actual traffic used by the first sub-object on the target node exceeds the initial traffic sub-threshold of the first sub-object, and the actual traffic used by the second sub-object on the target node does not exceed the initial traffic sub-threshold of the second sub-object, then, under the condition that the sum of the initial traffic sub-thresholds of each sub-object in the M sub-objects on the target node does not exceed the current traffic threshold of the target object on the target node, the initial traffic sub-threshold of the first sub-object on the target node can be adjusted (for example, increased), for example, so that the adjusted initial traffic sub-threshold of the first sub-object is not less than the actual traffic used by the first sub-object on the target node. In this way, the actual demand for traffic of the first sub-object is met. At the same time, the initial traffic sub-threshold of the second sub-object on the target node is adjusted (for example, reduced), and it is ensured that the adjusted initial traffic sub-threshold of the second sub-object is not less than the actual traffic used by the second sub-object on the target node. In this way, it is ensured that the traffic demands of different sub-objects under the same target object are met at the same time, thereby further improving the utilization rate of the traffic threshold.
[0132] Continue with Figure 6 Taking sub-object 1 and sub-object 2 on node 1 as an example, as shown in FIG7(a), when the flow of sub-object 1 on node 1 (corresponding to the actual usage flow of the first sub-object on the target node) increases from 5 to 15, at this time, it can be known that the actual usage flow of sub-object 1 on node 1 is greater than the sub-quota 10 of sub-object 1 (corresponding to the initial flow sub-threshold of the first sub-object above). At the same time, it can be known that the flow of sub-object 2 on node 1 (corresponding to the actual usage flow of the second sub-object on the target node) has not changed, and has not exceeded the sub-quota 15 of sub-object 2 (corresponding to the initial flow sub-threshold of the second sub-object above). At this time, the sum of the initial flow sub-thresholds of sub-object 1 and sub-object 2 on node 1 does not exceed the flow quota of object A on node 1. 25 (corresponding to the current traffic threshold of the target object on the target node), the sub-quota of sub-object 1 on node 1 can be adjusted from 10 to 15. At the same time, the sub-quota of sub-object 2 on node 1 can be adjusted from 15 to 10. In this way, the traffic requirements of different sub-objects can be met.
[0133] It should be pointed out that the above is only an example. In actual applications, while ensuring that the normal operation of other sub-objects is not affected, the initial flow sub-threshold of the first sub-object can be increased by lowering the initial flow sub-threshold of at least one other sub-object, thereby achieving flexible adjustment of the flow sub-thresholds between sub-objects, thereby meeting the flow requirements of different sub-objects.
[0134] In this way, the disclosed solution can utilize the flexible adjustment scheme of the traffic sub-thresholds between sub-objects to adjust the traffic sub-thresholds of the sub-objects on the target node, thereby ensuring that each sub-object can operate normally on the target node. In this way, the refined management and allocation of traffic between sub-objects is effectively realized, thereby improving the overall utilization rate of the resources of the target object, enriching the usage scenarios, providing more stable and reliable services, and further improving the user experience.
[0135] Furthermore, in a specific example, in order to further achieve refined management and allocation of traffic between sub-objects and ensure the traffic demand of each sub-object, after elastically adjusting the initial traffic sub-threshold of the first sub-object on the target node, the following process can also be performed:
[0136] When it is detected that the actual traffic usage of the second sub-object on the target node exceeds the reduced initial traffic sub-threshold, at least the following adjustments are made:
[0137] When the sum of the initial flow sub-thresholds of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node, the initial flow sub-threshold of the second sub-object on the target node is increased.
[0138] Furthermore, in one example, when the initial traffic sub-threshold of the second sub-object on the target node is increased, the initial traffic sub-threshold of the first sub-object on the target node can also be decreased, thereby effectively avoiding the long-term occupation of the traffic resources of the second sub-object by the first sub-object, thereby achieving refined management and allocation of traffic between sub-objects.
[0139] It should be noted that, in one example, when the actual traffic usage of the first sub-object on the target node exceeds the initial traffic sub-threshold of the first sub-object, it is necessary to increase the initial traffic sub-threshold of the first sub-object without affecting the normal operation of the second sub-object on the target node. For example, the initial traffic sub-threshold of the first sub-object is increased, and the initial traffic sub-threshold of the second sub-object is decreased at the same time, so as to improve the resource utilization of the first sub-object on the target node. Furthermore, if the actual traffic usage of the second sub-object on the target node exceeds the initial traffic sub-threshold of the second sub-object after the decrease, the initial traffic sub-threshold of other sub-objects can be decreased, and at the same time, the traffic sub-threshold of the second sub-object on the target node is increased (the traffic sub-threshold is the initial traffic sub-threshold after the decrease), so as to further meet the traffic usage demand of the second sub-object on the target node.
[0140] It should be pointed out that, in one example, if the actual traffic usage of the second sub-object on the target node exceeds the reduced initial traffic sub-threshold of the second sub-object, the initial traffic sub-threshold of the first sub-object can be reduced first, so as to avoid the long-term occupation of the traffic resources of the second sub-object by the first sub-object.
[0141] Or, in another example, if the actual traffic usage of the second sub-object on the target node exceeds the initial traffic sub-threshold of the second sub-object after being adjusted down, it can be determined first whether there are other sub-objects that can be adjusted. If so, the initial traffic sub-threshold of the other sub-objects can be directly adjusted down, and the traffic sub-threshold of the second sub-object can be increased to meet the traffic demand of the second sub-object. Furthermore, if the initial traffic sub-threshold of other sub-objects cannot be adjusted down because the actual traffic usage of other sub-objects is close to their initial traffic sub-thresholds, or even after being adjusted down, it cannot meet the requirements of the second sub-object, then the initial traffic sub-threshold of the sub-object that occupies the traffic of the second sub-object can be further adjusted down, that is, the initial traffic sub-threshold of the first sub-object can be adjusted down, so that the traffic demand of the second sub-object can be met through comprehensive adjustment.
[0142] Continuing with the example of sub-object 1 and sub-object 2 on node 1 in FIG. 7(a), as shown in FIG. 7(b), when it is detected that the flow of sub-object 2 on node 1 increases from 5 to 15 and exceeds the sub-quota of sub-object 2 on node 1 of 10, on the basis of ensuring that the sum of the sub-quotas of sub-object 1 and sub-object 2 on node 1 (that is, the sum of the initial flow sub-thresholds) does not exceed the flow quota of object A on node 1 of 25, the sub-quota of sub-object 2 on node 1 is increased from 10 to 15, and the sub-quota of sub-object 1 on node 1 is reduced from 15 to 10, so as to meet the flow requirements of sub-object 1 and sub-object 2 on node 1 to the greatest extent.
[0143] It should be pointed out that in the above example, the disclosed solution can also increase the traffic sub-threshold of the second sub-object on the target node while giving priority to reducing the initial traffic sub-threshold of other sub-objects on the target node without affecting the normal use of other sub-objects on the target node, so as to ensure that each sub-object can fully utilize the resources on the target node, thereby improving the utilization rate of system resources.
[0144] Furthermore, in a specific example, while increasing the traffic sub-threshold of the second sub-object on the target node, the initial traffic sub-threshold of the sub-object with low importance on the target node can be preferentially reduced according to the importance of different sub-objects on the target node. In this way, the traffic demand of the sub-object with high importance on the target node is preferentially met, thereby laying a foundation for meeting different business needs.
[0145] In this way, the disclosed solution can flexibly adjust the traffic sub-threshold of the second sub-object on the target node when the actual usage traffic of the second sub-object on the target node increases. For example, the traffic sub-threshold of the first sub-object on the target node can be suppressed back to the original initial traffic sub-threshold. In this way, through the flexible adjustment of the traffic threshold between sub-objects, the refined management and allocation of traffic between sub-objects is effectively realized, thereby improving the overall utilization rate of the resources of the target object, providing more stable and reliable services, and thus improving the user experience.
[0146] In one example, the disclosed solution can be specifically applied to the scenario of distributed table storage, for example, it can be specifically applied to business scenarios such as search and map. In the above business scenarios, the disclosed solution can not only achieve that multiple tenants (that is, users) are not affected by each other, but also meet the needs of the same business line containing multiple different sub-business lines. In other words, it can also meet the needs of multi-level tenants. In other words, the disclosed solution implements a multi-layer and multi-tenant elastic isolation mechanism on distributed table storage, which can meet the resource management of multi-layer tenants of the business, and also allow the sub-business traffic of the same business to complement each other. For example, for offline sub-businesses and online sub-businesses under the same business, during the low-peak period of the online sub-business traffic, the traffic of the offline sub-business can be controlled to flexibly use its low-peak idle resources, and when the traffic of the online sub-business increases, the traffic of the offline sub-business is controlled to return to the original limit threshold, so as to achieve full utilization of resources.
[0147] For example, in a search business scenario (e.g., a table search scenario), it is necessary to ensure that high-priority sub-businesses such as database building (i.e., the business corresponding to the first sub-object described above) do not affect access to table storage. However, for sub-businesses such as database building, only 3-5 hours of access are required each day. Low-priority sub-businesses such as offline mining (i.e., the business corresponding to the second sub-object described above) require access to table storage for offline needs. The disclosed solution can be used to control the offline needs and make full use of resources.
[0148] In the existing scheme, offline mining and other offline demands are usually controlled concurrently so that the offline mining sub-business does not affect the high-quality sub-businesses such as database construction. However, after the high-quality sub-businesses such as database construction are completed, if the offline demand is to be controlled, some resources will be wasted. As shown in Figure 8(a), although the database construction sub-business and the offline mining sub-business are well isolated in the existing scheme, and the offline mining sub-business does not affect the database construction business, there will be idle resources (i.e., the idle quota in the figure) left after the database construction sub-business is completed, resulting in insufficient utilization of resources; the above problem can be effectively solved by using the disclosed scheme. As shown in Figure 8(b), after the database construction sub-business is completed, the offline mining sub-business can be controlled to occupy its idle resources. In other words, the offline mining sub-business can fully utilize its idle resources during the off-peak period of the database construction sub-business, and the occupation will not affect the database construction sub-business. At this time, the traffic used after the offline mining sub-business is completed is close to the total traffic quota of the search business, thus greatly improving the quota resource utilization rate of the business.
[0149] The disclosed solution also provides a flow control device, such as Fig. 9 As shown, including:
[0150] The traffic acquisition unit 901 is used to acquire the actual usage traffic of the target object on each of the N target nodes; the N target nodes are all nodes used to undertake the total target traffic of the target object; N is an integer greater than or equal to 2;
[0151] The traffic control unit 902 is used to determine the target traffic threshold of the target object on each target node based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, so as to use the target traffic threshold to limit the traffic used by the target object on the target node.
[0152] In a specific example of the disclosed solution, the flow control unit is specifically used to:
[0153] Based on the total target traffic of the target object and the number of target nodes, the theoretical usage traffic of the target object on each target node is obtained;
[0154] Based on the actual usage flow of the target object on each target node and the total target flow of the target object, the actual load flow of the target object on each target node is obtained;
[0155] Based on the theoretical usage flow and the actual load flow of the target object on the target node, a target flow threshold of the target object on the target node is obtained to obtain the target flow threshold of the target object on each target node.
[0156] In a specific example of the disclosed solution, the flow control unit is specifically used to:
[0157] The theoretical usage flow and the actual load flow of the target object on the target node are weighted to obtain a target flow threshold of the target object on the target node.
[0158] In a specific example of the disclosed solution, the flow control unit is specifically used to:
[0159] Based on the total target traffic of the target object and the number of target nodes, the average traffic that the target node needs to carry is obtained;
[0160] The average traffic that the target node needs to carry is used as the theoretical usage traffic of the target object on each target node.
[0161] In a specific example of the disclosed solution, the flow control unit is specifically used to:
[0162] Based on the actual usage flow of the target object on each target node, the total usage flow of the target object is obtained;
[0163] Based on the total usage flow and the total target flow of the target object, and the actual usage flow of the target object on each target node, the actual load flow of the target object on each target node is obtained.
[0164] In a specific example of the disclosed solution, the flow control unit is further used to:
[0165] Determine the current traffic threshold of the target object on each target node;
[0166] Based on the current flow threshold of the target object on each target node and the target flow threshold, it is determined whether the current flow threshold on the target node needs to be adjusted.
[0167] In a specific example of the disclosed solution, the flow control unit is specifically used to:
[0168] When the difference between the current flow threshold of the target object on the target node and the target flow threshold is greater than the preset threshold, the current flow threshold on the target node is adjusted, and the target flow threshold of the target object on the target node is used as the new current flow threshold on the target node.
[0169] In a specific example of the disclosed solution, the traffic acquisition unit is further used to acquire the actual usage traffic of each of the M sub-objects contained in the target object on the target node; M is an integer greater than or equal to 2;
[0170] The flow control unit is further used to determine the initial flow sub-threshold of each sub-object on the target node; wherein the sum of the initial flow sub-threshold of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node; based on the relationship between the actual usage flow of each sub-object contained in the target object on the target node and the initial flow sub-threshold, determine whether the initial flow sub-threshold of the sub-object needs to be adjusted.
[0171] In a specific example of the disclosed solution, the flow control unit is specifically used to:
[0172] When the actual traffic usage of the first sub-object among the M sub-objects on the target node exceeds the initial traffic sub-threshold of the first sub-object, and the actual traffic usage of the second sub-object among the M sub-objects on the target node does not exceed the initial traffic sub-threshold of the second sub-object, at least the following adjustments are made:
[0173] When the sum of the initial traffic sub-thresholds of each sub-object among the M sub-objects on the target node does not exceed the current traffic threshold of the target object on the target node, the initial traffic sub-threshold of the first sub-object on the target node is increased, and the initial traffic sub-threshold of the second sub-object on the target node is decreased.
[0174] In a specific example of the disclosed solution, the flow control unit is further used to:
[0175] When it is detected that the actual traffic usage of the second sub-object on the target node exceeds the reduced initial traffic sub-threshold, at least the following adjustments are made:
[0176] When the sum of the initial flow sub-thresholds of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node, the initial flow sub-threshold of the second sub-object on the target node is increased.
[0177] For the description of the specific functions and examples of each unit of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0178] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0179] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0180] Fig.10A schematic block diagram of an example electronic device 1000 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0181] like Fig.10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0182] A number of components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0183] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above, such as the flow control method. For example, in some embodiments, the flow control method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the flow control method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the flow control method in any other appropriate manner (e.g., by means of firmware).
[0184] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0185] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0186] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0187] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0188] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0189] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0190] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0191] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A flow control method, comprising: Obtain the actual usage traffic of the target object on each of the N target nodes; The N target nodes are all nodes used to undertake the total target traffic of the target object; N is an integer greater than or equal to 2; Based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, a target traffic threshold of the target object on each target node is determined to limit the traffic used by the target object on the target node using the target traffic threshold.
2. The method according to claim 1, wherein: The determining of the target flow threshold of the target object on each target node based on the total target flow of the target object, the number of target nodes, and the actual usage flow of the target object on each target node includes: Based on the total target traffic of the target object and the number of target nodes, the theoretical usage traffic of the target object on each target node is obtained; Based on the actual usage flow of the target object on each target node and the total target flow of the target object, the actual load flow of the target object on each target node is obtained; Based on the theoretical usage flow and the actual load flow of the target object on the target node, a target flow threshold of the target object on the target node is obtained to obtain the target flow threshold of the target object on each target node.
3. The method according to claim 2, wherein: The step of obtaining a target flow threshold of the target object on the target node based on the theoretical usage flow and the actual load flow of the target object on the target node includes: The theoretical usage flow and the actual load flow of the target object on the target node are weighted to obtain a target flow threshold of the target object on the target node.
4. The method according to claim 2 or 3, wherein: The method of obtaining the theoretical usage flow of the target object on the target node based on the total target flow of the target object and the number of target nodes includes: Based on the total target traffic of the target object and the number of target nodes, the average traffic that the target node needs to carry is obtained; The average traffic that the target node needs to carry is used as the theoretical usage traffic of the target object on each target node.
5. The method according to any one of claims 2 to 4, wherein: The actual load flow of the target object on each target node is obtained based on the actual usage flow of the target object on each target node and the total target flow of the target object, including: Based on the actual usage flow of the target object on each target node, the total usage flow of the target object is obtained; Based on the total usage flow and the total target flow of the target object, and the actual usage flow of the target object on each target node, the actual load flow of the target object on each target node is obtained.
6. The method according to any one of claims 1 to 5, further comprising: Determine the current traffic threshold of the target object on each target node; Based on the current flow threshold of the target object on each target node and the target flow threshold, it is determined whether the current flow threshold on the target node needs to be adjusted.
7. The method according to claim 6, wherein: The determining whether it is necessary to adjust the current flow threshold on the target node based on the current flow threshold of the target object on each target node and the target flow threshold includes: When the difference between the current flow threshold of the target object on the target node and the target flow threshold is greater than the preset threshold, the current flow threshold on the target node is adjusted, and the target flow threshold of the target object on the target node is used as the new current flow threshold on the target node.
8. The method according to any one of claims 1 to 7, further comprising: Obtain the actual usage flow of each of the M sub-objects contained in the target object on the target node; M is an integer greater than or equal to 2; Determine the initial flow sub-threshold of each sub-object on the target node; wherein the sum of the initial flow sub-threshold of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node; Based on the relationship between the actual usage flow of each sub-object included in the target object on the target node and the initial flow sub-threshold, it is determined whether the initial flow sub-threshold of the sub-object needs to be adjusted.
9. The method according to claim 8, wherein: The determining whether it is necessary to adjust the current traffic sub-threshold of the sub-object based on the relationship between the actual usage traffic of each sub-object included in the target object on the target node and the initial traffic sub-threshold includes: When the actual traffic usage of the first sub-object among the M sub-objects on the target node exceeds the initial traffic sub-threshold of the first sub-object, and the actual traffic usage of the second sub-object among the M sub-objects on the target node does not exceed the initial traffic sub-threshold of the second sub-object, at least the following adjustments are made: When the sum of the initial traffic sub-thresholds of each sub-object among the M sub-objects on the target node does not exceed the current traffic threshold of the target object on the target node, the initial traffic sub-threshold of the first sub-object on the target node is increased, and the initial traffic sub-threshold of the second sub-object on the target node is decreased.
10. The method according to claim 9, further comprising: When it is detected that the actual traffic usage of the second sub-object on the target node exceeds the reduced initial traffic sub-threshold, at least the following adjustments are made: When the sum of the initial flow sub-thresholds of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node, the initial flow sub-threshold of the second sub-object on the target node is increased.
11. A flow control device, comprising: A traffic acquisition unit, used to acquire the actual usage traffic of the target object on each of the N target nodes; The N target nodes are all nodes used to undertake the total target traffic of the target object; N is an integer greater than or equal to 2; The traffic control unit is used to determine the target traffic threshold of the target object on each target node based on the total target traffic of the target object, the number of target nodes, and the actual traffic used by the target object on each target node, so as to use the target traffic threshold to limit the traffic used by the target object on the target node.
12. The device according to claim 11, wherein The flow control unit is specifically used for: Based on the total target traffic of the target object and the number of target nodes, the theoretical usage traffic of the target object on each target node is obtained; Based on the actual usage flow of the target object on each target node and the total target flow of the target object, the actual load flow of the target object on each target node is obtained; Based on the theoretical usage flow and the actual load flow of the target object on the target node, a target flow threshold of the target object on the target node is obtained to obtain the target flow threshold of the target object on each target node.
13. The device according to claim 12, wherein: The flow control unit is specifically used for: The theoretical usage flow and the actual load flow of the target object on the target node are weighted to obtain a target flow threshold of the target object on the target node.
14. The device according to claim 12 or 13, wherein: The flow control unit is specifically used for: Based on the total target traffic of the target object and the number of target nodes, the average traffic that the target node needs to carry is obtained; The average traffic that the target node needs to carry is used as the theoretical usage traffic of the target object on each target node.
15. The device according to any one of claims 12 to 14, wherein: The flow control unit is specifically used for: Based on the actual usage flow of the target object on each target node, the total usage flow of the target object is obtained; Based on the total usage flow and the total target flow of the target object, and the actual usage flow of the target object on each target node, the actual load flow of the target object on each target node is obtained.
16. The device according to any one of claims 11 to 15, wherein: The flow control unit is further used for: Determine the current traffic threshold of the target object on each target node; Based on the current flow threshold of the target object on each target node and the target flow threshold, it is determined whether the current flow threshold on the target node needs to be adjusted.
17. The device according to claim 16, wherein: The flow control unit is specifically used for: When the difference between the current flow threshold of the target object on the target node and the target flow threshold is greater than the preset threshold, the current flow threshold on the target node is adjusted, and the target flow threshold of the target object on the target node is used as the new current flow threshold on the target node.
18. The device according to any one of claims 11 to 17, wherein: The traffic acquisition unit is further used to acquire the actual usage traffic of each of the M sub-objects contained in the target object on the target node; M is an integer greater than or equal to 2; The flow control unit is further used to determine the initial flow sub-threshold of each sub-object on the target node; wherein the sum of the initial flow sub-threshold of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node; based on the relationship between the actual usage flow of each sub-object contained in the target object on the target node and the initial flow sub-threshold, determine whether the initial flow sub-threshold of the sub-object needs to be adjusted.
19. The device according to claim 18, wherein: The flow control unit is specifically used for: When the actual traffic usage of the first sub-object among the M sub-objects on the target node exceeds the initial traffic sub-threshold of the first sub-object, and the actual traffic usage of the second sub-object among the M sub-objects on the target node does not exceed the initial traffic sub-threshold of the second sub-object, at least the following adjustments are made: When the sum of the initial traffic sub-thresholds of each sub-object among the M sub-objects on the target node does not exceed the current traffic threshold of the target object on the target node, the initial traffic sub-threshold of the first sub-object on the target node is increased, and the initial traffic sub-threshold of the second sub-object on the target node is decreased.
20. The device according to claim 19, wherein The flow control unit is further used for: When it is detected that the actual traffic usage of the second sub-object on the target node exceeds the reduced initial traffic sub-threshold, at least the following adjustments are made: When the sum of the initial flow sub-thresholds of each sub-object in the M sub-objects on the target node does not exceed the current flow threshold of the target object on the target node, the initial flow sub-threshold of the second sub-object on the target node is increased.
21. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.
23. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 10.
Citation Information
Cited By
CDU group flow control method and device, electronic equipment and storage medium
CN120491694A
Resource processing method and device for large model, and electronic equipment
CN121029384A
Resource processing method and device for large model, and electronic device
CN121029384B
