Bandwidth control method, computer device and computer storage medium

By statistically analyzing and adjusting the number of times a service node is rebated per second, the problem of bandwidth fluctuations across a massive number of nodes was solved, enabling stable bandwidth control over the service node set and improving the stability and quality of the on-demand service.

CN116389380BActive Publication Date: 2026-05-05SHENZHEN YUNWANG WULIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN YUNWANG WULIAN TECH CO LTD
Filing Date
2023-03-24
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies suffer from unstable connections and large bandwidth fluctuations when managing video-on-demand services with a large number of nodes, which affects the quality of use for video-on-demand clients.

Method used

By statistically analyzing the average historical number of times the service node set is rebated per second and its bandwidth, the target number of times the service node set is rebated per second is determined, and the QPS of each service node is adjusted according to the target value, thereby achieving bandwidth control over the service node set.

Benefits of technology

It achieves stable bandwidth control over the service node set, ensuring that the target bandwidth is reached when the client calls the service node, thus improving the stability and quality of the on-demand service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389380B_ABST
    Figure CN116389380B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a bandwidth control method, a computer device and a computer storage medium. The computer device counts average historical QPS and average historical bandwidth of a service node set, determines target QPS of the service node set according to the target bandwidth, the average historical bandwidth and the average historical QPS, adjusts a QPS target value of each service node in the service node set according to the target QPS and the average historical QPS, and then returns a point to a client according to the QPS target value of each service node, so that the bandwidth of the client when calling the service node in the service node set can reach the target bandwidth, and thus the smooth control of the bandwidth of the service node set can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of node scheduling, specifically to a bandwidth control method, a computer device, and a computer storage medium. Background Technology

[0002] The on-demand client can connect to the on-demand service node and send an on-demand request to the on-demand service node when it needs to use the on-demand service. The on-demand service node returns the requested video, music or other multimedia data to the on-demand client based on the request, and then the on-demand client plays the multimedia data for the user to watch.

[0003] The control center, used to manage and control the operation of each video-on-demand (VOD) service node, can control the node's bandwidth based on the node's QPS (Queries Per Second). However, while this method is feasible for a small number of nodes that can maintain a stable connection with VOD clients, for a massive number of nodes that cannot maintain a stable connection, the unstable connection leads to unstable QPS, resulting in significant bandwidth fluctuations and ultimately impacting the quality of the VOD service for clients. Summary of the Invention

[0004] This application provides a bandwidth control method, computer device, and computer storage medium for controlling the bandwidth when a service node provides on-demand services to a client to ensure stable bandwidth.

[0005] A first aspect of this application provides a bandwidth control method, the method being applied to a computer device, the computer device being connected to each service node in a set of service nodes; the method includes:

[0006] The average historical number of times the service node set was rerouted per second and the average historical bandwidth corresponding to the average historical number of times the service node was rerouted per second in time are calculated.

[0007] The target number of times per second the service node set is determined based on the target bandwidth, the average historical number of times per second the service node is rebated, and the average historical bandwidth.

[0008] The target value for the number of times each service node in the service node set is rebated per second is adjusted based on the target number of times per second and the average historical number of times per second.

[0009] Return points to the client based on the target number of times each of the service nodes is returned per second, so that the total bandwidth generated by the client calling the service nodes reaches the target bandwidth.

[0010] A second aspect of this application provides a computer device connected to each service node in a set of service nodes; the computer device includes:

[0011] The statistics unit is used to count the average number of times the service node set is returned per second in history and the average historical bandwidth corresponding to the average number of times the service node set is returned per second in time.

[0012] The determining unit is configured to determine the target number of times per second the service node set is rebated based on the target bandwidth, the average historical number of times per second is rebated, and the average historical bandwidth.

[0013] An adjustment unit is used to adjust the target value of the number of times each service node in the service node set is returned per second based on the target number of times returned per second and the average historical number of times returned per second.

[0014] The rebate unit is used to rebate to the client according to the target value of the number of times each service node is rebated per second, so that the total bandwidth generated by the client calling the service node reaches the target bandwidth.

[0015] A third aspect of this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method of the first aspect described above.

[0016] A fourth aspect of this application provides a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0017] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0018] The computer device statistically analyzes the average historical QPS and average historical bandwidth of the service node set. Based on the target bandwidth, average historical bandwidth, and average historical QPS, the target QPS of the service node set is determined. The target QPS value of each service node in the service node set is adjusted according to the target QPS and average historical QPS. Then, a return point is sent to the client based on the target QPS value of each service node. When the client calls the service nodes in the service node set according to the return point from the computer device, the bandwidth used can reach the target bandwidth, thus achieving stable control of the bandwidth used by the service node set. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the bandwidth control method in an embodiment of this application;

[0020] Figure 2This is a schematic diagram of the timeline for a computer device to obtain the bandwidth and QPS values ​​of a service node in an embodiment of this application.

[0021] Figure 3 This is another flowchart illustrating the bandwidth control method in this application.

[0022] Figure 4 This is another flowchart illustrating the bandwidth control method in this application.

[0023] Figure 5 This is a schematic diagram of the structure of a computer device in an embodiment of this application;

[0024] Figure 6 This is another schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation

[0025] This application provides a bandwidth control method, computer device, and computer storage medium for controlling the bandwidth when a service node provides on-demand services to a client to ensure stable bandwidth.

[0026] The bandwidth control method of the present invention can be applied to one or more computer devices. The computer device is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0027] The computer equipment can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud databases, cloud computing, big data and artificial intelligence platforms.

[0028] The computer equipment communicates with multiple service nodes in the service node set. The service nodes communicate with clients to provide on-demand services (such as video-on-demand services). Clients can invoke service nodes to use the on-demand service to obtain on-demand data (such as video data) provided by the service nodes. The number of clients is not limited.

[0029] Computer devices can control the process of clients calling service nodes. Specifically, to ensure stable bandwidth usage by the service nodes providing on-demand services and thus guarantee the quality of on-demand service for clients, computer devices can control the bandwidth generated by clients calling service nodes. The following describes the operations performed by the computer devices to stably control bandwidth.

[0030] Please see Figure 1 One embodiment of the bandwidth control method in this application includes:

[0031] 101. Calculate the average historical number of times the service node set is rerouted per second and the average historical bandwidth corresponding to the average historical number of times the service node set is rerouted per second in time;

[0032] Computer devices can send requests to clients, who then invoke the corresponding service nodes to access on-demand services and obtain video-on-demand data. During this process, the computer device can calculate the average historical number of requests per second (QPS) to the service node set, as well as the average historical bandwidth corresponding to the average historical number of requests per second over time. This allows the target QPS for the service node set to be determined based on the average historical QPS and average historical bandwidth.

[0033] 102. Determine the target number of times the service node set is rebated per second based on the target bandwidth, the average historical number of times it is rebated per second, and the average historical bandwidth.

[0034] Operators want the bandwidth generated by the client's call to the service node set to reach a desired bandwidth. Controlling the service node set to achieve this desired bandwidth can be achieved by controlling the number of times the service node set is rebated per second. Therefore, the computer device can determine the target number of times the service node set is rebated per second based on the target bandwidth, the average historical QPS, and the previously achieved average historical bandwidth, so as to control the service node set to achieve the desired bandwidth based on the target QPS.

[0035] 103. Adjust the target value of the number of times each service node in the service node set is returned per second based on the target number of times returned per second and the average historical number of times returned per second;

[0036] When the target QPS of the service node set is obtained, the computer device can adjust the QPS of each service node in the service node set according to the target QPS. Specifically, the target QPS value of each service node in the service node set can be adjusted according to the target QPS and the average historical QPS obtained in the above steps, so that the computer device can return points to the client based on the target QPS value of each service node.

[0037] 104. Return points to the client based on the target number of times each service node is returned per second;

[0038] The computer device sends a return to the client based on the QPS target value of each service node. The number of times the service node set is returned per second can reach the target QPS mentioned above. Since the target QPS is determined based on the target bandwidth, the bandwidth used by the client when calling the service nodes in the service node set according to the return from the computer device can reach the target bandwidth. The target bandwidth can be set to be stable or slightly fluctuating according to the configuration needs of the operators, thereby achieving stable control over the bandwidth used by the service node set.

[0039] In this embodiment, the computer device counts the average historical QPS and average historical bandwidth of the service node set. Based on the target bandwidth, average historical bandwidth, and average historical QPS, it determines the target QPS of the service node set. Based on the target QPS and average historical QPS, it adjusts the target QPS value of each service node in the service node set. Then, it returns a bandwidth to the client based on the target QPS value of each service node. When the client calls the service nodes in the service node set according to the return from the computer device, the bandwidth reached can reach the target bandwidth. Therefore, it is possible to achieve stable control of the bandwidth reached by the service node set.

[0040] The following will be discussed in the preceding text. Figure 1 Based on the illustrated embodiments, the embodiments of this application are further described in detail. In this embodiment, the average historical QPS and the average historical bandwidth correspond in time. One implementation method is to ensure that the generation time range of the QPS value used to calculate the average historical QPS is the same as the generation time range of the bandwidth value used to calculate the average historical bandwidth. This ensures that the QPS of the service node set corresponds to the bandwidth it runs, better reflecting the actual workload of the service node set. Consequently, the target QPS value determined based on the average historical QPS and average historical bandwidth is more accurate, ensuring that the QPS value matches the bandwidth run based on that QPS value in time.

[0041] In actual operation, there is a delay between the time it takes for the service node to report bandwidth to the computer device and the time it takes for the computer device to determine the QPS value of the service node. This is because the computer device sends a feedback to the client based on the QPS of each service node. At this point, the computer device can determine the QPS value of the service node. However, the bandwidth can only be determined after the computer device sends the feedback, when the client calls the on-demand service of the service node based on the feedback, and then the service node reports it to the computer device. Obviously, there is a time delay between the computer device determining the bandwidth of the service node and the computer device determining the QPS value of the service node.

[0042] To address this situation, to ensure that the generation time range of the QPS value used for calculating the average historical QPS is the same as the generation time range of the bandwidth value used for calculating the average historical bandwidth, the implementation method adopted in this embodiment can be to calculate the average historical bandwidth based on the historical bandwidth values ​​within a target time range. This target time range is the time range within which the computer device receives the bandwidth reported by the service node, and this target time range is a preset time period following the generation time range of the QPS value used for calculating the average historical QPS. Specifically, this preset time period is the delay between the time point when the service node reports the bandwidth and the effective time point of the service node's number of times per second is returned. The effective time point of the service node's number of times per second is returned refers to the time point when the computer device returns data to the client according to the service node's number of times per second is returned.

[0043] like Figure 2 As shown, A1 to A4 represent multiple time ranges in the timeline for the computer equipment to receive bandwidth values ​​reported by the service node, and B1 to B4 represent the time ranges for the service node to generate QPS values. Since there is a delay between the bandwidth reporting time and the QPS value determination time, the bandwidth value in time range A1 should correspond to the QPS value in time range B1, which is a time interval delayed from A1 in the QPS value generation timeline. Similarly, the bandwidth value in time range A2 corresponds to the QPS value in time range B2, the bandwidth value in time range A3 corresponds to the QPS value in time range B3, and so on…

[0044] For example, suppose Figure 2 The specific time points on the timeline are shown in the figure. Assuming that the delay between the time point when the service node reports the bandwidth and the effective time point of the number of times the service node is returned per second is 1 minute, if the bandwidth value of the range A1 from 11:56 to 12:01 is used to calculate the average historical bandwidth of the range A1, then due to the bandwidth reporting delay, the bandwidth value of the range A1 should correspond to the QPS value of the range B1 from 11:55 to 12:00. Therefore, based on the QPS value of this range, the average historical QPS is calculated, and the average historical bandwidth of the range A1 and the QPS value of the range B1 can correspond to each other, jointly reflecting the actual traffic of the service node set. Similarly, based on the reception time of the bandwidth value, the QPS value of the previous minute is obtained to calculate the average historical QPS. That is, the bandwidth value of A2 range 11:51~11:56 corresponds to the QPS value of B2 range 11:50~11:55, the bandwidth value of A3 range 11:46~11:51 corresponds to the QPS value of B3 range 11:45~11:50, and so on.

[0045] Therefore, this method ensures that the generation time range of the QPS value used to calculate the average historical QPS is the same as the generation time range of the bandwidth value used to calculate the average historical bandwidth. This ensures that the QPS value used to calculate the average historical QPS matches the bandwidth value used to calculate the average historical bandwidth, making the calculated average historical QPS and average historical bandwidth more consistent with the actual traffic of the service node set.

[0046] Besides the reasons mentioned above that could cause delays in service node bandwidth reporting, other factors could also contribute to this delay. For example, after a client determines the bandwidth when calling the service node's on-demand service based on a callback, the service node might not report this bandwidth value immediately. Instead, to reduce interaction and conserve bandwidth, it might choose to report the bandwidth at regular intervals (e.g., every 5 minutes). In this case, the delay between the time the service node reports the bandwidth and the time when the service node's QPS becomes effective (i.e., the aforementioned preset time period) must consider not only the delay caused by the client calling the service node's on-demand service based on the callback, but also the delay caused by the service node not immediately reporting the bandwidth after determining it.

[0047] Therefore, this embodiment does not limit the setting method of the above-mentioned preset time period, and it can be set according to the various reasons that cause the computer device to receive bandwidth delay.

[0048] Of course, the time correspondence between average historical QPS and average historical bandwidth can be either the same time range in which the QPS value used to calculate the average historical QPS is generated as the bandwidth value used to calculate the average historical bandwidth, or the time difference between the QPS value generation range and the bandwidth value generation range is within a preset range. This preset range could be a short duration such as 1 second, 5 seconds, or half a minute. This embodiment does not limit the method for determining the time correspondence between average historical QPS and average historical bandwidth.

[0049] based on Figure 1 In one embodiment of the illustrated example, the target bandwidth is determined based on a preset bandwidth and an average historical bandwidth. The preset bandwidth is the bandwidth expected by the operators when the service node set is invoked. This setting reduces the gap between the target bandwidth and the historical bandwidth previously achieved by the service nodes, preventing strong bandwidth fluctuations caused by excessive differences between the target and historical bandwidths when the service node set is adjusted, thus achieving stable bandwidth control.

[0050] The target bandwidth is determined based on the preset bandwidth and the average historical bandwidth. This can be achieved by using the average of the preset bandwidth and the average historical bandwidth as the target bandwidth, or by taking the median between the preset bandwidth and the average historical bandwidth as the target bandwidth. This embodiment does not limit the specific method for determining the target bandwidth based on the preset bandwidth and the average historical bandwidth.

[0051] In this embodiment, bandwidth control is an iterative process, the purpose of which is to gradually bring the target bandwidth reached after each iteration closer to the aforementioned preset bandwidth. Please refer to... Figure 3 ,exist Figure 1 Based on the illustrated embodiment, one implementation of this embodiment, in addition to steps 101 to 104 described above, also includes the following steps:

[0052] 105. Determine whether the difference between the target bandwidth and the preset bandwidth is greater than a preset threshold. If so, return to step 101.

[0053] When the difference between the target bandwidth achieved by the client calling the service node according to the computer device's feedback and the aforementioned preset bandwidth exceeds a preset threshold, it indicates that the currently achieved bandwidth still falls short of the bandwidth expected by the operators. The computer device then returns to step 101, and in step 102, a new target QPS is determined using the new target bandwidth. This new target bandwidth can be determined based on the preset bandwidth and the previously achieved target bandwidth. In step 103, the new target QPS is used to readjust the QPS target value of each service node. In step 104, feedback is sent to the client according to the new QPS target value of each service node, thus ensuring that the bandwidth achieved by the client calling the service node reaches the aforementioned new target bandwidth. This process is iterated multiple times until the target bandwidth achieved by the client calling the service node reaches the preset bandwidth, i.e., the bandwidth expected by the operators.

[0054] Please see Figure 4 ,based on Figure 1 As shown in this embodiment, the specific execution process of step 103 includes the following steps:

[0055] 1031. Determine the target number of times per second is returned to each service node in the service node set according to the ratio of the target number of times per second is returned to the average historical number of times per second;

[0056] When determining the target QPS value for each service node based on the target QPS and the average historical QPS, the target number of times per second is returned for each service node can be adjusted according to the ratio of the target QPS to the average historical QPS. The target QPS value for each service node can then be adjusted accordingly.

[0057] To smoothly control the bandwidth of service nodes and avoid significant bandwidth fluctuations, when determining the target QPS adjustment ratio, the initial adjustment ratio for the number of times each service node receives a rebate per second in the service node set can be determined first based on the ratio of the target QPS to the average historical QPS. Then, the target QPS adjustment ratio is determined based on the adjustment coefficient and the initial adjustment ratio for the number of times a rebate per second. The adjustment coefficient is used to reduce bandwidth fluctuations caused by the computer equipment sending rebates to clients according to the target QPS adjustment ratio.

[0058] For example, the ratio of the target QPS to the average historical QPS is used as the initial QPS adjustment ratio 1+x, where x is a real number. Then, x in the initial QPS adjustment ratio 1+x is multiplied by an adjustment coefficient r to obtain the target QPS adjustment ratio 1+r*x. Here, r is a positive number less than 1, and the adjustment coefficient r is used to adjust the value of the target QPS adjustment ratio so that the target QPS adjustment ratio is less than the initial QPS adjustment ratio. Therefore, by adjusting the adjustment coefficient r, the value of the target QPS adjustment ratio is reduced, thus ensuring that the QPS target value obtained by each service node according to the target QPS adjustment ratio does not fluctuate too much compared to the previous historical QPS value. This further avoids large fluctuations in the bandwidth achieved by the service node based on the target QPS value, thereby achieving stable bandwidth control.

[0059] Of course, besides multiplying x in the initial QPS adjustment ratio 1+x by the adjustment coefficient r, other methods can also be used to adjust the initial QPS adjustment ratio. For example, the initial QPS adjustment ratio can be directly multiplied by the adjustment coefficient r, or the difference between the initial QPS adjustment ratio and the adjustment coefficient r can be used as the target QPS adjustment ratio. As long as the adjusted target QPS adjustment ratio is smaller than the initial QPS adjustment ratio, no specific restrictions are imposed here.

[0060] 1032. Determine the target value of the number of times per second that a service node in the set of service nodes is returned based on the target adjustment ratio for the number of times per second that a return is returned.

[0061] After determining the target QPS adjustment ratio for each service node, the target QPS value for each service node can be determined based on this target QPS adjustment ratio. For example, assuming the historical QPS value of a service node is 500 and the target QPS adjustment ratio is 6 / 5, the target QPS value for that service node can be determined to be 600, and the computer equipment will then send QPS back to the client according to this target QPS value.

[0062] In this embodiment, besides determining the QPS target value for each service node by adjusting the ratio, the QPS target value can also be determined according to the request processing performance of the service node. For example, a service node with high processing performance for client requests can be assigned a larger QPS target value, while one with weaker performance can be assigned a lower QPS target value. This embodiment does not limit the method of adjusting the QPS target value of service nodes based on the target QPS and the average historical QPS, as long as it ensures that the total QPS of the service node set reaches the target QPS.

[0063] based on Figure 1 In the illustrated embodiment, when determining the target QPS of the service node set, one implementation method is to determine the ratio of the target bandwidth to the average historical bandwidth, and use the product of this ratio and the average historical number of times the bandwidth is returned per second as the target QPS of the service node set.

[0064] In addition, there are several other ways to determine the target QPS of a set of service nodes. For example, one can determine the difference between the target bandwidth and the average historical bandwidth, and the ratio of this difference to the target bandwidth, and then determine the product of this ratio and the average duration. The sum of this product and the average historical QPS is then used as the target QPS of the set of service nodes. This embodiment does not limit the method for determining the target QPS of the set of service nodes.

[0065] based on Figure 1 In the illustrated embodiment, if a service node exists in multiple service node sets, the target QPS (queries per second) for that service node is the minimum among the multiple target QPS values ​​for that service node across the multiple service node sets. For example, if multiple service nodes exist, these multiple service nodes can be divided according to their location regions, resulting in service node sets for region A, region B, and region C; and according to the type of clients they serve, they can be divided into service node sets for type A clients and service node sets for type B clients. If a service node is a member of both the service node set for region A and the service node set for type B clients, assuming its QPS target value in the service node set for region A is 500 and its QPS target value in the service node set for type B clients is 400, then the minimum of these two QPS target values ​​is taken as the actual QPS target value for that service node. That is, the computer device will send a rebate to the client with the service node's QPS target value of 400, thus simultaneously satisfying the rebate requirements of that service node in both sets.

[0066] The bandwidth control method in the embodiments of this application has been described above. The computer device in the embodiments of this application is described below, and the computer device is connected to each service node in the service node set; please refer to... Figure 5 One embodiment of the computer device in this application includes:

[0067] The statistics unit 501 is used to count the average historical number of times the service node set is returned per second and the average historical bandwidth corresponding to the average historical number of times the service node set is returned per second in time.

[0068] The determining unit 502 is used to determine the target number of times per second the service node set is rebated based on the target bandwidth, the average historical number of times per second is rebated, and the average historical bandwidth.

[0069] The adjustment unit 503 is used to adjust the target value of the number of times each service node in the service node set is returned per second according to the target number of times returned per second and the average historical number of times returned per second;

[0070] The rebate unit 504 is used to rebate to the client according to the target value of the number of times each service node is rebated per second, so that the total bandwidth generated by the client calling the service node reaches the target bandwidth.

[0071] In a preferred embodiment of this example, the generation time range of the number of times per second that is used to count the average historical number of times per second is returned is the same as the generation time range of the bandwidth value that is used to count the average historical bandwidth.

[0072] In a preferred embodiment of this invention, the statistical unit 501 is specifically used for:

[0073] Obtain the historical bandwidth value for a preset time before the generation time range of the number of times per second that is used to calculate the average historical number of times per second, and calculate the average historical bandwidth based on the historical bandwidth value.

[0074] The preset time is the delay between the time point when the service node reports the bandwidth and the effective time point of the number of times the service node is rebated per second. The effective time point is the time point when the computer device rebates to the client according to the number of times the service node is rebated per second.

[0075] In a preferred embodiment of this example, the target bandwidth is determined based on a preset bandwidth and the average historical bandwidth, wherein the preset bandwidth is the expected bandwidth when the service node set is invoked.

[0076] In a preferred embodiment of this invention, the statistical unit 501 is specifically used for:

[0077] After the total bandwidth generated by the client calling the service node reaches the target bandwidth, if the difference between the target bandwidth and the preset bandwidth is greater than the preset threshold, the process returns to the step of calculating the average historical number of times the service node set is returned per second and the average historical bandwidth corresponding to the average historical number of times the service node is returned per second in time, so that the target bandwidth reaches the preset bandwidth.

[0078] In a preferred embodiment of this invention, the adjustment unit 503 is specifically used for:

[0079] The target number of times per second is rebated is adjusted based on the ratio of the target number of times per second is rebated to the average historical number of times per second.

[0080] The target value for the number of times each service node in the set of service nodes is determined based on the adjustment ratio of the target number of times per second is returned.

[0081] In a preferred embodiment of this invention, the adjustment unit 503 is specifically used for:

[0082] The initial rebate rate adjustment ratio for each service node in the service node set is determined based on the ratio of the target number of times per second is rebated to the average historical number of times per second is rebated.

[0083] The target number of times the data is returned per second is determined based on the adjustment coefficient and the initial number of times the data is returned per second adjustment ratio; wherein, the adjustment coefficient is used to reduce the bandwidth fluctuation caused by the computer device returning data to the client according to the target number of times the data is returned per second adjustment ratio.

[0084] In a preferred embodiment of this invention, the adjustment unit 503 is specifically used for:

[0085] The ratio of the number of times the target is returned per second to the average historical number of times it is returned per second is used as the initial return rate adjustment ratio 1+x, where x is a real number;

[0086] Multiply x in the initial adjustment ratio of return points per second 1+x by the adjustment coefficient r to obtain the target adjustment ratio of return points per second 1+r*x; where r is a positive number less than 1, and the adjustment coefficient r is used to adjust the value of the target adjustment ratio of return points per second so that the value of the target adjustment ratio of return points per second is less than the initial adjustment ratio of return points per second.

[0087] In a preferred embodiment of this example, the determining unit 502 is specifically used to determine the ratio of the target bandwidth to the average historical bandwidth, and to use the product of the ratio and the average historical number of times per second is returned as the target number of times per second is returned.

[0088] In a preferred embodiment of this example, if the service node exists in multiple sets of service nodes, the target value for the number of times the service node is returned per second is the minimum value among the multiple target values ​​for the number of times the service node is returned per second in the multiple sets of service nodes.

[0089] In this embodiment, the operations performed by each unit in the computer device are the same as those described above. Figure 1 The embodiments shown are similar and will not be repeated here.

[0090] In this embodiment, the computer device counts the average historical QPS and average historical bandwidth of the service node set. Based on the target bandwidth, average historical bandwidth, and average historical QPS, it determines the target QPS of the service node set. Based on the target QPS and average historical QPS, it adjusts the target QPS value of each service node in the service node set. Then, it returns a bandwidth to the client based on the target QPS value of each service node. When the client calls the service nodes in the service node set according to the return from the computer device, the bandwidth reached can reach the target bandwidth. Therefore, it is possible to achieve stable control of the bandwidth reached by the service node set.

[0091] The computer device in the embodiments of this application is described below. Please refer to [link / reference]. Figure 6 One embodiment of the computer device in this application includes:

[0092] The computer device 600 may include one or more central processing units (CPUs) 601 and a memory 605, in which one or more applications or data are stored.

[0093] The memory 605 can be volatile or persistent storage. The program stored in the memory 605 can include one or more modules, each module including a series of instruction operations on the computer device. Furthermore, the central processing unit 601 can be configured to communicate with the memory 605 and execute the series of instruction operations stored in the memory 605 on the computer device 600.

[0094] The computer device 600 may also include one or more power supplies 602, one or more wired or wireless network interfaces 603, one or more input / output interfaces 604, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0095] The central processing unit 601 can perform the aforementioned... Figure 1 The specific operations performed by the computer device in the illustrated embodiment will not be described in detail here.

[0096] This application also provides a computer storage medium, one embodiment of which includes: the computer storage medium storing instructions, which, when executed on a computer, cause the computer to perform the aforementioned... Figure 1 The operations performed by the computer device in the illustrated embodiment.

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

[0098] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0100] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A bandwidth control method, characterized in that, The method is applied to a computer device, the computer device being connected to each service node in a set of service nodes; the method includes: The average historical number of times the service node set was rerouted per second and the average historical bandwidth corresponding to the average historical number of times the service node was rerouted per second in time are calculated. The target number of times per second the service node set is determined based on the target bandwidth, the average historical number of times per second the service node is rebated, and the average historical bandwidth. The target value for the number of times each service node in the service node set is rebated per second is adjusted based on the target number of times per second and the average historical number of times per second. Return points to the client based on the target number of times each of the service nodes is returned per second, so that the total bandwidth generated by the client calling the service nodes reaches the target bandwidth.

2. The method according to claim 1, characterized in that, The time range for generating the average historical number of times per second (returned) value is the same as the time range for generating the average historical bandwidth value.

3. The method according to claim 2, characterized in that, The average historical bandwidth is statistically analyzed, including: The average historical bandwidth is calculated based on the historical bandwidth values ​​within a target time range. The target time range is the time range within which the computer device receives the bandwidth reported by the service node. The target time range is a preset time period after the generation time range of the return count value used to calculate the average historical return count per second. The preset time period is the delay between the time point when the service node reports bandwidth and the effective time point of the number of times the service node is rebated per second. The effective time point is the time point when the computer device rebates to the client according to the number of times the service node is rebated per second.

4. The method according to claim 1, characterized in that, The target bandwidth is determined based on the preset bandwidth and the average historical bandwidth, whereby the preset bandwidth is the expected bandwidth when the service node set is invoked.

5. The method according to claim 4, characterized in that, After the total bandwidth generated by the client's calls to the service node reaches the target bandwidth, the method further includes: If the difference between the target bandwidth and the preset bandwidth is greater than the preset threshold, then return to the step of performing the statistical analysis of the average historical number of times the service node set is returned per second and the average historical bandwidth corresponding to the average historical number of times the service node set is returned per second in time, so that the target bandwidth reaches the preset bandwidth.

6. The method according to claim 1, characterized in that, The step of adjusting the target value of the number of times each service node in the service node set is to receive a rebate per second based on the target number of times per second and the average historical number of times per second includes: The target number of times per second is rebated is adjusted based on the ratio of the target number of times per second is rebated to the average historical number of times per second. The target value for the number of times each service node in the set of service nodes is determined based on the adjustment ratio of the target number of times per second is returned.

7. The method according to claim 6, characterized in that, The step of determining the target number of rebates per second adjustment ratio for each service node in the service node set based on the ratio of the target number of rebates per second to the average historical number of rebates per second includes: The initial rebate rate adjustment ratio for each service node in the service node set is determined based on the ratio of the target number of times per second is rebated to the average historical number of times per second is rebated. The target number of times the data is returned per second is determined based on the adjustment coefficient and the initial number of times the data is returned per second adjustment ratio; wherein, the adjustment coefficient is used to reduce the bandwidth fluctuation caused by the computer device returning data to the client according to the target number of times the data is returned per second adjustment ratio.

8. The method according to claim 7, characterized in that, The step of determining the target number of times per second of rebates is based on the adjustment coefficient and the initial adjustment ratio for the number of times per second of rebates, including: The ratio of the number of times the target is returned per second to the average historical number of times it is returned per second is used as the initial return rate adjustment ratio 1+x, where x is a real number; Multiply x in the initial adjustment ratio of return points per second 1+x by the adjustment coefficient r to obtain the target adjustment ratio of return points per second 1+r*x; where r is a positive number less than 1, and the adjustment coefficient r is used to adjust the value of the target adjustment ratio of return points per second so that the value of the target adjustment ratio of return points per second is less than the initial adjustment ratio of return points per second.

9. The method according to claim 1, characterized in that, Determining the target number of times per second the service node set is rebated based on the target bandwidth, the average historical number of times per second is rebated, and the average historical bandwidth includes: Determine the ratio of the target bandwidth to the average historical bandwidth, and multiply the ratio by the average historical number of times per second is returned as the target number of times per second is returned.

10. The method according to any one of claims 1 to 9, characterized in that, If the service node exists in multiple sets of service nodes, then the target value for the number of times the service node is returned per second is the minimum value among the multiple target values ​​for the number of times the service node is returned per second in the multiple sets of service nodes.

11. A computer device, characterized in that, The computer equipment is connected to each service node in the set of service nodes; the computer equipment includes: The statistics unit is used to count the average number of times the service node set is returned per second in history and the average historical bandwidth corresponding to the average number of times the service node set is returned per second in time. The determining unit is configured to determine the target number of times per second the service node set is rebated based on the target bandwidth, the average historical number of times per second is rebated, and the average historical bandwidth. An adjustment unit is used to adjust the target value of the number of times each service node in the service node set is returned per second based on the target number of times returned per second and the average historical number of times returned per second. The rebate unit is used to rebate to the client according to the target value of the number of times each service node is rebated per second, so that the total bandwidth generated by the client calling the service node reaches the target bandwidth.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 10.

13. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed on the computer, cause the computer to perform the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Node bandwidth adjustment method and device, equipment and storage medium

    CN113067731A

  • Elastic scheduling method and system

    CN113673822A