Traffic prediction method and device, equipment, storage medium and program product
Through linear regression modeling historical data and introducing a dynamic parameter update mechanism, the accuracy problem of traditional traffic prediction methods in complex network environments is solved, and more efficient and robust traffic prediction is achieved.
Patent Information
- Application Number
- CN202510265917.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-10
AI Technical Summary
Traditional traffic prediction methods are difficult to accurately predict network traffic when facing complex and dynamic network environments, especially in non-stationary and burst traffic scenarios.
Through linear regression, a dynamic parameter update mechanism is introduced to adjust the coefficients of the regression model in real time to quickly respond to changes in network traffic patterns.
Improves the accuracy and robustness of traffic prediction, can adapt to complex and dynamic network environments, and ensures that the model can provide reliable prediction results when facing burst traffic.
Smart Images

Figure CN120128491A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of traffic prediction, and in particular, to a traffic prediction method, device, equipment, storage medium, and program product. Background Art
[0002] With the rapid development of cloud computing and big data technologies, the network traffic characteristics of modern data centers have become more complex and diverse, with significant dynamics, non-stationarity, and burstiness. In this context, accurate traffic prediction is crucial for optimizing resource allocation, ensuring service quality, and improving system availability. However, due to the uncertainty of traffic patterns, traditional traffic prediction methods still face many challenges in the face of complex network environments. Summary of the Invention
[0003] This application provides a traffic prediction method, device, equipment, storage medium, and program product to establish the relationship between historical data and future traffic through linear regression modeling, and introduce a dynamic parameter update mechanism to adjust the coefficients of the regression model in real time, ensuring that the model can quickly respond to changes in network traffic patterns.
[0004] The technical solution of this application is as follows: To achieve the above object, this application adopts the following technical solution:
[0005] In a first aspect, an embodiment of this application provides a traffic prediction method, and the method includes:
[0006] Determine a coefficient set according to the actual traffic in multiple first time periods within a first time window and the actual traffic at the first time points corresponding to each of the first time periods; the coefficient set represents the correlation coefficients between the actual traffic at each time point within the first time period and the actual traffic at the first time point; wherein, the first time point is the adjacent time point after the first time period;
[0007] Predict the traffic at a second time point based on the correlation coefficients and the actual traffic in a second time period; the second time point is the adjacent time point after the second time period.
[0008] The technical solution provided by the embodiment of this application at least brings the following beneficial effects:
[0009] Establish the relationship between historical data and future traffic through linear regression modeling, and introduce a dynamic parameter update mechanism to adjust the coefficients of the regression model in real time, ensuring that the model can quickly respond to changes in network traffic patterns.
[0010] Combined with the above first aspect, as a possible implementation, the method further includes:
[0011] Obtain the flow errors at each time point within the second time window; the flow error represents the deviation between the actual flow and the predicted flow;
[0012] Calculate the average flow error at each time point within the second time window;
[0013] Based on the flow errors at each time point within the second time window and the average flow error, calculate the flow standard deviation corresponding to the second time window;
[0014] Perform an upper limit estimation on the predicted flow at the second time point according to the average flow error and the flow standard deviation to obtain the predicted upper limit value of the flow at the second time point.
[0015] Combined with the above first aspect, as a possible implementation manner, the calculating the average flow error at each time point within the second time window includes:
[0016] Perform a weighted operation on the flow errors at each time point within the second time window; wherein, the weighted weight of each time point is negatively correlated with the time interval between this time point and the second time point.
[0017] Combined with the above first aspect, as a possible implementation manner, the calculating the flow standard deviation corresponding to the second time window based on the flow errors at each time point within the second time window and the average flow error includes:
[0018] Determine the error deviation corresponding to each time point within the second time window; the error deviation represents the square of the difference between the flow error at this time point and the average flow error;
[0019] Perform a weighted operation on the error deviations corresponding to each time point within the second time window to obtain the flow variance corresponding to the second time window;
[0020] Calculate the flow standard deviation based on the flow variance.
[0021] Combined with the above first aspect, as a possible implementation manner, the performing an upper limit estimation on the predicted flow at the second time point according to the average flow error and the flow standard deviation to obtain the predicted upper limit value of the flow at the second time point includes:
[0022] Calculate the predicted upper limit value of the flow at the second time point based on the following formula:
[0023]
[0024] wherein, B(T + 1) represents the predicted upper limit value of the flow, represents the predicted flow at the second time point; represents the average flow error; σ(T) represents the flow standard deviation.
[0025] Combined with the first aspect above, as a possible implementation, determining the coefficient set according to the actual flows in multiple first time periods within the first time window and the actual flows at the first time points corresponding to each of the first time periods includes:
[0026] Establish a linear regression model according to the actual flows in multiple first time periods within the first time window and the actual flows at the first time points corresponding to each of the first time periods;
[0027] Solve the linear regression model by using the least squares method to minimize the sum of squared errors, and obtain the coefficient set.
[0028] In the second aspect of the embodiments of the present application, a flow prediction device is provided, and the device includes:
[0029] A first determination module, configured to determine a coefficient set according to the actual flows in multiple first time periods within the first time window and the actual flows at the first time points corresponding to each of the first time periods; the coefficient set represents the correlation coefficients between the actual flows at each time point within the first time period and the actual flow at the first time point; wherein, the first time point is the adjacent time point after the first time period;
[0030] A prediction module, configured to predict the flow at a second time point based on the correlation coefficient and the actual flow in a second time period; the second time point is the adjacent time point after the second time period.
[0031] In the third aspect of the embodiments of the present application, an electronic device is provided, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the instructions to implement the method according to the first aspect and any one of its possible implementation manners above.
[0032] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, and when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the method according to the first aspect and any one of its possible implementation manners above.
[0033] According to the fifth aspect provided by the present application, a computer program product is provided, and the computer program product includes computer instructions, and when the computer instructions run on the electronic device, the electronic device executes the method according to the first aspect and any one of its possible implementation manners above.
[0034] It should be noted that the technical effects brought by any one of the implementation manners in the second aspect to the fifth aspect can refer to the technical effects brought by the corresponding implementation manners in the first aspect, and will not be elaborated here. Description of the Drawings
[0035] Figure 1 It is a schematic flowchart of a traffic prediction method provided by an embodiment of the present application;
[0036] Figure 2 It is another schematic flowchart of a traffic prediction method provided by an embodiment of the present application;
[0037] Figure 3 It is a schematic structural diagram of a traffic prediction device provided by an embodiment of the present application;
[0038] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0039] The network switching method, device and storage medium of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0040] The term "and / or" in this document is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations.
[0041] The terms "first" and "second" in the description of the present application and the accompanying drawings are used to distinguish different objects or different processes for the same object, rather than to describe the specific order of the objects.
[0042] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include other steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products or devices.
[0043] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0044] In the description of the present application, unless otherwise specified, the meaning of "a plurality" refers to two or more.
[0045] As introduced in the background art section, due to the uncertainty of traffic patterns, traditional traffic prediction methods still face many challenges in the face of complex network environments.
[0046] Currently, in the related art, the following two methods are mainly used for traffic prediction:
[0047] 1. Traditional methods based on time series. For example, the prediction method based on the Autoregressive Integrated Moving Average Model (ARIMA). This method is a classic statistical modeling technique used to analyze and predict numerical data with time correlation. The ARIMA model decomposes time series data into components such as trends, periodicity, and random fluctuations by combining autoregression, differencing integration, and moving average. Specifically, the autoregressive part predicts future values through a linear combination of historical data; the differencing integration part transforms a non-stationary sequence into a stationary sequence by differencing; the moving average part improves the prediction accuracy through a linear combination of error terms. In network traffic prediction, ARIMA can capture the periodicity and trend changes of traffic and is an analysis tool suitable for stationary time series.
[0048] 2. Traffic prediction methods based on exponential smoothing. This method is a statistical method widely used in time series prediction, especially suitable for dealing with short-term prediction problems.
[0049] However, traditional methods based on time series rely on the assumption of stationarity of time series and predict future traffic by modeling the trends and periodicity of historical data. However, the non-stationarity of network traffic and frequent burst traffic will lead to a significant decline in model accuracy. In addition, the parameter adjustment of the ARIMA model is relatively complex, unable to adapt to the rapidly changing network environment, and has poor real-time performance.
[0050] Traffic prediction methods based on exponential smoothing, although having the advantages of simple implementation and high computational efficiency in short-term prediction, their disadvantages are more obvious in complex and dynamic network scenarios. First, this method has poor adaptability to non-linear traffic patterns and is difficult to effectively handle complex changes or burst traffic situations; second, exponential smoothing has a slow response to highly dynamic traffic, which may lead to prediction lags. In addition, this method is highly sensitive to parameter settings, and the choice of smoothing factor has a significant impact on the prediction results, but the optimal parameters often need to be tuned through experiments. For long-term prediction, exponential smoothing is prone to error accumulation, unable to accurately reflect long-term trends, and simple exponential smoothing cannot capture the periodic or seasonal characteristics in traffic.
[0051] Aiming at the shortcomings of traditional time - series - based methods and exponential - smoothing - based traffic prediction methods, the purpose of this solution is to make up for the deficiencies of these methods in the face of complex dynamic network environments, thereby improving the accuracy and robustness of traffic prediction.
[0052] On the one hand, traditional time - series methods (such as ARIMA) assume the stationarity of data, making it difficult to cope with non - stationary network traffic patterns, and are relatively complex for parameter adjustment and long - term trend prediction.
[0053] This solution uses the sliding - window technique to flexibly extract short - term traffic features, avoiding over - reliance on data stationarity and being able to adapt to non - stationary and bursty traffic scenarios.
[0054] On the other hand, although exponential - smoothing - based methods perform well in short - term prediction, they have poor adaptability to non - linear patterns, high parameter sensitivity, insufficient response to highly dynamic traffic, and low long - term prediction accuracy. This solution dynamically updates the parameters of the regression model, combines the sensitive capture of traffic change trends by linear regression, and further improves the adaptability to highly dynamic and complex traffic patterns. In addition, this solution also uses the "3 - σ principle" for conservative upper - bound estimation to provide additional guarantees in bursty traffic scenarios, thus effectively solving the deficiencies of existing methods in resource allocation and prediction reliability.
[0055] The following combines the accompanying drawings of the specification to introduce the traffic prediction method provided by the embodiments of the present application in detail.
[0056] Figure 1 FIG. is a schematic flowchart of a traffic prediction method provided by an embodiment of the present application. The method includes the following steps:
[0057] S101: Determine a coefficient set according to the actual traffic in multiple first time periods within a first time window and the actual traffic at the first time points corresponding to each first time period; the coefficient set characterizes the correlation coefficient between the actual traffic at each time point within the first time period and the actual traffic at the first time point; where the first time point is the adjacent time point after the first time period.
[0058] In the embodiments of the present application, the actual traffic in the first time period represents the actual traffic at each time point within the first time period.
[0059] In the embodiments of the present application, the actual traffic at the past k time points is used to predict the traffic value at the adjacent time point k time points later. That is, formula (1) is established to calculate the predicted traffic value.
[0060]
[0061] Among them, d[t] represents the actual traffic at time point t, represents the predicted traffic at time point t + 1, ci It represents the coefficient to be determined, which is used to represent the correlation between the actual flow at past time points and the predicted flow at future time points.
[0062] The interval between adjacent time points can be set according to actual needs, and the embodiments of the present application do not limit this. The number of time points included in the first time window and the number of time points included in the first time period can also be set according to actual needs.
[0063] In the embodiments of the present application, the first time window can be understood as a historical window, that is, each time point in the first time window is a past time point, and the corresponding actual flow is known.
[0064] That is, each time point included in each first time period within the first time window, and the adjacent time point (i.e., the first time point) after the first time period are past time points, and the corresponding actual flow is already known.
[0065] In the embodiments of the present application, the actual flow of the past k time points is used to predict the flow value of the adjacent time point k time points later.
[0066] Since the characteristics of network traffic are dynamic and change frequently, the originally determined coefficients may become invalid over time. Therefore, in the embodiments of the present application, recent measured data is used to continuously update the coefficients to improve the accuracy of prediction.
[0067] In some embodiments of the present application, determining the coefficient set according to the actual flow of multiple first time periods within the first time window and the actual flow of the first time point corresponding to each first time period includes:
[0068] Establish a linear regression model according to the actual flow of multiple first time periods within the first time window and the actual flow of the first time point corresponding to each first time period;
[0069] Use the least squares method to minimize the sum of squared errors to solve the linear regression model and obtain the coefficient set.
[0070] Specifically, in the embodiments of the present application, the flow prediction is modeled as a regression problem, and its regression model is as shown in formula (2):
[0071] Y = αX + ∈ Formula (2)
[0072] Where Y represents the target variable vector, including historical flow data d[t], d[t - 1], …, d[t - r + 1], X is the regression matrix constructed based on the flow data. α represents the coefficient vector to be solved, that is, the coefficient set, which includes correlation coefficients. ∈ represents the error vector.
[0073] In the embodiments of the present application, by minimizing the estimated error vector, the correlation coefficient can be determined using the following formula (3).
[0074] α = (X T X) -1 X T Y Formula (3)
[0075] By minimizing the sum of squared errors using the least squares method, α is solved to capture the variation pattern in historical data.
[0076] S102: Predict the traffic at the second time point based on the correlation coefficient and the actual traffic in the second time period; the second time point is the adjacent time point after the second time period.
[0077] After calculating α, based on the same method as obtaining the actual traffic in the first time period, obtain the actual traffic in the second time period, and then combine the correlation coefficient to predict the traffic at the adjacent time point after the second time.
[0078] It can be seen that by applying the traffic prediction method provided in the embodiments of the present application, according to the actual traffic in multiple first time periods within the first time window and the actual traffic at the first time point corresponding to each of the first time periods, a coefficient set is determined; the coefficient set characterizes the correlation coefficient between the actual traffic at each time point within the first time period and the actual traffic at the first time point; wherein, the first time point is the adjacent time point after the first time period; based on the correlation coefficient and the actual traffic in the second time period, predict the traffic at the second time point; the second time point is the adjacent time point after the second time period. Thus, by linearly regressing to model the relationship between historical data and future traffic and introducing a dynamic parameter update mechanism, the coefficients of the regression model are adjusted in real time to ensure that the model can quickly respond to changes in the network traffic pattern.
[0079] In the embodiments of the present application, considering practical applications, more attention is paid to the upper bound of the predicted traffic rather than the exact value to avoid waste caused by over - allocating resources.
[0080] Specifically, when allocating resources, a conservative prediction of the traffic upper limit can cover possible burst traffic to a large extent, thereby reserving sufficient margin for resource allocation and avoiding problems such as resource shortage and service interruption caused by traffic exceeding the predicted range.
[0081] See Figure 2 , Figure 2 which is another flow schematic diagram of the traffic prediction method provided in the embodiments of the present application. As Figure 2 shown, it includes the following steps:
[0082] S201: Obtain the traffic error at each time point within the second time window; the traffic error represents the deviation between the actual traffic and the predicted traffic.
[0083] In an embodiment of the present application, the second time window can be understood as a historical window, that is, each time point in the first time window is a past time point, and the corresponding actual traffic is known.
[0084] In an embodiment of the present application, the length of the second time window can be set according to requirements. The second time window is an adjacent time window before the second time point. In other words, the next time point of the second time window is the second time point.
[0085] For each time point in the second time window, calculate the traffic error based on the following formula (4):
[0086]
[0087] where d(T) represents the true traffic at time point T, represents the predicted traffic at time point T. It is easy to understand that for a past time point T, traffic prediction can also be performed in a similar manner and its corresponding predicted traffic can be obtained.
[0088] S202: Calculate the average traffic error for each time point within the second time window.
[0089] In an embodiment of the present application, weighted operations are performed on the traffic errors of each time point within the second time window to obtain the average traffic error; among them, the weighted weight of each time point is negatively correlated with the time interval between this time point and the second time point.
[0090] Specifically, in order to make the newer data have a greater impact on the prediction result and make the older data have a smaller impact on the prediction result, exponentially decreasing weights can be assigned to the historical data.
[0091] In an embodiment of the present application, the following formula (5) is used to calculate the average traffic error for each time point within the second time window.
[0092]
[0093] In the solution of the present application, t represents the index of the local or specific current time, emphasizing a single time point; T is the global or statistical time index, emphasizing the time range or the termination point of the analysis window. For example, the second time window includes the time points labeled T - N + 1 and T, that is, the second time window includes N time points.
[0094] Among them, ρ is a weighting parameter, usually set to a value close to 0 to highlight the importance of recent data more. In the calculation formula, weights are assigned to data at different time points in an exponentially decaying manner. The weight decreases rapidly as the time difference T - t increases, making the data closer to time T have a greater impact on the result.
[0095] S203: Calculate the flow standard deviation corresponding to the second time window based on the flow errors at each time point within the second time window and the average flow error.
[0096] In an embodiment of the present application, the flow standard deviation can be calculated based on the following steps.
[0097] Step 11: Determine the error deviation corresponding to each time point within the second time window; the error deviation represents the square of the difference between the flow error at the time point and the average flow error.
[0098] Step 12: Perform a weighted operation on the error deviations corresponding to each time point within the second time window to obtain the flow variance corresponding to the second time window.
[0099] Step 13: Calculate the flow standard deviation based on the flow variance.
[0100] Specifically, the flow variance can be calculated based on the following formula (6):
[0101]
[0102] As shown in the formula, the weighted weights of each time point are negatively correlated with the time interval between this time point and the second time point. Since the weight decreases rapidly as the time difference T - t increases, the data closer to time T has a greater impact on the result.
[0103] Furthermore, the flow standard deviation corresponding to the second time window can be calculated based on the following formula (7):
[0104]
[0105] S204: Perform an upper limit estimation on the predicted flow at the second time point according to the average flow error and the flow standard deviation to obtain the predicted value of the flow upper limit at the second time point.
[0106] In the embodiment of the present application, when allocating resources, the "3 - σ principle" is adopted to conservatively predict the upper bound of the flow. Specifically, considering that under the normal distribution, 99.7% of the data points will fall within the range of the mean plus or minus 3 times the standard deviation. Therefore, by adding 3 times the standard deviation, it is possible to cover possible burst flows to a large extent, thus reserving sufficient margin for resource allocation and avoiding problems of resource shortage and service interruption caused by the flow exceeding the predicted range.
[0107] In one embodiment of the present application, the upper limit prediction of the predicted flow at the second time point is performed according to the average flow error and the flow standard deviation to obtain the predicted value of the flow upper limit at the second time point, which specifically includes: calculating the predicted value of the flow upper limit at the second time point based on the following formula (8):
[0108]
[0109] where B(T + 1) represents the predicted value of the flow upper limit, represents the predicted flow at the second time point; ree(T) represents the average flow error; σ(T) represents the flow standard deviation.
[0110] It can be seen that in the embodiment of the present application, by predicting the upper bound of the flow, sufficient resources are reserved for potential sudden increases in the flow, preventing service interruption caused by sudden traffic, and ensuring that the service requirements are met under various dynamic conditions. This not only optimizes the resource utilization efficiency but also guarantees the service continuity.
[0111] The prediction method provided by the embodiment of the present application is applicable to a prediction framework with a lightweight computing burden, enabling the solution to be quickly deployed in a network environment that requires high real-time performance and high reliability.
[0112] In addition, this solution has good scalability and compatibility, can be seamlessly integrated with existing network traffic management platforms or scheduling systems, and further optimizes the resource utilization rate and service quality. In practice, the sliding window feature extraction and the dynamic update technology of the regression model can directly utilize the existing computing resources, without the need for a large amount of hardware investment, with low deployment costs, and having the advantages of quick verification and online implementation. Therefore, this solution can not only meet the prediction requirements in a complex dynamic traffic environment in practical applications but also provide an efficient and reliable resource allocation strategy, with significant practical value.
[0113] See Figure 3 , which is a schematic structural diagram of a traffic prediction device provided by an embodiment of the present application. The device includes:
[0114] A first determination module 301, configured to determine a coefficient set according to the actual flows in multiple first time periods within a first time window and the actual flows at the first time points corresponding to each of the first time periods; the coefficient set represents the correlation coefficients between the actual flows at each time point within the first time period and the actual flows at the first time points; wherein, the first time point is the adjacent time point after the first time period;
[0115] A prediction module 302, configured to predict the flow at a second time point based on the correlation coefficients and the actual flow in a second time period; the second time point is the adjacent time point after the second time period.
[0116] Thus, by establishing the relationship between historical data and future traffic through linear regression modeling and introducing a dynamic parameter update mechanism, the coefficients of the regression model are adjusted in real time to ensure that the model can quickly respond to changes in the network traffic pattern.
[0117] In a possible implementation, the device further includes:
[0118] A first acquisition module, configured to acquire the traffic error at each time point within a second time window; the traffic error represents the deviation between the actual traffic and the predicted traffic;
[0119] A first calculation module, configured to calculate the average traffic error at each time point within the second time window;
[0120] A second calculation module, configured to calculate the traffic standard deviation corresponding to the second time window based on the traffic error and the average traffic error at each time point within the second time window;
[0121] An upper limit estimation module, configured to perform an upper limit estimation on the predicted traffic at the second time point according to the average traffic error and the traffic standard deviation to obtain the predicted value of the traffic upper limit at the second time point.
[0122] In a possible implementation, the first calculation module is specifically configured to:
[0123] Perform a weighted operation on the traffic errors at each time point within the second time window; wherein, the weighted weight of each time point is negatively correlated with the time interval between this time point and the second time point.
[0124] In a possible implementation, the second calculation module is specifically configured to:
[0125] Determine the error deviation corresponding to each time point within the second time window; the error deviation characterizes the square of the difference between the traffic error at this time point and the average traffic error;
[0126] Perform a weighted operation on the error deviations corresponding to each time point within the second time window to obtain the traffic variance corresponding to the second time window;
[0127] Calculate the traffic standard deviation based on the traffic variance.
[0128] In a possible implementation, the upper limit estimation module is specifically configured to:
[0129] Calculate the predicted value of the traffic upper limit at the second time point based on the following formula:
[0130]
[0131] Among them, B(T + 1) represents the predicted value of the traffic upper limit, represents the predicted traffic at the second time point; ree(T) represents the average traffic error; σ(T) represents the traffic standard deviation.
[0132] In a possible implementation manner, the first determination module is specifically configured to:
[0133] Establish a linear regression model according to the actual traffic in multiple first time periods within the first time window and the actual traffic at the first time point corresponding to each of the first time periods;
[0134] Solve the linear regression model by using the least squares method to minimize the sum of squared errors, and obtain the coefficient set.
[0135] When the functions of the above integrated modules are implemented in the form of hardware, an embodiment of the present application provides a possible structural schematic diagram of the electronic device involved in the above embodiment. As Figure 4 shown, the electronic device 400 includes: a processor 402, a communication interface 403, and a bus 404. Optionally, the electronic device 400 may further include a memory 401.
[0136] Among them, the processor 402 is a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 402 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0137] The bus 404 is used to transmit information between the components included in the electronic device 400.
[0138] The communication interface 403 is used to communicate with other devices or other communication networks. The other communication network may be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 403 may be a module, a circuit, a communication interface, or any device capable of implementing communication.
[0139] The memory 401 is used to store instructions. Among them, the instructions may be computer programs.
[0140] Among them, the memory 401 can be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions. It can also be a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions. It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, without limitation.
[0141] It should be noted that the memory 401 can exist independently of the processor 402 or be integrated with the processor 402. The memory 401 can be used to store instructions, program codes, or some data, etc. The memory 401 can be located inside the electronic device 400 or outside the electronic device 400, without limitation. The processor 402 is configured to execute the instructions stored in the memory 401 to implement the traffic prediction method provided in the following embodiments of the present application.
[0142] The present application also provides a computer-readable storage medium with instructions stored thereon. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the traffic prediction method provided in the above embodiments of the present disclosure.
[0143] The embodiments of the present application also provide a computer program product containing instructions. When it runs on the electronic device, the electronic device is caused to execute the traffic prediction method provided in the above embodiments of the present disclosure.
[0144] Among them, a computer-readable storage medium may be, for example, but not limited to, a system, device, or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer-readable storage medium well known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may be located in an application specific integrated circuit (ASIC). In the embodiments of the present application, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in conjunction with an instruction execution system, device, or component.
[0145] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A flow prediction method, characterized in that: The method comprises: Determine a coefficient set according to actual flow rates of multiple first time periods in a first time window and actual flow rates at first time points corresponding to each of the first time periods; the coefficient set represents a correlation coefficient between the actual flow rates at each of the time points in the first time period and the actual flow rates at the first time point; wherein the first time point is an adjacent time point after the first time period; Based on the correlation coefficient and the actual flow rate in the second time period, the flow rate at a second time point is predicted; the second time point is an adjacent time point after the second time period.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining the flow error at each time point in the second time window; the flow error represents the deviation between the actual flow and the predicted flow; Calculating the average flow error at each time point in the second time window; Calculate the flow standard deviation corresponding to the second time window based on the flow errors at each time point in the second time window and the average flow error; An upper limit estimate of the predicted flow at the second time point is performed according to the average flow error and the flow standard deviation to obtain an upper limit predicted value of the flow at the second time point.
3. The method according to claim 2, characterized in that The calculating the average flow error at each time point in the second time window includes: A weighted operation is performed on the flow error at each time point in the second time window; wherein the weight of each time point is negatively correlated with the time interval between the time point and the second time point.
4. The method according to claim 2 or 3, characterized in that: The calculating the flow standard deviation corresponding to the second time window based on the flow errors at each time point in the second time window and the average flow error includes: Determine the error deviation corresponding to each time point in the second time window; the error deviation represents the square of the difference between the flow error at the time point and the average flow error; Performing a weighted operation on the error deviations corresponding to each time point in the second time window to obtain a flow variance corresponding to the second time window; The flow rate standard deviation is calculated based on the flow rate variance.
5. The method according to any one of claims 2 to 4, characterized in that: The step of estimating an upper limit of the predicted flow at the second time point according to the average flow error and the flow standard deviation to obtain an upper limit predicted value of the flow at the second time point includes: The predicted value of the upper limit of the flow rate at the second time point is calculated based on the following formula: Wherein, B(T+1) represents the predicted value of the upper limit of the flow rate, represents the predicted flow at the second time point; ree(T) represents the average flow error; σ(T) represents the flow standard deviation.
6. The method according to claim 1, characterized in that The step of determining a coefficient set according to actual flow rates of a plurality of first time periods in a first time window and actual flow rates at first time points corresponding to each of the first time periods comprises: Establishing a linear regression model according to actual flow rates of a plurality of first time periods within a first time window and actual flow rates at first time points corresponding to each of the first time periods; The linear regression model is solved by minimizing the sum of squared errors using the least squares method to obtain the coefficient set.
7. A flow prediction device, characterized in that: The device comprises: A first determination module is used to determine a coefficient set according to actual flow rates of multiple first time periods in a first time window and actual flow rates at first time points corresponding to each of the first time periods; the coefficient set represents a correlation coefficient between the actual flow rates at each of the time points in the first time period and the actual flow rates at the first time point; wherein the first time point is an adjacent time point after the first time period; A prediction module is used to predict the flow at a second time point based on the correlation coefficient and the actual flow in the second time period; the second time point is an adjacent time point after the second time period.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable a computer device to implement a method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is run on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 6.