Road congestion prediction model construction method, device, equipment, medium and product

Through the combination of the adaptive graph learning hybrid model and the trend expert model, the problem of insufficient processing capacity of complex traffic data in the road congestion prediction model in the existing technology is solved, and more accurate, robust and interpretable road congestion prediction is achieved.

CN118587899BActive Publication Date: 2024-10-29HONG KONG UNIV OF SCI & TECH (GUANGZHOU)
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411081936.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-29
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

Existing road congestion prediction models have limitations in processing highly dynamic and heterogeneous urban traffic data. They lack the ability to learn complex patterns, have poor robustness to data noise, and have poor interpretability.

Method used

The adaptive graph learning hybrid model and the trend expert model are used to define the road traffic network as a directed weighted graph to obtain historical dynamic road condition characteristics, and cascade aggregation of probability prediction vectors, trend distribution vectors and periodic prediction vectors, combined with multi-layer Perceptron and sparse gating mechanism improve the robustness and interpretability of the model.

Benefits of technology

While ensuring the accuracy of road congestion prediction, it also improves the robustness and interpretability of the model, can more effectively capture complex traffic dynamics and trend signals, and improves the accuracy and transparency of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587899B_ABST
    Figure CN118587899B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment, medium and product for constructing a road congestion prediction model. Different road sections in a road traffic network are defined as directed weighted graphs, and historical dynamic road condition characteristics of different road sections are obtained as sample data; the sample data are input into an adaptive graph learning hybrid model for learning, and a probability prediction vector is output; the sample data are input into a trend expert model, and a trend distribution vector of the prediction probability of future traffic conditions is output; the historical traffic characteristics obtained are integrated according to the periodic expert model to determine the periodic prediction vector; an aggregated logarithmic vector is obtained through cascade aggregation; an objective function is determined according to the aggregated logarithmic vector, and congestion prediction training is performed through supervised learning to obtain a road congestion prediction model. The present application scheme improves the interpretability of the model while ensuring the accuracy and robustness of congestion prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a method, device, equipment, medium and product for constructing a road congestion prediction model. Background Art

[0002] Congestion prediction models are widely used in existing solutions to predict road congestion. However, existing congestion prediction models use deep learning modeling, which is highly dependent on time and space, has limitations in processing highly dynamic and heterogeneous urban traffic data, lacks the ability to learn complex patterns and robustness to data noise, and has poor interpretability. Summary of the invention

[0003] In order to solve the above problems, the present invention proposes a road congestion prediction model construction method, device, equipment, medium and product, which improves the interpretability of the model while ensuring the accuracy and robustness of congestion prediction.

[0004] An embodiment of the present invention provides a method for constructing a road congestion prediction model, the method comprising:

[0005] Different road sections in the road traffic network are defined as directed weighted graphs, and the historical dynamic road condition characteristics of different road sections are obtained as sample data;

[0006] Inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector;

[0007] Inputting the sample data into a preset trend expert model, and outputting a trend distribution vector of the predicted probability of future traffic conditions;

[0008] The acquired historical traffic characteristics are integrated according to the pre-built periodic expert model to determine the periodic prediction vector;

[0009] Performing cascade aggregation on the probability prediction vector, the trend distribution vector, and the periodicity prediction vector to obtain an aggregated logarithmic vector;

[0010] The objective function is determined according to the aggregated logarithmic vector, and congestion prediction training is performed through supervised learning to obtain a road congestion prediction model.

[0011] Preferably, the step of inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector comprises:

[0012] Extracting a temporal dynamic representation from the sample data according to a preset temporal convolutional network, and deriving a short-term spatiotemporal context through a lightweight summation operator;

[0013] According to the flow direction of traffic flow during traffic congestion, upstream expert models and downstream expert models are designed to simulate the dynamics of traffic flow propagation;

[0014] Aggregate information on dependencies between different road segments and build a global expert that captures implicit propagation patterns beyond the adjacency of the road network;

[0015] The sparse gating mechanism based on multi-layer perceptron integrates static road segment attributes, spatial steady-state embedding, and temporal steady-state embedding to determine the gating input of the road segment;

[0016] According to the gated input, a preset activation function is used to output activation weights of each expert;

[0017] At each observation moment, corresponding experts are selected for different road sections for modeling, and the outputs of each expert are aggregated based on their activation weights to obtain an encoded representation of the contextual traffic dynamics of the target road section.

[0018] Multiple layers of the hybrid are stacked and a multi-layer perceptron is used to generate a probability prediction vector of congestion levels for all road segments for a subsequent preset number of time steps.

[0019] Preferably, the step of inputting the sample data into a preset trend expert model and outputting a trend distribution vector of the predicted probability of future traffic conditions comprises:

[0020] Using discrete wavelet transform to perform multi-scale decomposition on the sample data, and using inverse wavelet transform to reconstruct trend signals from low-frequency components;

[0021] The trend expert model constructed based on the multi-head self-attention mechanism is combined with the output mapping layer based on the multi-layer perceptron to analyze the trend signal and output the trend distribution vector of the predicted probability of future traffic conditions.

[0022] Preferably, the cascade aggregation of the probability prediction vector, the trend distribution vector and the periodicity prediction vector to obtain an aggregated logarithmic vector includes:

[0023] Determining expert weights of the trend distribution vector and the periodic prediction vector according to a preset confidence function;

[0024] aggregating the trend distribution vector and the probability prediction vector according to the expert weight of the trend distribution vector to obtain a cascade vector;

[0025] The periodic prediction vector and the cascade vector are aggregated according to the expert weight of the periodic prediction vector to obtain an aggregated logarithmic vector.

[0026] Preferably, determining the objective function according to the aggregated logarithmic vector, performing congestion prediction training through supervised learning, and obtaining a road congestion prediction model includes:

[0027] According to the preset ordinal regression loss strategy, part of the probability of the target category is reallocated to other categories, and the elements of the one-hot label encoding are adjusted to determine the congestion level label;

[0028] calculating a relative entropy between the aggregated logarithmic vector and the congestion level label;

[0029] Calculating the importance balance loss and the load balance loss of different layers in the mixture, and determining the objective function according to the importance balance loss and the load balance loss of different layers and the relative entropy;

[0030] Congestion prediction training is performed through supervised learning according to the objective function to obtain a road congestion prediction model.

[0031] Furthermore, the objective function is: ;

[0032] in, is the loss value, is the relative entropy, and are the importance balance loss and load balance loss of the lth layer of the mixture, L is the number of layers of the mixture, and is a hyperparameter that controls the degree of expert balance.

[0033] The embodiment of the present invention further provides a device for constructing a road congestion prediction model, the device comprising:

[0034] A definition module, used to define different road sections in the road traffic network as directed weighted graphs, and obtain historical dynamic road condition characteristics of different road sections as sample data;

[0035] A hybrid module, used for inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector;

[0036] A trend module, used for inputting the sample data into a preset trend expert model and outputting a trend distribution vector of the predicted probability of future traffic conditions;

[0037] The periodic module is used to fuse the acquired historical traffic characteristics according to the pre-built periodic expert model to determine the periodic prediction vector;

[0038] A cascade module, used for cascading and aggregating the probability prediction vector, the trend distribution vector and the periodicity prediction vector to obtain an aggregated logarithmic vector;

[0039] The training module is used to determine the target function according to the aggregated logarithmic vector, perform congestion prediction training through supervised learning, and obtain a road congestion prediction model.

[0040] An embodiment of the present invention also provides a road congestion prediction model construction device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, a road congestion prediction model construction method as described in any of the above embodiments is implemented.

[0041] An embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the road congestion prediction model construction method as described in any of the above embodiments.

[0042] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the method for constructing a road congestion prediction model as described in any one of the above embodiments.

[0043] The present invention provides a method, device, equipment, medium and product for constructing a road congestion prediction model. By defining different road sections in a road traffic network as directed weighted graphs, the historical dynamic road condition characteristics of different road sections are obtained as sample data; the sample data is input into a preset adaptive graph learning hybrid model for learning, the encoding representation of the contextual traffic dynamics of the target section is determined, and a probability prediction vector is output; the sample data is input into a preset trend expert model, and a trend distribution vector of the predicted probability of future traffic conditions is output; the acquired historical traffic characteristics are integrated according to a pre-constructed periodic expert model to determine a periodic prediction vector; the probability prediction vector, the trend distribution vector and the periodic prediction vector are cascaded and aggregated to obtain an aggregated logarithmic vector; the objective function is determined according to the aggregated logarithmic vector, and congestion prediction training is performed through supervised learning to obtain a road congestion prediction model. The present application scheme improves the interpretability of the model while ensuring the accuracy and robustness of congestion prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flowchart of a method for constructing a road congestion prediction model provided by an embodiment of the present invention;

[0045] Figure 2is a schematic diagram of the structure of a road congestion prediction model provided by an embodiment of the present invention;

[0046] Figure 3 is a schematic diagram of the structure of a single-layer adaptive graph learning hybrid model provided by an embodiment of the present invention;

[0047] Figure 4 It is a structural schematic diagram of a road congestion prediction model building device provided by an embodiment of the present invention;

[0048] Figure 5 It is a structural diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] See also Figure 1 , is a flow chart of a method for constructing a road congestion prediction model provided by an embodiment of the present invention, the method comprising steps S1 to S6;

[0051] S1, define different road sections in the road traffic network as directed weighted graphs, and obtain the historical dynamic road condition characteristics of different road sections as sample data;

[0052] S2, inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector;

[0053] S3, inputting the sample data into a preset trend expert model, and outputting a trend distribution vector of the predicted probability of future traffic conditions;

[0054] S4, fusing the acquired historical traffic characteristics according to the pre-built periodic expert model to determine the periodic prediction vector;

[0055] S5, performing cascade aggregation on the probability prediction vector, the trend distribution vector, and the periodicity prediction vector to obtain an aggregated logarithmic vector;

[0056] S6, determining an objective function according to the aggregated logarithmic vector, performing congestion prediction training through supervised learning, and obtaining a road congestion prediction model.

[0057] In the specific implementation of this embodiment, the traffic network is first defined and a network directed weighted graph is constructed. That is, different road sections in the road traffic network are defined as a directed weighted graph. .

[0058] in represents a road segment, and Indicates road segment and The adjacent relationship between them. , the dynamic traffic characteristics are expressed as ,in is the number of road segments, represents the number of dynamic traffic feature types. In addition, let Indicates road segment At time step Dynamic road condition characteristics.

[0059] Defining the degree of congestion, three discrete congestion levels are used to evaluate the traffic conditions of a road section: smooth, slow, and congested, which are recorded as categories 0, 1, and 2, respectively.

[0060] Based on the above concepts, we define the target problem, namely congestion prediction: given the previous Traffic feature sequence of time steps , as the historical traffic feature set , that is, sample data, and traffic network , the goal is to learn a mapping function , to predict the future The congestion level during the time interval, .

[0061] in, Indicates in the future The predicted value of congestion level for each road segment in each time step.

[0062] See also Figure 2 , is a schematic diagram of the structure of the road congestion prediction model provided by an embodiment of the present invention. The overall framework of the congestion prediction model proposed in this application includes three main modules:

[0063] Adaptive graph learning hybrid: This module consists of multiple MAGL layers built on a sparse gated MoE architecture that selectively routes samples to specialized graph learning experts to fully and effectively explore spatiotemporal dependencies. By inputting the sample data into a preset adaptive graph learning hybrid model to learn, the encoding representation of the contextual traffic dynamics of the target road section is determined, and a probability prediction vector is output;

[0064] Trend and cycle expert cascade integration: This module adaptively integrates two professional experts to capture trend and cycle patterns, enhancing the model's robustness to corrupted data. The sample data is input into the preset trend expert model, which outputs a trend distribution vector of the predicted probability of future traffic conditions;

[0065] The acquired historical traffic characteristics are integrated according to the pre-built periodic expert model to determine the periodic prediction vector;

[0066] Expert confidence balance: This module uses ordinal regression to guide experts to identify the ordinal relationship between congestion levels, alleviate overconfidence in their predictions and promote effective collaboration among experts. Specifically, the static attributes and dynamic historical road condition observation sequences of each traffic section are first input into the adaptive graph learner hybrid, trend expert and periodic expert respectively to model the road condition evolution pattern in a targeted manner, and the prediction probabilities of the three for the road conditions of these sections in the future several time steps are obtained.

[0067] These prediction probabilities are aggregated in a cascade order through a learnable confidence function to obtain the probability prediction result of the model as a whole. The probability prediction vector, the trend distribution vector and the periodicity prediction vector are cascaded and aggregated to obtain an aggregated logarithmic vector.

[0068] The prediction results and the softened real road condition labels are subjected to supervised learning, and an expert balance regularization term is introduced to ensure that each modeling expert can learn unique abilities without being overconfident, thereby promoting cooperation among experts to obtain accurate road condition prediction results. The objective function is determined according to the aggregated logarithmic vector, and congestion prediction training is performed through supervised learning to obtain a road congestion prediction model.

[0069] This case is based on a customized congestion prediction model of mixed experts. By introducing the inductive bias of congestion perception, different experts can focus on processing different fine-grained road condition evolution patterns and improve the accuracy of congestion prediction. Make full use of stable trend and periodic signals; by designing experts who specialize in modeling trend signals and periodic signals respectively, by modeling these stable time series signals, the robustness is improved while maintaining the accuracy of congestion prediction.

[0070] The expert aggregation method based on prediction confidence makes the expert collaboration process transparent so that users can understand the internal mechanism of the model in making congestion predictions and achieve explainable congestion predictions.

[0071] The congestion prediction model provided by the present invention can effectively improve the accuracy, robustness and interpretability of congestion prediction by designing customized road condition modeling experts and promoting beneficial cooperation among experts, thereby enabling the construction of a smart transportation system.

[0072] In another embodiment provided by the present invention, the step S2 specifically includes:

[0073] Extracting a temporal dynamic representation from the sample data according to a preset temporal convolutional network, and deriving a short-term spatiotemporal context through a lightweight summation operator;

[0074] According to the flow direction of traffic flow during traffic congestion, upstream expert models and downstream expert models are designed to simulate the dynamics of traffic flow propagation;

[0075] Aggregate information on dependencies between different road segments and build a global expert that captures implicit propagation patterns beyond the adjacency of the road network;

[0076] The sparse gating mechanism based on multi-layer perceptron integrates static road segment attributes, spatial steady-state embedding, and temporal steady-state embedding to determine the gating input of the road segment;

[0077] According to the gated input, a preset activation function is used to output activation weights of each expert;

[0078] At each observation moment, corresponding experts are selected for different road sections for modeling, and the outputs of each expert are aggregated based on their activation weights to obtain an encoded representation of the contextual traffic dynamics of the target road section.

[0079] Multiple layers of the hybrid are stacked and a multi-layer perceptron is used to generate a probability prediction vector of congestion levels for all road segments for a subsequent preset number of time steps.

[0080] When this embodiment is implemented, see Figure 3 , is a structural diagram of a single-layer adaptive graph learning hybrid model provided in an embodiment of the present invention.

[0081] The ideal sparse gating function should guide the input road segment to the most suitable expert for spatiotemporal modeling under specific context conditions. To achieve this goal, detailed context features are selected as gating inputs to enhance the distinguishability of road segment samples. Given that convolutional networks are sensitive to high-frequency signals (e.g., sudden congestion), we first use a temporal convolutional network to extract the input road segment information. Extracting temporal dynamic representations from The short-term spatiotemporal context is then derived through a lightweight summation operator ,in Indicates road segment of Step neighbors.

[0082] Considering that short-term road condition information may still lack differentiation in different scenarios, three types of steady-state features are further incorporated: (1) Static road segment attributes , (2) Trainable spatially stable embedding , used to encode the unique steady-state properties of the road segment, (3) trainable temporal steady-state embedding and , which is used to encode the time-dependent steady-state pattern of regularity. In general, the road segment At the moment The corresponding gate input is .

[0083] in, Represents a vector concatenation operation. Based on this gated input, the gated function generates the corresponding expert activation weights, .

[0084] in, is an activation function, Gaussian noise is added to the output expert activation weights To avoid over-reliance on a few specific experts, The largest weight is retained item.

[0085] Among congestion-aware graph learning experts, there are significant spatiotemporal pattern differences between congested and non-congested traffic scenarios. Such pattern differences may introduce noisy or even contradictory knowledge, making it difficult to train a unified model that can perfectly recognize traffic patterns in different scenarios. To address this challenge, three groups of graph learning experts are designed, each with a dedicated inductive bias to specialize in a specific pattern type.

[0086] Specifically, traffic congestion usually propagates upward from downstream segments to upstream segments, while during non-congested periods, traffic flows freely from upstream to downstream segments. Based on this characteristic, two types of specialized expert groups, namely upstream expert models and downstream expert models, are configured to simulate these two completely different propagation dynamics.

[0087] In general, each expert Based on an edge-aware graph attention network, it works by adaptively aggregating neighboring road segment information to update the representation of the target road segment: .

[0088] Among them, the weight The following formula is used to calculate the importance of information aggregation between nodes:

[0089] .

[0090] in, , and Represents a learnable mapping matrix. For upstream experts, Include For all upstream segments, Only covers downstream section.

[0091] However, the graph topology constructed based on the road network is often noisy and incomplete, and may not truly reflect the actual relationship between road segments. Therefore, a group of global experts are assigned to identify potential propagation patterns. Each global expert is equipped with a unique learnable road segment embedding , used to encode inherent spatial characteristics. and The potential dependencies between can be inferred by the following way,weights: .

[0092] By aggregating information based on this dependency, the global expert is able to capture implicit propagation patterns beyond the road network adjacency relationships, enhancing the model's ability to understand and predict complex traffic dynamics.

[0093] Each layer of the adaptive graph learning hybrid uses a learnable sparse gating mechanism to select a small number of specific experts for modeling a specific road segment at each observation time, and aggregate the outputs of each expert based on the weights routed to each expert, and finally obtain an encoded representation of the contextual traffic dynamics of the target road segment. Formally, the MAGL layer is defined as: .

[0094] in, represents the number of experts, represents the sparse gating function, and yes The output vector elements, used to determine the Experts The importance of is a function specially designed to enrich the gate input; It is a road section In the time interval No. The output of the layer, and ,in Represents a fully connected layer.

[0095] In practice, by stacking layer mixture, and use a multi-layer perceptron to generate the next The congestion level probability prediction vector of all road sections at time steps, .

[0096] In another embodiment provided by the present invention, the step S3 specifically includes:

[0097] Using discrete wavelet transform to perform multi-scale decomposition on the sample data, and using inverse wavelet transform to reconstruct trend signals from low-frequency components;

[0098] The trend expert model constructed based on the multi-head self-attention mechanism is combined with the output mapping layer based on the multi-layer perceptron to analyze the trend signal and output the trend distribution vector of the predicted probability of future traffic conditions.

[0099] In the specific implementation of this embodiment, although the adaptive graph learning hybrid can model a variety of traffic propagation patterns, the accuracy of traffic condition prediction will be affected when the short-term historical traffic data is contaminated. In such scenarios, modeling trends and periodic signals is particularly important for accurate predictions because they are insensitive to external interference. Inspired by this, trend experts and periodic experts are constructed to capture stable trends and periodicities respectively, thereby improving the robustness of the model. On the other hand, the adaptive graph learning hybrid is of great significance in fully capturing the complex, non-stationary, and irregular patterns in traffic situations. It is necessary to organically combine trend experts, periodic experts, and adaptive graph learning hybrids to achieve accurate and robust traffic condition predictions. Based on this motivation, a cascaded expert integration technology is designed.

[0100] When decoupling and modeling trend signals, the trend of traffic conditions can be represented by low-frequency signals in short-term observation data, which are often mixed with high-frequency signals that fluctuate over time. Therefore, the discrete wavelet transform (DWT) is first applied to the input sequence. Perform multi-scale decomposition and use inverse wavelet transform to reconstruct trend signals from low-frequency components Subsequently, a trend expert based on a multi-head self-attention mechanism is used, combined with an output mapping layer based on a multi-layer perceptron (MLP), to output a predicted probability distribution vector of future traffic conditions. .

[0101] When modeling periodic signals, the periodic patterns contained in historical data can provide greater robustness to predictions when there are serious errors or omissions in short-term data. It contains global periodic patterns driven by daily travel habits (such as morning rush hour commuting), as well as local periodic features affected by external factors such as recent weather changes. In order to capture this multi-dimensional periodicity, an efficient MLP-based periodic expert module is designed to perform future predictions. By integrating historical traffic characteristics and learnable space and time, the periodic prediction vector .

[0102] By learning the periodic patterns in historical data, the stability and accuracy of predictions can be improved even in the face of severe data pollution.

[0103] In another embodiment provided by the present invention, the step S5 specifically includes:

[0104] Determining expert weights of the trend distribution vector and the periodic prediction vector according to a preset confidence function;

[0105] aggregating the trend distribution vector and the probability prediction vector according to the expert weight of the trend distribution vector to obtain a cascade vector;

[0106] The periodic prediction vector and the cascade vector are aggregated according to the expert weight of the periodic prediction vector to obtain an aggregated logarithmic vector.

[0107] In the specific implementation of this embodiment, the trend expert model and the periodic expert model are cascaded to ensure that these experts play a leading role in processing damaged data, and when facing irregular traffic situations, the adaptive graph learning hybrid can be used to lead the capture of complex patterns. However, the distribution similarity between the two types of data makes it particularly difficult to learn an ideal routing strategy in the absence of a clear supervisory signal. Therefore, this case alleviates this problem by using the confidence of the expert prediction to determine its impact on the final prediction.

[0108] Specifically, a learnable confidence function is designed based on the output probability distribution of trend experts or periodic experts. To assign weights to each expert: .in, is a dispersion function that calculates the variance and negative entropy of a probability distribution to measure the confidence of the prediction; is trained to map the dispersion to The time index superscript of the probability distribution is omitted here for brevity.

[0109] The order of expert aggregation follows two principles: (1) When the confidence levels of all weaker experts are low, only stronger experts are activated to concentrate on learning complex patterns; (2) Since periodic experts cannot directly access the latest traffic observation data, they are considered to be weaker in ability than trend experts. These principles lead to a cascade expert aggregation strategy, according to which the final traffic prediction probability distribution of the congestion prediction model designed in this case is obtained by cascading the outputs of different experts, that is, according to the expert weight of the trend distribution vector, the trend distribution vector is aggregated with the probability prediction vector to obtain a cascade vector, .

[0110] According to the expert weight of the periodic prediction vector, the periodic prediction vector and the cascade vector are aggregated to obtain an aggregated logarithmic vector, .

[0111] in, and There are two learnable confidence functions, which are used to evaluate the forecast confidence of trend experts and cyclical experts respectively and assign corresponding weights.

[0112] It should be noted that this method is also highly interpretable, because the decision-making process of the model can be directly explained by the weights of each expert. The contribution (weight) of each expert intuitively reflects the trust tendency of the model in a specific situation: when the short-term data quality is poor, the model may rely more on the stable mode of trend and periodic experts; and when faced with complex and changeable non-periodic traffic patterns, the role of the MAGL component may be enhanced. Such a design not only improves the accuracy and robustness of the prediction, but also makes the internal logic of the model more transparent, easy to understand and debug.

[0113] In another embodiment provided by the present invention, the step S6 specifically includes:

[0114] According to the preset ordinal regression loss strategy, part of the probability of the target category is reallocated to other categories, and the elements of the one-hot label encoding are adjusted to determine the congestion level label;

[0115] calculating a relative entropy between the aggregated logarithmic vector and the congestion level label;

[0116] Calculating the importance balance loss and the load balance loss of different layers in the mixture, and determining the objective function according to the importance balance loss and the load balance loss of different layers and the relative entropy;

[0117] Congestion prediction training is performed through supervised learning according to the objective function to obtain a road congestion prediction model.

[0118] In the specific implementation of this embodiment, the ordinal regression technology for the expert confidence balance problem, the architecture of different experts has various inductive biases, and the different degrees of category crowding imbalance in their assigned data subsets may lead to significant confidence differences. This may cause overconfident experts to weaken the contribution of other experts, which in turn leads to biased predictions in the output of the cascaded expert integration module. To meet this challenge, this case adopts an ordinal regression strategy to alleviate the problem of expert overconfidence. This method reduces the expert's over-certainty about a single category by reallocating part of the probability of the target category to other categories and smoothing the unique hot label into a soft label.

[0119] In addition, categories adjacent to the target category will be assigned higher probability values ​​to maintain the natural order between categories. This strategy further enriches each category in the label space with the information of neighboring categories, effectively alleviating the overconfidence phenomenon caused by category imbalance.

[0120] Specifically, the i-th element of the one-hot label encoding is adjusted to ,in represents the target category, and is a predefined distance metric function used to penalize the probability of being far away from the class. In the context of congestion prediction, given the limited number of classes, This can be determined through hyperparameter tuning.

[0121] In practice, further constraints on the distance metric function need to satisfy , for all holds, thus narrowing the tuning scope to A set of parameters.

[0122] Determine the overall optimization goal and design two optimization goals for training the congestion prediction model designed in this patent. The first part is the ordinal regression loss, which aims to promote the balance of confidence among experts. This loss is calculated by calculating the logarithmic probability of the CP-MoE output. Congestion level labels after ordinal smoothing The Kullback-Leibler (KL) divergence between .

[0123] The second part includes two types of expert-balanced regularization terms, which are designed to prevent the model collapse problem in the adaptive graph learning hybrid module. Specifically, each layer of the adaptive graph learning hybrid is equipped with an importance-balanced loss , to limit the variation of weights assigned to different graph experts, and a load balancing loss , used to ensure the fairness of the activation frequency of each expert.

[0124] Congestion prediction training is performed through supervised learning according to the objective function to obtain a road congestion prediction model.

[0125] In another embodiment provided by the present invention, the objective function is: ;

[0126] in, is the loss value, is the relative entropy, and are the importance balance loss and load balance loss of the lth layer of the mixture, L is the number of layers of the mixture, and is a hyperparameter that controls the degree of expert balance.

[0127] In the specific implementation of this embodiment, the congestion prediction model is trained by jointly optimizing the following objectives. The objective function is: .

[0128] in, is the loss value, is the relative entropy, and are the importance balance loss and load balance loss of the lth layer of the mixture, respectively. , L is the number of layers of the mixture, and is a hyperparameter that controls the degree of expert balance.

[0129] This case uses a congestion-aware adaptive graph learning hybrid. This model architecture can fully and efficiently capture diverse dynamic road condition evolution patterns, and is the basis for achieving high-precision congestion prediction. Through cascaded expert integration: by assigning trend experts and periodic experts to model stable traffic signals, and cascading aggregation with the adaptive graph learning hybrid, it is possible to improve the robustness and interpretability of the model while ensuring the accuracy of congestion prediction, which is the key to improving the reliability of congestion prediction. Considering that overconfident experts will dominate the expert aggregation process and thus affect the final prediction results, this technical solution provides an optimization strategy based on ordinal regression and an expert balance regularization strategy, which is an important guarantee for the adaptive graph learning hybrid and cascade expert integration technology to fully exert their effectiveness.

[0130] Compared with the existing technology, this case improves the interpretability of the model while ensuring the accuracy and robustness of congestion prediction.

[0131] In another embodiment provided by the present invention, see Figure 4 , is a schematic diagram of a structure of a road congestion prediction model building device provided by an embodiment of the present invention, the device comprising:

[0132] A definition module, used to define different road sections in the road traffic network as directed weighted graphs, and obtain historical dynamic road condition characteristics of different road sections as sample data;

[0133] A hybrid module, used for inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector;

[0134] A trend module, used for inputting the sample data into a preset trend expert model and outputting a trend distribution vector of the predicted probability of future traffic conditions;

[0135] The periodic module is used to fuse the acquired historical traffic characteristics according to the pre-built periodic expert model to determine the periodic prediction vector;

[0136] A cascade module, used for cascading and aggregating the probability prediction vector, the trend distribution vector and the periodicity prediction vector to obtain an aggregated logarithmic vector;

[0137] The training module is used to determine the target function according to the aggregated logarithmic vector, perform congestion prediction training through supervised learning, and obtain a road congestion prediction model.

[0138] The road congestion prediction model construction device provided in this embodiment can execute all the steps and functions of the road congestion prediction model construction method provided in any of the above embodiments, and the specific functions of the device are not described in detail here.

[0139] See also Figure 5 , is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a road congestion prediction model construction program. When the processor executes the computer program, the steps in each of the above-mentioned road congestion prediction model construction method embodiments are implemented, such as Figure 1 Alternatively, the processor implements the functions of each module in the above-mentioned device embodiments when executing the computer program.

[0140] Exemplarily, the computer program may be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device. For example, the computer program may be divided into various modules, and the specific functions of each module have been described in detail in a method for constructing a road congestion prediction model provided in any of the above embodiments, and the specific functions of the terminal device will not be repeated here.

[0141] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art may understand that the schematic diagram is only an example of a terminal device and does not constitute a limitation on a terminal device. The terminal device may include more or fewer components than shown in the figure, or may combine certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0142] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0143] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0144] Wherein, if the module integrated in the terminal device 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 such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0145] It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for constructing a road congestion prediction model, characterized in that: The method comprises: Different road sections in the road traffic network are defined as directed weighted graphs, and the historical dynamic road condition characteristics of different road sections are obtained as sample data; Inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector; The adaptive graph learning hybrid model is composed of multiple MAGL layers built on a sparse gated MoE architecture; the sample data is input into a preset trend expert model to output a trend distribution vector of the predicted probability of future traffic conditions; The acquired historical traffic characteristics are integrated according to the pre-built periodic expert model to determine the periodic prediction vector; Performing cascade aggregation on the probability prediction vector, the trend distribution vector, and the periodicity prediction vector to obtain an aggregated logarithmic vector; Determine the objective function according to the aggregated logarithmic vector, perform congestion prediction training through supervised learning, and obtain a road congestion prediction model; The adaptive graph learning hybrid model consists of multiple MAGL layers built on a sparse gated MoE architecture, which input sample routes in the sample data to professional graph learning experts; The step of inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector includes: Extracting a temporal dynamic representation from the sample data according to a preset temporal convolutional network, and deriving a short-term spatiotemporal context through a lightweight summation operator; According to the flow direction of traffic flow during traffic congestion, upstream expert models and downstream expert models are designed to simulate the dynamics of traffic flow propagation; Aggregate information on dependencies between different road segments and build a global expert that captures implicit propagation patterns beyond the adjacency of the road network; The sparse gating mechanism based on multi-layer perceptron integrates static road segment attributes, spatial steady-state embedding, and temporal steady-state embedding to determine the gating input of the road segment; According to the gated input, a preset activation function is used to output activation weights of each expert; At each observation moment, corresponding experts are selected for different road sections for modeling, and the outputs of each expert are aggregated based on their activation weights to obtain an encoded representation of the contextual traffic dynamics of the target road section. Stacking multiple layers of the mixture and using a multi-layer perceptron to generate a probability prediction vector of congestion levels for all road segments for a subsequent preset number of time steps; The step of inputting the sample data into a preset trend expert model and outputting a trend distribution vector of the predicted probability of future traffic conditions includes: Using discrete wavelet transform to perform multi-scale decomposition on the sample data, and using inverse wavelet transform to reconstruct trend signals from low-frequency components; A trend expert model constructed based on a multi-head self-attention mechanism is combined with an output mapping layer based on a multi-layer perceptron to analyze the trend signal and output a trend distribution vector of the predicted probability of future traffic conditions; The step of fusing the acquired historical traffic characteristics according to the pre-built periodic expert model to determine the periodic prediction vector includes: The MLP-based periodic expert module is used to make future predictions. By integrating historical traffic characteristics and learnable time and space, the periodic prediction vector is determined. ; Among them, MLP per () is a multi-layer perceptron model, is a collection of historical traffic features, and is a trainable time-steady embedding, Es is a learnable road segment embedding, After time t time steps; The objective function is determined according to the aggregated logarithmic vector, and congestion prediction training is performed through supervised learning to obtain a road congestion prediction model, including: According to the preset ordinal regression loss strategy, part of the probability of the target category is reallocated to other categories, and the elements of the one-hot label encoding are adjusted to determine the congestion level label; calculating a relative entropy between the aggregated logarithmic vector and the congestion level label; Calculating the importance balance loss and the load balance loss of different layers in the mixture, and determining the objective function according to the importance balance loss and the load balance loss of different layers and the relative entropy; Congestion prediction training is performed through supervised learning according to the objective function to obtain a road congestion prediction model.

2. The method for constructing a road congestion prediction model according to claim 1, characterized in that: The cascading aggregation of the probability prediction vector, the trend distribution vector, and the periodicity prediction vector to obtain an aggregated logarithmic vector includes: Determining expert weights of the trend distribution vector and the periodic prediction vector according to a preset confidence function; aggregating the trend distribution vector and the probability prediction vector according to the expert weight of the trend distribution vector to obtain a cascade vector; The periodic prediction vector and the cascade vector are aggregated according to the expert weight of the periodic prediction vector to obtain an aggregated logarithmic vector.

3. The method for constructing a road congestion prediction model according to claim 1, characterized in that: The objective function is: ; in, is the loss value, is the relative entropy, and are the importance balance loss and load balance loss of the lth layer of the mixture, L is the number of layers of the mixture, and is a hyperparameter that controls the degree of expert balance.

4. A road congestion prediction model construction device, characterized in that: The device comprises: A definition module, used to define different road sections in the road traffic network as directed weighted graphs, and obtain historical dynamic road condition characteristics of different road sections as sample data; A hybrid module, used for inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector; The adaptive graph learning hybrid model consists of multiple MAGL layers built on the sparse gated MoE architecture; A trend module, used for inputting the sample data into a preset trend expert model and outputting a trend distribution vector of the predicted probability of future traffic conditions; The periodic module is used to fuse the acquired historical traffic characteristics according to the pre-built periodic expert model to determine the periodic prediction vector; A cascade module, used for cascading and aggregating the probability prediction vector, the trend distribution vector and the periodicity prediction vector to obtain an aggregated logarithmic vector; A training module, used to determine an objective function according to the aggregated logarithmic vector, and perform congestion prediction training through supervised learning to obtain a road congestion prediction model; The adaptive graph learning hybrid model consists of multiple MAGL layers built on a sparse gated MoE architecture, which input sample routes in the sample data to professional graph learning experts; The step of inputting the sample data into a preset adaptive graph learning hybrid model for learning, determining the encoding representation of the contextual traffic dynamics of the target road section, and outputting a probability prediction vector includes: Extracting a temporal dynamic representation from the sample data according to a preset temporal convolutional network, and deriving a short-term spatiotemporal context through a lightweight summation operator; According to the flow direction of traffic flow during traffic congestion, upstream expert models and downstream expert models are designed to simulate the dynamics of traffic flow propagation; Aggregate information on dependencies between different road segments and build a global expert that captures implicit propagation patterns beyond the adjacency of the road network; The sparse gating mechanism based on multi-layer perceptron integrates static road segment attributes, spatial steady-state embedding, and temporal steady-state embedding to determine the gating input of the road segment; According to the gated input, a preset activation function is used to output activation weights of each expert; At each observation moment, corresponding experts are selected for different road sections for modeling, and the outputs of each expert are aggregated based on their activation weights to obtain an encoded representation of the contextual traffic dynamics of the target road section. Stacking multiple layers of the mixture and using a multi-layer perceptron to generate a probability prediction vector of congestion levels for all road segments for a subsequent preset number of time steps; The step of inputting the sample data into a preset trend expert model and outputting a trend distribution vector of the predicted probability of future traffic conditions includes: Using discrete wavelet transform to perform multi-scale decomposition on the sample data, and using inverse wavelet transform to reconstruct trend signals from low-frequency components; A trend expert model constructed based on a multi-head self-attention mechanism is combined with an output mapping layer based on a multi-layer perceptron to analyze the trend signal and output a trend distribution vector of the predicted probability of future traffic conditions; The step of fusing the acquired historical traffic characteristics according to the pre-built periodic expert model to determine the periodic prediction vector includes: The MLP-based periodic expert module is used to make future predictions. By integrating historical traffic characteristics and learnable time and space, the periodic prediction vector is determined. ; Among them, MLP per () is a multi-layer perceptron model, is a collection of historical traffic features, and is a trainable time-steady embedding, Es is a learnable road segment embedding, After time t time steps; The objective function is determined according to the aggregated logarithmic vector, and congestion prediction training is performed through supervised learning to obtain a road congestion prediction model, including: According to the preset ordinal regression loss strategy, part of the probability of the target category is reallocated to other categories, and the elements of the one-hot label encoding are adjusted to determine the congestion level label; calculating a relative entropy between the aggregated logarithmic vector and the congestion level label; Calculating the importance balance loss and the load balance loss of different layers in the mixture, and determining the objective function according to the importance balance loss and the load balance loss of different layers and the relative entropy; Congestion prediction training is performed through supervised learning according to the objective function to obtain a road congestion prediction model.

5. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for constructing a road congestion prediction model as described in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the road congestion prediction model construction method as described in any one of claims 1 to 3.

7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of any method described in claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Deep traffic jam prediction method

    CN113469425A

  • Training method of road condition prediction model, and road condition prediction method and device

    CN114283388A

  • Road traffic jam prediction method, device and equipment and readable storage medium

    CN115222089A

  • Data identification method and system fused with expert model decision

    CN116861331A

  • Traffic network coding representation learning method based on mask pattern attention mechanism

    CN117690289A