Bandwidth Processing Method and Apparatus

By training and testing models to predict the bandwidth peak time interval and determine the bandwidth processing time interval, the problem of not being able to accurately obtain the bandwidth processing time interval in the prior art is solved, and effective bandwidth peak cutting processing and cost reduction are achieved.

CN116112365BActive Publication Date: 2025-06-10BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310182841.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2025-06-10
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

The prior art cannot accurately obtain the bandwidth processing time interval, resulting in the inability to effectively perform bandwidth peak cutting processing.

Method used

By obtaining bandwidth information and time information of multiple unit time periods of the target object in the historical time period, the detection model is trained to predict the bandwidth peak time interval, and determine the bandwidth processing time interval based on the interval, and send it to the client for peak cutting processing.

Benefits of technology

It realizes accurate prediction of bandwidth peak time intervals, and determines appropriate bandwidth processing time intervals, effectively reducing bandwidth costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112365B_ABST
    Figure CN116112365B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a bandwidth processing method and apparatus. The bandwidth processing method includes: obtaining bandwidth information and time information of a plurality of unit time periods of a target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period; inputting the bandwidth information and time information of each of the plurality of unit time periods into a detection model to obtain a bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of each of the plurality of unit time periods of the historical time of the target object; determining a bandwidth processing time interval of the target object based on the bandwidth peak time interval; and sending information indicating the bandwidth processing time interval to a client so that the client performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communications, and in particular, to a bandwidth processing method and apparatus. Background Art

[0002] During the operation of an Internet application (APP), a large number of resources are downloaded, such as recommended resources, page widget resources, special effect resources for editing and shooting, etc. The download of these resources will incur bandwidth costs. Generally, these resources are pre-downloaded to the client in advance to improve the user experience. The characteristic of bandwidth costs is that the bandwidth costs generated during peak time periods are relatively high, while the bandwidth costs during other time periods are very low. Therefore, peak shaving and valley filling can be performed to reduce the bandwidth costs.

[0003] Currently, a certain bandwidth peak value within the historical time of the APP is often used as the target bandwidth peak value within that time period. Based on the difference between the obtained target bandwidth peak value and the real-time bandwidth peak value within that time period, peak shaving processing is performed on the bandwidth of the APP. However, this method often fails to obtain an accurate bandwidth processing time interval, and thus cannot effectively perform peak shaving processing. Summary of the Invention

[0004] The present disclosure provides a bandwidth processing method and apparatus to at least solve the problem that the related art cannot obtain an accurate bandwidth processing time interval.

[0005] According to a first aspect of an embodiment of the present disclosure, a bandwidth processing method is provided, including: obtaining bandwidth information and time information of a plurality of unit time periods of a target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period; inputting the bandwidth information and time information of each of the plurality of unit time periods into a detection model to obtain a bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of each of the plurality of unit time periods of the historical time of the target object; determining a bandwidth processing time interval of the target object based on the bandwidth peak time interval; and sending information indicating the bandwidth processing time interval to the client, so that the client performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0006] Optionally, determining the bandwidth processing time interval of the target object based on the bandwidth peak time interval includes one of the following: determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

[0007] Optionally, after sending the information indicating the bandwidth processing time interval to the client, it further includes: receiving the size of the resources corresponding to the paused pre-download tasks feedback by the client; in the case where the size of the resources exceeds a preset threshold, sending a recovery policy instruction to the client, where the recovery policy instruction instructs the client to, at the end of the bandwidth processing time interval, allocate the paused pre-download tasks to multiple unit time intervals for recovery according to the size of the resources, the actual bandwidth peak value within the target time period, and the actual bandwidth of each unit time interval.

[0008] Optionally, obtaining the bandwidth information and time information of the target object in multiple unit time intervals within the first predetermined time period includes: obtaining the bandwidth information of the target object within the first predetermined time period; dividing the first predetermined time period to obtain multiple unit time intervals; and determining the bandwidth information and time information of each unit time interval based on the bandwidth information, the start time and end time of each unit time interval.

[0009] Optionally, the detection model is trained in the following manner: obtaining the bandwidth information, time information, and the identifier of each unit time interval within each second predetermined time period in the historical time of the target object, where the identifier is used to indicate whether the corresponding unit time interval is a bandwidth peak time interval; inputting the bandwidth information and time information of each unit time interval within each second predetermined time period into the detection model to obtain the estimated bandwidth peak time interval and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval within each second predetermined time period; determining the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time intervals indicated by the identifier as the bandwidth peak time intervals, and the bandwidth information of the unit time intervals; adjusting the parameters of the detection model based on the loss, and training the detection model to obtain the trained detection model.

[0010] Optionally, determining the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time intervals indicated by the identifier as the bandwidth peak time intervals, and the bandwidth information of the unit time intervals includes: obtaining the first loss based on the estimated bandwidth peak time interval and the unit time intervals indicated by the identifier as the bandwidth peak time intervals; obtaining the second loss based on the estimated bandwidth information and the bandwidth information of the unit time intervals indicated by the identifier as the bandwidth peak time intervals; and determining the loss based on the first loss and the second loss.

[0011] According to a second aspect of the embodiments of the present disclosure, a bandwidth processing method is provided, including: receiving information indicating a bandwidth processing time interval of a target object within a target time period at the current time, where the bandwidth processing time interval is obtained based on a bandwidth peak time interval obtained by inputting the bandwidth information and time information of each of multiple unit time periods of the target object within a first predetermined time period into a detection model, the first predetermined time period is a time period before the target time period, and the detection model is trained based on the bandwidth information and time information of each of multiple unit time periods of the historical time of the target object; performing bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0012] Optionally, performing bandwidth peak shaving processing on the target object based on the bandwidth processing time interval includes: suspending the pre-download task of the target object when the current time is within the bandwidth processing time interval.

[0013] Optionally, when the current time reaches the end time of the bandwidth processing time interval, resume the suspended pre-download task.

[0014] Optionally, receiving a recovery policy instruction based on the size feedback of the resources corresponding to the suspended pre-download task; based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, allocate the suspended pre-download task to multiple unit time periods for recovery according to the size of the resources, the actual bandwidth peak within the target time period, and the actual bandwidth of each unit time period.

[0015] According to a third aspect of the embodiments of the present disclosure, a bandwidth processing system is provided. The bandwidth processing system includes a server and a client. The server obtains the bandwidth information and time information of each of multiple unit time periods of the target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period; inputs the bandwidth information and time information of each of the multiple unit time periods into a detection model to obtain a bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of each of multiple unit time periods of the historical time of the target object; determines a bandwidth processing time interval of the target object based on the bandwidth peak time interval; sends information indicating the bandwidth processing time interval to the client; the client receives the information indicating the bandwidth processing time interval and performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0016] Optionally, the detection model is trained as follows: Obtain the bandwidth information, time information, and the identifier of each unit time period within each second predetermined time period of the target object in the historical time, where the identifier is used to indicate whether the corresponding unit time period is a bandwidth peak time interval; Input the bandwidth information and time information of each unit time period within each second predetermined time period into the detection model to obtain the estimated bandwidth peak time interval and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval within each second predetermined time period; Determine the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods indicated by the identifier as bandwidth peak time intervals, and the bandwidth information of the unit time periods; Adjust the parameters of the detection model based on the loss and train the detection model to obtain the trained detection model.

[0017] Optionally, determining the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods indicated by the identifier as bandwidth peak time intervals, and the bandwidth information of the unit time periods includes: Obtaining the first loss based on the estimated bandwidth peak time interval and the unit time periods indicated by the identifier as bandwidth peak time intervals; Obtaining the second loss based on the estimated bandwidth information and the bandwidth information of the unit time periods indicated by the identifier as bandwidth peak time intervals; Determining the loss based on the first loss and the second loss.

[0018] Optionally, determining the bandwidth processing time interval of the target object based on the bandwidth peak time interval includes one of the following: Determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; Determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; Determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

[0019] Optionally, obtaining the bandwidth information and time information of each unit time period of the target object within the first predetermined time period includes: Obtaining the bandwidth information of the target object within the first predetermined time period; Dividing the first predetermined time period to obtain multiple unit time periods; Determining the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and end time of each unit time period.

[0020] Optionally, performing bandwidth peak shaving on the target object based on the bandwidth processing time interval includes: Pausing the pre-download task of the target object when the current time is within the bandwidth processing time interval.

[0021] Optionally, the client feeds back the size of the resources corresponding to the paused pre-download task to the server; when the size of the resources exceeds a preset threshold, the server sends a recovery policy instruction to the client; based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, the client distributes the paused pre-download task to multiple unit time intervals for recovery according to the size of the resources, the actual bandwidth peak value within the target time interval, and the actual bandwidth of each unit time interval.

[0022] Optionally, when the current time reaches the end time of the bandwidth processing time interval, resume the paused pre-download task.

[0023] According to a fourth aspect of the embodiments of the present disclosure, a bandwidth processing device is provided, including: a time interval acquisition unit configured to acquire bandwidth information and time information of multiple unit time intervals of a target object within a first predetermined time interval, where the first predetermined time interval is a time interval before the target time interval; a bandwidth peak time interval acquisition unit configured to input the bandwidth information and time information of each of the multiple unit time intervals into a detection model to obtain a bandwidth peak time interval of the target object within the target time interval, where the detection model is trained based on the bandwidth information and time information of each of the multiple unit time intervals of the historical time of the target object; a bandwidth processing time interval determination unit configured to determine a bandwidth processing time interval of the target object based on the bandwidth peak time interval; and a sending unit configured to send information indicating the bandwidth processing time interval to the client so that the client performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0024] Optionally, the bandwidth processing time interval determination unit is further configured to determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time intervals before the bandwidth peak time interval; determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time intervals after the bandwidth peak time interval; and determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time intervals before the bandwidth peak time interval, and a predetermined number of unit time intervals after the bandwidth peak time interval.

[0025] Optionally, the sending unit is further configured to, after sending the information indicating the bandwidth processing time interval to the client, receive the size of the resources corresponding to the paused pre-download task fed back by the client; and when the size of the resources exceeds a preset threshold, send a recovery policy instruction to the client, where the recovery policy instruction instructs the client to distribute the paused pre-download task to multiple unit time intervals for recovery according to the size of the resources, the actual bandwidth peak value within the target time interval, and the actual bandwidth of each unit time interval when the bandwidth processing time interval ends.

[0026] Optionally, the time period acquisition unit is further configured to acquire the bandwidth information of the target object within a first predetermined time period; divide the first predetermined time period to obtain a plurality of unit time periods; and determine the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and the end time of each unit time period.

[0027] Optionally, the training unit is configured to train the detection model in the following manner: acquire the bandwidth information, time information, and the identifier of each unit time period within each second predetermined time period in the historical time of the target object, where the identifier is used to indicate whether the corresponding unit time period is a bandwidth peak time interval; input the bandwidth information and time information of each unit time period within each second predetermined time period into the detection model to obtain the estimated bandwidth peak time interval and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval within each second predetermined time period; determine the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods indicated by the identifier as the bandwidth peak time intervals, and the bandwidth information of the unit time periods; adjust the parameters of the detection model based on the loss, and train the detection model to obtain the trained detection model.

[0028] Optionally, the training unit is further configured to acquire a first loss based on the estimated bandwidth peak time interval and the unit time periods indicated by the identifier as the bandwidth peak time intervals; acquire a second loss based on the estimated bandwidth information and the bandwidth information of the unit time periods indicated by the identifier as the bandwidth peak time intervals; and determine the loss based on the first loss and the second loss.

[0029] According to a fifth aspect of the embodiments of the present disclosure, there is provided a bandwidth processing device, including: a receiving unit configured to receive information indicating a bandwidth processing time interval of a target object within a target time period where the current time is located, where the bandwidth processing time interval is obtained by inputting the bandwidth information and time information of each unit time period within a first predetermined time period of the target object into the detection model to obtain the bandwidth peak time interval, the first predetermined time period is a time period before the target time period, and the detection model is trained based on the bandwidth information and time information of each unit time period in the historical time of the target object; and a processing unit configured to perform bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0030] Optionally, the processing unit is further configured to pause the pre-download task of the target object when the current time is within the bandwidth processing time interval.

[0031] Optionally, the processing unit is further configured to resume the paused pre-download task when the current time reaches the end time of the bandwidth processing time interval.

[0032] Optionally, the processing unit is further configured to receive a recovery policy instruction based on the size feedback of the resources corresponding to the paused pre-download task; based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, allocate the paused pre-download task to multiple unit time intervals for recovery according to the size of the resources, the actual bandwidth peak value within the target time period, and the actual bandwidth of each unit time period.

[0033] According to a sixth aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the instructions to implement the bandwidth processing method according to the present disclosure.

[0034] According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, when the instructions in the computer-readable storage medium are run by at least one processor, causing at least one processor to execute the bandwidth processing method according to the present disclosure as described above.

[0035] According to an eighth aspect of the embodiments of the present disclosure, there is provided a computer program product, including computer instructions, which implement the bandwidth processing method according to the present disclosure when executed by a processor.

[0036] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0037] According to the bandwidth processing method and device of the present disclosure, a detection model is trained through the bandwidth information and time information of multiple unit time intervals of the historical time of the target object. The detection model can predict the accurate bandwidth peak time interval through learning. Therefore, based on the bandwidth peak time interval of the target object in the target time period where the current time is located output by the trained detection model, and based on this bandwidth peak time interval, the bandwidth processing time interval of the target object is obtained, and the bandwidth processing time interval is sent to the client for bandwidth peak shaving processing of the target object, which can effectively perform peak shaving processing on the resource download of the target object, thereby reducing the bandwidth cost of the target object. Therefore, the present disclosure solves the problem that the accurate bandwidth processing time interval cannot be obtained in the related art.

[0038] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure and do not constitute an improper limitation of the present disclosure.

[0040] Figure 1It is a schematic diagram of an implementation scenario showing a bandwidth processing method according to an exemplary embodiment of the present disclosure;

[0041] Figure 2 It is a flowchart of a bandwidth processing method shown according to an exemplary embodiment; Figure 1 ;

[0042] Figure 3 It is a complete flowchart of obtaining a bandwidth processing time interval shown according to an exemplary embodiment;

[0043] Figure 4 It is a flowchart of a bandwidth processing method shown according to an exemplary embodiment; Figure 2 ;

[0044] Figure 5 It is a schematic diagram of a bandwidth processing system shown according to an exemplary embodiment;

[0045] Figure 6 It is an operation flowchart of a bandwidth processing system shown according to an exemplary embodiment;

[0046] Figure 7 It is a block diagram of a bandwidth processing device shown according to an exemplary embodiment; Figure 1 ;

[0047] Figure 8 It is a block diagram of a bandwidth processing device shown according to an exemplary embodiment; Figure 2 ;

[0048] Figure 9 It is a block diagram of an electronic device 900 according to an embodiment of the present disclosure. Detailed implementation manners

[0049] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order different from those illustrated or described herein. The implementation manners described in the following embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0051] It should be noted here that "at least one of several items" as used in this disclosure means that it includes three parallel cases: "any one of the several items", "a combination of any multiple of the several items", and "all of the several items". For example, "including at least one of A and B" includes the following three parallel cases: (1) including A; (2) including B; (3) including A and B. Another example, "performing at least one of step one and step two" means the following three parallel cases: (1) performing step one; (2) performing step two; (3) performing step one and step two.

[0052] The present disclosure provides a bandwidth processing method, which can obtain an accurate bandwidth processing time interval. For example, the following takes the scenario of bandwidth peak shaving processing of a video application (APP) as an example for illustration.

[0053] Figure 1 It is a schematic diagram of an implementation scenario showing the bandwidth processing method according to an exemplary embodiment of the present disclosure. As Figure 1 described, this implementation scenario includes a server 100, a user terminal 110, and a user terminal 120. Among them, the number of user terminals is not limited to 2, and includes but is not limited to devices such as mobile phones and personal computers. The user terminal can install and obtain a video application (APP). The server can be a single server, or a server cluster composed of several servers, or a cloud computing platform or a virtualization center.

[0054] The server 100 obtains the bandwidth information and time information of multiple unit time periods of the video APP within a first predetermined time period, where the first predetermined time period is a time period before the target time period; inputs the bandwidth information and time information of each of the multiple unit time periods into a detection model to obtain the bandwidth peak time interval of the video APP within the target time period, where the detection model is trained based on the bandwidth information and time information of multiple unit time periods of the historical time of the video APP; determines the bandwidth processing time interval of the video APP based on the bandwidth peak time interval; and sends the information indicating the bandwidth processing time interval to the user terminal 110 or the user terminal 120.

[0055] The user terminal 110 or the user terminal 120 receives the information indicating the bandwidth processing time interval of the video APP within the target time period where the current time is located; and performs bandwidth peak shaving processing on the video APP based on the bandwidth processing time interval in the information.

[0056] Next, the training method and device of a transfer learning model, and the image processing method and device according to the exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0057] Figure 2The flowchart of a bandwidth processing method shown according to an exemplary embodiment Figure 1 , as Figure 2 shown, the bandwidth processing method includes the following steps:

[0058] In step S201, obtain the bandwidth information and time information of a plurality of unit time periods of the target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period. The above-mentioned first predetermined time period and target time period can be 1 day, 2 days, or several hours, and the present disclosure does not limit this. The above-mentioned plurality of unit time periods can be obtained by dividing the first predetermined time period by time. For example, it can be divided into units of 1 hour, or it can be divided into units of 5 minutes, and the present disclosure does not limit this. The above-mentioned target object can be an application program, such as an application program for watching videos, but the present disclosure does not limit this, as long as it is an object that generates bandwidth costs. The above-mentioned first predetermined time period is generally determined based on the target time period. For example, when the target time period is December 1, 2022, the first predetermined time period can be November 1, 2022, or it can also be November 30, 2022. Of course, the first predetermined time period can also include multiple ones, such as it can include both November 1, 2022 and November 30, 2022 at the same time, and the present disclosure does not limit this.

[0059] According to an exemplary embodiment of the present disclosure, obtaining the bandwidth information and time information of a plurality of unit time periods of the target object within a first predetermined time period includes: obtaining the bandwidth information of the target object within the first predetermined time period; dividing the first predetermined time period to obtain a plurality of unit time periods; based on the bandwidth information, the start time and end time of each unit time period, determine the bandwidth information and time information of each unit time period. According to this embodiment, by dividing the first predetermined time period to obtain a plurality of unit time periods, the bandwidth information and time information of each unit time period can be conveniently and quickly obtained according to the start time and end time of each unit time period.

[0060] For example, taking the first predetermined time period as 1 day and the unit time period as 1 hour as an example, divide the 12 hours of the target object in 1 day into 12 unit time periods in units of 1 hour. When dividing, it is easy to know the start time and end time of each divided unit time period. Then, based on the bandwidth information within 1 day and the start time and end time of the 12 time periods, the bandwidth information and time information of the 12 unit time periods can be obtained. For the bandwidth information of each unit time period, it can be the average bandwidth per second within each 1 hour, or other bandwidth information, and the present disclosure does not limit this. For the time information of each unit time period, it can be the start time and end time of the corresponding unit time period, and the present disclosure also does not limit this.

[0061] Return Figure 2 In step S202, the bandwidth information and time information of each of the multiple unit time periods are input into the detection model to obtain the bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of each of the multiple unit time periods of the historical time of the target object. The above detection model may be a basic neural network model, and the present disclosure does not limit this. As long as it can learn the bandwidth peak time interval of the predetermined time period corresponding to the multiple unit time periods based on the bandwidth information and time information of each of the multiple unit time periods. It should be noted that the characteristic of the bandwidth cost is that the cost of the bandwidth generated during the peak time period is relatively high, and the bandwidth cost during other time periods is very low. Therefore, by obtaining the accurate bandwidth peak time interval, the accurate bandwidth processing time interval can be obtained.

[0062] According to an exemplary embodiment of the present disclosure, the detection model can be trained in the following manner: Obtain the bandwidth information, time information, and the identifier of each unit time period within each second predetermined time period in the historical time of the target object, where the identifier is used to indicate whether the corresponding unit time period is the bandwidth peak time interval; Input the bandwidth information and time information of each of the multiple unit time periods within each second predetermined time period into the detection model to obtain the estimated bandwidth peak time interval within each second predetermined time period and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval; Determine the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods indicated by the identifier as the bandwidth peak time interval, and the bandwidth information of the unit time periods; Adjust the parameters of the detection model based on the loss, and train the detection model to obtain the trained detection model. According to this embodiment, by using the information of multiple predetermined time periods in the historical time as training samples, and then training the detection model based on the information of each predetermined time period respectively, a detection model with better training effect can be obtained.

[0063] For example, taking the second predetermined time period as 1 day, the unit time period as 1 hour, and the target time period as December 1, 2022 as an example, obtain the bandwidth information, time information of multiple unit time periods within each of the 100 days before the target time period, and identify the unit time periods within each day that belong to the bandwidth peak time interval (subsequently referred to as the actual bandwidth peak time interval). Use the information of multiple unit time periods corresponding to 1 day as a training sample, that is, input the respective bandwidth information and time information of multiple unit time periods corresponding to 1 day into the detection model to obtain the estimated bandwidth peak time interval within the day and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval. After obtaining the estimated bandwidth peak time intervals corresponding to 100 days and the estimated bandwidth information corresponding to the estimated bandwidth peak time intervals, based on the estimated bandwidth peak time intervals corresponding to 100 days and the estimated bandwidth information corresponding to the estimated bandwidth peak time intervals, as well as the loss between the actual bandwidth peak time intervals corresponding to 100 days and the actual bandwidth information, adjust the parameters of the detection model to train the detection model so as to obtain a trained detection model.

[0064] According to an exemplary embodiment of the present disclosure, determining the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods identified as the bandwidth peak time interval, and the bandwidth information of the unit time periods may include: obtaining a first loss based on the estimated bandwidth peak time interval and the unit time periods identified as the bandwidth peak time interval; obtaining a second loss based on the estimated bandwidth information and the bandwidth information of the unit time periods identified as the bandwidth peak time interval; and determining the loss based on the first loss and the second loss. According to this embodiment, by obtaining the respective losses of the estimated bandwidth peak time interval and the bandwidth information, the total loss is determined, such that the determination of the loss is not limited to a single bandwidth peak time interval, increasing the factors considered when determining the loss and making the final loss more accurate.

[0065] Specifically, the above loss may be determined using the mean square error. Of course, other functions may also be used to determine it, and the present disclosure does not limit this. For example, taking the loss determined based on the mean square error as an example, obtain the mean square error between the estimated bandwidth peak time interval and the unit time periods belonging to the bandwidth peak time interval as the first loss, and obtain the mean square error between the estimated bandwidth information and the bandwidth information of the unit time periods belonging to the bandwidth peak time interval as the second loss. After obtaining the first loss and the second loss, the sum of the first loss and the second loss may be obtained as the final loss. Of course, the present disclosure is not limited to summation.

[0066] Return Figure 2, in step S203, based on the bandwidth peak time interval, determine the bandwidth processing time interval of the target object. The bandwidth peak time interval in this step refers to a unit time period. However, considering the actual situation, it is very likely that the bandwidth costs of several unit time periods before and after the bandwidth peak time interval are not much different from that of the bandwidth peak time interval. Therefore, at this time, the bandwidth peak time interval and several unit time periods before and after it can be used together as the bandwidth processing time interval that needs to be peak-shaved.

[0067] According to an exemplary embodiment of the present disclosure, determining the bandwidth processing time interval of the target object based on the bandwidth peak time interval may include one of the following: determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval. According to this embodiment, the bandwidth processing time interval can be flexibly determined based on the bandwidth peak time interval according to needs and actual situations.

[0068] Specifically, the above-mentioned predetermined number can be set according to needs, and the present disclosure does not limit this. For example, still taking the unit time period as 1 hour, assuming that the bandwidth peak time interval within 1 day obtained through the detection model is from 7 o'clock to 8 o'clock, then when determining the bandwidth processing time interval, it can be considered to use from 6 o'clock to 8 o'clock as the bandwidth processing time interval, or it can be considered to use from 7 o'clock to 9 o'clock as the bandwidth processing time interval, or it can also use from 6 o'clock to 9 o'clock as the bandwidth processing time interval. Of course, it can also be multiple unit time periods before and after 7 o'clock to 8 o'clock, and the present disclosure does not limit this.

[0069] In step S204, send the information indicating the bandwidth processing time interval to the client, so that the client can perform bandwidth peak shaving on the target object based on the bandwidth processing time interval.

[0070] According to an exemplary embodiment of the present disclosure, after sending the information indicating the bandwidth processing time interval to the client, it further includes: receiving the size of the resources corresponding to the paused pre-download task feedback by the client; in the case where the size of the resources exceeds a preset threshold, sending a recovery policy instruction to the client, wherein the recovery policy instruction instructs the client to allocate the paused pre-download task to multiple unit time periods to resume running according to the size of the resources, the actual bandwidth peak value within the target time period, and the actual bandwidth of each unit time period when the bandwidth processing time interval ends. According to this embodiment, when the resources corresponding to the paused pre-download task are too large, it is prevented that when the bandwidth processing time interval ends, the paused pre-download task resumes running together with the download task, resulting in the problem that the occupied bandwidth exceeds the load.

[0071] Specifically, the above preset threshold can be set as needed or determined according to the actual bandwidth peak value within the bandwidth processing time interval. For example, the actual bandwidth peak value within the bandwidth processing time interval can be used as the preset threshold, and the present disclosure does not limit this. It should be noted that the actual bandwidth of the above unit time period can be understood as the occupied bandwidth of this unit time period.

[0072] For example, taking the actual bandwidth peak value within the bandwidth processing time interval as the preset threshold as an example, assuming that the size of the resources corresponding to the paused pre-download task exceeds the actual bandwidth peak value, it indicates that the resources corresponding to the paused pre-download task are too large. At this time, the first difference between the actual bandwidth of the first unit time period after the bandwidth processing time interval ends and the actual bandwidth peak value can be calculated, and according to the time sequence of the pre-download task pause, starting from the front, the first number of pre-download tasks are selected to resume running. The size of the resources corresponding to this part of the pre-download tasks is not much different from the first difference, or can be equal, and the present disclosure does not limit this; after the first unit time ends, the second difference between the actual bandwidth of the second unit time period and the actual bandwidth peak value is calculated, and the second number of pre-download tasks are continuously selected to resume running. The size of the resources corresponding to this part of the pre-download tasks is not much different from the second difference, and so on until all pre-download tasks end running.

[0073] For another example, still taking the actual bandwidth peak value within the bandwidth processing time interval as the preset threshold value, assume that the actual bandwidth peak value is 200 megabytes, the actual bandwidth in the first unit time period after the end of the bandwidth processing time interval is 100 megabytes, the actual bandwidth in the second unit time period is 150 megabytes, and the actual bandwidth in the third unit time period is 100 megabytes. When the resource corresponding to the paused pre-download task is 210 megabytes, at this time it exceeds 200 megabytes, indicating that the resource corresponding to the paused pre-download task is too large. Then calculate the first difference between the actual bandwidth in the first unit time period after the end of the bandwidth processing time interval and the actual bandwidth peak value within the target time period. In this embodiment, the first difference is 100 megabytes, indicating that there are still 100 megabytes available in the first unit time period to run the paused pre-download task. According to the time sequence of the pre-download tasks being paused, select the first quantity of pre-download tasks to resume running from the front to the back. The size of the resources corresponding to this part of the pre-download tasks is 100 megabytes or approximately the same as 100 megabytes. After the end of the first unit time, calculate the second difference between the actual bandwidth in the second unit time period and the actual bandwidth peak value within the target time period. In this embodiment, the second difference is 50 megabytes, and continue to select the second quantity of pre-download tasks to resume running. The size of the resources corresponding to this part of the pre-download tasks is approximately the same as 50 megabytes. And so on, continue to calculate the third difference between the actual bandwidth in the third unit time period and the actual bandwidth peak value within the target time period. In this embodiment, the third difference is 100 megabytes, and continue to select the remaining pre-download tasks to resume running. Since the size of the resources corresponding to this part of the pre-download tasks is approximately 60 (obtained by 210 - 100 - 50), and the 100 megabytes of the third difference is greater than 60 megabytes, so until the third unit time period, all pre-download tasks end running.

[0074] For the convenience of understanding the above embodiments, the following is combined with Figure 3 to make a systematic description. Figure 3 is a complete flowchart of obtaining a bandwidth processing time interval shown according to an exemplary embodiment, as Figure 3As shown, first, obtain the bandwidth information, time information, and information on whether each unit time period within a day of the target object within the historical time is a bandwidth peak time period. Use the bandwidth information, time information, and information on whether each unit time period within a day is a bandwidth peak time period to train the detection model. Specifically, input the bandwidth information and time information of multiple unit time periods within a day into the detection network to obtain the estimated bandwidth peak time period and the corresponding estimated bandwidth information within a day. Through the estimated bandwidth peak time period, the actual bandwidth peak time period, the estimated bandwidth information, and the actual bandwidth information, continuously train and calibrate the detection model to improve the precision-recall rate of the detection model, and finally obtain the trained detection model. After obtaining the trained detection model, if you want to obtain the bandwidth processing time period of the current day, you can input the bandwidth information and time information of multiple unit time periods of the day before the current day into the trained detection network to estimate the bandwidth peak time period of the current day, and determine the current bandwidth processing time period based on the bandwidth peak time period. For specific reference, please refer to the above embodiments, and no further elaboration will be provided here.

[0075] Figure 4 is a flowchart of a bandwidth processing method shown according to an exemplary embodiment Figure 2 , such as Figure 4 shown, the bandwidth processing method includes the following steps:

[0076] In step S401, receive information indicating the bandwidth processing time period of the target object within the target time period where the current time is located. Among them, the bandwidth processing time period is obtained based on the bandwidth peak time period obtained by inputting the bandwidth information and time information of each unit time period of the target object within the first predetermined time period into the detection model. The first predetermined time period is the time period before the target time period, and the detection model is trained based on the bandwidth information and time information of multiple unit time periods of the historical time of the target object. The bandwidth processing time period in this step can specifically refer to the above embodiments, and no further elaboration will be provided here.

[0077] In step S402, based on the bandwidth processing time period, perform bandwidth peak shaving processing on the target object. In this step, the bandwidth peak shaving processing means that only the real-time download task is run within the bandwidth processing time period, and all pre-download tasks are suspended to avoid excessive download tasks in the bandwidth processing time period, resulting in excessive bandwidth costs.

[0078] According to an exemplary embodiment of the present disclosure, bandwidth peak shaving processing is performed on a target object based on a bandwidth processing time interval, including: when the current time is within the bandwidth processing time interval, pausing the pre-download task of the target object. According to this embodiment, by pausing the pre-download task running within the bandwidth processing time interval, the problem of excessive bandwidth cost caused by too many download tasks in the bandwidth processing time interval is avoided, that is, the bandwidth cost in the bandwidth processing time interval is reduced.

[0079] Specifically, the resources corresponding to the above pre-download task are resources that are being downloaded at the current time and will be used after a third predetermined time period after the current time, that is, the resources downloaded by the pre-download task are not resources that are needed in real time and can be pre-downloaded, and the target object will use them later. It should be noted that generally, the corresponding task to the pre-download task is a real-time download task, that is, the resources that the target object immediately needs to use, which are generally triggered by user operations and resources with progress bars, such as the video being watched. Of course, the present disclosure does not limit this.

[0080] For example, when the current time reaches the start time of the peak shaving time interval, the pre-download task of the target object at the current time can be paused, but the real-time download task at the current time is not processed at all and can continue to run according to the original logic; when the current time is within the peak shaving time interval, continue to pause the pre-download tasks that have been paused after the start time and before the current time, and pause the pre-download task of the target object at the current time. Similarly, the real-time download task at the current time is not processed at all and can continue to run according to the original logic. That is, as the current time advances, the pre-download tasks that start running or have already run at the current time are paused in real time.

[0081] According to an exemplary embodiment of the present disclosure, when the current time reaches the end time of the bandwidth processing time interval, the paused pre-download task is resumed. According to this embodiment, when the bandwidth processing time interval ends, the previously paused pre-download task is resumed, so that the pre-download task continues to download the resources that have not been downloaded completely, so that the target user can obtain the corresponding resources in time when using them later.

[0082] For example, when the current time reaches the end time of the bandwidth processing time interval, the pre-download task paused during the bandwidth processing time interval can be resumed. It should be noted that at this time, the real-time download task is still not processed at all and can continue to run according to the original logic.

[0083] According to an exemplary embodiment of the present disclosure, when the current time is not within the peak shaving time period, the pre-download task at the current time runs normally, and the real-time download task at the current time also proceeds normally, that is, all download tasks continue to run according to the original logic without any processing. Because there is generally no large bandwidth cost at a time that is not within the bandwidth processing time interval, no processing is done at this time, which can also give users a better experience.

[0084] According to an exemplary embodiment of the present disclosure, a recovery policy instruction for receiving feedback on the size of the resource corresponding to the paused pre-download task is received; based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, the paused pre-download task is allocated to multiple unit time periods for recovery according to the size of the resource, the actual bandwidth peak value within the target time period, and the actual bandwidth of each unit time period. According to this embodiment, when the resource corresponding to the paused pre-download task is too large, the problem that the paused pre-download task resumes running together with the download task at the end of the bandwidth processing time interval, resulting in the occupied bandwidth exceeding the load, is prevented.

[0085] For example, after pausing the pre-download task of the target object, the size of the resource corresponding to the paused pre-download task can be sent to the server. When the server determines that the resource size exceeds the preset threshold, a recovery policy instruction is sent to the client to guide the recovery of the pre-download task. Specifically, assuming that the size of the resource corresponding to the paused pre-download task exceeds the preset threshold, it means that the resource corresponding to the paused pre-download task is too large. At this time, the first difference between the bandwidth of the first unit time period after the end of the bandwidth processing time interval and the actual bandwidth peak value can be calculated, and according to the order of the pre-download tasks being paused from earliest to latest, the first number of pre-download tasks are selected for recovery from the front to the back. The size of the resources corresponding to this part of the pre-download tasks is not much different from the first difference, and can also be equal. The present disclosure does not limit this; after the end of the first unit time, the second difference between the bandwidth of the second unit time period and the actual bandwidth peak value is calculated, and the second number of pre-download tasks are continued to be selected for recovery. The size of the resources corresponding to this part of the pre-download tasks is not much different from the second difference, and so on until all pre-download tasks end running.

[0086] Figure 5 is a schematic diagram of a bandwidth processing system shown according to an exemplary embodiment, as Figure 5As shown in the figure, the bandwidth processing system includes a server 50 and a client 52. Among them, the server 50 obtains the bandwidth information and time information of multiple unit time periods of the target object within the first predetermined time period, where the first predetermined time period is the time period before the target time period; inputs the bandwidth information and time information of each of the multiple unit time periods into the detection model to obtain the bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of each of the multiple unit time periods of the historical time of the target object; determines the bandwidth processing time interval based on the bandwidth peak time interval; sends the information indicating the bandwidth processing time interval to the client 52; the client 52 receives the information indicating the bandwidth processing time interval and performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0087] According to an exemplary embodiment of the present disclosure, the detection model is trained in the following manner: obtaining the bandwidth information, time information, and the identifier of each unit time period within each second predetermined time period in the historical time of the target object, where the identifier is used to indicate whether the corresponding unit time period is a bandwidth peak time interval; inputting the bandwidth information and time information of each of the multiple unit time periods within each second predetermined time period into the detection model to obtain the estimated bandwidth peak time interval within each second predetermined time period and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval; determining the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods indicated by the identifier as the bandwidth peak time interval, and the bandwidth information of the unit time periods; adjusting the parameters of the detection model based on the loss, and training the detection model to obtain the trained detection model. According to this embodiment, by using the information of multiple predetermined time periods in the historical time as training samples, and then training the detection model respectively based on the information of each predetermined time period, a detection model with better training effect can be obtained.

[0088] It should be noted that the training of the above detection model can be executed by the server 50 or the client 52, and the present disclosure does not limit this.

[0089] According to an exemplary embodiment of the present disclosure, determining a loss based on an estimated bandwidth peak time interval, estimated bandwidth information, an identification indicating a unit time period as the bandwidth peak time interval, and bandwidth information of the unit time period includes: obtaining a first loss based on the estimated bandwidth peak time interval and the unit time period identified as the bandwidth peak time interval; obtaining a second loss based on the estimated bandwidth information and the bandwidth information of the unit time period identified as the bandwidth peak time interval; and determining the loss based on the first loss and the second loss. According to this embodiment, by obtaining the respective losses of the estimated bandwidth peak time interval and the bandwidth information, the total loss is determined, such that the determination of the loss is not limited to a single bandwidth peak time interval, increasing the factors considered when determining the loss and making the final loss more accurate.

[0090] According to an exemplary embodiment of the present disclosure, determining a bandwidth processing time interval of a target object based on the bandwidth peak time interval includes one of the following: determining the bandwidth processing time interval of the target object by combining the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by combining the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by combining the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval. According to this embodiment, the bandwidth processing time interval can be flexibly determined based on the bandwidth peak time interval according to requirements and actual situations.

[0091] According to an exemplary embodiment of the present disclosure, obtaining bandwidth information and time information of a plurality of unit time periods of a target object within a first predetermined time period includes: obtaining the bandwidth information of the target object within the first predetermined time period; dividing the first predetermined time period to obtain a plurality of unit time periods; and determining the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and the end time of each unit time period. According to this embodiment, the first predetermined time period is divided to obtain a plurality of unit time periods, so that the bandwidth information and time information of each unit time period can be conveniently and quickly obtained according to the start time and the end time of each unit time period.

[0092] According to an exemplary embodiment of the present disclosure, performing bandwidth peak shaving on a target object based on the bandwidth processing time interval includes: suspending the pre-download task of the target object when the current time is within the bandwidth processing time interval. According to this embodiment, by suspending the pre-download task running within the bandwidth processing time interval, the problem of excessive bandwidth costs caused by too many download tasks within the bandwidth processing time interval is avoided, that is, the bandwidth cost within the bandwidth processing time interval is reduced.

[0093] According to an exemplary embodiment of the present disclosure, when the current time reaches the end time of the bandwidth processing time interval, the paused pre-download task is resumed. According to this embodiment, after the bandwidth processing time interval ends, the previously paused pre-download task is resumed, so that the pre-download task continues to download the undownloaded resources, so that the target user can obtain the corresponding resources in a timely manner during subsequent use.

[0094] According to an exemplary embodiment of the present disclosure, when the current time is not within the peak shaving time period, the pre-download task at the current time runs normally, and the real-time download task at the current time also proceeds normally, that is, all download tasks continue to run according to the original logic without any processing. Because there is generally no large bandwidth cost at times that are not within the bandwidth processing time interval, no processing is done at this time, which can also give users a better experience.

[0095] According to an exemplary embodiment of the present disclosure, the client feedbacks the size of the resources corresponding to the paused pre-download task to the server; when the size of the resources exceeds a preset threshold, the server sends a recovery policy instruction to the client; based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, the client distributes the paused pre-download task to multiple unit time intervals for recovery according to the size of the resources, the actual bandwidth peak value within the target time period, and the actual bandwidth of each unit time interval. According to this embodiment, when the resources corresponding to the paused pre-download task are too large, it is prevented that when the bandwidth processing time interval ends, the paused pre-download task resumes running together with the download task, resulting in the problem that the occupied bandwidth exceeds the load.

[0096] To facilitate the understanding of the above system, the following will be combined with Figure 6 for a detailed description. Figure 6 is a flowchart of the operation of a bandwidth processing system shown according to an exemplary embodiment, as Figure 6As shown, the server uses the trained detection model for prediction to obtain the bandwidth peak time interval of the target object in the target time period, determines the bandwidth processing time interval based on the bandwidth peak time interval, and then sends the information indicating the bandwidth processing time interval to the client. The client receives the information indicating the bandwidth processing time interval, extracts the bandwidth processing time interval, and determines in real time whether the current time meets the start time of the bandwidth processing time interval. If the current time is the start time of the bandwidth processing time interval, the pre-download task is paused, and the real-time download task is not specially processed and continues to run. At the same time, the client also determines in real time whether the current time meets the end time of the bandwidth processing time interval. If the current time is the end time of the bandwidth processing time interval, the pre-download task is resumed, and the real-time download task is also not specially processed and continues to run. It should be noted that when the client determines in real time that the current time is not within the bandwidth processing time interval, both the pre-download task and the real-time download task run normally, that is, all resources are downloaded normally.

[0097] In summary, the present disclosure determines the bandwidth peak time, that is, the bandwidth peak time interval, by training an artificial intelligence model based on the bandwidth peak data of historical time, making the bandwidth peak time interval relatively accurate. Then, based on the bandwidth peak time interval, a relatively accurate bandwidth processing time interval is determined, that is, the artificial intelligence technology is introduced to solve the problem of predicting the bandwidth peak. Then, the resource download task is throttled according to the predicted bandwidth processing time interval to reduce the bandwidth cost.

[0098] Figure 7 is a block diagram of a bandwidth processing device shown according to an exemplary embodiment Figure 1 Referring to Figure 7 FIG., the device includes a time period obtaining unit 70, a bandwidth peak time interval obtaining unit 72, a bandwidth processing time interval determining unit 74, and a sending unit 76.

[0099] The time period obtaining unit 70 is configured to obtain the bandwidth information and time information of multiple unit time periods of the target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period; the bandwidth peak time interval obtaining unit 72 is configured to input the bandwidth information and time information of each of the multiple unit time periods into the detection model to obtain the bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of each of the multiple unit time periods of the historical time of the target object; the bandwidth processing time interval determining unit 74 is configured to determine the bandwidth processing time interval of the target object based on the bandwidth peak time interval; the sending unit 76 is configured to send the information indicating the bandwidth processing time interval to the client so that the client performs bandwidth throttling on the target object based on the bandwidth processing time interval.

[0100] According to an exemplary embodiment of the present disclosure, a training unit is configured to train a detection model in the following manner: obtain bandwidth information, time information, and an identifier for each unit time period within each second predetermined time period of a target object in historical time, where the identifier is used to indicate whether the corresponding unit time period is a bandwidth peak time interval; input the bandwidth information and time information of each unit time period within each second predetermined time period into the detection model to obtain an estimated bandwidth peak time interval and estimated bandwidth information corresponding to the estimated bandwidth peak time interval within each second predetermined time period; determine a loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time periods indicated by the identifier as bandwidth peak time intervals, and the bandwidth information of the unit time periods; adjust the parameters of the detection model based on the loss, and train the detection model to obtain a trained detection model.

[0101] According to an exemplary embodiment of the present disclosure, the training unit is further configured to obtain a first loss based on the estimated bandwidth peak time interval and the unit time periods indicated by the identifier as bandwidth peak time intervals; obtain a second loss based on the estimated bandwidth information and the bandwidth information of the unit time periods indicated by the identifier as bandwidth peak time intervals; and determine a loss based on the first loss and the second loss.

[0102] According to an exemplary embodiment of the present disclosure, the bandwidth processing time interval determination unit 74 is further configured to determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; and determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

[0103] According to an exemplary embodiment of the present disclosure, the sending unit is further configured to, after sending the information indicating the bandwidth processing time interval to the client, receive the size of the resources corresponding to the paused pre-download task feedback by the client; and in the case where the size of the resources exceeds a preset threshold, send a recovery policy instruction to the client, where the recovery policy instruction instructs the client to, when the bandwidth processing time interval ends, allocate the paused pre-download task to multiple unit time periods for recovery according to the size of the resources, the actual bandwidth peak within the target time period, and the actual bandwidth of each unit time period.

[0104] According to an exemplary embodiment of the present disclosure, the time period acquisition unit is further configured to acquire bandwidth information of a target object within a first predetermined time period; divide the first predetermined time period to obtain a plurality of unit time periods; and determine the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and the end time of each unit time period.

[0105] Figure 8 is a block diagram of a bandwidth processing device shown according to an exemplary embodiment Figure 2 . Referring to Figure 8 , the device includes a receiving unit 80 and a processing unit 82.

[0106] The receiving unit 80 is configured to receive information indicating a bandwidth processing time interval of a target object within a target time period where the current time is located, where the bandwidth processing time interval is obtained by inputting the bandwidth information and time information of each of a plurality of unit time periods of the target object within a first predetermined time period into a detection model to obtain a bandwidth peak time interval, the first predetermined time period is a time period before the target time period, and the detection model is trained based on the bandwidth information and time information of each of a plurality of unit time periods of the historical time of the target object; the processing unit 82 is configured to perform bandwidth peak shaving processing on the target object based on the bandwidth processing time interval.

[0107] According to an exemplary embodiment of the present disclosure, the processing unit 82 is further configured to pause the pre-download task of the target object when the current time is within the bandwidth processing time interval.

[0108] According to an exemplary embodiment of the present disclosure, the processing unit 82 is further configured to resume the paused pre-download task when the current time reaches the end time of the bandwidth processing time interval.

[0109] According to an exemplary embodiment of the present disclosure, the processing unit 82 is further configured to receive a recovery policy instruction based on the size feedback of the resources corresponding to the paused pre-download task; and based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, allocate the paused pre-download task to a plurality of unit time periods for recovery according to the size of the resources, the actual bandwidth peak within the target time period, and the actual bandwidth of each unit time period.

[0110] According to an embodiment of the present disclosure, an electronic device can be provided. Figure 9 is a block diagram of an electronic device 900 according to an embodiment of the present disclosure. The electronic device includes at least one memory 901 and at least one processor 902. A set of computer-executable instructions is stored in the at least one memory. When the set of computer-executable instructions is executed by the at least one processor, a bandwidth processing method according to an embodiment of the present disclosure is executed.

[0111] As an example, the electronic device 900 can be a PC computer, a tablet device, a personal digital assistant, a smart phone, or other devices capable of executing the above instruction set. Here, the electronic device 1000 does not have to be a single electronic device, but can also be a collection of devices or circuits that can execute the above instructions (or instruction sets) individually or jointly. The electronic device 900 can also be a part of an integrated control system or a system manager, or can be configured as a portable electronic device that can be interconnected locally or remotely (e.g., via wireless transmission).

[0112] In the electronic device 900, the processor 902 can include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor 902 can also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, and the like.

[0113] The processor 902 can run instructions or code stored in the memory, where the memory 901 can also store data. The instructions and data can also be sent and received via the network interface device over the network, where the network interface device can employ any known transmission protocol.

[0114] The memory 901 can be integrated with the processor 902, for example, by arranging RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 901 can include a separate device, such as an external disk drive, a storage array, or other storage devices that can be used by any database system. The memory 901 and the processor 902 can be operatively coupled, or can communicate with each other, for example, via an I / O port, a network connection, etc., such that the processor 902 can read files stored in the memory 901.

[0115] In addition, the electronic device 900 can also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.). All components of the electronic device can be connected to each other via a bus and / or a network.

[0116] According to an embodiment of the present disclosure, a computer-readable storage medium may also be provided, wherein when the instructions in the computer-readable storage medium are run by at least one processor, at least one processor is caused to execute the bandwidth processing method of the embodiment of the present disclosure. Examples of the computer-readable storage medium herein include: read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disc memory, hard disk drive (HDD), solid state drive (SSD), cartridge memory (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device configured to store a computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program and any associated data, data files and data structures to a processor or computer such that the processor or computer can execute the computer program. The computer program in the above computer-readable storage medium may run in an environment deployed in computer devices such as clients, hosts, proxy devices, servers, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system such that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.

[0117] According to an embodiment of the present disclosure, there is provided a computer program product including computer instructions that implement the bandwidth processing method of the embodiment of the present disclosure when executed by a processor.

[0118] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0119] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A bandwidth processing method, characterized in that, it includes: Obtain the bandwidth information and time information of multiple unit time periods of the target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period; Input the bandwidth information and time information of each of the multiple unit time periods into a detection model to obtain the bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of multiple unit time periods of the historical time of the target object; Determine the bandwidth processing time interval of the target object based on the bandwidth peak time interval; Send the information indicating the bandwidth processing time interval to the client, so that the client performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval; wherein, the obtaining of the bandwidth information and time information of multiple unit time periods of the target object within a first predetermined time period includes: obtaining the bandwidth information of the target object within a first predetermined time period; dividing the first predetermined time period to obtain multiple unit time periods; determining the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and end time of each unit time period; wherein, the determining of the bandwidth processing time interval of the target object based on the bandwidth peak time interval includes one of the following: Determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; Determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; Determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

2. The bandwidth processing method according to claim 1, characterized in that, after sending the information indicating the bandwidth processing time interval to the client, it further includes: Receiving the size of the resources corresponding to the paused pre-download task feedback by the client; In the case where the size of the resources exceeds a preset threshold, sending a recovery policy instruction to the client, where the recovery policy instruction instructs the client to, when the bandwidth processing time interval ends, allocate the paused pre-download task to multiple unit time periods for recovery according to the size of the resources, the actual bandwidth peak within the target time period, and the actual bandwidth of each unit time period.

3. The bandwidth processing method according to claim 1, characterized in that, the detection model is trained in the following manner: Obtain the bandwidth information, time information, and the identifier of each unit time period of the target object within each second predetermined time period in historical time, where the identifier is used to indicate whether the corresponding unit time period is a bandwidth peak time interval; Input the bandwidth information and time information of each unit time period within each second predetermined time period into the detection model to obtain the estimated bandwidth peak time interval and the estimated bandwidth information corresponding to the estimated bandwidth peak time interval within each second predetermined time period; Determine the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time period marked as the bandwidth peak time interval, and the bandwidth information of the unit time period; Adjust the parameters of the detection model based on the loss, and train the detection model to obtain the trained detection model.

4. The bandwidth processing method according to claim 3, wherein, The determining the loss based on the estimated bandwidth peak time interval, the estimated bandwidth information, the unit time period marked as the bandwidth peak time interval, and the bandwidth information of the unit time period includes: Obtain the first loss based on the estimated bandwidth peak time interval and the unit time period marked as the bandwidth peak time interval; Obtain the second loss based on the estimated bandwidth information and the bandwidth information of the unit time period marked as the bandwidth peak time interval; Determine the loss based on the first loss and the second loss.

5. A bandwidth processing method, wherein, includes: Receive information indicating the bandwidth processing time interval within the target time period where the current time of the target object is located. Among them, the bandwidth processing time interval is obtained based on the bandwidth peak time interval obtained by inputting the bandwidth information and time information of each unit time period of the target object within the first predetermined time period into the detection model. The first predetermined time period is the time period before the target time period, and the detection model is trained based on the bandwidth information and time information of each unit time period of the historical time of the target object; Perform bandwidth peak shaving processing on the target object based on the bandwidth processing time interval; Among them, the bandwidth information and time information of each unit time period of the target object within the first predetermined time period are obtained in the following manner: Obtain the bandwidth information of the target object within the first predetermined time period; Divide the first predetermined time period to obtain multiple unit time periods; Based on the bandwidth information, the start time and end time of each unit time period, determine the bandwidth information and time information of each unit time period; Among them, the bandwidth processing time interval is determined by one of the following methods: Determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; Determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; Determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

6. The bandwidth processing method according to claim 5, wherein, Performing bandwidth peak clipping on the target object based on the bandwidth processing time interval includes: When the current time is within the bandwidth processing time interval, pausing the pre-download task of the target object.

7. The bandwidth processing method according to claim 6, characterized in that it further includes: When the current time reaches the end time of the bandwidth processing time interval, resuming the paused pre-download task.

8. The bandwidth processing method according to claim 6, characterized in that it further includes: Receiving a recovery policy instruction based on the size feedback of the resources corresponding to the paused pre-download task; Based on the recovery policy instruction, when the current time reaches the end time of the bandwidth processing time interval, allocating the paused pre-download task to multiple unit time periods for recovery according to the size of the resources, the actual bandwidth peak value within the target time period, and the actual bandwidth of each unit time period.

9. A bandwidth processing system, characterized in that the bandwidth processing system includes a server and a client, where the server obtains the bandwidth information and time information of multiple unit time periods of the target object within a first predetermined time period, where the first predetermined time period is a time period before the target time period; inputs the bandwidth information and time information of each of the multiple unit time periods into a detection model to obtain the bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of multiple unit time periods of the historical time of the target object; determines the bandwidth processing time interval of the target object based on the bandwidth peak time interval; and sends the information indicating the bandwidth processing time interval to the client; the client receives the information indicating the bandwidth processing time interval and performs bandwidth peak clipping on the target object based on the bandwidth processing time interval; where obtaining the bandwidth information and time information of multiple unit time periods of the target object within a first predetermined time period includes: obtaining the bandwidth information of the target object within a first predetermined time period; dividing the first predetermined time period to obtain multiple unit time periods; and determining the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and end time of each unit time period; where determining the bandwidth processing time interval of the target object based on the bandwidth peak time interval includes one of the following: Determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; Determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; Determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

10. A bandwidth processing device, characterized in that it includes: A time period acquisition unit, configured to acquire bandwidth information and time information of multiple unit time periods of a target object within a first predetermined time period, where the first predetermined time period is a time period before a target time period; A bandwidth peak time interval acquisition unit, configured to input the bandwidth information and time information of each of the multiple unit time periods into a detection model to obtain a bandwidth peak time interval of the target object within the target time period, where the detection model is trained based on the bandwidth information and time information of multiple unit time periods of the historical time of the target object; A bandwidth processing time interval determination unit, configured to determine a bandwidth processing time interval of the target object based on the bandwidth peak time interval; A sending unit, configured to send information indicating the bandwidth processing time interval to a client, so that the client performs bandwidth peak shaving processing on the target object based on the bandwidth processing time interval; The time period acquisition unit is further configured to acquire the bandwidth information of the target object within the first predetermined time period; divide the first predetermined time period to obtain multiple unit time periods; and determine the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and the end time of each unit time period; The bandwidth processing time interval determination unit is configured to determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; and determine the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

11. A bandwidth processing device characterized in that it includes a receiving unit, configured to receive information indicating a bandwidth processing time interval of a target object within a target time period where the target object is located at the current time, where the bandwidth processing time interval is obtained based on a bandwidth peak time interval obtained by inputting the bandwidth information and time information of multiple unit time periods of the target object within a first predetermined time period into a detection model, the first predetermined time period is a time period before the target time period, and the detection model is trained based on the bandwidth information and time information of multiple unit time periods of the historical time of the target object; a processing unit, configured to perform bandwidth peak shaving processing on the target object based on the bandwidth processing time interval; wherein, the bandwidth information and time information of multiple unit time periods of the target object within the first predetermined time period are obtained by the following method: acquiring the bandwidth information of the target object within the first predetermined time period; dividing the first predetermined time period to obtain multiple unit time periods; and determining the bandwidth information and time information of each unit time period based on the bandwidth information, the start time and the end time of each unit time period; Among them, the bandwidth processing time interval is determined by one of the following methods: determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods before the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval and a predetermined number of unit time periods after the bandwidth peak time interval; determining the bandwidth processing time interval of the target object by using the bandwidth peak time interval, a predetermined number of unit time periods before the bandwidth peak time interval, and a predetermined number of unit time periods after the bandwidth peak time interval.

12. An electronic device, characterized in that, comprises: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the bandwidth processing method according to any one of claims 1 to 8.

13. A computer-readable storage medium, characterized in that, when the instructions in the computer-readable storage medium are run by at least one processor, the at least one processor is caused to execute the bandwidth processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Bandwidth scheduling method, traffic transmission method and related products

    CN113055308A

  • Peak clipping method and device and electronic equipment

    CN114448808A

  • Peak clipping progress prediction method and device and electronic equipment

    CN115250219A