A peak shaving method, device and electronic equipment
By predicting the bandwidth peak set and real-time bandwidth monitoring, the target bandwidth peak is dynamically calculated and peak-cutting processing is performed, which solves the problem of relying on manual experience for bandwidth governance in the prior art, and achieves efficient and accurate bandwidth peak-cutting.
Patent Information
- Application Number
- CN202011204199.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-02
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2040-11-02
AI Technical Summary
The existing bandwidth governance methods are highly dependent on manual experience and cannot flexibly and accurately cut bandwidth peaking.
By obtaining the set of predicted bandwidth peaks of the target object within the preset time, dynamically calculate the target bandwidth peak, and perform peak cutting processing when the real-time bandwidth peak is not less than the peak threshold.
Real-time, dynamic and precise peak-cutting processing of bandwidth is realized, improving the flexibility and accuracy of peak-cutting processing.
Smart Images

Figure CN114448808B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and more specifically, to a peak shaving method, device and electronic device. The present application also relates to a video resource providing method. Background Art
[0002] With the continuous development of Internet technology, especially with the continuous maturity of cloud platform technology, enterprises can provide services to users conveniently and quickly by deploying or registering applications on cloud platforms.
[0003] After an enterprise deploys or registers an application on a cloud platform, it can usually charge based on the bandwidth peak of the bandwidth resources used by the application on the cloud platform's resource server, such as the content delivery network (CDN). For example, it can use a monthly 95 bandwidth peak, i.e., 95th percentile charging, for billing. Since during the operation of an application, there may be bandwidth resources used, i.e., the bandwidth peak may increase sharply in a certain period of time, therefore, for cost considerations, bandwidth management is generally performed on the bandwidth resources used by the application, i.e., in the process of the resource server providing resource data to the application to generate bandwidth resources, the bandwidth of the resource server is peaked to achieve the purpose of bandwidth management. In the process of implementing the present application, the inventors found that the existing bandwidth management methods rely heavily on manual experience, and there is a problem that the bandwidth peak cannot be flexibly and accurately processed. Summary of the invention
[0004] One objective of the embodiments of the present disclosure is to provide a new technical solution for peak shaving of bandwidth.
[0005] According to a first aspect of the present disclosure, a peak shaving method is provided, the method comprising:
[0006] Obtain a set of predicted bandwidth peak values of a target object within a first preset time period; calculate a target bandwidth peak value of the target object within the first preset time period based on the predicted bandwidth peak value set; obtain a real-time bandwidth peak value of the target object within the first preset time period; and perform peak clipping on the bandwidth of the target object based on the target bandwidth peak value when the real-time bandwidth peak value is not less than a peak threshold.
[0007] Optionally, calculating the target bandwidth peak value of the target object within the first preset time length based on the predicted bandwidth peak value set includes: obtaining a historical bandwidth peak value set of the target object within a second preset time length; obtaining a first peak baseline based on the historical bandwidth peak value set; obtaining a second peak baseline based on the predicted bandwidth peak value set; and calculating the target bandwidth peak value based on the first peak baseline and the second peak baseline.
[0008] Optionally, obtaining a first peak baseline based on the historical bandwidth peak set includes: taking a maximum value in the historical bandwidth peak set as the first peak baseline; obtaining a second peak baseline based on the predicted bandwidth peak set includes: taking a maximum value in the predicted bandwidth peak set as the second peak baseline.
[0009] Optionally, the target bandwidth peak is calculated based on the first peak baseline and the second peak baseline, including: when the time period corresponding to the first preset duration is within the preset peak time period, using the second peak baseline as the target bandwidth peak; and when the time period corresponding to the first preset duration is not within the preset peak time period, obtaining the maximum value between the first peak baseline and the second peak baseline, and using the maximum value as the target bandwidth peak.
[0010] Optionally, performing peak shaving processing on the bandwidth of the target object according to the target bandwidth peak value includes: obtaining a cost target value by calculating the difference between the real-time bandwidth peak value and the target bandwidth peak value; and performing peak shaving processing on the bandwidth of the target object according to the cost target value.
[0011] Optionally, performing peak shaving processing on the bandwidth of the target object according to the cost target value includes: obtaining real-time time data corresponding to the real-time bandwidth peak value, and obtaining end time data corresponding to the first preset duration; calculating a target peak shaving duration according to the real-time time data and the end time data; and performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration according to the cost target value.
[0012] Optionally, the bandwidth of the target object includes the video bandwidth when the target object provides video data; and performing peak clipping processing on the bandwidth of the target object within the target peak clipping duration according to the cost target value comprises: obtaining a video clarity ratio calculation model, wherein the video clarity ratio calculation model is used to fit the clarity ratio when the target object outputs video data within a set duration, taking a set cost target value as a constraint and a set video quality condition as a target; inputting the cost target value and the target peak clipping duration into the target video clarity ratio model to obtain a target clarity ratio set, wherein the target clarity ratio set comprises at least one data pair, and the data pair consists of a video playback duration and a video bit rate; and performing peak clipping processing on the bandwidth of the target object within the target peak clipping duration by controlling the target object to provide video data according to the clarity ratio set.
[0013] Optionally, performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration according to the cost target value includes performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration by at least one of the following methods: adjusting the speed at which the target object provides resource data according to the cost target value; adjusting the data flow capacity when the target object provides resource data according to the cost target value; adjusting the level of preloading processing performed when the target object provides resource data according to the cost target value.
[0014] Optionally, the peak threshold is calculated by the following steps: obtaining a preset peak clipping ratio; and calculating the peak threshold according to the target bandwidth peak value and the preset peak clipping ratio.
[0015] Optionally, obtaining a set of predicted bandwidth peak values of the bandwidth of the target object within a first preset time duration includes: obtaining a first bandwidth peak value set of the target object within the same historical time period corresponding to the first preset time duration; and obtaining a second bandwidth peak value set of the target object within a third preset time duration before the first preset time duration; and obtaining the predicted bandwidth peak value set based on the first bandwidth peak value set and the second bandwidth peak value set.
[0016] Optionally, obtaining the predicted bandwidth peak set based on the first bandwidth peak set and the second bandwidth peak set includes: obtaining the predicted peak by inputting the first bandwidth peak set and the second bandwidth peak set into a target bandwidth peak prediction model.
[0017] Optionally, the target object includes: a node server in a content distribution network.
[0018] According to a second aspect of the present disclosure, a video resource providing method is also provided, which is applied to a node server in a content distribution network, comprising:
[0019] Receiving an access request for a target video sent by a terminal device; providing video data of the target video to the terminal device in response to the access request; and in the process of providing the video data, performing peak clipping processing on a video bandwidth corresponding to the video data according to any one of the methods described in the first aspect of the present disclosure.
[0020] According to a third aspect of the present disclosure, there is also provided a peak clipping device, comprising:
[0021] A predicted bandwidth peak value set acquisition module is used to acquire a predicted bandwidth peak value set of a target object within a first preset time length; a target bandwidth peak value calculation module is used to calculate the target bandwidth peak value of the target object within the first preset time length according to the predicted bandwidth peak value set; a real-time bandwidth peak value acquisition module is used to acquire the real-time bandwidth peak value of the target object within the first preset time length; and a peak clipping processing module is used to perform peak clipping processing on the bandwidth of the target object according to the target bandwidth peak value when the real-time bandwidth peak value is not less than a peak threshold.
[0022] According to a fourth aspect of the present disclosure, an electronic device is further provided, comprising the apparatus according to the third aspect of the present disclosure; or comprising:
[0023] A memory for storing executable instructions;
[0024] The processor is used to operate the electronic device to execute the method according to the first aspect or the second aspect of the present disclosure under the control of the executable instructions.
[0025] According to the fifth aspect of the present disclosure, a computer-readable storage medium is also provided, which stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method according to the first aspect or the second aspect of the present disclosure when read and executed by the computer.
[0026] According to an embodiment of the present disclosure, when peak clipping is performed on the bandwidth of a target object, a set of predicted bandwidth peak values of the target object within a first preset time length is first obtained; based on the set of predicted bandwidth peak values, a target bandwidth peak value of the target object within the first preset time length is dynamically calculated; thereafter, the real-time bandwidth peak value of the target object within the first preset time length is obtained, and when the real-time bandwidth peak value is not less than a peak threshold, peak clipping is performed on the bandwidth of the target object based on the calculated target bandwidth peak value. This method can obtain the target bandwidth peak value of the target object for peak clipping in the first preset time length in real time, dynamically, and conveniently by predicting the set of predicted bandwidth peak values of the target object within the first preset time length; at the same time, since peak clipping is triggered on the bandwidth of the target object when the real-time bandwidth peak value is not less than the peak threshold, the method can also improve the accuracy of peak clipping.
[0027] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0029] Figure 1 It is a schematic diagram of a peak clipping method.
[0030] Figure 2 It is a scene schematic diagram of the peak shaving method provided by an embodiment of the present disclosure.
[0031] Figure 3 is a schematic block diagram showing a hardware configuration that can be used to implement a peak shaving method according to an embodiment.
[0032] Figure 4 It is a flowchart of the peak shaving method provided in an embodiment of the present disclosure.
[0033] Figure 5 It is a schematic diagram comparing the predicted bandwidth peak value and the actual bandwidth peak value provided by the embodiment of the present disclosure.
[0034] Figure 6 It is a schematic diagram of the peak shaving method provided by an embodiment of the present disclosure.
[0035] Figure 7 It is a flowchart of a method for providing video resources provided by another embodiment of the present disclosure.
[0036] Figure 8 It is a schematic principle block diagram of the peak clipping device provided in an embodiment of the present disclosure.
[0037] Figure 9a is a schematic principle block diagram of an electronic device according to an embodiment of the present disclosure.
[0038] Figure 9b is a schematic principle block diagram of an electronic device according to another embodiment of the present disclosure. DETAILED DESCRIPTION
[0039] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0040] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0041] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0042] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0043] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0044] Please see Figure 1 , which is a schematic diagram of a peak shaving method. Figure 1 As shown in FIG. 1 , the bandwidth of a target object, such as a node server in a content distribution network, can generally be subjected to flow control during peak hours to reduce the peak value of its bandwidth. Specifically, a unified peak-cutting peak value can be manually configured. When the real-time bandwidth peak value of the target object exceeds the peak-cutting peak value, the bandwidth of the target object is subjected to peak-cutting processing, that is, the real-time bandwidth peak value is reduced to a value such as 100% by taking a flow control method. Figure 1 The shown can be cut below the water level.
[0045] However, in practice, the bandwidth peaks corresponding to different applications and services are usually dynamic and strongly correlated with holidays, operational hotspots, business development trends, etc. The manual configuration method is not flexible and accurate enough. Of course, you can also use the peak time period configuration method. For example, you can set a step-by-step peak reduction method of 5% from 21:00 to 22:00 and 10% from 22:00 to 23:00. However, this method also requires manual configuration, and this method can only roughly set the stage reduction ratio, and cannot handle abnormal fluctuation peaks during non-peak hours and peak hours of different services. It also has the problem of low accuracy.
[0046] Please see Figure 2 , which is a schematic diagram of a scenario of a peak shaving method provided by an embodiment of the present disclosure. Figure 2 As shown, in order to flexibly and accurately perform bandwidth peak clipping, in a specific implementation, when the terminal device 1200 sends an access request for a target video to the target object 1300, wherein the target object 1300 may be, for example, a node server in a content distribution network for providing video data, and when the target object 1300 provides the video data of the target video to the terminal device 1200 in response to the request, the server 1100 may obtain a set of predicted bandwidth peak values of the target object 1300 within a first preset duration; calculate a target bandwidth peak value of the target object within the first preset duration based on the predicted bandwidth peak value set; and obtain a real-time bandwidth peak value of the target object 1300 within the first preset duration in real time; and when the real-time bandwidth peak value is not less than a peak threshold, perform peak clipping on the bandwidth of the target object 1300, for example, the video bandwidth, based on the target bandwidth peak value, and after the peak clipping is performed on the bandwidth of the target object 1300, the target object 1300 provides the terminal device 1200 with bandwidth data after the peak clipping is performed.
[0047] Here, the target object 1300 is taken as a node server for providing video data in a content distribution network. For example, when the terminal device 1200 sends an access request for the target video "Video 1" to the node server, in response to the request, the node server can provide the video data of "Video 1" to the terminal device 1200 according to the default configuration, for example, according to the video bit rate of 4800 kbps, where the bit rate (Bit rate) refers to the number of bits transmitted per second, and its unit is bps. Generally, the higher the bit rate, the larger the amount of data (number of bits) transmitted per unit time; in the process of the node server providing the video data of "Video 1" to the terminal device 1200, the server 1100 obtains the predicted bandwidth peak value of the node server within the one-hour period from 22:00 to 23:00, and calculates the target bandwidth peak value of the node server within the time range, for example, the value is 300Mbps; and the server 1100 can also simultaneously obtain the real-time bandwidth peak value of the node server within the time range; in the implementation process, the peak threshold is set to 270Mbps, then when the real-time bandwidth peak value of the node server is less than the peak value within 22:00 to 22:09:59 seconds When the threshold is met, peak shaving may not be performed on the bandwidth of the node server; and at 22:10, when the real-time bandwidth peak of the node server is 290Mbps, that is, not less than the peak threshold, peak shaving may be performed on the bandwidth of the node server within the time range of 22:10 to 23:00 according to the target bandwidth peak. Specifically, the bandwidth of the node server may be reduced by reducing the bit rate of the video data provided by the node server, that is, within the time range of 22:10 to 23:00, video data of "Video 1" may be provided to the terminal device 1200 at a video bit rate of 4800bps*90%=4320kbps, so as to flexibly and accurately perform peak shaving on the bandwidth of the node server without affecting the user experience as much as possible.
[0048] It should be noted that here the video resolution is reduced by adjusting the bit rate of the provided video data to achieve the purpose of peak shaving on the bandwidth. In specific implementation, peak shaving can also be performed by other methods. For example, the bandwidth of the node server can also be peak shaving by speed limiting, which will not be repeated here. In addition, here the server 1100 implements the method described in this embodiment to perform peak shaving on the bandwidth of the target object 1300 as an example. In specific implementation, the method can also be directly implemented by the target object 1300, for example, a node server in a content distribution network for providing video resources.
[0049] according to Figure 2It can be seen from the content that the peak clipping method provided in this embodiment does not require manual configuration, but the server 1100 can automatically predict the bandwidth peak of the target object 1300 within a first preset time period, and calculate the target bandwidth peak based on the predicted bandwidth peak set, and flexibly trigger the precise peak clipping processing of the bandwidth of the target object 1300 when the real-time bandwidth peak of the target object 1300 is not less than the peak threshold.
[0050] <Hardware Configuration>
[0051] Figure 3 The figure is a structural diagram of an optional hardware configuration that can be used to implement the peak shaving method of the embodiment of the present disclosure.
[0052] like Figure 3 As shown, the peak shaving method provided in this embodiment can be applied to the server 1100.
[0053] The server may be a blade server, a rack-mounted server, etc. The server may also be a server cluster deployed in the cloud, which is not limited here.
[0054] like Figure 3 As shown, the server 1100 may include a processor 1110, a memory 1120, an interface device 1130, a communication device 1140, a display device 1150, and an input device 1160. The processor 1110 may be, for example, a central processing unit CPU, etc. The memory 1120 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1130 may include, for example, a USB interface, a serial interface, etc. The communication device 1140 may be capable of wired or wireless communication, for example. The display device 1150 may be, for example, a liquid crystal display screen. The input device 1160 may include, for example, a touch screen, a keyboard, etc.
[0055] In this embodiment, the server 1100 may be used to participate in implementing the peak shaving method according to any embodiment of the present disclosure.
[0056] As used in the embodiments of the present disclosure, the memory 1120 of the server 1100 is used to store instructions, and the instructions are used to control the processor 1110 to operate to support the implementation of the peak shaving method according to any embodiment of the present disclosure. A technician can design instructions according to the scheme disclosed in the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.
[0057] It should be understood by those skilled in the art that although Figure 3 , multiple devices of the server 1100 are shown; however, the server 1100 of the embodiment of the present disclosure may only involve some of the devices, for example, only the processor 1110 and the memory 1120.
[0058] When the method provided in this embodiment is applied to a terminal device, the terminal device may be a smart phone, a portable computer, a desktop computer, a tablet computer, etc., and is not particularly limited here.
[0059] It should be noted that the method provided in this embodiment can be applied to a server alone, or can be used in an interaction scenario between a terminal device and a server as needed, and is not specifically limited here.
[0060] <Method Example 1>
[0061] Figure 4 is a flow chart of the peak shaving method provided by the embodiment of the present disclosure. The method provided by this embodiment can be applied to a server, for example, Figure 3 In the server 1100 shown.
[0062] according to Figure 4 As shown, the method of this embodiment may include the following steps S4100 to S4400, which are described in detail below.
[0063] Step S4100: obtaining a set of predicted bandwidth peak values of a target object within a first preset time period.
[0064] The target object may be a resource server that provides resource data to the application. The resource data may be resource data such as pictures, audio, and video. For example, the target object may be a node server in a content distribution network.
[0065] In specific implementation, the server implementing the method of this embodiment can be a server connected to the target object in communication, or it can be the target object itself, and no special restrictions are made here. In addition, in this embodiment, unless otherwise specified, the target object is a node server in the content distribution network, and the resource data is video data as an example to illustrate the method provided by the embodiment of the present disclosure.
[0066] The predicted bandwidth peak value set is a set including at least one predicted bandwidth peak value, and the set corresponds to the first preset duration, wherein the predicted bandwidth peak value is the bandwidth peak value of the target object at a certain moment in the future predicted by the prediction algorithm. For example, in the case of 95 billing, when the first preset duration is 1 hour, the set can be a set including 12 predicted bandwidth peak values, that is, the bandwidth peak value of the target object at that moment is predicted at intervals of five minutes. It should be noted that in the specific implementation, the first preset duration can be set according to the situation. For example, the first preset duration can also be 3 hours, and there is no special limitation here.
[0067] Specifically, in this embodiment, different from the existing technology that performs peak shaving processing on the bandwidth of the target object based on manually configured target bandwidth peak value, or performs peak shaving processing on the bandwidth of the target object based on peak time period configuration, which has the problems of inflexibility, inconvenience and low accuracy, the method provided by the embodiment of the present disclosure uses a statistical prediction algorithm based on time series to predict a predicted bandwidth peak set of the target object within a first preset time length in order to conveniently and accurately perform peak shaving processing on the bandwidth of the target object, and calculates the target bandwidth peak value of the target object for peak shaving processing within the time length based on the predicted bandwidth peak set obtained by prediction. The following first describes how to predict the predicted bandwidth peak set of the target object within the time length.
[0068] In the present disclosure, in order to accurately predict the bandwidth peak value of the target object in the future, the statistical prediction algorithm based on time series can be: exponential smoothing algorithm (ES), for example, Holt-Winters algorithm, autoregressive and moving average model (ARIMA, Autoregressive Integrated Moving Average Model) and time series decomposition algorithm (STL, Seasonal-Trend decomposition procedure based on Loess) and other algorithms or one or more thereof.
[0069] In this embodiment, in order to improve the accuracy of the predicted bandwidth peak set, the present disclosure also provides another method for predicting the bandwidth peak of a target object, specifically including: obtaining a first bandwidth peak set of the target object in the same historical time period corresponding to the first preset time length; and obtaining a second bandwidth peak set of the target object in a third preset time length before the first preset time length; and obtaining the predicted bandwidth peak set based on the first bandwidth peak set and the second bandwidth peak set.
[0070] Specifically, the first bandwidth peak value set is a set of actual bandwidth peak values of the target object in the same period of historical time corresponding to the first preset duration. For example, if the current time is set to "xx year yy month 8 day 14:55", the first preset duration is 1 hour, that is, the period to be predicted is "xx year yy month 8 day 15:00" - "xx year yy month 8 day 16:00", then the first bandwidth peak value set can be a set of actual bandwidth peak values of the target object in the period of "15:00" to "16:00" from "xx year yy month 1 day" to "xx year yy month 7 day".
[0071] The second bandwidth peak value set is a set of actual bandwidth peak values of the target object within the third preset time period before the current time on the same day. Still using the above example, when the third preset time period is 2 hours, the second bandwidth peak value may be a set of actual bandwidth peak values of the target object within "13:00-14:59" on "xx-yy-8".
[0072] Specifically, in order to accurately predict the bandwidth peak value of the target object, this embodiment takes a comprehensive balance of the trend represented by the actual bandwidth peak value of the target object in the same historical time period outside the current day, and the trend represented by the actual bandwidth peak value at adjacent times within the current day. The base value of the bandwidth peak value to be predicted is obtained by linearly weighting the historical data of the same period in the past several days, and then the fluctuation trend of the target object within the first preset time period is obtained by comparing the difference between the adjacent actual bandwidth peak points and the historical data, so as to accurately predict the predicted bandwidth peak value set.
[0073] In a specific implementation, obtaining the predicted bandwidth peak set according to the first bandwidth peak set and the second bandwidth peak set includes: obtaining the predicted peak by inputting the first bandwidth peak set and the second bandwidth peak set into a target bandwidth peak prediction model.
[0074] In this embodiment, the target bandwidth peak prediction model is a model for predicting the bandwidth peak of the target object within a first preset time period. The model may specifically be a sparse periodic autoregression model (SPRA). Since the model is a prior art, it will not be described in detail here. For details, please refer to the detailed description in the prior art. Of course, with the continuous advancement of technology, in the specific implementation, the model may also be other types of models, which are not particularly limited here.
[0075] Please refer to Table 1, which is a schematic diagram of measurement indicators of three different prediction algorithms for predicting bandwidth peak of a target object, such as a node server in a CDN product.
[0076] Prediction Methods MAPE RMSE SMAPE Target bandwidth peak prediction model 0.038 23247 0.038 ARIMA Model 0.108 65033 0.110 Holt-Winters Model 0.139 75495 0.144
[0077] Table 1
[0078] Among them, a mean absolute percentage error (MAPE) of 0% indicates a perfect model, and a MAPE greater than 100% indicates a poor model; the root mean square error (RMSE) indicates the consistency between the predicted value and the actual value. When they are completely consistent, the value is equal to 0; the larger the error, the larger the value; the symmetric mean absolute percentage error (SMAPE) is a correction to MAPE.
[0079] According to the content of Table 1, in the embodiment of the present disclosure, the accuracy of the predicted bandwidth peak for the target object predicted by the target bandwidth peak prediction model is relatively high.
[0080] Please see Figure 5 , is a schematic diagram of the comparison between the predicted bandwidth peak and the actual bandwidth peak provided by the embodiment of the present disclosure. Figure 5 It can be seen from the content that the error between the predicted bandwidth peak value obtained by the target bandwidth peak prediction model provided by this embodiment and the actual bandwidth peak value is relatively small, and the accuracy is higher.
[0081] To sum up, in specific implementation, the target bandwidth peak prediction model provided in this embodiment can be used to predict the predicted bandwidth peak set of the target object within the first preset time length, and based on the predicted bandwidth peak set, the bandwidth of the target object can be flexibly and accurately subjected to peak clipping processing.
[0082] After step S4100, step S4200 is executed to calculate the target bandwidth peak value of the target object within the first preset time period according to the predicted bandwidth peak value set.
[0083] The target bandwidth peak value is a peak reference value used to perform peak clipping processing, or may also be called a peak baseline.
[0084] In this embodiment, in order to be able to flexibly perform peak clipping processing on the bandwidth of the target object, after the predicted bandwidth peak set is obtained according to step S4100, the target bandwidth peak of the target object within the first preset time length is calculated according to the predicted bandwidth peak set, including: obtaining a historical bandwidth peak set of the target object within a second preset time length; obtaining a first peak baseline according to the historical bandwidth peak set; obtaining a second peak baseline according to the predicted bandwidth peak set; and calculating the target bandwidth peak according to the first peak baseline and the second peak baseline.
[0085] In a specific implementation, the obtaining of the first peak baseline according to the historical bandwidth peak set includes: taking the maximum value in the historical bandwidth peak set as the first peak baseline; the obtaining of the second peak baseline according to the predicted bandwidth peak set includes: taking the maximum value in the predicted bandwidth peak set as the second peak baseline. Of course, in a specific implementation, the first peak baseline can also be obtained by calculation through other methods, for example, the first peak baseline can also be the average value of the bandwidth peaks in the historical bandwidth peak set, and the second peak baseline can also be obtained by calculation through other methods, which are not specifically limited here.
[0086] Specifically, since this embodiment predicts the bandwidth peak of the target object within the first preset time period based on the trend of the target object at adjacent moments, when the first preset time period is long, the prediction result may have a large deviation. Therefore, when performing peak clipping processing, in order to further improve the accuracy, this embodiment calculates the target bandwidth peak based on two types of bandwidth baselines, namely, a first peak baseline and a second peak baseline, wherein the first peak baseline can be the maximum value of the bandwidth peak of the target object within the second preset time period, for example, within the past week; the second peak baseline can be the maximum value of the predicted bandwidth peak of the target object within the first preset time period.
[0087] In a specific implementation, the target bandwidth peak is calculated based on the first peak baseline and the second peak baseline, including: when the time period corresponding to the first preset duration is within the preset peak time period, the second peak baseline is used as the target bandwidth peak; and when the time period corresponding to the first preset duration is not within the preset peak time period, the maximum value between the first peak baseline and the second peak baseline is obtained, and the maximum value is used as the target bandwidth peak.
[0088] like Figure 6 As shown, it is a schematic diagram of the peak shaving method provided by the embodiment of the present disclosure. Figure 6 As shown, in the embodiment of the present disclosure, the target bandwidth peak value may be calculated as follows: during non-peak hours, the target bandwidth peak value = max (first peak baseline, second peak baseline); during peak hours, the target bandwidth peak value = max (second peak baseline).
[0089] It should be noted that, in specific implementation, other methods may also be used to calculate the target bandwidth peak value, which will not be described in detail here.
[0090] Step S4300: Obtain the real-time bandwidth peak value of the target object within the first preset time period.
[0091] In specific implementation, step S4300 may be performed during the execution of steps S4100 and S4200, for example, before or after step S4100. This embodiment does not impose any special limitation on the timing of obtaining the real-time bandwidth peak value.
[0092] Step S4400: When the real-time bandwidth peak value is not less than the peak value threshold, peak clipping is performed on the bandwidth of the target object according to the target bandwidth peak value.
[0093] After obtaining the target bandwidth peak value of the target object within the first preset time period in step S4200 and obtaining the real-time bandwidth peak value of the target object at any time within the first preset time period in step S4300, the real-time bandwidth peak value can be compared with the peak threshold value, and when the real-time bandwidth peak value is not less than the peak threshold value, peak clipping processing is performed on the bandwidth of the target object.
[0094] In specific implementation, the peak threshold can be preset by the user. In this embodiment, in order to improve the accuracy of peak clipping processing, the peak threshold can be calculated through the following steps: obtaining a preset peak clipping ratio; calculating the peak threshold based on the target bandwidth peak and the preset peak clipping ratio.
[0095] Specifically, in this embodiment, the peak threshold can be calculated by the formula: Peak threshold = target bandwidth peak * (1-preset peak clipping ratio), where the preset peak clipping ratio can be set according to the situation, for example, the value can be 10%, and there is no special limitation here.
[0096] In a specific implementation, the peak shaving processing is performed on the bandwidth of the target object according to the target bandwidth peak value, including: obtaining a cost target value by calculating the difference between the real-time bandwidth peak value and the target bandwidth peak value; and performing peak shaving processing on the bandwidth of the target object according to the cost target value.
[0097] In specific implementation, according to the type of resource data provided by the target object, the methods commonly used for peak shaving are: 1. Speed limit method, that is, peak shaving is performed by adjusting the data flow capacity when the target object provides resource data, that is, the size of the buffer, or, peak shaving can be performed by adjusting the speed at which the target object provides resources, that is, the transmission speed of the resource data; 2. Preload degradation method, that is, peak shaving is performed by adjusting the level of preloading of resource data; 3. Clarity ratio adjustment method, which is generally aimed at resource data of video or image type, that is, peak shaving is performed by forcibly reducing the clarity of the provided resource data.
[0098] Among the above three methods, method 1 and method 2 will have an intuitive impact on users and cause poor user experience. However, method 3 usually has a relatively small impact on users when the clarity ratio adjustment range is within a limited range. Therefore, in this embodiment, when the target object is a node server used to provide video data in a content distribution network, the bandwidth of the target object is peak-cut by adjusting the clarity ratio when providing video data.
[0099] In this embodiment, the cost target value is the difference between the target bandwidth peak and the peak threshold. In this embodiment, in order to improve the accuracy of peak shaving processing, the peak shaving processing is performed on the bandwidth of the target object according to the cost target value, including: obtaining real-time time data corresponding to the real-time bandwidth peak, and obtaining end time data corresponding to the first preset duration; calculating the target peak shaving duration according to the real-time time data and the end time data; and performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration according to the cost target value.
[0100] According to the above steps, it can be seen that, unlike the method in the prior art that presets a time period and performs peak clipping on all bandwidth peaks in the time period, which has the problem of low accuracy, this implementation uses a method triggered by a real-time bandwidth peak to perform peak clipping processing, so that the peak clipping result can be more accurate.
[0101] In this embodiment, the bandwidth of the target object includes the video bandwidth when the target object provides video data. For example, the target object may be a node server in a content distribution network for providing video data. According to the cost target value, peak clipping processing is performed on the bandwidth of the target object within the target peak clipping duration, including: obtaining a video clarity ratio calculation model, wherein the video clarity ratio calculation model is used to fit the clarity ratio of the target object when it outputs video data within a set duration with a set cost target value as a constraint and a set video quality condition as a target; inputting the cost target value and the target peak clipping duration into the target video clarity ratio model to obtain a target clarity ratio set, wherein the target clarity ratio set includes at least one data pair, and the data pair consists of a video playback duration and a video bit rate; by controlling the target object to provide video data according to the clarity ratio set, peak clipping processing is performed on the bandwidth of the target object within the target peak clipping duration.
[0102] In this embodiment, when performing peak clipping processing, in order to ensure that the clarity of the video data provided by the target object after the peak clipping processing does not have a significant impact on the user experience, this embodiment takes the established cost target value calculated when the peak clipping processing is triggered as a constraint, and takes the output of video data with the best quality as the goal. By using a pre-trained video clarity ratio calculation model to fit the clarity ratio of the video data within the peak clipping duration, that is, the target peak clipping duration, to obtain a target clarity ratio set, and based on the target clarity ratio set, the target object is controlled to provide video data.
[0103] The following first describes the training method of the video definition ratio calculation model. In this embodiment, the measurement values used to measure the peak clipping process include: cost and video definition quality.
[0104] In this embodiment, cost = video playback duration * bit rate, wherein bit rate, also known as video bit rate, refers to the number of data bits transmitted per unit time during data transmission; since the video playback duration is generally a constant value, the bit rate can be used as a quantitative indicator to represent the cost during specific implementation.
[0105] In addition, in this embodiment, an objective evaluation algorithm close to subjective evaluation can be used to evaluate the video quality: a Visual Multimethod Assessment Fusion (VMAF) algorithm, and the VMAF value obtained in percentage is used as a quantitative indicator representing the playback clarity quality.
[0106] Correspondingly, in this embodiment, the definition ratio of the target object when outputting video data within a set time period is fitted with the set cost target value as a constraint and the set video quality condition as a target, which can be specifically expressed by the following formula:
[0107] a1+a2+...+a i =1;
[0108] a1*x1+a2*x2+...+a i *x i <=β;
[0109] Υ=a1*y1+a2*y2+...+a i *y i ;
[0110] Among them, a i Indicates the proportion of playback time corresponding to different bit rates within the target peak shaving time; x i Indicates that iThe corresponding average bit rate; β represents the calculated cost target value, that is, the difference between the target bandwidth peak and the peak threshold; y i represents the corresponding VMAF value calculated by the VMAF algorithm under different clarity ratios; Υ represents the cumulative sum of VMAF values under different clarity ratio combinations.
[0111] In the above description, the peak shaving processing of the bandwidth of the target object is achieved by adjusting the video clarity ratio; in specific implementation, of course, other methods can also be used to achieve the peak shaving processing, that is, according to the cost target value, the peak shaving processing is performed on the bandwidth of the target object within the target peak shaving duration, including performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration by at least one of the following methods: according to the cost target value, adjusting the speed at which the target object provides resource data; according to the cost target value, adjusting the data flow capacity when the target object provides resource data; according to the cost target value, adjusting the level of preloading processing when the target object provides resource data, and the detailed processing process will not be repeated here.
[0112] It should be noted that, in this embodiment, the target object is a node server in a content distribution network, and the bandwidth is the video bandwidth when providing video data. The peak clipping method provided in this embodiment is illustrated. In specific implementation, the method can of course also be applied to other scenarios. For example, the method can also be applied to communication base stations that provide mobile communications; or other types of bandwidth can also be subjected to peak clipping processing, which will not be repeated here.
[0113] In summary, the peak clipping method provided in this embodiment, when performing peak clipping processing on the bandwidth of the target object, first obtains the predicted bandwidth peak set of the target object within the first preset time length; based on the predicted bandwidth peak set, dynamically calculates the target bandwidth peak of the target object within the first preset time length; then, by obtaining the real-time bandwidth peak of the target object within the first preset time length, and when the real-time bandwidth peak is not less than the peak threshold, performs peak clipping processing on the bandwidth of the target object according to the calculated target bandwidth peak. This method can obtain the target bandwidth peak of the target object for peak clipping processing in the first preset time length in real time, dynamically and conveniently by predicting the predicted bandwidth peak set of the target object within the first preset time length; at the same time, since the peak clipping processing of the bandwidth of the target object is triggered when the real-time bandwidth peak is not less than the peak threshold, the method can also cover the peak abnormal fluctuation points of non-peak time periods in the whole time period, thereby improving the accuracy of peak clipping processing.
[0114] <Method Example 2>
[0115] Corresponding to the peak shaving method in the first embodiment of the method, this embodiment also provides a method for providing video resources. Figure 7 , which is a flow chart of a video resource providing method provided by an embodiment of the present disclosure, and the method can be applied in a content distribution network.
[0116] like Figure 7 As shown, the method of this embodiment is applied to a node server in a content distribution network, and may specifically include steps S7100 to S7300.
[0117] Step S7100: receiving an access request for a target video sent by a terminal device.
[0118] Step S7200: In response to the access request, provide the video data of the target video to the terminal device.
[0119] Step S7300: In the process of providing the video data, peak clipping is performed on the video bandwidth corresponding to the video data according to the method described in any one of the above method embodiments 1.
[0120] In this embodiment, the terminal device can be a mobile terminal device such as a smart phone, a laptop computer, a desktop computer, a tablet computer, a wearable device, or a smart home device such as a smart speaker, a set-top box, a smart TV, etc., without any special limitation here.
[0121] <Device Example>
[0122] Corresponding to the above embodiment, this embodiment also provides a peak clipping device, such as Figure 8 As shown, it is a schematic principle block diagram of the peak clipping device provided in an embodiment of the present disclosure.
[0123] according to Figure 8 As shown, the peak clipping device 8000 of this embodiment includes a predicted bandwidth peak value set acquisition module 8100 , a target bandwidth peak value calculation module 8200 , a real-time bandwidth peak value acquisition module 8300 and a peak clipping processing module 8400 .
[0124] The predicted bandwidth peak value set acquisition module 8100 is used to acquire a predicted bandwidth peak value set of a target object within a first preset time period.
[0125] In one embodiment, when acquiring the predicted bandwidth peak set of the target object within a first preset time length, the predicted bandwidth peak set acquisition module 8100 can be used to: acquire a first bandwidth peak set of the target object within the same historical period corresponding to the first preset time length; and acquire a second bandwidth peak set of the target object within a third preset time length before the first preset time length; and obtain the predicted bandwidth peak set based on the first bandwidth peak set and the second bandwidth peak set.
[0126] In one embodiment, when the predicted bandwidth peak set acquisition module 8100 obtains the predicted bandwidth peak set based on the first bandwidth peak set and the second bandwidth peak set, it can be used to: obtain the predicted peak by inputting the first bandwidth peak set and the second bandwidth peak set into a target bandwidth peak prediction model.
[0127] The target bandwidth peak value calculation module 8200 is used to calculate the target bandwidth peak value of the target object within the first preset time period according to the predicted bandwidth peak value set.
[0128] In one embodiment, when the target bandwidth peak calculation module 8200 calculates the target bandwidth peak of the target object within the first preset time length according to the predicted bandwidth peak set, it can be used to: obtain a historical bandwidth peak set of the target object within a second preset time length; obtain a first peak baseline according to the historical bandwidth peak set; obtain a second peak baseline according to the predicted bandwidth peak set; and calculate the target bandwidth peak according to the first peak baseline and the second peak baseline.
[0129] In one embodiment, when the target bandwidth peak calculation module 8200 obtains the first peak baseline based on the historical bandwidth peak set, it can be used to: use the maximum value in the historical bandwidth peak set as the first peak baseline; and can also be used to: use the maximum value in the predicted bandwidth peak set as the second peak baseline.
[0130] In this embodiment, when the target bandwidth peak value is calculated based on the first peak baseline and the second peak baseline, the target bandwidth peak value calculation module 8200 can be used to: when the time period corresponding to the first preset duration is within the preset peak time period, use the second peak baseline as the target bandwidth peak value; and when the time period corresponding to the first preset duration is not within the preset peak time period, obtain the maximum value between the first peak baseline and the second peak baseline, and use the maximum value as the target bandwidth peak value.
[0131] The real-time bandwidth peak value acquisition module 8300 is used to acquire the real-time bandwidth peak value of the target object within the first preset time period.
[0132] The peak clipping processing module 8400 is used to perform peak clipping processing on the bandwidth of the target object according to the target bandwidth peak value when the real-time bandwidth peak value is not less than the peak value threshold value.
[0133] In one embodiment, when the peak clipping processing module 8400 performs peak clipping processing on the bandwidth of the target object according to the target bandwidth peak value, it can be used to: obtain a cost target value by calculating the difference between the real-time bandwidth peak value and the target bandwidth peak value; and perform peak clipping processing on the bandwidth of the target object according to the cost target value.
[0134] In this embodiment, when the peak shaving processing module 8400 performs peak shaving processing on the bandwidth of the target object according to the cost target value, it can be used to: obtain real-time time data corresponding to the real-time bandwidth peak value, and obtain end time data corresponding to the first preset duration; calculate the target peak shaving duration according to the real-time time data and the end time data; and perform peak shaving processing on the bandwidth of the target object within the target peak shaving duration according to the cost target value.
[0135] In this embodiment, the bandwidth of the target object includes the video bandwidth when the target object provides video data. When the peak clipping processing module 8400 performs peak clipping processing on the bandwidth of the target object within the target peak clipping duration according to the cost target value, it can be used to: obtain a video clarity ratio calculation model, wherein the video clarity ratio calculation model is used to fit the clarity ratio when the target object outputs video data within a set duration with a set cost target value as a constraint and a set video quality condition as a target; input the cost target value and the target peak clipping duration into the target video clarity ratio model to obtain a target clarity ratio set, wherein the target clarity ratio set includes at least one data pair, and the data pair consists of a video playback duration and a video bit rate; and perform peak clipping processing on the bandwidth of the target object within the target peak clipping duration by controlling the target object to provide video data according to the clarity ratio set.
[0136] In one embodiment, the peak shaving processing module 8400 performs peak shaving processing on the bandwidth of the target object within the target peak shaving duration according to the cost target value, including performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration by at least one of the following methods: adjusting the speed at which the target object provides resource data according to the cost target value; adjusting the data flow capacity when the target object provides resource data according to the cost target value; adjusting the level of preloading processing performed when the target object provides resource data according to the cost target value.
[0137] In one embodiment, the device 8000 further includes a peak threshold calculation module, which is used to: obtain a preset peak clipping ratio; and calculate the peak threshold according to the target bandwidth peak value and the preset peak clipping ratio.
[0138] <Equipment Embodiment>
[0139] Corresponding to the above method embodiment 1 and the above method embodiment 2, this embodiment provides an electronic device, such as Figure 9a As shown, the electronic device 100 includes a peak clipping device 8000 according to any embodiment of the present disclosure.
[0140] In another embodiment, Figure 9b As shown, the electronic device 100 may include a memory 110 and a processor 120, wherein the memory 110 is used to store executable instructions; and the processor 120 is used to execute a method as in any method embodiment of the present disclosure under the control of the executable instructions.
[0141] <Medium Example>
[0142] Corresponding to the above method embodiments, in this embodiment, a computer-readable storage medium is also provided, which stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method described in any of the above embodiments of the present disclosure when read and executed by the computer.
[0143] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0144] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0145] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0146] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0147] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0148] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so as to produce a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device for implementing the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions make the computer, programmable data processing device, and / or other equipment work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0149] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0150] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0151] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.
Claims
1. A peak shaving method, comprising: Obtain a set of predicted bandwidth peak values of the target object within a first preset time period; Calculating a target bandwidth peak value of the target object within the first preset time period according to the predicted bandwidth peak value set; Obtaining a real-time bandwidth peak value of the target object within the first preset time period; In the case that the real-time bandwidth peak value is not less than the peak threshold value, peak clipping processing is performed on the bandwidth of the target object according to the target bandwidth peak value, including: controlling the target object to provide video data according to a target clarity ratio set, and performing peak clipping processing on the bandwidth of the target object within a target peak clipping duration, wherein the bandwidth of the target object includes the video bandwidth when the target object provides video data, the target clarity ratio set includes at least one data pair, the data pair consists of a video playback duration and a video bit rate, and the target peak clipping duration is determined according to real-time time data corresponding to the real-time bandwidth peak value and end time data corresponding to the first preset duration.
2. The method according to claim 1, wherein calculating the target bandwidth peak value of the target object within the first preset duration according to the predicted bandwidth peak value set comprises: Acquire a historical bandwidth peak value set of the target object within a second preset time period; Obtaining a first peak baseline according to the historical bandwidth peak value set; Obtaining a second peak baseline according to the predicted bandwidth peak set; The target bandwidth peak value is calculated according to the first peak baseline and the second peak baseline.
3. The method according to claim 2, wherein obtaining a first peak baseline according to the historical bandwidth peak value set comprises: Taking the maximum value in the historical bandwidth peak value set as the first peak baseline; The step of obtaining a second peak baseline according to the predicted bandwidth peak set includes: The maximum value in the predicted bandwidth peak set is used as the second peak baseline.
4. The method according to claim 2, wherein calculating the target bandwidth peak value according to the first peak baseline and the second peak baseline comprises: When the time period corresponding to the first preset duration is within a preset peak time period, taking the second peak baseline as the target bandwidth peak value; as well as When the time period corresponding to the first preset duration is not within the preset peak time period, a maximum value between the first peak baseline and the second peak baseline is obtained, and the maximum value is used as the target bandwidth peak value.
5. According to the method described in claim 1, the target clarity ratio set is obtained by inputting the cost target value and the target peak shaving duration into a video clarity ratio calculation model, wherein the cost target value is the difference between the real-time bandwidth peak value and the target bandwidth peak value, and the video clarity ratio calculation model is used to fit the clarity ratio of the target object when it outputs video data within a set duration, with the set cost target value as a constraint and the set video quality condition as a target.
6. The method according to claim 1, wherein the step of performing peak shaving processing on the bandwidth of the target object within the target peak shaving duration further comprises the following manner: According to the cost target value, the speed at which the target object provides resource data is adjusted; wherein, The cost target value is the difference between the real-time bandwidth peak value and the target bandwidth peak value; According to the cost target value, adjusting the data flow capacity when the target object provides resource data; According to the cost target value, the level of preloading processing performed when the target object provides resource data is adjusted.
7. The method according to claim 1, wherein the peak value threshold is calculated by the following steps: Obtain a preset peak clipping ratio; The peak value threshold is calculated according to the target bandwidth peak value and the preset peak clipping ratio.
8. The method according to claim 1, wherein obtaining a set of predicted bandwidth peak values of a target object within a first preset time period comprises: Acquire a first bandwidth peak value set of the target object in the same historical time period corresponding to the first preset duration; as well as Acquire a second bandwidth peak value set of the target object within a third preset time period before the first preset time period; The predicted bandwidth peak set is obtained according to the first bandwidth peak set and the second bandwidth peak set.
9. The method according to claim 8, wherein obtaining the predicted bandwidth peak set according to the first bandwidth peak set and the second bandwidth peak set comprises: The predicted bandwidth peak set is obtained by inputting the first bandwidth peak set and the second bandwidth peak set into a target bandwidth peak prediction model.
10. The method according to claim 1, wherein the target object comprises: A node server in a content delivery network.
11. A video resource providing method, applied to a node server in a content distribution network, comprising: Receiving an access request for a target video sent by a terminal device; In response to the access request, providing the video data of the target video to the terminal device; In the process of providing the video data, peak clipping is performed on a video bandwidth corresponding to the video data according to the method according to any one of claims 1 to 10.
12. A peak clipping device, comprising: A predicted bandwidth peak value set acquisition module is used to acquire a predicted bandwidth peak value set of a target object within a first preset time period; A target bandwidth peak value calculation module, configured to calculate a target bandwidth peak value of the target object within the first preset time period according to the predicted bandwidth peak value set; A real-time bandwidth peak value acquisition module, used to acquire the real-time bandwidth peak value of the target object within the first preset time period; A peak shaving processing module, configured to perform peak shaving processing on the bandwidth of the target object according to the target bandwidth peak value when the real-time bandwidth peak value is not less than the peak value threshold value; Among them, performing peak clipping processing on the bandwidth of the target object according to the target bandwidth peak value includes: controlling the target object to provide video data according to a target clarity ratio set, and performing peak clipping processing on the bandwidth of the target object within a target peak clipping duration, wherein the bandwidth of the target object includes the video bandwidth when the target object provides video data, the target clarity ratio set includes at least one data pair, the data pair consists of a video playback duration and a video bit rate, and the target peak clipping duration is determined according to real-time time data corresponding to the real-time bandwidth peak value and end time data corresponding to the first preset duration.
13. An electronic device, comprising the apparatus according to claim 12; or comprising: A memory for storing executable instructions; A processor is used to operate the electronic device to execute the method according to any one of claims 1-11 under the control of the executable instructions.
14. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method according to any one of claims 1 to 11 when being read and executed by the computer.
Citation Information
Patent Citations
Bandwidth scheduling method and device
CN110474852A