A method and system for predicting and processing traffic flow data based on a feature difference learning network
By introducing feature difference learning networks and generating adversarial networks into the traffic flow prediction model, analyzing the heterogeneity and spatiotemporal characteristics of traffic data, the problem of large differences between the prediction results of existing models and the actual situation is solved, and higher prediction accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510228087.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The existing traffic flow prediction model is difficult to effectively distinguish the heterogeneity of traffic data, resulting in large differences between the prediction results and the actual situation.
A method for predicting traffic flow data of feature difference learning network traffic flow data is proposed. By integrating sample positioning encoder, feature difference generator and discriminator, a deep learning model DXGAN is built, dynamically exchanged and generated adversarial network, analyzing the autocorrelation and space-time entanglement information between nodes, and providing balanced and rich learning samples.
Through the combination of feature difference learning and generative adversarial network, the accuracy and applicability of traffic flow prediction are improved, the robustness and generalization capabilities of the model are enhanced, and more accurate and personalized prediction solutions are provided.
Smart Images

Figure CN119723894B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to data processing, and specifically to a method and system for predicting and processing traffic flow data based on a feature difference learning network. Background Art
[0002] With the development of intelligent transportation systems, prediction technologies are used to plan urban computing, urban planning, and urban development including population migration.
[0003] Generally, statistical algorithms are used for the above planning. These statistical algorithms, including autoregressive integrated moving average (ARIMA) and support vector machine (SVM), can consider the temporal correlation between road nodes. However, due to non-linear characteristics, these models are often restricted by the model and cannot provide accurate predictions. With the development of deep learning, recurrent neural network (RNN) models and convolutional neural network (CNN) models can learn rich spatio-temporal dependence relationships in data due to their rich non-linear characteristics, and gradually replace traditional models in prediction problems. More and more excellent models have also been proposed.
[0004] However, due to the existence of fine-grained data, the above models tend to learn the consistent features in the historical window and fail to effectively distinguish the heterogeneity of the data, which may lead to a large difference between the prediction result and the actual situation. Summary of the Invention
[0005] Aiming at the problems existing in the prior art, the present invention provides a method and system for predicting and processing traffic flow data based on a feature difference learning network.
[0006] The present invention is realized through the following technical solutions:
[0007] The present invention provides a method for predicting and processing traffic flow data based on a feature difference learning network, including:
[0008] Performing data preprocessing on the input original traffic time series data to obtain feature difference learning samples. The original traffic time series data includes traffic data of multiple target road nodes within a certain time range. The feature difference learning samples at least include:
[0009] Constructing a deep learning model, a dynamic exchange generative adversarial network DXGAN, by integrating a sample location encoder, a feature difference generator, and a discriminator;
[0010] Inputting the feature difference learning samples into the deep learning model DXGAN to obtain a prediction result.
[0011] Further, the performing data preprocessing on the input original traffic time series data to obtain feature difference learning samples includes:
[0012] Record the change characteristics of the original traffic time series data in the time and space dimensions through the spatial sample position difference observation matrix and the time sample information difference matrix;
[0013] The spatial sample position difference observation matrix is: when the position information of the sample is detected by the model, that is , the value of this matrix remains , conversely, when the position information of the sample , , where represents the spatial retrieval status matrix, where represents the coordinate position of the sensor node in the spatial dimension.
[0014] The representation of the time sample information difference matrix is more inclined to the situation of the change of the spatial sample position difference observation matrix in time , and this matrix can be expressed as:
[0015] ;
[0016] In the formula, represents the data in the sensor at time , represents the time sample information difference matrix. When , it means that the model did not record the changes of the original traffic time series data in space and time at the previous moment.
[0017] Furthermore, the data preprocessing of the input original traffic time series data to obtain feature difference learning samples includes:
[0018] Pass the original traffic time series data through respectively to obtain two data embeddings with different channel dimensions , represents the embedding feature in the spatial dimension obtained after the original traffic time series data is mapped through the fully connected layer, represents the embedding feature in the time dimension obtained after the original traffic time series data is mapped through the fully connected layer;
[0019] According to the time sample information difference matrix , construct the feature to obtain the time sample information difference feature ;
[0020] The embedding features in the spatial dimension and the time dimension as well as the original traffic time series data and the trainable parameters Through the convolution operation , obtain the features on the convolution , where represents the convolution operation function;
[0021] According to and the position information features obtained by using the encoding technology perform an addition operation to obtain the comprehensive information features . Among them, the position information features obtained by using the encoding technology include:
[0022] The first position information feature: ;
[0023] The second position information feature: ;
[0024] The third position information feature: ;
[0025] The fourth position information feature: ;
[0026] Among them, represents the position of the element index, represents the spatial distance parameter matrix, represents the transpose of the spatial distance parameter matrix;
[0027] According to and the position information features obtained by using the encoding technology sum, determine the comprehensive feature ;
[0028] According to the position information features that record the trend difference change of the target road node and the time delay feature sum, determine the comprehensive feature ,
[0029] Through the normalization operation determine the comprehensive information feature of the node , represents the normalization operation, represents the trainable weight.
[0030] Further, the deep learning model DXGAN includes: a sample localization encoder, a feature difference generator, and a discriminator, where
[0031] The feature difference generator includes: a difference sample generation layer, a difference generator characterization layer, and a difference generator output layer;
[0032] The difference sample generation layer includes recording the feature differences at different times, and this representation method is to use the comprehensive information features of the nodes obtained above Perform a differential comparison and represent it using which can be represented by the following method where represents the comprehensive feature representation of the input node at time .
[0033] The difference generator characterization layer learns the rich information representation in the time series data by receiving the difference information representation generated by the difference sample generation layer and the input at different times . This characterization layer is composed of a GRU network and the representation is: where the output state is , is represented as the hidden state representation of the th layer of the difference generator characterization layer, where represent the update gate state and the candidate hidden state respectively. The update gate state is represented as , represents the difference information feature generated by the difference sample generation layer represents the comprehensive information feature of the node is represented as the hidden state representation of the th layer of the difference generator characterization layer, the reset gate state is represented as , and the candidate hidden state is represented as . concat represents the concatenation effect between states , and , , represent the network learnable parameters;
[0034] The output layer of the difference generator performs data fitting through a fully connected layer to obtain the final output prediction sequence , where FC represents the fully connected layer represents the learnable parameter.
[0035] Furthermore, the feature difference discriminator determines the overall loss through , where is the MAE loss is the discriminator loss represents the hyperparameter;
[0036] The representation form of the discriminator loss is: , represents the discriminator symbol represents the generator symbol indicates that the expectation is calculated based on samples drawn from the distribution P Represent a sample Samples drawn from the distribution P (representing the true data distribution);
[0037] Furthermore, inputting the feature difference learning samples into the deep learning model DXGAN to obtain a prediction result includes:
[0038] Evaluating the prediction result by the mean absolute percentage error MAPE, root mean square error RMSE, and mean absolute error MAE, where
[0039] The formula for the mean absolute percentage error MAPE: ;
[0040] The formula for the root mean square error RMSE: ;
[0041] The formula for the mean absolute error MAE: ;
[0042] In the formula, is the total number of samples, is the true value, is the predicted value.
[0043] The present invention also provides a feature difference learning network traffic flow data prediction and processing system, including:
[0044] A data preprocessing module for preprocessing the input original traffic time series data to obtain feature difference learning samples. The original traffic time series data includes traffic data of multiple target road nodes within a time range, and the feature difference learning samples at least include:
[0045] A DXGAN neural network model construction and training module for constructing the deep learning model DXGAN by integrating a sample location encoder, a feature difference generator, and a discriminator;
[0046] A prediction evaluation module for inputting the feature difference learning samples into the deep learning model DXGAN to obtain a prediction result.
[0047] Furthermore, the data preprocessing module records the change characteristics of the original traffic time series data in the time and space dimensions through a spatial sample position difference observation matrix and a time sample information difference matrix;
[0048] The spatial sample position difference observation matrix is: when the position information of the sample is detected by the model, that is, , the value of this matrix remains , otherwise, when the position information of the sample is not detected, , where represents the spatial retrieval status matrix, where represents the coordinate position of the sensor node in the spatial dimension.
[0049] The representation of the time sample information difference matrix is more inclined to the situation of the change of the spatial sample position difference observation matrix in time , and this matrix can be expressed as:
[0050] ;
[0051] In the formula, represents the data in the sensor at time , represents the time sample information difference matrix. When , it means that the model did not record the changes in the original traffic time series data in space and time at the previous moment.
[0052] Furthermore, for the feature difference learning traffic flow data prediction processing method, it is characterized in that the preprocessing of the input original traffic time series data to obtain feature difference learning samples includes:
[0053] Pass the original traffic time series data through respectively to obtain data embeddings with two different channel dimensions , represents the embedding feature in the spatial dimension obtained after the mapping of the original traffic time series data through the fully connected layer, represents the embedding feature in the time dimension obtained after the mapping of the original traffic time series data through the fully connected layer;
[0054] According to the time sample information difference matrix , construct the feature to obtain the time sample information difference feature ;
[0055] Perform a convolution operation on the embedding features in the spatial dimension and the time dimension , the original traffic time series data and the trainable parameter to obtain the feature on the convolution , where represents the convolution operation function; According to
[0056] and the position information feature obtained by using the encoding technology perform an addition operation to obtain the comprehensive information feature . Among them, the position information feature obtained by using the encoding technology includes:
[0057] First position information feature: ;
[0058] Second position information feature: ;
[0059] Third position information feature: ;
[0060] Fourth position information feature: ;
[0061] Among them, represents the position of the element index, represents the spatial distance parameter matrix, represents the transpose of the spatial distance parameter matrix;
[0062] According to and the position information feature obtained by using the coding technology, the sum determines the comprehensive feature ;
[0063] According to the position information feature recording the trend difference change of the target road node and the time delay feature sum, determine the comprehensive feature ,
[0064] Furthermore, the deep learning model DXGAN includes: a bit sample positioning encoder, a feature difference generator, and a discriminator, where
[0065] The feature difference generator includes: a difference sample generation layer, a difference generator characterization layer, and a difference generator output layer;
[0066] The difference sample generation layer records the feature differences at different times to compare the comprehensive information features of the nodes obtained above differentially, and represents it with , which can be represented by the following method , where represents the comprehensive feature representation of the input node at time .
[0067] The difference generator characterization layer learns the rich information representation in the time series data by receiving the difference information representation generated by the difference sample generation layer, and the input at different times. This characterization layer is composed of a GRU network and is represented as: , where the output state is , is represented as the Hidden state representation of the layer, where respectively represent the update gate state and the candidate hidden state. Among them, the update gate state is represented as , represents the differential information feature generated by the layer generated from the differential samples, represents the comprehensive information feature of the node, is represented as the hidden state representation of the layer of the differential generator characterization layer, and the reset gate state is represented as , and the candidate hidden state is represented as , concat represents the concatenation effect between states, , and , , represent the network learnable parameters;
[0068] The output layer of the differential generator performs data fitting through a fully connected layer to obtain the final output prediction sequence , where FC represents the fully connected layer, represents the learnable parameter.
[0069] Compared with the prior art, the present invention has the following beneficial technical effects:
[0070] The beneficial effects of the present invention are as follows: Aiming at the problems existing in the prior art, the present invention combines the generative adversarial model and the feature difference learning strategy, and for the first time proposes a prediction processing strategy for network traffic flow data of a feature difference learning network based on robustness analysis. By analyzing the autocorrelation between nodes through a sample localization encoder and using its spatio-temporal entanglement information to accurately locate the feature positions, an equilibrium and rich learning sample is provided for the feature difference generator. In addition, in order to improve the robustness and generalization ability of the model, we adopt the method of trend comparison between nodes, which not only maintains the consistency characteristics of the data, but also maximally restores the heterogeneity characteristics of the original samples. At the same time, we also analyze the characteristics of the scale-free network in the road network system, and combine the influence of individuals on neighboring individuals in the complex system to distinguish the spatio-temporal feature differences between individuals through trend-based differential feature difference learning, further enhancing the robustness and generalization of the network. Finally, to solve the out-of-distribution data problem, we adopt an adversarial feature difference discriminator to process spatio-temporal information in an adversarial decoupling manner, thereby improving the interpretability and robustness of the model.
[0071] Compared with the prior art, the present invention further improves the accuracy and applicability of traffic time series prediction, greatly enhances the prediction ability of the existing model, and provides an interpretable solution from the perspective of robustness: using the high accuracy of the DXGAN model to improve the accuracy of traffic time series prediction, so as to provide a more accurate and personalized prediction solution for intelligent transportation.
[0072] The present invention provides a method and system for predicting and processing traffic flow data based on a feature difference learning network. The method preprocesses the input original traffic time series data to obtain feature difference learning samples, and the original traffic time series data includes traffic data of multiple target road nodes within a certain time range; then, a deep learning model DXGAN is constructed by integrating a sample location encoder, a feature difference generator, and a discriminator; then, the feature difference learning samples are input into the deep learning model DXGAN to obtain a prediction result. By trend-based difference learning to distinguish the spatio-temporal feature differences between individuals, the high accuracy of the DXGAN model is used to improve the accuracy of traffic time series prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a schematic flowchart of a method for predicting and processing traffic flow data based on a feature difference learning network according to an embodiment of the present invention;
[0074] Figure 2 is a flowchart of a preprocessing stage according to an embodiment of the present invention;
[0075] Figure 3 is a schematic diagram of the principle of the DXGAN neural network model according to an embodiment of the present invention;
[0076] Figure 4 is a schematic structural diagram of a system for predicting and processing traffic flow data based on a feature difference learning network according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0077] The following further describes the present invention in detail with specific embodiments, which are explanations of the present invention rather than limitations.
[0078] The innovation of the present invention lies in: The present invention proposes a method and system for predicting and processing traffic flow data based on a feature difference learning network with robustness analysis. The Dynamic exchange Generative Adversarial Network (hereinafter referred to as DXGAN for short) encodes spatio-temporal information for the original data, and further improves the prediction ability of the model from the perspective of robustness by constructing a generator and a discriminator. Experiments were carried out on four datasets of PEMS03 / 04 / 07 / 08. The experimental results show that this strategy has good performance indicators in overall performance and can achieve the best performance with fewer parameters, which provides a new time series prediction method with lower spatio-temporal complexity in the case of limited performance resources.
[0079] Aiming at the problem of prediction error caused by the existing model ignoring local heterogeneity in spatio-temporal data, a method and system for predicting and processing traffic flow data based on a feature difference learning network with robustness analysis are proposed. The spatio-temporal feature information with encoding is utilized, and the idea of difference learning is used to ensure the authenticity of the long-term spatio-temporal heterogeneity in the original spatio-temporal data to the greatest extent. A generator and a discriminator network are constructed to analyze and judge the comparison samples generated by the model, and from a robust perspective, guide the model to correct and improve the prediction results, effectively expanding the problems of poor performance and robustness of the existing prediction model.
[0080] Aiming at the problems of long calculation time and poor effect of the existing prediction algorithms, a feature difference learning network with robustness analysis is proposed, which greatly improves the operation efficiency of the model while ensuring the excellent performance of the model itself.
[0081] Aiming at the problem of prediction error caused by the existing model ignoring local heterogeneity in spatio-temporal data, the present invention proposes an innovative deep learning model - "Dynamic exchange Generative Adversarial Network" (DXGAN). This model consists of a sample location encoder, a feature difference generator and a discriminator, and designs a model for prediction tasks from the perspective of the robustness of the network system itself using the idea of feature difference learning.
[0082] In the tests on the PEMS03 / 04 / 07 / 08 datasets, DXGAN showed excellent imputation performance. The present invention conducts prediction experiments on the PEMS03 / 04 / 07 / 0 datasets.
[0083] The experimental results show that the mean absolute error (MAE) reaches 12.74 / 12.76 / 11.34 / 13.40 / 2.95 / 1.59 respectively, the mean absolute percentage error (MAPE) reaches 12.76 / 11.34 / 7.73 / 8.57 / 8.10 / 3.60 respectively, and the root mean square error (RMSE) reaches 1.44 / 28.03 / 29.53 / 20.98 / 8.10 / 3.60 respectively. Its model effect is better than that of all existing proposed models.
[0084] Due to its unique model architecture, the DXGAN of the present invention can be more applicable in intelligent transportation systems and a wide range of scenario applications, and at the same time demonstrates the important role of technological innovation in improving the quality of life of urban residents.
[0085] Figure 1 It is a schematic flowchart of the traffic flow data prediction and processing method of the feature difference learning network according to an embodiment of the present invention; as Figure 1 shown, the traffic flow data prediction and processing method of the feature difference learning network includes the following steps:
[0086] Step S101, perform data preprocessing on the input original traffic time series data to obtain feature difference learning samples.
[0087] In this embodiment, the original traffic time series data includes traffic data of multiple target road nodes within a certain time range;
[0088] In the preprocessing stage, the PEMS04 dataset is extremely widely used in the traffic field. This dataset contains a total of 307 target road nodes. This dataset records a total of 16,992 timestamp traffic features between January and January 2018. This dataset has been proven to be effective and has been used as a typical dataset in the traffic prediction field.
[0089] As Figure 2 shown, to facilitate observing the data change characteristics of the time series data in the time and space dimensions in the original features, the change characteristics of the original traffic time series data in the time and space dimensions are recorded through the spatial sample position difference observation matrix and the time sample information difference matrix;
[0090] The spatial sample position difference observation matrix is: when the position information of the sample is detected by the model, that is , the value of this matrix remains , otherwise, when the position information of the sample is , where represents the spatial retrieval status matrix, and where represents the coordinate position of the sensor node in the spatial dimension.
[0091] The representation of the time sample information difference matrix is more inclined to the situation of the change of the spatial sample position difference observation matrix in time, and this matrix can be expressed as: ;
[0092] ;
[0093] In the formula, represents the data in the sensor at time moment, represents the time sample information difference matrix. When , it means that the model did not record the changes in the original traffic time series data in space and time at the previous moment.
[0094] When the non-linear neural network learns task-related features, it often captures features irrelevant to the task. This makes it difficult for the network to maintain good generalization performance when facing data distribution shifts. At the same time, the complex heterogeneity of spatio-temporal data in the road network system also often hinders the neural network from effectively learning high-quality features. To solve these problems and strengthen the learning of task-related time and space features, we propose a new method to process the time and space information in the original time series data through position information encoding. This method helps to improve the generalization ability of the model and the quality of feature learning.
[0095] For the original traffic time series data after being mapped through a fully connected layer and obtaining data embeddings with two different channel dimensions, this form can be expressed as:
[0096] ;
[0097] ;
[0098] In the formula, represents the embedded feature in the spatial dimension obtained after the original traffic time series data is mapped through the fully connected layer, represents the embedded feature in the time dimension obtained after the original traffic time series data is mapped through the fully connected layer; according to the time sample information difference matrix , construct the feature , and obtain the time sample information difference feature ;
[0099] The embedded features in the spatial dimension and time dimension as well as the original traffic time series data and the trainable parameter are passed through the convolution operation , and the feature on the convolution is obtained, where Represents the convolution operation function;
[0100] According to and the position information features obtained by using coding technology perform an addition operation to obtain comprehensive information features . Among them, the position information features obtained by using coding technology include:
[0101] The first position information feature: ;
[0102] The second position information feature: ;
[0103] The third position information feature: ;
[0104] The fourth position information feature: ;
[0105] Among them, represents the position of the element index, represents the spatial distance parameter matrix, represents the transpose of the spatial distance parameter matrix;
[0106] According to and the sum of the position information features obtained by using coding technology determine the comprehensive feature ;
[0107] According to the position information features recording the trend difference change of the target road node and the time delay feature sum, determine the comprehensive feature ,
[0108] Through the normalization operation determine the comprehensive information feature of the node , represents the normalization operation, represents the trainable weight.
[0109] After the comprehensive verification of the system, it is confirmed that the sample localization encoder constructed by the present invention can provide the model with sampling data that is more evenly distributed and can retain the original spatio-temporal features to the greatest extent for the model to learn.
[0110] Step S102, construct a deep learning model DXGAN by integrating a sample localization encoder, a feature difference generator, and a discriminator;
[0111] Such as Figure 3As shown, the core technology of building a deep learning model DXGAN in the present invention includes: the present invention proposes a feature difference learning network traffic flow data prediction processing method based on robustness analysis, which is used to solve the prediction task problem. The DXGAN neural network model mainly includes a data preprocessing module, a DXGAN neural network model construction and training module, and a prediction evaluation module.
[0112] The data preprocessing module is used to locate and analyze the initial time series information and to receive and transmit it.
[0113] The DXGAN neural network model construction and training module includes: a sample location encoder, a feature difference generator and a discriminator. The DXGAN neural network model is trained. In the process of multiple rounds of iterations, the DXGAN neural network model construction and training module has the ability to distinguish between real data and comparison samples. The DXGAN neural network model construction and training module will continuously update parameters during the training process to improve the model prediction performance.
[0114] The prediction evaluation module is used to judge the performance advancement of the model by combining the obtained prediction results with the performance evaluation indicators and save them.
[0115] For the sample localization encoder, this component can be used to provide the model with more uniform data samples to solve the local heterogeneity problem in the data samples.
[0116] Through the feature difference generator and discriminator, spatiotemporal features are captured from different potential perspectives, thereby enhancing the robustness and generalization of the system.
[0117] The feature difference generator includes: a difference sample generation layer, a difference generator representation layer, and a difference generator output layer;
[0118] The difference sample generation layer includes recording the feature differences at different times to convert the comprehensive information features of the nodes obtained above into Compare the differences and use It can be expressed as follows ,in Indicates at time The comprehensive feature representation of the input nodes.
[0119] The difference generator representation layer represents the difference information generated by the difference sample generation layer by accepting the difference , and the input at different times To learn rich information representations in time series data to support the learning of model training strategies. Specifically, first, we use the GRU network as the unit for processing learning trends in our neural network framework, and the representation is:
[0120] ;
[0121] ;
[0122] ;
[0123] ;
[0124] wherein, represents the updated gate state, represents the reset gate state, represents the candidate hidden state, where the output state is , is expressed as the difference information feature generated by the difference sample generation layer, represents the comprehensive information feature of the node, is expressed as the hidden state representation of the th layer of the difference generator characterization layer, concat represents the concatenation effect between states, , and , , represent the network learnable parameters;
[0125] The output layer of the difference generator performs data fitting through a fully connected layer , and obtains the final output prediction sequence , wherein, FC represents the fully connected layer, represents the learnable parameter.
[0126] The composition of the feature difference discriminator is similar to the generator structure and both are composed of GRU units and an output layer constitute.
[0127] ;
[0128] wherein, represents the overall loss, and its structure is composed of the MAE loss in the general form and the discriminator loss constitute, wherein represents the hyperparameter.
[0129] wherein the discriminator loss can be expanded in the form of:
[0130] ;
[0131] wherein represents the discriminator symbol, The expectation is calculated based on samples drawn from the distribution P, denotes the samples drawn from the distribution P (representing the true data distribution), that is samples conforming to the true data distribution P. denotes the discriminator symbol, denotes the generator symbol, The expectation is calculated based on samples drawn from the distribution P, denotes the samples samples drawn from the distribution P (representing the true data distribution);
[0132] In step S102, the described DXGAN deep learning model includes: a sample location encoder module composed of a fully connected layer and an encoding technique, a generator module Generator composed of GRU units, and a discriminator module Discriminator, enabling parallel output of the data processed by each module; the encoder module Encoder is used to implement the embedded representation of road signals and transform them into sampled data that is more uniform and preserves the original spatio-temporal features to the greatest extent. The generator module Generator uses a GRU network for feature learning and constructs feature difference learning data. The discriminator module is used to maximize the accuracy for real data while minimizing the accuracy for the contrast data generated by the generator module.
[0133] In step S103, the feature difference learning samples are input into the deep learning model DXGAN to obtain a prediction result.
[0134] Specifically, this embodiment includes:
[0135] Step 1, input the original road node sensor information , with the maximum number of iterations being , training the sample location encoder and the feature difference generator to generate feature difference learning samples for the model to learn;
[0136] Step 2, input the feature difference learning information generated by the generator in step 1 into the feature difference discriminator and train the feature difference discriminator to minimize the total loss value;
[0137] Step 3, alternate the feature difference generator and the discriminator to make the model loss converge in the correct imitation direction, iterate times until the maximum number of iterations N;
[0138] Step 4, obtain the road network dataset through the output layer of the discriminator and calculate its loss value.
[0139] In step S103, for the deep learning model DXGAN constructed by inputting the obtained feature difference learning sample data, analyzing the prediction performance of the model includes: analyzing the prediction performance of the model, evaluating the prediction performance, and evaluating the model running efficiency, time complexity, actual memory occupancy, and actual performance.
[0140] In step S103, for the deep learning model DXGAN constructed by inputting the obtained feature difference learning sample data, analyze the prediction performance of the model, and its index discrimination and preservation include: to fully evaluate the performance advantages of the model, the mean absolute percentage error MAPE, root mean square error RMSE, and mean absolute error MAE are used, and their calculation formulas are expressed as:
[0141] ;
[0142] ;
[0143] ;
[0144] In the formula, is the total number of samples, is the true value, is the predicted value;
[0145] As can be seen from the above embodiments, the expected benefits and commercial values after the transformation of the technical solution of the present invention are:
[0146] a. Improve the management efficiency and accuracy of the traffic road network system: The high accuracy and high sensitivity of the DXGAN model in predicting the traffic flow at road network nodes indicate that it can significantly improve and enhance the efficiency and accuracy of road network system node prediction in practical applications. This is of great significance for improving the quality of life of urban residents and reducing road travel delays.
[0147] b. Reduce the burden on the intelligent transportation system: Due to the high efficiency and reliability of DXGAN, it can reduce false predictions, thereby reducing transportation costs and system burden.
[0148] c. Commercialization potential: Due to its high performance in traffic system prediction, the DXGAN model has strong commercialization potential and may attract the attention of urban road system builders and residents' travel developers.
[0149] d. Technology promotion and application: This model can be integrated into various intelligent transportation systems, such as wearable devices or smartphone applications, to provide users with real-time traffic travel predictions and road congestion warning systems.
[0150] The technical solution of the present invention fills the technical gap in the industry:
[0151] a. Innovative model design: DXGAN provides a method for predicting and processing traffic flow data based on a feature difference learning network through robustness analysis. This unique structure is rare in the existing technology.
[0152] b. Efficient resource utilization: Due to its lightweight design, DXGAN can maintain high performance in an environment with limited computing resources, which is a significant improvement in existing traffic flow prediction technologies.
[0153] c. Accuracy of data processing and prediction: Compared with the existing technology, DXGAN demonstrates higher accuracy and reliability in data processing and traffic system node prediction.
[0154] d. Applicability and efficiency: The design of the DXGAN model takes into account the generalization of different datasets, enabling it to be applicable to road network data in different scenarios and providing a generally applicable solution. Moreover, due to its lightweight design, the DXGAN model can achieve high prediction accuracy with fewer parameters, greatly improving the computational efficiency.
[0155] The technical solution of the present invention overcomes technical biases:
[0156] a. Overcoming the dependence on traditional methods: Previously, many road network traffic flow prediction methods relied on traditional statistical or simple machine learning techniques. DXGAN introduces advanced deep learning techniques, breaking the dependence on traditional methods.
[0157] b. Solving the limitations of data processing: Traditional methods for predicting and processing road traffic flow data often overlook the problem of reduced prediction accuracy caused by the local heterogeneity of the signals themselves. DXGAN solves this problem from the perspective of system robustness by integrating a location sample positioning encoder and a feature difference generator and discriminator, providing more comprehensive data analysis.
[0158] c. Overcoming the challenges of dataset differences: Facing the differences in the distribution of different datasets, many methods are difficult to adapt. DXGAN successfully overcomes this technical bias through its design flexibility, providing personalized and highly adaptable solutions.
[0159] Embodiment 2, as another implementation manner of the present invention, the operation process of the method and system for predicting and processing traffic flow data based on a feature difference learning network through robustness analysis provided by the embodiment of the present invention includes:
[0160] Specifically, it includes the following steps:
[0161] I. System initialization and configuration, importing libraries and tools, including 'numpy', 'pandas','scipy', 'torch','matplotlib', etc.
[0162] Set global parameters, batch size: 64; learning rate: 0.001; number of training epochs: 100; initialize the CUDA environment.
[0163] II. Data processing and feature extraction. (1) Import traffic data. Use 'numpy.load' to load the.npy format data file from the specified path.
[0164] Data preprocessing includes:
[0165] To facilitate observing the data change characteristics of the time-series data in the original features in the time and space dimensions, by designing a spatial sample position difference observation matrix and a time sample information difference matrix, record the change characteristics of the original traffic time-series data in the time and space dimensions;
[0166] The spatial sample position difference observation matrix is: when the position information of the sample is detected by the model, that is , the value of this matrix remains , otherwise, when the position information of the sample , , where represents the coordinate position of the sensor node in the spatial dimension.
[0167] The representation of the time sample information difference matrix is more inclined to the situation of the change of the spatial sample position difference observation matrix in time , and this matrix can be expressed as:
[0168] ;
[0169] In the formula, represents the data in the sensor at time . When , it means that the model did not record the changes of the original traffic time-series data in space and time at the previous moment.
[0170] III. Build and train a neural network model, including:
[0171] (1) Design of the DXGAN neural network model;
[0172] (2) Prepare the dataset. Divide the datasets of PEMS03 / 04 / 07 / 08 according to the division ratio of 6:2:2, and randomly shuffle and divide the data.
[0173] (3) Model training, including: Use 'torch.optim.Adam' as the optimizer; adopt 5-fold cross-validation; loss function: ' '; Record metrics such as losses, MAE, MAPE, RMSE during training and testing.
[0174] IV. Performance evaluation and result recording, including: (1) Evaluation metric calculation: MSE, RMSE, MAE; (2) Optimal model selection: Select the optimal model based on metrics such as test , the number of training parameters, and the training iteration time; (3) Result visualization: Prediction effect diagrams and the synthetic prediction and real distribution; (4) Result saving: Save the training and testing results to a CSV file.
[0175] V. System optimization and adjustment, including:
[0176] Parameter tuning: Adjust the network structure and training parameters according to the performance results.
[0177] Feature selection: Analyze the impact of different features on the model performance.
[0178] Code optimization: Optimize the code to improve efficiency.
[0179] VI. Practical application and testing include:
[0180] Practical application testing: Evaluate the performance of the DXGAN neural network model on datasets such as PEMS04;
[0181] System deployment: Gradually expand the DXGAN neural network model into existing public datasets to improve the performance of the datasets.
[0182] As can be seen from the above embodiments, DXGAN consists of a sample location encoder, a feature difference generator, and a discriminator, effectively solving the problems of local heterogeneity and data non-uniformity in traffic flow prediction in intelligent transportation systems, and significantly improving the robustness and generalization ability of the prediction model.
[0183] Solutions to data non-uniformity and acquisition limitations: Due to the layout and functional limitations of sensors, the obtained traffic data often has the problem of non-uniform distribution, which will affect the accuracy and robustness of the prediction model. By introducing a sample location encoder, a feature difference generator, and a discriminator, DXGAN can analyze the spatio-temporal features of traffic flow from multiple perspectives, enhancing the model's ability to process non-uniform data and prediction accuracy.
[0184] Solutions to the local heterogeneity problem: Traditional traffic flow prediction models often encounter difficulties in processing fine-grained sensor data with spatial and temporal heterogeneity. The sample location encoder of DXGAN helps the model learn and predict traffic nodes with complex dependencies more effectively by providing more uniform data samples, thus solving the local heterogeneity problem in the data samples.
[0185] Good robustness: The test results on multiple datasets such as PEMS04 show that DXGAN improves the adaptability and generalization ability of the model in the face of complex real-world traffic situations through feature difference learning and the application of deep neural network technology, thus enabling the model to exhibit superior prediction performance on multiple real-world datasets.
[0186] Embodiment 3, as Figure 3 shown, the traffic flow data prediction and processing system of the feature difference learning network based on robustness analysis provided by the embodiment of the present invention includes:
[0187] A data preprocessing module for positioning and analyzing the initial time series information and receiving and transmitting it.
[0188] A DXGAN neural network model construction and training module for training the DXGAN neural network model by integrating a sample positioning encoder, a feature difference generator, and a discriminator.
[0189] A prediction evaluation module for judging the advanced nature of the model performance by combining the obtained prediction results with performance evaluation indicators and saving them.
[0190] It can be seen from the above embodiments that the present invention effectively solves the problems of local heterogeneity and data non-uniformity in traffic flow prediction in the intelligent transportation system by developing a new type of spatio-temporal feature difference learning neural network, and significantly improves the robustness and generalization ability of the prediction model.
[0191] Secondly, the present invention provides a new network system that optimizes the model prediction ability from the perspective of the robustness of the model system itself. Using the method of feature difference learning, it captures and analyzes spatio-temporal features from different potential perspectives. This not only helps the model consider the trend and consistency of traffic flow during prediction, but also enhances the robustness and generalization ability of the model in the face of data imbalance and acquisition limitations.
[0192] Figure 4 is a schematic structural diagram of the traffic flow data prediction and processing system of the feature difference learning network according to an embodiment of the present invention. As Figure 4 shown, the traffic flow data prediction and processing system of the feature difference learning network includes: a data preprocessing module 41, a DXGAN neural network model construction and training module 42, and a prediction evaluation module 43, wherein
[0193] The data preprocessing module 41 is used to perform data preprocessing on the input original traffic time series data to obtain feature difference learning samples. The original traffic time series data includes traffic data of multiple target road nodes within a time range, and the feature difference learning samples at least include:
[0194] The DXGAN neural network model construction and training module 42 is used to construct a deep learning model DXGAN by integrating a sample location encoder, a feature difference generator, and a discriminator;
[0195] The prediction and evaluation module 43 is used to input the feature difference learning samples into the deep learning model DXGAN to obtain a prediction result.
[0196] Based on the above embodiments, the data preprocessing module 41 is used to record the change characteristics of the original traffic time series data in the time and space dimensions through a spatial sample position difference observation matrix and a time sample information difference matrix;
[0197] The spatial sample position difference observation matrix is: when the position information of the sample is detected by the model, that is , the value of this matrix remains , otherwise, when the position information of the sample , , where represents the spatial retrieval status matrix, and the value of this matrix is 0 or 1, where represents the coordinate position of the sensor node in the spatial dimension.
[0198] The representation of the time sample information difference matrix is more inclined to the situation of the change of the spatial sample position difference observation matrix in time , and this matrix can be expressed as:
[0199] ;
[0200] In the formula, represents the data in the sensor at time . When , it means that the model did not record the changes of the original traffic time series data in space and time at the previous moment.
[0201] Furthermore, the original traffic time series data is respectively passed through to obtain two data embeddings with different channel dimensions , represents the embedding feature in the spatial dimension obtained after the mapping of the original traffic time series data through the fully connected layer, represents the embedding feature in the time dimension obtained after the mapping of the original traffic time series data through the fully connected layer;
[0202] According to the time sample information difference matrix , construct a feature to obtain the time sample information difference feature ;
[0203] The embedded features in the spatial dimension and the temporal dimension as well as the original traffic time-series data and the trainable parameters are subjected to a convolution operation to obtain the features on the convolution, where ; represents the convolution operation function;
[0204] According to and the location information features obtained by using the encoding technology a summation operation is performed to obtain the comprehensive information features . Among them, the location information features obtained by using the encoding technology include:
[0205] The first location information feature: ;
[0206] The second location information feature: ;
[0207] The third location information feature: ;
[0208] The fourth location information feature: ;
[0209] where represents the position of the element index, represents the spatial distance parameter matrix, represents the transpose of the spatial distance parameter matrix;
[0210] According to and the sum of the location information features obtained by using the encoding technology the comprehensive feature is determined;
[0211] According to the sum of the location information features recording the trend difference change of the target road node and the time-delay feature the comprehensive feature
[0212] is determined through a normalization operation to determine the comprehensive information feature of the node, represents the normalization operation, represents the trainable weight.
[0213] Based on the above embodiments, the deep learning model DXGAN includes: a sample location encoder, a feature difference generator, and a discriminator, where
[0214] The feature difference generator includes: a difference sample generation layer, a difference generator characterization layer, and a difference generator output layer;
[0215] The difference sample generation layer records the feature differences at different times to perform a differential comparison on the comprehensive information features of the nodes obtained above, and represents it using It can be represented by the following method , where represents the comprehensive feature representation of the input node at time .
[0216] The difference generator characterization layer learns the rich information representation in the time series data by receiving the difference information representation generated by the difference sample generation layer , as well as the inputs at different times . This characterization layer is composed of a GRU network, and the representation is: , where the output state is , represents the hidden state representation of the th layer of the difference generator characterization layer, where represent the update gate state and the candidate hidden state respectively. The update gate state is represented as , represents the difference information feature generated by the difference sample generation layer, represents the comprehensive information feature of the node, represents the hidden state representation of the th layer of the difference generator characterization layer, the reset gate state is represented as , the candidate hidden state is represented as , concat represents the concatenation effect between states, , and , , represent the network learnable parameters;
[0217] The output layer of the difference generator performs data fitting through a fully connected layer to obtain the final output prediction sequence , where FC represents the fully connected layer, represents the learnable parameter.
[0218] The implementation principle and technical effect of this embodiment are similar to those shown in Figures 1-4 , and will not be elaborated here.
[0219] An embodiment of the present invention also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0220] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor can implement the steps in each of the above method embodiments.
[0221] An embodiment of the present invention also provides an information data processing terminal, which is used to provide a user input interface to implement the steps in each of the above method embodiments when executed on an electronic device. The information data processing terminal is not limited to mobile phones, computers, and switches.
[0222] An embodiment of the present invention also provides a server, which is used to provide a user input interface to implement the steps in each of the above method embodiments when executed on an electronic device.
[0223] An embodiment of the present invention provides a computer program product, which when running on an electronic device enables the electronic device to implement the steps in each of the above method embodiments when executed.
[0224] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above embodiment methods of the present application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in each of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc.
[0225] To further illustrate the related effects of the embodiments of the present invention, the following experiment is conducted: During the training process, the DXGAN neural network first preprocesses the original data using the sample localization encoder, and then alternately trains the feature difference generator and the discriminator, and uses the function for constraint to achieve the best prediction effect. In each iteration process, the number of training times of the feature difference generator and the discriminator is the same. By comprehensively comparing the outputs of the feature difference generator and the discriminator, the neural network model can converge the training of the model under the given constraint . At the same time, the Adam optimizer is selected to optimize the parameters of the neural network model. After multiple rounds of iteration, the neural network model will tend to converge and reach a stable region.
[0226] As shown in Table 1, the experiments conducted on four datasets show that our model DXGAN outperforms the existing state-of-the-art models in all evaluation metrics. The performance data of these baseline models are from widely cited original literature, ensuring the fairness of the comparison. The experimental results show that the performance of the network model proposed by the present invention is better than other model metrics.
[0227] Table 1 Performance test of the DXGAN model on the PEMS03 / 04 / 07 / 08 datasets
[0228]
[0229] As mentioned above, the above is only a relatively preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention shall be covered by the protection scope of the present invention.
Claims
1. A method for predicting and processing network traffic flow data by feature difference learning, characterized in that: include: Performing data preprocessing on the input original traffic time series data to obtain feature difference learning samples, wherein the original traffic time series data includes traffic data of multiple target road nodes within a time range; Through the sample positioning encoder, feature difference generator and discriminator, a deep learning model dynamic exchange generative adversarial network DXGAN is constructed; Inputting the feature difference learning sample into the deep learning model DXGAN to obtain a prediction result; The data preprocessing of the input original traffic time series data to obtain feature difference learning samples includes: Record the change characteristics of the original traffic time series data in time and space dimensions through the spatial sample position difference observation matrix and the time sample information difference matrix; The spatial sample position difference observation matrix is: i,j Detected, confirmed x i,j =1, the value of the matrix remains SPA i,j =1, otherwise, when the position information x i,j = 0, SPA i,j =0, where SPA i,j represents the spatial retrieval state matrix, u,j represents the coordinate position of the sensor node in the spatial dimension; The representation of the time sample information difference matrix is more inclined to the change of the spatial sample position difference observation matrix at time t. The matrix is expressed as: In the formula, x t represents the data in the sensor at time t, ε represents the time sample information difference matrix, when SPA t-1 =0 means that the model did not record the spatial and temporal changes of the original traffic time series data at the previous moment; The original traffic time series data is respectively processed through F1=FC(X) and F2=FC(X) to obtain data embedding F1 and F2 of two different channel dimensions, where F1 represents the embedding features of the original traffic time series data in the spatial dimension after being mapped by the fully connected layer, and F2 represents the embedding features of the original traffic time series data in the time dimension after being mapped by the fully connected layer; According to the time sample information difference matrix ε, construct the feature F ε =FC(ε), obtain the time sample information difference feature F ε ; The embedding features F1, F2 in the spatial and temporal dimensions, the original traffic time series data X and the trainable parameters W K Through the convolution operation H1 = Conv(F1, F2, X, W K ), obtain the feature H1 on the convolution, where Conv represents the convolution operation function; According to F1 and the position information feature PF obtained by encoding technology S Perform the sum operation to obtain the comprehensive information feature F S , where the location information features obtained using the encoding technology include: First location information feature <h2 style=";text-align:left;direction:ltr">PF<h2 style=";text-align:left;direction:ltr"> T <h2 style=";text-align:left;direction:ltr"> [t,n,2i] = sin(t / 10000<h2 style=";text-align:left;direction:ltr"> 4i / D′ <h2 style=";text-align:left;direction:ltr"> ) Second location information feature PF S [t,2n,2i+1]=cos(t / 10000 4i / D′ ) The third location information feature PF S [t,2n,2j+D / 2]=sin(t / 10000 4j / D′ ) Fourth location information feature PF S [t,2n,2j+D / 2]=cos(t / 10000 4j / D′ ); Where n represents the position of the element index, D represents the spatial distance parameter matrix, and D′ represents the transpose of the spatial distance parameter matrix; According to F2 and the position information feature PF obtained by encoding technology T The sum of the two determines the comprehensive feature F T ; According to the location information feature PE of the target road node trend difference change τ and the time-delay characteristic E τ The sum of the two determines the comprehensive feature F τ , By normalizing H Norm =norm(F T W1+F S W2+F τ W3+H1W4) determines the comprehensive information feature H of the node Norm , norm represents the normalization operation, and W1, W2, W3, and W4 represent trainable weights.
2. The method for predicting and processing traffic flow data using feature difference learning network according to claim 1 is characterized in that: The deep learning model DXGAN includes: a sample positioning encoder, a feature difference generator and a discriminator, wherein: The feature difference generator includes: a difference sample generation layer, a difference generator representation layer, and a difference generator output layer; The difference sample generation layer includes recording the feature differences at different times to convert the comprehensive information feature H of the node obtained above into Norm Compare the differences and use F Δ It can be expressed as follows: F Δ =(H Norm:t+1 -H Norm:t ), where H Norm:t+1 represents the comprehensive feature representation of the input node at time t+1; The difference generator representation layer receives the difference information generated by the difference sample generation layer to represent F Δ , and the input H at different times Norm To learn the rich information representation in time series data, the representation layer consists of a GRU network and is represented as: F r =u t ⊙H k-1 +(1-u t )⊙c t , where the output state is F r , H k-1 It is represented as the hidden state representation of the k-1th layer of the difference generator representation layer, where u t ,c t Represent the update gate state and candidate hidden state respectively; the update gate state is represented by u t =sigmoid(concat(F Δ H Norm H k-1 )θ u +b u ), F Δ It is represented as the difference information feature generated by the difference sample generation layer, H Norm Represents the comprehensive information characteristics of the node, H k-1 It is represented as the hidden state representation of the k-1th layer of the difference generator representation layer, and the reset gate state is represented as r t =sigmoid(concat(F Δ H Norm H k-1 )θ r +b r ), the candidate hidden state is denoted as c t =tanh(concat(F Δ H Norm H k-1 ⊙H k-1 )θ c +b c ), concat represents the cascade effect between states, θ u ,θ r ,θ c and b u , b r , b c Represents the network learnable parameters; The output layer of the difference generator is fitted with data through a fully connected layer. Get the final output prediction sequence Among them, FC represents the fully connected layer, and W,b represents the learnable parameters.
3. The method for predicting and processing traffic flow data using feature difference learning network according to claim 2 is characterized in that: The feature difference discriminator determines the overall loss L by L=L1+λL2, where L1 is the MAE loss, L2 is the discriminator loss, and λ is represented as a hyperparameter; The discriminator loss is expressed as: L2 = -E X~P [log(D(G(X)))], D represents the discriminator symbol, G represents the generator symbol, E X~P It means that the expectation is calculated based on samples drawn from distribution P, X~P means that sample X is drawn from distribution P, and P represents the true data distribution.
4. The method for predicting and processing traffic flow data using feature difference learning network according to claim 3 is characterized in that: The step of inputting the feature difference learning sample into the deep learning model DXGAN to obtain a prediction result includes: The prediction results are evaluated by the mean absolute percentage error MAPE, root mean square error RMSE and mean absolute error MAE, where: The formula for mean absolute percentage error MAPE is: The formula for root mean square error RMSE is: The formula for mean absolute error MAE is: Where N is the total number of samples, y i is the true value, is the predicted value.
5. A feature difference learning network traffic flow data prediction and processing system, characterized in that: include: The data preprocessing module is used to perform data preprocessing on the input original traffic time series data to obtain feature difference learning samples, wherein the original traffic time series data includes traffic data of multiple target road nodes within a time range, and the feature difference learning samples at least include: Dynamic exchange generative adversarial network DXGAN neural network model construction and training module, which is used to build the deep learning model DXGAN by integrating sample positioning encoder, feature difference generator and discriminator; A prediction evaluation module, used for inputting the feature difference learning sample into the deep learning model DXGAN to obtain a prediction result; The data preprocessing module is specifically used to record the change characteristics of the original traffic time series data in time and space dimensions through the spatial sample position difference observation matrix and the time sample information difference matrix; The spatial sample position difference observation matrix is: ,j Detected by the model, determine x i,j =1, the value of the matrix remains SPA i,j =1, otherwise, when the position information x i,j = 0, SPA i,j =0, where SPA i,j represents the spatial retrieval state matrix, i, j represents the coordinate position of the sensor node in the spatial dimension; The representation of the time sample information difference matrix is more inclined to the change of the spatial sample position difference observation matrix at time t. The matrix can be expressed as: In the formula, x t represents the data in the sensor at time t, ε represents the time sample information difference matrix, when SPA t-1 =0 means that the model did not record the spatial and temporal changes of the original traffic time series data at the previous moment; The data preprocessing module is further used to embed the original traffic time series data into F1 and F2 respectively through F1=FC(X) and F2=FC(X), where F1 represents the embedding features of the original traffic time series data in the spatial dimension after being mapped by the fully connected layer, and F2 represents the embedding features of the original traffic time series data in the time dimension after being mapped by the fully connected layer; According to the time sample information difference matrix ε, construct the feature F ε =FC(ε), obtain the time sample information difference feature F ε ; The embedding features F1, F2 in the spatial and temporal dimensions, the original traffic time series data X and the trainable parameters W K Through the convolution operation H1 = Conv(F1, F2, X, W K ), obtain the feature H1 on the convolution, where Conv represents the convolution operation function; According to F1 and the position information feature PF obtained by encoding technology S Perform the sum operation to obtain the comprehensive information feature F S , where the location information features obtained using the encoding technology include: First location information feature ON S [t,n,2i]=sin(t / 10000 4i / D′ ) Second location information feature ON S [t,2n,2i+1]=cos(t / 10000 4i / D′ ) The third location information feature ARE S [t,2n,2j+D / 2]=sin(t / 10000 4j / D′ ) Fourth location information feature PE S [t,2n,2j+D / 2]=cos(t / 10000 4j / D′ ); Where n represents the position of the element index, D represents the spatial distance parameter matrix, and D′ represents the transpose of the spatial distance parameter matrix; According to F2 and the position information feature PF obtained by encoding technology T The sum of the two determines the comprehensive feature F T ; According to the location information feature PE of the target road node trend difference change τ and the time-delay characteristic E τ The sum of the two determines the comprehensive feature F τ , By normalizing H Norm =norm(F T W1+F S W2+F τ W3+H1W4) determines the comprehensive information feature H of the node Norm , norm represents the normalization operation, and W1, W2, W3, and W4 represent trainable weights.
6. The feature difference learning network traffic flow data prediction and processing system according to claim 5 is characterized in that: The deep learning model DXGAN includes: a sample positioning encoder, a feature difference generator and a discriminator, wherein: The feature difference generator includes: a difference sample generation layer, a difference generator representation layer, and a difference generator output layer; The difference sample generation layer includes recording the feature differences at different times to convert the comprehensive information feature H of the node obtained above into Norm Compare the differences and use F Δ It can be expressed as follows: F Δ =(H Norm:t+1 -H Norm:t ), where H Norm:t+1 represents the comprehensive feature representation of the input node at time t+1; The difference generator representation layer receives the difference information generated by the difference sample generation layer to represent F Δ , and the input H at different times Norm To learn the rich information representation in time series data, the representation layer consists of a GRU network and is represented as: F r =u t ⊙H k-1 +(1-u t )⊙c t , where the output state is F r , H k-1 It is represented as the hidden state representation of the k-1th layer of the difference generator representation layer, where u t ,c t They represent the update gate state and the candidate hidden state respectively, where the update gate state is represented by u t =sigmoid(concat(F Δ H Norm H k-1 )θ u +b u ), F Δ It is represented as the difference information feature generated by the difference sample generation layer, H Norm Represents the comprehensive information characteristics of the node, H k-1 It is represented as the hidden state representation of the k-1th layer of the difference generator representation layer, and the reset gate state is represented as r t =sigmoid(concat(F Δ H Norm H k-1 )θ r +b r ), the candidate hidden state is denoted as c t =tanh(concat(F Δ H Norm H k-1 ⊙H k-1 )θ c +b c ), concat represents the cascade effect between states, θ u ,θ r ,θ c and b u , b r , b c Represents the network learnable parameters; The output layer of the difference generator is fitted with data through a fully connected layer. Get the final output prediction sequence Among them, FC represents the fully connected layer, and W,b represents the learnable parameters.
Citation Information
Patent Citations
Time-space correlation traffic flow prediction method based on deep learning
CN119274345A