Bandwidth flow prediction method, device, storage medium and electronic device
By obtaining the historical data and real values of bandwidth traffic and adjusting the target prediction value, the problem of inaccurate prediction of neural network models is solved, and more accurate bandwidth traffic prediction is achieved.
Patent Information
- Application Number
- CN202111401269.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-11-19
AI Technical Summary
In the prior art, the prediction of bandwidth traffic is inaccurate by relying on neural network models, resulting in inaccurate prediction of bandwidth traffic.
By obtaining the original prediction value and true value of the bandwidth traffic at the first point in time, the processing strategy is determined, including adjusting or abandoning the target original prediction value, and adjusting the target prediction results using the difference and weights to achieve accurate bandwidth traffic prediction.
Improve the accuracy of bandwidth traffic prediction, and can adjust the prediction value based on historical data, reduce errors, and achieve more accurate traffic prediction.
Smart Images

Figure CN116155752B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a bandwidth flow prediction method, device, storage medium and electronic equipment. Background Art
[0002] In the prior art, when predicting the bandwidth flow of nodes in a content distribution network in various regions, a neural network model is usually used to obtain feature data at a certain time point, and then the bandwidth flow at the next time point is predicted based on the feature data.
[0003] However, due to the large fluctuation of node bandwidth flow, relying solely on neural network models to predict bandwidth flow is not accurate. Summary of the Invention
[0004] Embodiments of the present invention provide a bandwidth flow prediction method, apparatus, storage medium, and electronic device to at least solve the technical problem of inaccurate bandwidth flow prediction.
[0005] According to one aspect of an embodiment of the present invention, a bandwidth flow prediction method is provided, comprising: obtaining a first original predicted value of the bandwidth flow at a first time point, a first true value of the bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point; determining a processing strategy for the target original predicted value based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value; when the processing strategy is to adjust the target original predicted value, adjusting the target original predicted value based on the difference between the first true value and the first original predicted value to obtain a target prediction result of the bandwidth flow at the target time point; when the processing strategy is to abandon the adjustment of the target original predicted value, determining the target original predicted value as the target prediction result.
[0006] According to another aspect of an embodiment of the present invention, a bandwidth flow prediction device is provided, comprising: an acquisition module, configured to acquire a first original predicted value of the bandwidth flow at a first time point, a first true value of the bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point; a first determination module, configured to determine a processing strategy for the target original predicted value based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value; a first adjustment module, configured to adjust the target original predicted value based on the difference between the first true value and the first original predicted value when the processing strategy is to adjust the target original predicted value, so as to obtain a target prediction result of the bandwidth flow at the target time point; and a second determination module, configured to determine the target original predicted value as the target prediction result when the processing strategy is to abandon the adjustment of the target original predicted value.
[0007] As an optional example, the above-mentioned first determination module includes: a first determination unit, used to determine that the above-mentioned processing strategy is to adjust the above-mentioned target original prediction value when the absolute value of the difference between the above-mentioned first true value and the above-mentioned first original prediction value is greater than a first threshold; a second determination unit, used to determine that the above-mentioned processing strategy is to abandon adjusting the above-mentioned target original prediction value when the absolute value of the above-mentioned difference is less than or equal to the above-mentioned first threshold.
[0008] As an optional example, the above-mentioned adjustment module includes: a processing unit, used to multiply the above-mentioned difference with the target weight to obtain the target result; and a third determination unit, used to determine the sum of the above-mentioned target result and the above-mentioned target original prediction value as the above-mentioned target prediction result at the above-mentioned target time point.
[0009] As an optional example, the adjustment module further includes: an acquisition unit, configured to acquire an initial weight of the input before multiplying the difference by the target weight to obtain the target result, and use the initial weight as the target weight.
[0010] As an optional example, the above-mentioned device also includes: a second adjustment module, used to adjust the above-mentioned target weight when reaching any time point including the above-mentioned first time point and the above-mentioned target time point; a third determination module, used to use the adjusted above-mentioned target weight as the target weight used at the next time point.
[0011] As an optional example, the above-mentioned second adjustment module includes: an execution unit, which is used to take the current end time point as the current time point, and a time point before the above-mentioned current time point as the second time point, and perform the following operations: taking the difference between the target prediction result of the bandwidth flow at the above-mentioned current time point and the current true value of the bandwidth flow at the above-mentioned current time point as the first difference; taking the difference between the target prediction result of the bandwidth flow at the above-mentioned second time point and the second true value of the bandwidth flow at the above-mentioned second time point as the second difference; and adjusting the above-mentioned target weight at the above-mentioned current time point when the absolute value of the above-mentioned second difference is less than or equal to the absolute value of the above-mentioned first difference.
[0012] As an optional example, the execution unit is further used to: calculate the absolute value difference between the absolute value of the first difference and the absolute value of the second difference; the larger the absolute value of the absolute value difference, the greater the amplitude of adjusting the target weight.
[0013] According to another aspect of the embodiments of the present invention, a storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the bandwidth flow prediction method is executed.
[0014] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the bandwidth flow prediction method through the computer program.
[0015] In an embodiment of the present invention, a first original predicted value of the bandwidth flow at a first time point, a first true value of the bandwidth flow at the first time point, and a target original predicted value at a target time point are obtained, wherein the first time point is a time point before the target time point; a processing strategy for the target original predicted value is determined based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value; in the case where the processing strategy is to adjust the target original predicted value, the target original predicted value is adjusted according to the difference between the first true value and the first original predicted value to obtain the target prediction result of the bandwidth flow at the target time point; in the processing strategy In order to abandon the adjustment of the above-mentioned target original predicted value, the method of determining the above-mentioned target original predicted value as the above-mentioned target prediction result is provided. Since in the above-mentioned method, when determining the target prediction result of the bandwidth flow at the target time point, it is possible to determine whether to adjust the target original predicted value of the bandwidth flow at the target time point based on the first original predicted value of the bandwidth flow at the first time point before the target time point and the first true value of the bandwidth flow at the first time point, and if it is determined to be adjusted, the above-mentioned target original predicted value is adjusted based on the difference between the above-mentioned first true value and the above-mentioned first original predicted value to obtain the target prediction result of the bandwidth flow at the target time point, thereby achieving the purpose of accurately predicting the bandwidth flow at the target time point, and further solving the technical problem of inaccurate bandwidth flow prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a flowchart of an optional bandwidth flow prediction method according to an embodiment of the present invention;
[0018] Figure 2 1 is a schematic diagram of different time points of an optional bandwidth flow prediction method according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of determining a target prediction result of an optional bandwidth flow prediction method according to an embodiment of the present invention;
[0020] Figure 4 This is a schematic diagram of a change trend of a difference between a target prediction result and a true value determined in an optional bandwidth flow prediction method according to an embodiment of the present invention;
[0021] Figure 51 is a schematic structural diagram of an optional bandwidth flow prediction device according to an embodiment of the present invention;
[0022] Figure 6 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] According to a first aspect of an embodiment of the present invention, a bandwidth flow prediction method is provided. Optionally, as Figure 1 As shown, the above method includes:
[0026] S102, obtaining a first original predicted value of bandwidth flow at a first time point, a first actual value of bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point;
[0027] S104, determining a processing strategy for the target original predicted value based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and giving up adjusting the target original predicted value;
[0028] S106, when the processing strategy is to adjust the target original predicted value, adjusting the target original predicted value according to the difference between the first true value and the first original predicted value to obtain a target prediction result of the bandwidth flow at the target time point;
[0029] S108: When the processing strategy is to abandon adjusting the target original prediction value, the target original prediction value is determined as the target prediction result.
[0030] Optionally, this embodiment can be applied in the process of predicting the bandwidth flow of a node. The node can be a node in a content distribution network. When predicting, each node can be regarded as an individual to predict the bandwidth flow usage of each node, or multiple nodes in a certain area can be regarded as a whole to predict the bandwidth flow usage of the whole. When predicting bandwidth flow, the bandwidth flow at a certain time point can be predicted according to a certain time point. In this embodiment, the time point can be determined, such as determining a time point every hour, or determining a time point every day, every five minutes, etc. The method of this embodiment can be used for the length of the time point interval. For example, taking the time point determined at intervals of every hour as an example, as Figure 2 As shown, for three time points, the target prediction result of each time point can be predicted.
[0031] Optionally, in this embodiment, the multiple time points may be connected or disconnected. The multiple time points may be the same time point in different periods. For example, the multiple time points may be different dates. The different dates constitute multiple time points, and the bandwidth flow rate at each time point is predicted.
[0032] Optionally, in this embodiment, each time point may correspond to an original prediction value, a true value, and a target prediction value. The original prediction value may be a prediction of the bandwidth flow at each time point using a certain prediction method, such as using a neural network model to predict the original prediction value at a time point. The target prediction value is a more accurate prediction result obtained after adjusting the original prediction value. The true value is the true value of the bandwidth flow at that time point. For example, Figure 3 As shown, Figure 3 In the process, the original predicted value and the true value at the previous time point are used to adjust the original predicted value at the next time point to obtain the target prediction result at the next time point.
[0033] In this embodiment, whether to adjust the original predicted value of the target time point, and if so, how to adjust it, can be determined based on data at a first time point before the target time point. The first time point can be a time point adjacent to the target time point, or a time point not adjacent to the target time point. For example, if the target time point is 1:00, the first time point can be 12:00, or a time point before 12:00, such as 10:00. For example, if the target time point is 1:00 on the 15th, the first time point can be 1:00 on the 14th, or a date between the 14th and 1:00, such as 1:00 on the 12th.
[0034] Through this embodiment, when determining the target prediction result of the bandwidth flow at the target time point, it can be determined whether to adjust the target original prediction value of the bandwidth flow at the target time point based on the first original prediction value of the bandwidth flow at the first time point before the target time point and the first true value of the bandwidth flow at the first time point. If the adjustment is determined, the target original prediction value is adjusted according to the difference between the first true value and the first original prediction value to obtain the target prediction result of the bandwidth flow at the target time point, thereby achieving the purpose of accurately predicting the bandwidth flow at the target time point.
[0035] As an optional example, the above-mentioned determination of a processing strategy for the target original predicted value according to the first true value and the first original predicted value includes:
[0036] When the absolute value of the difference between the first true value and the first original predicted value is greater than a first threshold, determining the processing strategy to adjust the target original predicted value;
[0037] When the absolute value of the difference is less than or equal to the first threshold, the processing strategy is determined to abandon adjusting the target original prediction value.
[0038] Optionally, in this embodiment, a strategy for adjusting the target original predicted value at the target time point can be determined based on the first time point before the target time point. The first true value at the first time point and the first original predicted value at the first time point can be obtained, and then the absolute value of the difference between the two can be calculated. If the absolute value of the difference between the two is greater than the first threshold, it is considered that the target original predicted value at the target time point needs to be adjusted. If the above absolute value is less than or equal to the first threshold, the target original predicted value can be directly used as the target prediction result of the bandwidth flow at the target time point. The above first threshold can be a set tolerance value, that is, the prediction error allowed to exist. For example, if the original predicted value is 100G and the true value is 200G, the difference between the two is 100G, and the set first threshold is 20G, then the difference exceeds the first threshold, and the target original predicted value at the target time point needs to be adjusted. If the difference between the two is less than the first threshold, it is within the allowable error and there is no need to adjust the target original predicted value.
[0039] As an optional example, when the processing strategy is to adjust the target original predicted value, adjusting the target original predicted value according to the difference between the first true value and the first original predicted value includes:
[0040] Multiply the difference by the target weight to get the target result;
[0041] The sum of the target result and the target original prediction value is determined as the target prediction result at the target time point.
[0042] Optionally, in this embodiment, when adjusting the target original predicted value at the target time point, the difference between the first original predicted value and the first true value at the first time point can be multiplied by a target weight, where the target weight is an input weight or a weight obtained by calculation. After the target result is obtained by multiplication, the sum of the target result and the target original predicted value is determined as the target predicted result at the target time point.
[0043] As an optional example, before multiplying the difference value by the target weight to obtain the target result, the above method further includes:
[0044] Get the initial weight of the input and use the initial weight as the target weight.
[0045] Optionally, the target weight in this embodiment may be a weight set based on empirical values, and the initial weight may be calculated or set based on actual data conditions.
[0046] As an optional example, the above method further includes:
[0047] When reaching any time point including the first time point and the target time point, adjusting the target weight;
[0048] The adjusted target weight is used as the target weight for the next time point.
[0049] Optionally, in this embodiment, when an initial weight is input to obtain a target weight at a time point, the target weight at that time point can be adjusted at each time point, and the adjusted weight is used as the target weight for the next time point. For example, if the initial weight at a time point is 0.5, then at that time point, the weight is adjusted to 0.6, and at the time point after that time point, the target weight is 0.6.
[0050] As an optional example, when any time point including the first time point and the target time point is reached, adjusting the target weight includes:
[0051] Set the currently reached time point as the current time point and the time point before the current time point as the second time point, and perform the following operations:
[0052] The difference between the target prediction result of the bandwidth flow at the current time point and the current true value of the bandwidth flow at the current time point is used as the first difference;
[0053] The difference between the target prediction result of the bandwidth flow at the second time point and the second true value of the bandwidth flow at the second time point is used as the second difference;
[0054] When the absolute value of the second difference is less than or equal to the absolute value of the first difference, the target weight at the current time point is adjusted.
[0055] Optionally, in this embodiment, when determining whether to adjust the weight, the weight can be adjusted based on the trend of the difference between the true value and the target prediction result at each time point. For example, taking three time points as an example, Figure 4 As shown in the figure, the difference between the actual value and the target prediction result at each time point is 10G, 12G and 14G respectively. The trend is that the difference is getting bigger and bigger. At this time, the weight can be adjusted.
[0056] As an optional example, when the second difference is less than or equal to the first difference, adjusting the target weight at the current time point includes:
[0057] Calculate the absolute value difference between the absolute value of the first difference and the absolute value of the second difference;
[0058] When the absolute value of the absolute value difference is larger, the magnitude of the adjustment of the target weight is larger.
[0059] Optionally, in this embodiment, if the difference between the absolute value of the first difference and the absolute value of the second difference is larger, it means that the fluctuation degree of the difference between the adjusted target prediction result and the true value at each time point is larger. Therefore, the target weight can be adjusted with a larger amplitude, thereby reducing the fluctuation degree of the difference between the target prediction result and the true value, and obtaining a more accurate prediction result.
[0060] Let's take an example. For example, if the target time point is 5 minutes, since bandwidth is time-series, with each 5-minute point corresponding to a real bandwidth value and an original predicted value, the purpose of this embodiment is to accurately predict bandwidth traffic at future times and obtain a target prediction result, so as to operate the switching point in advance, thereby saving traffic during peak hours and increasing bandwidth usage during off-peak hours. The target prediction result is more accurate than the original prediction value.
[0061] Because bandwidth addition and reduction take time to execute, assume that the time is t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, and t11. Use the data before t0 to train the prediction model (such as CRU, XGBoost, etc.). At t0, the predicted value at t1 is needed. The predicted model will output the predicted value of t1 as pred_t1 (the original predicted value). At t1, the bandwidth predicted value at t2 is needed. The model prediction output at t2 is pred_t2. At this time, the true bandwidth value true_t1 at t1 is known. According to the error between the true bandwidth at t1 and the predicted bandwidth:
[0062] error=true_t1-pred_t1
[0063] Set a threshold delta. If error>delta, then 60% of the error (the percentage parameter can be adjusted manually) is applied to the model output of t2:
[0064] pred_t2_true=pred_t2+60%*error
[0065] If error <= delta:
[0066] pred_t2_true=pred_t2
[0067] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0068] According to another aspect of the embodiment of the present application, a bandwidth flow prediction device is also provided. Figure 5 Shown, including:
[0069] An acquisition module 502 is configured to acquire a first original predicted value of bandwidth flow at a first time point, a first actual value of bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point;
[0070] A first determining module 504 is configured to determine a processing strategy for a target original predicted value based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value;
[0071] A first adjustment module 506 is configured to adjust the target original predicted value according to the difference between the first true value and the first original predicted value to obtain a target prediction result of the bandwidth flow at a target time point when the processing strategy is to adjust the target original predicted value;
[0072] The second determining module 508 is configured to determine the target original predicted value as the target prediction result when the processing strategy is to abandon adjusting the target original predicted value.
[0073] Optionally, this embodiment can be applied in the process of predicting the bandwidth flow of a node. The node can be a node in a content distribution network. When predicting, each node can be regarded as an individual to predict the bandwidth flow usage of each node, or multiple nodes in a certain area can be regarded as a whole to predict the bandwidth flow usage of the whole. When predicting bandwidth flow, the bandwidth flow at a certain time point can be predicted according to a certain time point. In this embodiment, the time point can be determined, such as determining a time point every hour, or determining a time point every day, every five minutes, etc. The method of this embodiment can be used for the length of the time point interval. For example, taking the time point determined at intervals of every hour as an example, as Figure 2 As shown, for three time points, the target prediction result of each time point can be predicted.
[0074] Optionally, in this embodiment, the multiple time points may be connected or disconnected. The multiple time points may be the same time point in different periods. For example, the multiple time points may be different dates. The different dates constitute multiple time points, and the bandwidth flow rate at each time point is predicted.
[0075] Optionally, in this embodiment, each time point may correspond to an original prediction value, a true value, and a target prediction value. The original prediction value may be a prediction of the bandwidth flow at each time point using a certain prediction method, such as using a neural network model to predict the original prediction value at a time point. The target prediction value is a more accurate prediction result obtained after adjusting the original prediction value. The true value is the true value of the bandwidth flow at that time point. For example, Figure 3 As shown, Figure 3 In the process, the original predicted value and the true value at the previous time point are used to adjust the original predicted value at the next time point to obtain the target prediction result at the next time point.
[0076] In this embodiment, whether to adjust the original predicted value of the target time point, and if so, how to adjust it, can be determined based on data at a first time point before the target time point. The first time point can be a time point adjacent to the target time point, or a time point not adjacent to the target time point. For example, if the target time point is 1:00, the first time point can be 12:00, or a time point before 12:00, such as 10:00. For example, if the target time point is 1:00 on the 15th, the first time point can be 1:00 on the 14th, or a date between the 14th and 1:00, such as 1:00 on the 12th.
[0077] Through this embodiment, when determining the target prediction result of the bandwidth flow at the target time point, it can be determined whether to adjust the target original prediction value of the bandwidth flow at the target time point based on the first original prediction value of the bandwidth flow at the first time point before the target time point and the first true value of the bandwidth flow at the first time point. If the adjustment is determined, the target original prediction value is adjusted according to the difference between the first true value and the first original prediction value to obtain the target prediction result of the bandwidth flow at the target time point, thereby achieving the purpose of accurately predicting the bandwidth flow at the target time point.
[0078] As an optional example, the first determining module includes:
[0079] a first determining unit, configured to determine, when an absolute value of a difference between the first true value and the first original predicted value is greater than a first threshold, that a processing strategy is to adjust the target original predicted value;
[0080] The second determining unit is configured to determine, when the absolute value of the difference is less than or equal to the first threshold, that the processing strategy is to abandon adjusting the target original predicted value.
[0081] Optionally, in this embodiment, a strategy for adjusting the target original predicted value at the target time point can be determined based on the first time point before the target time point. The first true value at the first time point and the first original predicted value at the first time point can be obtained, and then the absolute value of the difference between the two can be calculated. If the absolute value of the difference between the two is greater than the first threshold, it is considered that the target original predicted value at the target time point needs to be adjusted. If the above absolute value is less than or equal to the first threshold, the target original predicted value can be directly used as the target prediction result of the bandwidth flow at the target time point. The above first threshold can be a set tolerance value, that is, the prediction error allowed to exist. For example, if the original predicted value is 100G and the true value is 200G, the difference between the two is 100G, and the set first threshold is 20G, then the difference exceeds the first threshold, and the target original predicted value at the target time point needs to be adjusted. If the difference between the two is less than the first threshold, it is within the allowable error and there is no need to adjust the target original predicted value.
[0082] As an optional example, the adjustment module includes:
[0083] A processing unit, configured to multiply the difference by the target weight to obtain the target result;
[0084] The third determining unit is configured to determine the sum of the target result and the target original prediction value as the target prediction result at the target time point.
[0085] Optionally, in this embodiment, when adjusting the target original predicted value at the target time point, the difference between the first original predicted value and the first true value at the first time point can be multiplied by a target weight, where the target weight is an input weight or a weight obtained by calculation. After the target result is obtained by multiplication, the sum of the target result and the target original predicted value is determined as the target predicted result at the target time point.
[0086] As an optional example, the adjustment module further includes:
[0087] The acquisition unit is used to obtain the initial weight of the input before multiplying the difference with the target weight to obtain the target result, and use the initial weight as the target weight.
[0088] Optionally, the target weight in this embodiment may be a weight set based on empirical values, and the initial weight may be calculated or set based on actual data conditions.
[0089] As an optional example, the above device further includes:
[0090] A second adjustment module is used to adjust the target weight when any time point including the first time point and the target time point is reached;
[0091] The third determining module is configured to use the adjusted target weight as the target weight to be used at the next time point.
[0092] Optionally, in this embodiment, when an initial weight is input to obtain a target weight at a time point, the target weight at that time point can be adjusted at each time point, and the adjusted weight is used as the target weight for the next time point. For example, if the initial weight at a time point is 0.5, then at that time point, the weight is adjusted to 0.6, and at the time point after that time point, the target weight is 0.6.
[0093] As an optional example, the second adjustment module includes:
[0094] The execution unit is configured to use the currently reached time point as the current time point and a time point before the current time point as the second time point, and perform the following operations:
[0095] The difference between the target prediction result of the bandwidth flow at the current time point and the current true value of the bandwidth flow at the current time point is used as the first difference;
[0096] The difference between the target prediction result of the bandwidth flow at the second time point and the second true value of the bandwidth flow at the second time point is used as the second difference;
[0097] When the absolute value of the second difference is less than or equal to the absolute value of the first difference, the target weight at the current time point is adjusted.
[0098] Optionally, in this embodiment, when determining whether to adjust the weight, the weight can be adjusted based on the trend of the difference between the true value and the target prediction result at each time point. For example, taking three time points as an example, Figure 4 As shown in the figure, the difference between the actual value and the target prediction result at each time point is 10G, 12G and 14G respectively. The trend is that the difference is getting bigger and bigger. At this time, the weight can be adjusted.
[0099] As an optional example, the execution unit is further configured to:
[0100] Calculate the absolute value difference between the absolute value of the first difference and the absolute value of the second difference;
[0101] The larger the absolute value of the absolute value difference is, the larger the amplitude of adjusting the target weight is.
[0102] Optionally, in this embodiment, if the difference between the absolute value of the first difference and the absolute value of the second difference is larger, it means that the fluctuation degree of the difference between the adjusted target prediction result and the true value at each time point is larger. Therefore, the target weight can be adjusted with a larger amplitude, thereby reducing the fluctuation degree of the difference between the target prediction result and the true value, and obtaining a more accurate prediction result.
[0103] For other examples of this embodiment, please refer to the above examples and will not be repeated here.
[0104] Figure 6 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 6 As shown, it includes a processor 602, a communication interface 604, a memory 606 and a communication bus 608, wherein the processor 602, the communication interface 604 and the memory 606 complete communication with each other through the communication bus 608, wherein,
[0105] Memory 606, for storing computer programs;
[0106] The processor 602 is configured to implement the following steps when executing the computer program stored in the memory 606:
[0107] Obtaining a first original predicted value of bandwidth flow at a first time point, a first actual value of bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point;
[0108] Determining a processing strategy for the target original predicted value according to the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value;
[0109] When the processing strategy is to adjust the target original predicted value, the target original predicted value is adjusted according to the difference between the first true value and the first original predicted value to obtain a target prediction result of the bandwidth flow at the target time point;
[0110] When the processing strategy is to abandon adjusting the target original prediction value, the target original prediction value is determined as the target prediction result.
[0111] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The use of only one thick line in the figure does not mean that there is only one bus or only one type of bus. The communication interface is used for communication between the above electronic devices and other devices.
[0112] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0113] As an example, the memory 606 may include, but is not limited to, the acquisition module 502, the first determination module 504, the first adjustment module 506, and the second determination module 508 in the request processing device. Furthermore, the memory 606 may also include, but is not limited to, other module units in the request processing device, which will not be described in detail in this example.
[0114] The above-mentioned processor can be a general-purpose processor, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0115] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0116] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only. The device for implementing the above request processing method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 6 Different configurations shown.
[0117] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0118] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned bandwidth flow prediction method are executed.
[0119] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0120] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0121] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing one or more computer devices (such as personal computers, servers, or network devices) to execute all or part of the steps of the methods described in various embodiments of the present invention.
[0122] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0124] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0125] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0126] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A bandwidth flow prediction method, characterized in that: include: Obtaining a first original predicted value of bandwidth flow at a first time point, a first actual value of bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point; determining a processing strategy for the target original predicted value based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value, and determining that the processing strategy is to adjust the target original predicted value when the absolute value of the difference between the first true value and the first original predicted value is greater than a first threshold; In a case where the processing strategy is to adjust the target original predicted value, adjusting the target original predicted value according to the difference between the first true value and the first original predicted value to obtain a target prediction result of the bandwidth flow at the target time point includes: multiplying the difference by a target weight to obtain a target result; and determining the sum of the target result and the target original predicted value as the target prediction result at the target time point; In a case where the processing strategy is to abandon adjusting the target original predicted value, determining the target original predicted value as the target prediction result; Before multiplying the difference by the target weight to obtain the target result, the method further includes: obtaining an input initial weight and using the initial weight as the target weight; adjusting the target weight when reaching any time point including the first time point and the target time point; and using the adjusted target weight as the target weight to be used at the next time point; When reaching any time point including the first time point and the target time point, adjusting the target weight includes: taking the current end time point as the current time point, taking a time point before the current time point as the second time point, and performing the following operations: taking the difference between the target prediction result of the bandwidth flow at the current time point and the current true value of the bandwidth flow at the current time point as the first difference; taking the difference between the target prediction result of the bandwidth flow at the second time point and the second true value of the bandwidth flow at the second time point as the second difference; when the absolute value of the second difference is less than or equal to the absolute value of the first difference, adjusting the target weight at the current time point, calculating the absolute value difference between the absolute value of the first difference and the absolute value of the second difference; when the absolute value of the absolute value difference is larger, the amplitude of adjusting the target weight is larger.
2. The method according to claim 1, characterized in that The determining of a processing strategy for the target original predicted value according to the first true value and the first original predicted value includes: When the absolute value of the difference is less than or equal to the first threshold, the processing strategy is determined to be to abandon adjusting the target original predicted value.
3. A bandwidth flow prediction device, characterized in that: include: An acquisition module, configured to acquire a first original predicted value of bandwidth flow at a first time point, a first actual value of bandwidth flow at the first time point, and a target original predicted value at a target time point, wherein the first time point is a time point before the target time point; a first determining module, configured to determine a processing strategy for the target original predicted value based on the first true value and the first original predicted value, wherein the processing strategy includes adjusting the target original predicted value and abandoning the adjustment of the target original predicted value, and when an absolute value of a difference between the first true value and the first original predicted value is greater than a first threshold, determining that the processing strategy is to adjust the target original predicted value; A first adjustment module is configured to, when the processing strategy is to adjust the target original predicted value, adjust the target original predicted value according to a difference between the first true value and the first original predicted value to obtain a target prediction result of the bandwidth flow at the target time point, including: multiplying the difference by a target weight to obtain a target result; and determining the sum of the target result and the target original predicted value as the target prediction result at the target time point; a second determining module, configured to determine the target original predicted value as the target prediction result when the processing strategy is to abandon adjusting the target original predicted value; Before multiplying the difference by the target weight to obtain the target result, the method further includes: obtaining an input initial weight and using the initial weight as the target weight; adjusting the target weight when reaching any time point including the first time point and the target time point; and using the adjusted target weight as the target weight to be used at the next time point; When reaching any time point including the first time point and the target time point, adjusting the target weight includes: taking the current end time point as the current time point, taking a time point before the current time point as the second time point, and performing the following operations: taking the difference between the target prediction result of the bandwidth flow at the current time point and the current true value of the bandwidth flow at the current time point as the first difference; taking the difference between the target prediction result of the bandwidth flow at the second time point and the second true value of the bandwidth flow at the second time point as the second difference; when the absolute value of the second difference is less than or equal to the absolute value of the first difference, adjusting the target weight at the current time point, calculating the absolute value difference between the absolute value of the first difference and the absolute value of the second difference; when the absolute value of the absolute value difference is larger, the amplitude of adjusting the target weight is larger.
4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 2 is executed.
5. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 2 through the computer program.
Citation Information
Patent Citations
Traffic prediction method and device
CN109120463A