Traffic prediction method and device, equipment, storage medium and computer program product

Through multi-model fusion and dynamic weighting mechanism, combined with attention mechanism and incremental learning, the adaptability problem of traffic prediction technology in various business scenarios is solved, and high-precision and robust traffic prediction are achieved.

CN120342893APending Publication Date: 2025-07-18ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510757174.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Existing traffic prediction technologies are difficult to adapt to multiple business scenarios, lack universality and adaptability, and have low prediction accuracy and robustness.

Method used

Multi-model fusion and dynamic weighting mechanism are adopted to dynamically correct the traffic prediction results through weight adjustments of time series models, deep learning models and lightweight models, combined with attention mechanisms and incremental learning.

Benefits of technology

It significantly improves the accuracy and adaptability of traffic prediction, can adapt to a variety of business scenarios, and improves prediction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342893A_ABST
    Figure CN120342893A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic prediction method and device, equipment, a storage medium and a computer program product, and relates to the technical field of networks, and the method comprises the steps: obtaining a primary traffic prediction result according to the weight of each model and the traffic prediction result of each model; the weight of the model is dynamically adjusted according to the performance and activeness of the model; obtaining a flow prediction result correction according to the primary flow prediction result and the flow prediction result of each model; and correcting the primary flow prediction result through the flow prediction result correction amount to obtain a final flow prediction result. According to the method, the accuracy and robustness of traffic prediction can be improved, and the method is suitable for various service scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network technologies, and in particular, to a traffic prediction method, apparatus, device, storage medium, and computer program product. Background Art

[0002] In the digital age, network traffic prediction is crucial for the efficient allocation and stable operation of network resources. At the same time, traffic prediction technologies face many challenges. Network traffic data presents multi-dimensional complex characteristics, with various characteristics such as periodicity, seasonality, and suddenness intertwined. A single model can only capture one of these characteristic patterns and is difficult to comprehensively cover multi-dimensional characteristics. At the same time, there are also significant differences in the traffic prediction requirements for different business scenarios. Static models are difficult to dynamically adapt to diverse business needs and cannot fully meet the differentiated prediction requirements of various industries. Currently, most traffic prediction technologies are designed for specific scenarios and data, lacking generality and adaptability, and are difficult to extend to other industries or prediction scenarios with different time spans, and the prediction accuracy and robustness are low.

[0003] Therefore, how to improve the accuracy and robustness of traffic prediction and adapt to multiple business scenarios has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention

[0004] This application provides a traffic prediction method, apparatus, device, storage medium, and computer program product, which can improve the accuracy and robustness of traffic prediction and adapt to multiple business scenarios.

[0005] This application provides a traffic prediction method, including:

[0006] Obtaining a primary traffic prediction result according to the weights of each model and the traffic prediction results of each model; the weights of the model are dynamically adjusted according to the performance and activity of the model;

[0007] Obtaining a traffic prediction result correction amount according to the primary traffic prediction result and the traffic prediction results of each model;

[0008] Correcting the primary traffic prediction result through the traffic prediction result correction amount to obtain the final traffic prediction result.

[0009] This application also provides a traffic prediction apparatus, including:

[0010] A prediction result determination module, configured to obtain a primary traffic prediction result according to the weights of each model and the traffic prediction results of each model; the weights of the model are dynamically adjusted according to the performance and activity of the model;

[0011] A correction amount determination module, configured to obtain a correction amount for the traffic prediction result according to the primary traffic prediction result and the traffic prediction results of each model;

[0012] A prediction result correction module, configured to correct the primary traffic prediction result by the traffic prediction result correction amount to obtain a final traffic prediction result.

[0013] The present application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above traffic prediction methods when executing the computer program.

[0014] The present application also provides a computer-readable storage medium, in which a computer program is stored, and wherein the computer program implements the steps of any of the above traffic prediction methods when executed by a processor.

[0015] The present application also provides a computer program product, including a computer program, and the computer program implements the steps of any of the above traffic prediction methods when executed by a processor.

[0016] The present application adopts multi-model fusion and a dynamic weight mechanism for traffic prediction. In primary fusion, a primary traffic prediction result is obtained according to the weights of each model and the traffic prediction results of each model. In secondary fusion, the primary traffic prediction result is corrected by the traffic prediction result correction amount to obtain a final traffic prediction result, which can significantly improve the prediction accuracy. Dynamically adjusting the weights of the models according to the performance and activity of the models can enhance the adaptability of the models, improve the prediction accuracy and be applicable to a variety of service scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0018] Figure 1 A flowchart of a traffic prediction method provided by an embodiment of the present application;

[0019] Figure 2 An incremental training flowchart provided by an embodiment of the present application;

[0020] Figure 3 A multi-model fusion traffic prediction flowchart provided by an embodiment of the present application;

[0021] Figure 4 A schematic diagram of a traffic prediction device provided by an embodiment of the present application;

[0022] Figure 5 Schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0024] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0025] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0026] An embodiment of the present application provides a traffic prediction method, and the method will be described in detail in combination with the execution process of the traffic prediction method.

[0027] Referring to Figure 1 As shown, the traffic prediction method includes:

[0028] S101: Obtain a primary traffic prediction result according to the weights of each model and the traffic prediction results of each model; the weights of the model are dynamically adjusted according to the performance and activity of the model.

[0029] This embodiment uses a multi-model fusion mechanism for traffic prediction. Multi-model fusion refers to fusing the traffic prediction results of multiple models to obtain the final traffic prediction result. A single model performs traffic prediction based on the extracted traffic features to obtain the traffic prediction result. According to the traffic prediction results of each model and the respective weights of each model, a primary traffic prediction result is obtained to complete the primary fusion.

[0030] The weights of the model are dynamically adjusted according to the performance of the model and the activity of the model. The performance of the model can be the accuracy of the model, such as RMSE (Root Mean Squared Error). The activity of the model can be the number of times the model is called.

[0031] The calculation method of the weights of the models can be shown as follows:

[0032] ;

[0033] represents the weight of model i in the sliding window , and T represents the length of the sliding window; and represent the balance coefficients, which are used to balance the performance of the model and the activity of the model. represents the performance index of model i, represents the performance index of model j, represents the activity of model i, represents the activity of model j, can be expressed as:

[0034] ;

[0035] represents the proportion of the call times of model i in the past fixed time period (normalized). represents the call times of model i in the past fixed time period. Similarly, can be determined.

[0036] Dynamically adjusting the weights of the models according to the performance of the models and the activity of the models can enhance the adaptability of the models and improve the prediction accuracy.

[0037] Among them, the way to obtain the primary traffic prediction result according to the weights of each model and the traffic prediction results of each model can be to perform weighted summation on the traffic prediction results of each model according to the weights of each model to obtain the primary traffic prediction result. As shown in the following formula:

[0038] ;

[0039] represents the primary prediction result, represents the prediction result of model i, represents the weight of model i, and t represents the time point.

[0040] In some embodiments, obtaining the primary traffic prediction result according to the weights of each model and the traffic prediction results of each model includes:

[0041] Obtaining the primary traffic prediction result according to the weights and traffic prediction results of the time series model, the deep learning model, and the lightweight model.

[0042] Based on the principle of complementarity, this embodiment selects three models, namely, a time series model, a deep learning model, and a lightweight model. The time series model can be the Prophet model, which can capture periodicity and trends. The deep learning model can be the TCN (Temporal Convolutional Network) model, which can handle long-range dependencies. The lightweight model can be the XGBoost (eXtreme Gradient Boosting) model, which can handle non-linear feature interactions.

[0043] This embodiment integrates the advantages of the time series model, the deep learning model, and the lightweight model to comprehensively capture traffic characteristics and improve prediction accuracy.

[0044] S102: Obtain a traffic prediction result correction amount based on the primary traffic prediction result and the traffic prediction results of each model.

[0045] In some embodiments, obtaining a traffic prediction result correction amount based on the primary traffic prediction result and the traffic prediction results of each model includes:

[0046] Calculate the error between the primary traffic prediction result and the actual value and construct a residual sequence;

[0047] Map the primary traffic prediction result to a query vector;

[0048] Combine the traffic prediction results of each model to obtain a feature matrix, and map the feature matrix to a key vector and a value vector;

[0049] Obtain attention weights based on the query vector, the key vector, and the value vector;

[0050] Obtain the traffic prediction result correction amount based on the attention weights and the residual sequence.

[0051] After the primary fusion is completed, secondary fusion is performed to improve the accuracy of the traffic prediction result, reduce errors, and enhance the adaptability to complex scenarios. During the secondary fusion process, calculate the error between the primary traffic prediction result and the actual value, and construct a residual sequence, as shown in the following formula:

[0052] ;

[0053] represents the residual sequence, represents the actual value sequence, represents the primary traffic prediction result sequence.

[0054] S103: Map the primary traffic prediction result to a query vector.

[0055] During the secondary fusion process, the primary prediction result is mapped to a query vector as shown in the following formula:

[0056] ;

[0057] represents the query vector, represents the weight matrix of the query vector.

[0058] During the secondary fusion process, the traffic prediction results of individual models are obtained, and the traffic prediction results of each model are combined into a feature matrix as eigenvalues . The feature matrix is mapped to a key vector and a value vector as shown in the following formula:

[0059] ;

[0060] ;

[0061] K and V represent the key vector and the value vector respectively, and represent the weight matrix of the key vector and the weight matrix of the value vector respectively.

[0062] The multi-head attention mechanism is applied to calculate the attention weights as shown in the following formula:

[0063] ;

[0064] represents the attention weights, represents the vector dimension of the key vector.

[0065] Based on the residual sequence and the attention weights, the Transformer-Meta model is used to obtain the traffic prediction result correction amount as shown in the following formula:

[0066] ;

[0067] represents the traffic prediction result correction amount.

[0068] S103: Correct the primary traffic prediction result through the traffic prediction result correction amount to obtain the final traffic prediction result.

[0069] The correction amount can be added to the primary traffic prediction result to obtain the final traffic prediction result, that is:

[0070] .

[0071] In some embodiments, it further includes:

[0072] Determine the cumulative error sum according to the prediction error value of the model;

[0073] Update the model according to the cumulative error sum.

[0074] This embodiment constructs a closed-loop feedback and incremental learning mechanism to monitor the prediction error of the model, determine the cumulative error sum according to the prediction error value of the model, and update the model according to the cumulative error sum, forming a closed loop of prediction-evaluation-update, which can improve the adaptability and flexibility of the model.

[0075] In some embodiments, determining the cumulative error sum according to the prediction error value of the model includes:

[0076] Determine the positive cumulative sum according to the prediction error value;

[0077] Determine the negative cumulative sum according to the prediction error value;

[0078] Determine the cumulative error sum according to the positive cumulative sum and the negative cumulative sum.

[0079] During the prediction process, the cumulative sum algorithm is used to monitor the cumulative change of the prediction error, determine the positive cumulative sum and the negative cumulative sum, and then determine the cumulative error sum according to the positive cumulative sum and the negative cumulative sum. The positive cumulative sum and the negative cumulative sum are shown in the following formulas:

[0080] ;

[0081] ;

[0082] and represent the positive cumulative sum and the negative cumulative sum respectively, represents the prediction error value, is the mean value of the prediction error; k is a reference value for controlling the growth of the cumulative sum to avoid false alarms caused by normal fluctuations, and can usually be set to 0.5 times the standard deviation. and represent the initial values of the cumulative sum, both of which are set to 0.

[0083] In some embodiments, determining the cumulative error sum according to the positive cumulative sum and the negative cumulative sum includes:

[0084] Perform a weighted sum of the positive cumulative sum and the negative cumulative sum to obtain the cumulative error sum.

[0085] Set respective corresponding weights for the positive cumulative sum and the negative cumulative sum, and then perform a weighted sum of the positive cumulative sum and the negative cumulative sum according to the weights to obtain the cumulative error sum.

[0086] The weighted sum of the positive cumulative sum and the negative cumulative sum is calculated to obtain the cumulative error sum, which comprehensively considers the importance of the positive cumulative sum and the negative cumulative sum, and the obtained cumulative error sum is more accurate.

[0087] In some embodiments, updating the model according to the cumulative error sum includes:

[0088] If the cumulative error sum is greater than zero and less than the first decision threshold, adjust the target parameters of the model;

[0089] If the cumulative error sum is greater than or equal to the first decision threshold and less than the second decision threshold, perform feature recombination;

[0090] If the cumulative error sum is greater than or equal to the second decision threshold, retrain the model.

[0091] The first decision threshold is represented by and the cumulative error sum is represented by The first decision threshold is determined according to the specific application scenario and the experience of historical data, and the first decision threshold determines the sensitivity of triggering model update. The second decision threshold can be a multiple of the first decision threshold. For example, the second decision threshold is twice the first decision threshold. If , it is considered that the prediction error is small. At this time, in order to further improve the prediction accuracy without destroying the original structure of the model, some parameters of the model are fine-tuned. If , that is, it is considered that the prediction error is a medium error. At this time, feature recombination is performed. If , it is considered that the prediction error is large. At this time, the entire model is retrained.

[0092] Refer to Figure 2 the incremental training flow chart shown. During the real-time prediction process, monitor the prediction error. If the prediction error is abnormal, trigger an update. The update methods include parameter fine-tuning, feature recombination, and full-scale update. If , the update method selects parameter fine-tuning. If , the update method selects feature recombination. If , the update method selects full-scale update, and the entire model is retrained. After the update is completed, model verification is performed. If the verification passes, update the model and output the result. If the verification fails, perform full-scale update.

[0093] In some embodiments, it further includes:

[0094] Collect traffic data, perform data cleaning on the traffic data, and perform normalization processing on the traffic data after data cleaning;

[0095] Extract traffic features based on the normalized traffic data so that the model can obtain a traffic prediction result according to the traffic features.

[0096] This embodiment aims to implement traffic data collection, traffic data processing, and feature extraction. The extracted traffic features are input into a single model for training and prediction to obtain the traffic prediction result of the single model. Then, steps S101 to S106 are executed for model fusion to obtain the final traffic prediction result.

[0097] Among them, based on traffic collection protocols such as SNMP (Simple Network Management Protocol), NetFlow, Sflow (Sampled Flow), collection tools (Wireshark, tcpdump, etc.), and logging systems, etc., traffic data in the network can be comprehensively collected to obtain raw traffic data packets. After the raw traffic data packets are parsed, key traffic data can be extracted, mainly including timestamp, source / destination IP address, source / destination port, number of traffic bytes, and protocol type, etc.

[0098] In some embodiments, data cleaning is performed on the traffic data, and the normalized processing of the traffic data after data cleaning includes:

[0099] Intercept the traffic data within the sliding window;

[0100] Calculate the mean value of the traffic data within the sliding window;

[0101] Calculate the standard deviation of the traffic data within the sliding window;

[0102] According to the mean value, the standard deviation, and the traffic data within the sliding window, calculate the standardized residual of the traffic data within the sliding window;

[0103] Judge whether the absolute value of the standardized residual is greater than a preset threshold;

[0104] If the absolute value of the standardized residual is greater than the preset threshold, the traffic data corresponding to the standardized residual is an outlier;

[0105] Use the mean value to replace the outlier;

[0106] When there are missing values, interpolation is used for data filling;

[0107] According to the maximum value and the minimum value of the traffic data, perform normalized processing on the traffic data after data cleaning.

[0108] In this embodiment, a dynamic sliding window mechanism is adopted to clean the traffic data, which can ensure data quality and availability. The length of the sliding window is set to T, and for each time point t, the data within the sliding window is intercepted. , and the data within each sliding window is regarded as an independent sub-dataset. The standardized residual of the data within the sliding window is calculated as shown in the following formula:

[0109] ;

[0110] represents the standardized residual, is a single data point within the sub-dataset, represents the mean value, represents the standard deviation of the sub-dataset. If the absolute value of the standardized residual of a certain data is greater than a preset threshold, for example , then it is determined that the data is abnormal. For the outlier, the sliding window mean interpolation method is used for replacement, that is , represents the interpolation.

[0111] For the missing value, the sliding window mean interpolation method is used for filling.

[0112] After the data cleaning is completed, in order to analyze different features on the same scale, the min-max normalization method is used to normalize the data as shown in the following formula:

[0113] ;

[0114] Among them, represents the data after normalization processing, represents the original data, and respectively represent the maximum value and the minimum value of the data.

[0115] In some embodiments, it further includes:

[0116] determining the traffic fluctuation coefficient; the traffic fluctuation coefficient is used to quantify the fluctuation of the network traffic time series;

[0117] adjusting the length of the sliding window according to the traffic fluctuation coefficient.

[0118] In order to cope with sudden interference, the length of the sliding window is dynamically adjusted in this embodiment. The length T of the sliding window can be expressed as:

[0119] ;

[0120] and are the preset minimum window length and maximum window length, represents the floor function, represents the traffic fluctuation coefficient, which is used to quantify the fluctuation of the network traffic time series.

[0121] Dynamically adjusting the length of the sliding window according to the traffic fluctuation coefficient can adapt to different traffic fluctuation situations and improve the robustness and accuracy of data preprocessing.

[0122] In some embodiments, determining the traffic fluctuation coefficient includes:

[0123] Calculating the standard deviation of the traffic data within the sliding window;

[0124] Calculating the mean value of the traffic data within the sliding window;

[0125] Determining the traffic fluctuation coefficient according to the standard deviation of the traffic data within the sliding window and the mean value of the traffic data within the sliding window.

[0126] The calculation method of the traffic fluctuation coefficient can be as follows:

[0127] ;

[0128] represents the standard deviation of the traffic data within the sliding window, represents the mean value of the traffic data within the sliding window. If , it is considered that the traffic within the sliding window is stable. If , it is considered that the traffic within the sliding window fluctuates violently and the length of the sliding window needs to be recalculated, represents the threshold value.

[0129] In some embodiments, extracting traffic features from the normalized traffic data includes:

[0130] Extracting time series features, inter-node traffic correlation features, user behavior features, and network event features from the normalized traffic data.

[0131] In this embodiment, the traffic features are extracted by comprehensively considering the internal features and external features related to traffic to comprehensively capture various factors affecting traffic.

[0132] The internal features mainly include:

[0133] Time series features: Extracting the traffic data within a specific past sliding window (such as the traffic data for 1 hour, 1 day, 1 week), capturing the short-term fluctuations and long-term trends of traffic; Extracting information such as hours, days, weeks, etc. from the timestamps to capture periodic change patterns; Using methods such as moving average or difference to extract and quantify the seasonal trends of traffic, comprehensively capturing the variation laws of traffic data in the time dimension.

[0134] Flow correlation between nodes: Calculate the flow correlation between different nodes in the network using the Pearson correlation coefficient.

[0135] The external features mainly include:

[0136] User behavior patterns: Extract features based on the user's historical behavior patterns, such as the user's active time period, the number of active hours per day, etc., to reflect the user's demand patterns and usage habits for network resources.

[0137] Network events: Record events in the network, such as maintenance, attacks, etc., which may affect the characteristics of traffic data.

[0138] After completing the extraction of traffic features, construct a multi-factor traffic feature matrix:

[0139] ;

[0140] Among them, , , , are the time series feature matrix, the flow correlation feature matrix between nodes, the user behavior feature matrix, and the network event feature matrix respectively, which together constitute the multi-factor traffic feature matrix.

[0141] Combined with Figure 3 shown, as a specific implementation, the traffic prediction based on multi-model fusion includes:

[0142] Collect traffic data and process the traffic data (including data cleaning and normalization). After data processing, comprehensively consider various factors affecting traffic, extract internal features and external features, and combine them into a feature matrix. The internal features include time series features and flow correlation between nodes. The external features include user behavior patterns and network events.

[0143] After completing feature extraction, input the feature matrix into a single model for training and prediction to obtain the traffic prediction results of the single model. Use a primary fusion mechanism based on dynamic weights for fusion prediction to obtain the primary traffic prediction results. Calculate the error between the primary traffic prediction results and the actual values, and construct a residual sequence. Map the primary prediction results to query vectors, and combine the prediction results of the single model into a feature matrix. After mapping the feature matrix to key vectors and value vectors, apply the multi-head attention mechanism to calculate the attention weights. After completing the attention calculation, use the Transformer-Meta model to model the residual sequence and output the traffic prediction result correction amount. Add the traffic prediction correction amount to the primary traffic prediction results to obtain the final traffic prediction results.

[0144] Construct a "prediction - evaluation - update" closed - loop to monitor the prediction error of the model in real - time, and use the CUSUM (Cumulative Sum) algorithm to calculate the cumulative sum of the errors. When the cumulative sum exceeds the threshold, a feedback signal is generated to trigger model update.

[0145] In summary, this application adopts multi - model fusion and dynamic weight mechanism for traffic prediction. In the primary fusion, according to the weights of each model and the traffic prediction results of each model, the primary traffic prediction result is obtained. In the secondary fusion, the primary traffic prediction result is corrected by the traffic prediction result correction amount to obtain the final traffic prediction result, which can significantly improve the prediction accuracy. Dynamically adjusting the weights of the models according to the performance and activity of the models can enhance the adaptability of the models, improve the prediction accuracy and be applicable to various business scenarios.

[0146] Through the description of the above - mentioned implementation manners, those skilled in the art can clearly understand that the method according to the above - mentioned embodiments can be implemented by means of software plus a necessary general - purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.

[0147] The embodiment of this application also provides a traffic prediction device. Refer to Figure 4 As shown, the traffic prediction device includes:

[0148] A prediction result determination module 10, configured to obtain a primary traffic prediction result according to the weights of each model and the traffic prediction results of each model; the weights of the models are dynamically adjusted according to the performance and activity of the models;

[0149] A correction amount determination module 20, configured to obtain a traffic prediction result correction amount according to the primary traffic prediction result and the traffic prediction results of each model;

[0150] A prediction result correction module 30, configured to correct the primary traffic prediction result by the traffic prediction result correction amount to obtain the final traffic prediction result.

[0151] Based on the above - mentioned embodiments, as a specific implementation manner, the correction amount determination module 20 includes:

[0152] A residual sequence construction unit, configured to calculate the error between the primary traffic prediction result and the actual value and construct a residual sequence;

[0153] A first mapping unit, configured to map the primary traffic prediction result into a query vector;

[0154] A second mapping unit, configured to combine the traffic prediction results of each model to obtain a feature matrix, and map the feature matrix into a key vector and a value vector;

[0155] An attention weight determination unit, configured to obtain an attention weight according to the query vector, the key vector, and the value vector;

[0156] A correction amount determination unit, configured to obtain a correction amount of the traffic prediction result according to the attention weight and the residual sequence.

[0157] Based on the above embodiments, as a specific implementation manner, the primary fusion module is configured to:

[0158] Obtain a primary traffic prediction result according to the weights of the time series model, the deep learning model, and the lightweight model and the traffic prediction result.

[0159] Based on the above embodiments, as a specific implementation manner, further included is:

[0160] An error accumulation module, configured to determine an error accumulation sum according to the prediction error value of the model;

[0161] A model update module, configured to update the model according to the error accumulation sum.

[0162] Based on the above embodiments, as a specific implementation manner, the error accumulation module includes:

[0163] A positive accumulation unit, configured to determine a positive accumulation sum according to the prediction error value;

[0164] A negative accumulation unit, configured to determine a negative accumulation sum according to the prediction error value;

[0165] An integration unit, configured to determine the error accumulation sum according to the positive accumulation sum and the negative accumulation sum.

[0166] Based on the above embodiments, as a specific implementation manner, the model update module includes:

[0167] A parameter adjustment unit, configured to adjust the target parameters of the model if the error accumulation sum is greater than zero and less than a first decision threshold;

[0168] A feature recombination unit, configured to perform feature recombination if the error accumulation sum is greater than or equal to the first decision threshold and less than a second decision threshold;

[0169] A model training unit, configured to retrain the model if the error accumulation sum is greater than or equal to the second decision threshold.

[0170] Based on the above embodiments, as a specific implementation manner, further included is:

[0171] A data acquisition and processing module, which is used to acquire traffic data, perform data cleaning on the traffic data, and perform normalization processing on the traffic data after data cleaning;

[0172] A feature extraction module, which is used to extract traffic features according to the traffic data after normalization processing, so that the model can obtain traffic prediction results according to the traffic features.

[0173] On the basis of the above embodiments, as a specific implementation manner, the data acquisition and processing module is used for:

[0174] Intercept the traffic data within the sliding window;

[0175] Calculate the mean value of the traffic data within the sliding window;

[0176] Calculate the standard deviation of the traffic data within the sliding window;

[0177] According to the mean value, the standard deviation and the traffic data within the sliding window, calculate the standardized residual of the traffic data within the sliding window;

[0178] Judge whether the absolute value of the standardized residual is greater than a preset threshold;

[0179] If the absolute value of the standardized residual is greater than the preset threshold, the traffic data corresponding to the standardized residual is an outlier;

[0180] Use the mean value to replace the outlier;

[0181] When there are missing values, use interpolation to fill the data;

[0182] According to the maximum value and the minimum value of the traffic data, perform normalization processing on the traffic data after data cleaning.

[0183] On the basis of the above embodiments, as a specific implementation manner, it further includes:

[0184] A fluctuation coefficient determination module, which is used to determine the traffic fluctuation coefficient; the traffic fluctuation coefficient is used to quantify the fluctuation of the network traffic time series;

[0185] A sliding window adjustment module, which is used to adjust the length of the sliding window according to the traffic fluctuation coefficient.

[0186] On the basis of the above embodiments, as a specific implementation manner, the fluctuation coefficient adjustment module includes:

[0187] A standard deviation calculation unit, which is used to calculate the standard deviation of the traffic data within the sliding window;

[0188] A mean value calculation unit, which is used to calculate the mean value of the traffic data within the sliding window;

[0189] A fluctuation coefficient determination unit, configured to determine the traffic fluctuation coefficient according to the standard deviation of the traffic data within the sliding window and the mean value of the traffic data within the sliding window.

[0190] Based on the above embodiments, as a specific implementation manner, the feature extraction module is configured to:

[0191] Extract time series features, inter-node traffic correlation features, user behavior features, and network event features according to the normalized traffic data.

[0192] For the description of the features in the corresponding embodiments of the traffic prediction device, reference can be made to the relevant descriptions in the corresponding embodiments of the traffic prediction method, which will not be elaborated here one by one.

[0193] An embodiment of the present application further provides an electronic device. Referring to Figure 5 as shown, the electronic device includes a memory 1 and a processor 2. A computer program is stored in the memory 1, and the processor 2 is configured to run the computer program to execute the steps in any of the above embodiments of the traffic prediction method.

[0194] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the traffic prediction method when running.

[0195] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs and other various media that can store computer programs.

[0196] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the traffic prediction method are implemented.

[0197] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the traffic prediction method are implemented.

[0198] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0199] The above has introduced in detail a traffic prediction method, device, equipment, storage medium, and computer program product provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A traffic prediction method, characterized in that, Including: Obtain a primary traffic prediction result based on the weights of each model and the traffic prediction results of each model; the weight of the model is dynamically adjusted according to the performance and activity of the model; Obtain a traffic prediction result correction amount according to the primary traffic prediction result and the traffic prediction results of each model; Correct the primary traffic prediction result through the traffic prediction result correction amount to obtain the final traffic prediction result.

2. The flow prediction method according to claim 1, wherein Obtaining a traffic prediction result correction amount according to the primary traffic prediction result and the traffic prediction results of each model includes: Calculate the error between the primary traffic prediction result and the actual value and construct a residual sequence; Map the primary traffic prediction result to a query vector; Combine the traffic prediction results of each model to obtain a feature matrix, and map the feature matrix to a key vector and a value vector; Obtain attention weights according to the query vector, the key vector and the value vector; Obtain the traffic prediction result correction amount according to the attention weights and the residual sequence.

3. The traffic prediction method according to claim 1, wherein Obtaining a primary traffic prediction result based on the weights of each model and the traffic prediction results of each model includes: Obtain a primary traffic prediction result according to the weights and traffic prediction results of the time series model, the deep learning model and the lightweight model.

4. The flow prediction method according to claim 1, wherein It also includes: Determine the error cumulative sum according to the prediction error value of the model; Update the model according to the error cumulative sum.

5. The flow prediction method according to claim 4, wherein Determining the error cumulative sum according to the prediction error value of the model includes: Determine the positive cumulative sum according to the prediction error value; Determine the negative cumulative sum according to the prediction error value; Determine the error cumulative sum according to the positive cumulative sum and the negative cumulative sum.

6. The flow prediction method according to claim 4, characterized in that Updating the model according to the error cumulative sum includes: If the error cumulative sum is greater than zero and less than the first decision threshold, adjust the target parameters of the model; If the error cumulative sum is greater than or equal to the first decision threshold and less than the second decision threshold, perform feature recombination; If the error cumulative sum is greater than or equal to the second decision threshold, retrain the model.

7. The flow prediction method according to claim 1, wherein It also includes: Collect traffic data, perform data cleaning on the traffic data, and perform normalization processing on the traffic data after data cleaning; Extract traffic features according to the traffic data after normalization processing, so that the model can obtain traffic prediction results according to the traffic features.

8. The flow prediction method according to claim 7, wherein Performing data cleaning on the traffic data and performing normalization processing on the traffic data after data cleaning includes: Intercept the traffic data within the sliding window; Calculate the mean value of the traffic data within the sliding window; Calculate the standard deviation of the traffic data within the sliding window; Calculate the standardized residual of the traffic data within the sliding window according to the mean value, the standard deviation and the traffic data within the sliding window; Judge whether the absolute value of the standardized residual is greater than a preset threshold; If the absolute value of the standardized residual is greater than the preset threshold, the traffic data corresponding to the standardized residual is an outlier; Replace the outlier with the mean value; When there are missing values, use interpolation to fill in the data; Perform normalization processing on the traffic data after data cleaning according to the maximum value and the minimum value of the traffic data.

9. The flow prediction method according to claim 8, characterized in that, It also includes: Determine the traffic fluctuation coefficient; the traffic fluctuation coefficient is used to quantify the fluctuation of the network traffic time series; Adjust the length of the sliding window according to the traffic fluctuation coefficient.

10. The flow prediction method according to claim 9, characterized in that, Determining the traffic fluctuation coefficient includes: Calculate the standard deviation of the traffic data within the sliding window; Calculate the mean value of the traffic data within the sliding window; Determine the traffic fluctuation coefficient according to the standard deviation of the traffic data within the sliding window and the mean value of the traffic data within the sliding window.

11. The flow prediction method according to claim 7, wherein Extracting traffic features from the normalized traffic data includes: Extract time series features, inter-node traffic correlation features, user behavior features, and network event features from the normalized traffic data.

12. A flow prediction device, characterized in that, Includes: A prediction result determination module, configured to obtain a primary traffic prediction result according to the weights of each model and the traffic prediction results of each model; the weights of the model are dynamically adjusted according to the performance and activity of the model; A correction amount determination module, configured to obtain a traffic prediction result correction amount according to the primary traffic prediction result and the traffic prediction results of each model; A prediction result correction module, configured to correct the primary traffic prediction result through the traffic prediction result correction amount to obtain the final traffic prediction result.

13. An electronic device, characterized in that, Includes: A memory for storing computer programs; A processor, configured to implement the steps of the traffic prediction method according to any one of claims 1 to 11 when executing the computer program.

14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the traffic prediction method according to any one of claims 1 to 11 when executed by a processor.

15. A computer program product, comprising a computer program, characterized in that, The computer program implements the steps of the traffic prediction method according to any one of claims 1 to 11 when executed by a processor.

Citation Information

Cited By

  • Service area flow intelligent transmission monitoring method based on big data analysis

    CN120750811A