Network traffic prediction method and device, and storage medium
By using the LSTM and GRU hybrid model to extract and predict network traffic data, the problem of nonlinear features and increasing uncertainty in the prior art is solved, and high-precision and efficient network traffic prediction are achieved.
Patent Information
- Application Number
- CN202310850299.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2043-07-12
AI Technical Summary
In the existing network traffic prediction methods, nonlinear feature relationships cannot be extracted based on statistical models, and empirical model analysis methods increase uncertainty for components with large amplitude changes. Based on machine learning models, a single model cannot obtain high accuracy. prediction results.
A hybrid model consisting of a long and short-term memory network model (LSTM) and a gated recurrent network model (GRU) is used to extract the traffic data feature, and the prediction accuracy of network traffic data is improved through clustering and prediction results.
It effectively improves the prediction accuracy and time efficiency of network traffic data, reduces the convergence time complexity of the model, and improves the prediction accuracy and stability.
Smart Images

Figure CN119316304A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular to a network traffic prediction method and device, and a storage medium. Background Art
[0002] As the business scale of telecom operators continues to grow, the amount of traffic on their networks is growing exponentially. Irrational allocation of network traffic resources may cause the entire network to paralyze. Predicting future network traffic trends and making reasonable network resource plans in advance can minimize network congestion. Therefore, how to efficiently allocate network resources is crucial.
[0003] At present, traffic scheduling methods are mainly based on the following three methods: based on statistical models, based on empirical pattern analysis, and based on machine learning models. The method based on statistical models uses the difference method to smooth the traffic data and then capture the characteristics of network traffic. The smoothed model is fitted through a statistical model. The method based on empirical pattern analysis decomposes the traffic data into countless IMF (Intrinsic Mode Function) components and residual components, and then predicts them separately. The method based on machine learning models uses the learning ability of machine learning models to seek the optimal solution. Summary of the invention
[0004] The inventors note that in the above-mentioned related technologies, the methods based on statistical models require that the data have stationary characteristics, and the models cannot extract nonlinear characteristic relationships. The methods based on empirical mode analysis will increase uncertainty for components with large amplitude changes. The methods based on machine learning models usually use a single model, and a single model cannot obtain high-precision network traffic data prediction results.
[0005] Based on this, the present disclosure provides a network traffic prediction solution, which can extract features of traffic data from different dimensions by utilizing a hybrid model composed of a long short-term memory network model (Long Short Term Memory, abbreviated as: LSTM) and a gated recurrent network model (Gated Recurrent Unit, abbreviated as: GRU), thereby effectively improving the prediction results of network traffic data.
[0006] In a first aspect of the present disclosure, a network traffic prediction method is provided, which is performed by a network traffic prediction device, and the method includes: clustering data objects in a traffic data set to obtain a working day data set and a non-working day data set; predicting the working day data set using a long short-term memory network model to obtain a first prediction result; determining a residual value using the first prediction result and historical data; adding the residual value to the working day data set to obtain an updated data set; predicting the updated data set using a gated recurrent network model to obtain a second prediction result; and obtaining a network traffic prediction result based on the first prediction result and the second prediction result.
[0007] In some embodiments, obtaining a network traffic prediction result based on the first prediction result and the second prediction result includes: fusing the first prediction result and the second prediction result to obtain the network traffic prediction result.
[0008] In some embodiments, clustering a traffic data set includes: determining the number of clusters K; calculating the density value of each data object in the traffic data set; selecting K data objects in order of the density values from large to small as K initial cluster centers; and clustering the data objects in the traffic data set according to the K initial cluster centers.
[0009] In some embodiments, the density value of the i-th data object in the traffic data set is determined by the distance between the i-th data object and the j-th data object in the traffic data set, 1≤j≤N and j≠i, N is the total number of data objects in the traffic data set.
[0010] In some embodiments, the density value p of the i-th data object i for
[0011]
[0012] where dist(x i , x j ) is the i-th data object x i With the jth data object x j The distance between c is the preset cutoff distance.
[0013] In some embodiments, determining the number of clusters K includes: setting a cluster number set, wherein the cluster number set includes a plurality of initial cluster numbers; clustering the traffic data set using each initial cluster number in the cluster number set in order of the initial cluster numbers from small to large to obtain a plurality of clustering results; calculating the Davidson-Borg index of each clustering result in the plurality of clustering results; if the Davidson-Borg index of the mth clustering result is less than the Davidson-Borg index of the m+1th clustering result, the m+2th clustering result, and the m+3th clustering result at the same time, then taking the mth initial cluster number as the cluster number K, wherein 1≤m≤M-3. M is the total number of initial cluster numbers.
[0014] In some embodiments, the Davidson-Borgin index of the mth clustering result is determined by the average distance from the data objects in each cluster in the mth clustering result to the cluster center of each cluster, and the distance between every two cluster centers in the mth clustering result.
[0015] In some embodiments, the Davidson-Borgin Index DBI(m) of the m-th clustering result is:
[0016]
[0017] Where k is the number of clusters in the mth clustering result, avg(C i ) is the average distance from the data objects in the ith cluster to the cluster center of the ith cluster, avg(C j ) is the average distance from the data objects in the jth cluster to the cluster center of the jth cluster, d cen (u i ,u j ) is the distance from the center of the i-th cluster to the center of the j-th cluster, 1≤i, j≤k and j≠i.
[0018] In some embodiments, the minimum value of the multiple initial cluster numbers is 2, and the maximum value is no greater than is a natural number, and N is the total number of data objects in the traffic data set.
[0019] In a second aspect of the present disclosure, a network traffic prediction device is provided, comprising: a first processing module, configured to cluster data objects in a traffic data set to obtain a working day data set and a non-working day data set; a second processing module, configured to predict the working day data set using a long short-term memory network model to obtain a first prediction result; a third processing module, configured to determine a residual value using the first prediction result and historical data, add the residual value to the working day data set to obtain an updated data set, and predict the updated data set using a gated recurrent network model to obtain a second prediction result; and a fourth processing module, configured to obtain a network traffic prediction result based on the first prediction result and the second prediction result.
[0020] In some embodiments, the fourth processing module is configured to fuse the first prediction result and the second prediction result to obtain the network traffic prediction result.
[0021] In some embodiments, the first processing module is configured to determine the number of clusters K, calculate the density value of each data object in the traffic data set, select K data objects in order of the density values from large to small as K initial cluster centers, and cluster the data objects in the traffic data set according to the K initial cluster centers.
[0022] In some embodiments, the density value of the i-th data object in the traffic data set is determined by the distance between the i-th data object and the j-th data object in the traffic data set, 1≤j≤N and j≠i, N is the total number of data objects in the traffic data set.
[0023] In some embodiments, the density value p of the i-th data object i for
[0024]
[0025] where dist(x i , x j ) is the i-th data object x i With the jth data object x j The distance between c is the preset cutoff distance.
[0026] In some embodiments, the first processing module is configured to set a cluster number set, wherein the cluster number set includes a plurality of initial cluster numbers, and cluster the traffic data set using each initial cluster number in the cluster number set in order of the initial cluster numbers from small to large to obtain a plurality of clustering results, and calculate the Davidson-Borg index of each clustering result in the plurality of clustering results, and if the Davidson-Borg index of the mth clustering result is less than the Davidson-Borg index of the m+1th clustering result, the m+2th clustering result, and the m+3th clustering result at the same time, the mth initial cluster number is used as the cluster number K, wherein 1≤m≤M-3. M is the total number of initial cluster numbers.
[0027] In some embodiments, the Davidson-Borgin index of the mth clustering result is determined by the average distance from the data objects in each cluster in the mth clustering result to the cluster center of each cluster, and the distance between every two cluster centers in the mth clustering result.
[0028] In some embodiments, the Davidson-Borgin Index DBI(m) of the m-th clustering result is:
[0029]
[0030] Where k is the number of clusters in the mth clustering result, avg(C i ) is the average distance from the data objects in the ith cluster to the cluster center of the ith cluster, avg(C j ) is the average distance from the data objects in the jth cluster to the cluster center of the jth cluster, d cen (u i ,u j ) is the distance from the center of the i-th cluster to the center of the j-th cluster, 1≤i, j≤k and j≠i.
[0031] In some embodiments, the minimum value of the multiple initial cluster numbers is 2, and the maximum value is no greater than is a natural number, and N is the total number of data objects in the traffic data set.
[0032] In a third aspect of the present disclosure, a network traffic prediction device is provided, comprising: a memory; and a processor, coupled to the memory, the processor being configured to execute a method as described in any of the above embodiments based on instructions stored in the memory.
[0033] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method described in any of the above embodiments is implemented.
[0034] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 A schematic diagram of a flow chart of a network traffic prediction method according to an embodiment of the present disclosure;
[0037] Figure 2 A flow chart of a traffic data set clustering method according to an embodiment of the present disclosure;
[0038] Figure 3 A schematic diagram of a flow chart of a method for determining the number of clusters according to an embodiment of the present disclosure;
[0039] Figure 4 A schematic diagram of the structure of a network traffic prediction device according to an embodiment of the present disclosure;
[0040] Figure 5 A schematic diagram of the structure of a network traffic prediction device according to another embodiment of the present disclosure;
[0041] Figure 6 Schematic diagram of time comparison of different models;
[0042] Fig. 7A and Figure 7B Schematic diagram of RMSE performance of different models.
[0043] Figure 8 Schematic diagram of the accuracy of different models;
[0044] Fig. 9 Schematic diagram for comparing predicted values with actual values. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0046] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0047] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0048] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0049] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0050] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0051] Figure 1 The flowchart of the network traffic prediction method according to one embodiment of the present disclosure is shown in FIG.
[0052] In step 101, data objects in a traffic data set are clustered to obtain a working day data set and a non-working day data set.
[0053] In some embodiments, the step of clustering the traffic data set is as follows: Figure 2 shown.
[0054] Figure 2 The flow chart of a traffic data set clustering method according to an embodiment of the present disclosure is as follows. In some embodiments, the following traffic data set clustering method is executed by a network traffic prediction device.
[0055] In step 201, the number of clusters K is determined.
[0056] In some embodiments, the step of determining the number of clusters K is as follows: Figure 3 shown.
[0057] Figure 3 The flowchart of a method for determining the number of clusters according to an embodiment of the present disclosure is shown in FIG.
[0058] In step 301, a cluster number set is set, wherein the cluster number set includes a plurality of initial cluster numbers.
[0059] In some embodiments, the minimum value of the multiple initial cluster numbers is 2, and the maximum value is no greater than is a natural number, and N is the total number of data objects in the traffic dataset.
[0060] In step 302, the traffic data set is clustered using each initial cluster number in the cluster number set in the order of the initial cluster number from small to large, so as to obtain a plurality of clustering results.
[0061] For example, if the first initial cluster number in the cluster number set is 2, the traffic data set is clustered when the cluster number is 2 to obtain the first clustering result. Next, if the second initial cluster number in the cluster number set is 3, the traffic data set is clustered when the cluster number is 3 to obtain the second clustering result. And so on.
[0062] In step 303, the Davies-Bouldin index of each clustering result in the plurality of clustering results is calculated.
[0063] In some embodiments, the Davidson-Borgin index of the mth clustering result is determined by the average distance from the data objects in each cluster in the mth clustering result to the cluster center of each cluster, and the distance between every two cluster centers in the mth clustering result.
[0064] For example, the Davidson-Boulding Index DBI(m) of the m-th clustering result is shown in formula (1).
[0065]
[0066] Among them, k is the number of clusters in the mth clustering result, avg(C i ) is the average distance from the data object in the ith cluster to the cluster center of the ith cluster, avg(C j ) is the average distance from the data object in the jth cluster to the cluster center of the jth cluster, d cen (u i ,u j ) is the distance from the center of the i-th cluster to the center of the j-th cluster, 1≤i, j≤k and j≠i.
[0067] In step 304, if the Davidson-Borg index of the m-th clustering result is less than the Davidson-Borg index of the m+1-th clustering result, the m+2-th clustering result, and the m+3-th clustering result, the m-th initial cluster number is used as the cluster number K, where 1≤m≤M-3. M is the total number of initial clusters.
[0068] It should be noted that the use of the Davidson-Botting Index can better balance the independence and cohesion of the data set, thereby selecting the optimal cluster value.
[0069] return Figure 2 In step 202, a density value of each data object in the traffic data set is calculated.
[0070] In some embodiments, the density value of the i-th data object in the traffic data set is determined by the distance between the i-th data object and the j-th data object in the traffic data set, 1≤j≤N and j≠i, N is the total number of data objects in the traffic data set.
[0071] For example, the density value ρ of the i-th data object i As shown in formula (2).
[0072]
[0073] where dist(x i , x j ) is the i-th data object x i With the jth data object x j The distance between c It is the preset cutoff distance.
[0074] In step 203, K data objects are selected in descending order of density values to serve as K initial cluster centers.
[0075] In step 204, data objects in the traffic data set are clustered according to the K initial cluster centers.
[0076] It should be noted here that by using the density value of the data object to select K initial cluster centers, it is closer to the actual cluster center, thereby effectively reducing the number of iterations of the clustering process.
[0077] In some embodiments, after determining the K initial cluster centers, the data objects in the traffic data set are clustered according to the k-means clustering algorithm. Since the k-means clustering algorithm itself is not the inventive point of the present disclosure, it will not be described in detail here.
[0078] return Figure 1 In step 102, a long short-term memory network model (LSTM) is used to predict the workday data set to obtain a first prediction result.
[0079] LSTM is a time recurrent neural network designed to solve the long-term dependency problem of general RNN (Recurrent Neural Network). Since LSTM itself is not the inventive point of the present disclosure, it will not be described in detail here.
[0080] In some embodiments, a stationarity test is performed on the data objects in the working day data set, and differential processing is performed when the data objects are not stationary, so that the data objects in the working day data set are stationary time series, and then the data objects in the working day data set are input into LSTM for prediction.
[0081] When training LSTM, training parameters are determined according to Akaike Information Criterion (AIC), and then the LSTM is trained using the training parameters.
[0082] It should be noted that during the model training process, both the working day data set and the non-working day data set are used for LSTM training. During the prediction process, only the working day data set is input into the LSTM.
[0083] In step 103, a residual value is determined using the first prediction result and historical data.
[0084] For example, the residual value is determined according to the difference between the first prediction result and the historical data.
[0085] In step 104, the residual values are added to the workday data set to obtain an updated data set.
[0086] In step 105, a gated recurrent network model (GRU) is used to predict the updated data set to obtain a second prediction result.
[0087] GRU is a variant of LSTM. LSTM introduces three gate functions: input gate, forget gate and output gate to control input value, memory value and output value. In GRU, there are only two gate functions, namely update gate and reset gate. Since GRU itself is not the inventive point of the present disclosure, it will not be described here.
[0088] In step 106, a network traffic prediction result is obtained according to the first prediction result and the second prediction result.
[0089] In some embodiments, the first prediction result and the second prediction result are fused to obtain a network traffic prediction result.
[0090] For example, if the first prediction result is l t , the second prediction result is n t , then the network traffic prediction result x t As shown in formula (3).
[0091] x t = l t +n t (3)
[0092] In the network traffic prediction method provided in the above embodiment of the present disclosure, by utilizing a hybrid model composed of a long short-term memory network model and a gated recurrent network model, it is possible to extract features from traffic data from different dimensions, thereby effectively improving the prediction results of network traffic data.
[0093] Figure 4 FIG. 1 is a schematic diagram of the structure of a network traffic prediction device according to an embodiment of the present disclosure. Figure 4 As shown, the network traffic prediction device includes a first processing module 41 , a second processing module 42 , a third processing module 43 and a fourth processing module 44 .
[0094] The first processing module 41 is configured to cluster the data objects in the traffic data set to obtain a working day data set and a non-working day data set.
[0095] In some embodiments, the first processing module 41 determines the number of clusters K, calculates the density value of each data object in the traffic data set, selects K data objects in order of density value from large to small as K initial cluster centers, and clusters the data objects in the traffic data set according to the K initial cluster centers.
[0096] In some embodiments, the density value of the i-th data object in the traffic data set is determined by the distance between the i-th data object and the j-th data object in the traffic data set, 1≤j≤N and j≠i, N is the total number of data objects in the traffic data set.
[0097] For example, the density value ρ of the i-th data object i As shown in formula (2).
[0098] It should be noted here that by using the density value of the data object to select K initial cluster centers, it is closer to the actual cluster center, thereby effectively reducing the number of iterations of the clustering process.
[0099] In some embodiments, the first processing module 41 sets a cluster number set, wherein the cluster number set includes a plurality of initial cluster numbers, and clusters the traffic data set using each initial cluster number in the cluster number set in order of the initial cluster numbers from small to large, to obtain a plurality of clustering results, and calculates the Davidson-Borg index of each clustering result in the plurality of clustering results, and if the Davidson-Borg index of the mth clustering result is less than the Davidson-Borg index of the m+1th clustering result, the m+2th clustering result, and the m+3th clustering result at the same time, the mth initial cluster number is used as the cluster number K, wherein 1≤m≤M-3. M is the total number of initial cluster numbers.
[0100] In some embodiments, the Davidson-Borgin index of the mth clustering result is determined by the average distance from the data objects in each cluster in the mth clustering result to the cluster center of each cluster, and the distance between every two cluster centers in the mth clustering result.
[0101] For example, the Davidson-Boulding Index DBI(m) of the m-th clustering result is shown in formula (1).
[0102] It should be noted that the use of the Davidson-Botting Index can better balance the independence and cohesion of the data set, thereby selecting the optimal cluster value.
[0103] In some embodiments, the minimum value of the multiple initial cluster numbers is 2, and the maximum value is no greater than is a natural number, and N is the total number of data objects in the traffic dataset.
[0104] The second processing module 42 is configured to use the long short-term memory network model to predict the weekday data set to obtain a first prediction result.
[0105] The third processing module 43 is configured to determine a residual value using the first prediction result and historical data, add the residual value to the working day data set to obtain an updated data set, and predict the updated data set using the gated recurrent network model to obtain a second prediction result.
[0106] For example, the residual value is determined according to the difference between the first prediction result and the historical data.
[0107] The fourth processing module 44 is configured to obtain a network traffic prediction result according to the first prediction result and the second prediction result.
[0108] In some embodiments, the fourth processing module 44 merges the first prediction result and the second prediction result to obtain a network traffic prediction result.
[0109] For example, if the first prediction result is l t , the second prediction result is n t , then the network traffic prediction result x t As shown in formula (3).
[0110] In the network traffic prediction device provided in the above-mentioned embodiment of the present disclosure, by utilizing a hybrid model composed of a long short-term memory network model and a gated recurrent network model, it is possible to extract features of traffic data from different dimensions, thereby effectively improving the prediction results of network traffic data.
[0111] Figure 5 FIG. 1 is a schematic diagram of the structure of a network traffic prediction device according to another embodiment of the present disclosure. Figure 5 As shown, the network traffic prediction device includes a memory 51 and a processor 52.
[0112] The memory 51 is used to store instructions. The processor 52 is coupled to the memory 51. The processor 52 is configured to execute the instructions stored in the memory to implement the following. Figures 1 to 3 The method of any one of the embodiments.
[0113] like Figure 5 As shown, the network traffic prediction device also includes a communication interface 53 for information exchange with other devices. At the same time, the network traffic prediction device also includes a bus 54, through which the processor 52, the communication interface 53, and the memory 51 communicate with each other.
[0114] The memory 51 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 51 may also be a memory array. The memory 51 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.
[0115] In addition, the processor 52 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0116] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Figures 1 to 3 The method of any one of the embodiments.
[0117] The present disclosure is described below through specific examples.
[0118] Traffic data is one of the typical time series data, which is an important reference for system performance management, risk prevention and anomaly detection. For example, traffic data of a certain operator from September 1 to October 15, 2022 was collected for experimental training, testing and verification. The data sampling interval was five minutes, and a total of 1,200 data were extracted. First, the data was preprocessed, 880 groups of valid data were cleaned and screened out, 600 groups were used to complete the model training, and the remaining 280 groups were used to test the performance of the network model.
[0119] In order to evaluate the effectiveness of the solution provided by the present disclosure, the root mean square error (RMSE) is used as an evaluation indicator, as shown in formula (4).
[0120]
[0121] In formula (4), n is the total number of data, x is i is the original data, x′ iFor forecast data.
[0122] In order to verify the time efficiency of the solution provided by the present disclosure, ARIMA (Autoregressive Integrated Moving Average), GRU and LSTM algorithms are used for comparative analysis. The experimental results are as follows: Figure 6 shown.
[0123] Depend on Figure 6 It can be seen that when the data scale increases, the network convergence time of the ARIMA algorithm and the GRU algorithm shows a quadratic growth trend, and the clustering time of the LSTM algorithm shows a linear growth trend, but their convergence speed is not as fast as the convergence speed of the solution provided by the present disclosure. It can be seen that the solution provided by the present disclosure greatly improves the time efficiency, and the time complexity is reduced from the original O(n 2 ) becomes O(np).
[0124] In addition, the performance test and evaluation results of the scheme and other algorithms provided by the present disclosure in real data sets S1 and S2 are as follows: Fig. 7A and Figure 7B shown. Fig. 7A Corresponding test results of S1 dataset, Figure 7B Corresponding test results of S2 dataset. Fig. 7A and Figure 7B In the figure, label 1 is used to represent the RMSE of ARIMA, label 2 is used to represent the RMSE of GRU, label 3 is used to represent the RMSE of LSTM, and label 4 is used to represent the RMSE of the solution provided in the present disclosure.
[0125] like Fig. 7A and Figure 7B As shown, since ARIMA can only predict the linear part of the data, its prediction effect is the worst and the RMSE value is the largest, while the prediction effects of GRU and LSTM models are in the middle. The prediction mean square error of the solution provided by the present disclosure is the smallest, indicating that the solution provided by the present disclosure has high prediction accuracy.
[0126] The average of the three experimental results of 20 minutes, 40 minutes and 60 minutes is taken, and the obtained accuracy data is shown in Table 1. Figure 8 shown.
[0127]
[0128] Table 1 Comparison of model prediction performance
[0129] As shown in Table 1, the accuracy of the solution provided by the present disclosure is higher than that of other existing technologies regardless of the training time of 20 minutes, 40 minutes or 60 minutes. Taking the data of 60 minutes as an example, the accuracy of the solution provided by the present disclosure is improved by 11.2%, 14.5% and 6.7% respectively compared with ARIMA, GRU and LSTM. This is because the hybrid model has a strong learning ability for time series, so the solution provided by the present disclosure can obtain better accuracy.
[0130] Fig. 9 A comparison diagram of the predicted value and the true value is given. Fig. 9 As shown, label 1 is used to represent the original data, label 2 is used to represent the prediction result of ARIMA, label 3 is used to represent the prediction result of GRU, label 4 is used to represent the prediction result of LSTM, and label 5 is used to represent the prediction result of the solution provided by the present disclosure.
[0131] like Fig. 9 As shown, the prediction error of the prediction result of the scheme provided by the present disclosure is the smallest, which is basically consistent with the actual flow data. By comparison, it can be seen that the prediction result of the scheme provided by the present disclosure has a significant improvement in the prediction effect at the point of sudden flow change, and is more stable than the prediction result of the baseline model.
[0132] In some embodiments, the functional unit described above can be implemented as a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component or any appropriate combination thereof for performing the functions described in the present disclosure.
[0133] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0134] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.
Claims
1. A network traffic prediction method, performed by a network traffic prediction device, comprising: Cluster the data objects in the traffic data set to obtain a working day data set and a non-working day data set; Using a long short-term memory network model to predict the workday data set to obtain a first prediction result; Determine a residual value using the first prediction result and historical data; Adding the residual value to the working day data set to obtain an updated data set; Using a gated recurrent network model to predict the updated data set to obtain a second prediction result; A network traffic prediction result is obtained according to the first prediction result and the second prediction result.
2. The method according to claim 1, wherein: The network traffic prediction result obtained according to the first prediction result and the second prediction result includes: The first prediction result and the second prediction result are merged to obtain the network traffic prediction result.
3. The method according to claim 1 or 2, wherein: Clustering the traffic dataset involves: Determine the number of clusters K; Calculating a density value of each data object in the traffic data set; Selecting K data objects in descending order of density values as K initial cluster centers; The data objects in the traffic data set are clustered according to the K initial cluster centers.
4. The method according to claim 3, wherein: The density value of the i-th data object in the traffic data set is determined by the distance between the i-th data object and the j-th data object in the traffic data set, 1≤j≤N and j≠i, N is the total number of data objects in the traffic data set.
5. The method according to claim 4, wherein: The density value ρ of the i-th data object i for where dist(x i , x j ) is the i-th data object x i With the jth data object x j The distance between c is the preset cutoff distance.
6. The method according to claim 3, wherein: Determining the number of clusters K includes: Setting a cluster number set, wherein the cluster number set includes a plurality of initial cluster numbers; Clustering the traffic data set using each initial cluster number in the cluster number set in an ascending order of the initial cluster number to obtain a plurality of clustering results; Calculating the Davidson-Botting Index of each clustering result in the plurality of clustering results; If the Davidson-Borg index of the m-th clustering result is less than the Davidson-Borg index of the m+1-th clustering result, the m+2-th clustering result, and the m+3-th clustering result, the m-th initial cluster number is used as the cluster number K, where 1≤m≤M-3. M is the total number of initial clusters.
7. The method according to claim 6, wherein: The Davidson-Borgin index of the mth clustering result is determined by the average distance from the data objects in each cluster in the mth clustering result to the cluster center of each cluster, and the distance between every two cluster centers in the mth clustering result.
8. The method according to claim 7, wherein: The Davidson-Boulding Index DBI(m) of the m-th clustering result is: Where k is the number of clusters in the mth clustering result, avg(C i ) is the average distance from the data objects in the ith cluster to the cluster center of the ith cluster, avg(C j ) is the average distance from the data objects in the jth cluster to the cluster center of the jth cluster, d cen (u i ,u j ) is the distance from the center of the i-th cluster to the center of the j-th cluster, 1≤i,j≤k and j≠i.
9. The method according to claim 6, wherein: The minimum value of the multiple initial cluster numbers is 2, and the maximum value is no more than is a natural number, and N is the total number of data objects in the traffic data set.
10. A network traffic prediction device, comprising: A first processing module is configured to cluster the data objects in the traffic data set to obtain a working day data set and a non-working day data set; A second processing module is configured to predict the workday data set using a long short-term memory network model to obtain a first prediction result; a third processing module, configured to determine a residual value using the first prediction result and historical data, add the residual value to the working day data set to obtain an updated data set, and predict the updated data set using a gated recurrent network model to obtain a second prediction result; The fourth processing module is configured to obtain a network traffic prediction result according to the first prediction result and the second prediction result.
11. The device according to claim 10, wherein: The fourth processing module is configured to fuse the first prediction result and the second prediction result to obtain the network traffic prediction result.
12. The device according to claim 10 or 11, wherein: The first processing module is configured to determine the number of clusters K, calculate the density value of each data object in the traffic data set, select K data objects in order of the density values from large to small as K initial cluster centers, and cluster the data objects in the traffic data set according to the K initial cluster centers.
13. The device according to claim 12, wherein: The density value of the i-th data object in the traffic data set is determined by the distance between the i-th data object and the j-th data object in the traffic data set, 1≤j≤n and j≠i, and N is the total number of data objects in the traffic data set.
14. The device according to claim 13, wherein: The density value ρ of the i-th data object i for where dist(x i , x j ) is the i-th data object x i With the jth data object x j The distance between c is the preset cutoff distance.
15. The device according to claim 12, wherein: The first processing module is configured to set a cluster number set, wherein the cluster number set includes a plurality of initial cluster numbers, and cluster the traffic data set using each initial cluster number in the cluster number set in the order of the initial cluster numbers from small to large to obtain a plurality of clustering results, and calculate the Davidson-Borg index of each clustering result in the plurality of clustering results, and if the Davidson-Borg index of the mth clustering result is less than the Davidson-Borg index of the m+1th clustering result, the m+2th clustering result, and the m+3th clustering result at the same time, the mth initial cluster number is used as the cluster number K, wherein 1≤m≤M-3. M is the total number of initial cluster numbers.
16. The device according to claim 15, wherein: The Davidson-Borgin index of the mth clustering result is determined by the average distance from the data objects in each cluster in the mth clustering result to the cluster center of each cluster, and the distance between every two cluster centers in the mth clustering result.
17. The device according to claim 16, wherein: The Davidson-Boulding Index DBI(m) of the m-th clustering result is: Where k is the number of clusters in the mth clustering result, avg(C i ) is the average distance from the data objects in the ith cluster to the cluster center of the ith cluster, avg(C j ) is the average distance from the data objects in the jth cluster to the cluster center of the jth cluster, d cen (u i ,u j ) is the distance from the center of the i-th cluster to the center of the j-th cluster, 1≤i,j≤k and j≠i.
18. The device according to claim 15, wherein: The minimum value of the multiple initial cluster numbers is 2, and the maximum value is no more than is a natural number, and N is the total number of data objects in the traffic data set.
19. A network traffic prediction device, comprising: Memory; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 based on instructions stored in the memory.
20. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Medium and long term electric quantity prediction method based on clustering analysis and deep learning
CN114626594A
Control tower and enterprise management platform for managing value chain network entities from point of origin of one or more products of the enterprise to point of customer use
US20210182995A1
Method and system for monitoring of turbid media of interest to predict events
WO2021152534A1