Intelligent traffic path optimization method and device, electronic equipment and readable storage medium
Through the relationship graph convolution network and gated loop unit, the road network features are processed, combined with depth-first search and multi-task learning, the data sparseness and complexity neglect in traffic data analysis and prediction in the prior art are solved, and more accurate driving time estimation and path optimization are achieved.
Patent Information
- Application Number
- CN202510399949.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the analysis and prediction of traffic data, the existing technology has problems such as sparse data, temporal modeling ignores road network complexity and individual driving behavior differences, route estimation may cause unreal routing, and time estimation is inaccurate enough.
The node and edge features of the road network are processed by relational graph convolutional networks (RGCNs) and gated cyclic units (GRUs) to extract spatiotemporal feature representations; the initial transfer probability and candidate path set are generated based on the start-end point data, and the path and driving time estimation are optimized through depth-first search and multi-task learning.
It improves the accuracy of driving time estimation and the effectiveness of path optimization, can more comprehensively reflect traffic conditions and road network complexity, and reduces the occurrence of unreal routes.
Smart Images

Figure CN119917937A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of traffic data analysis and prediction, and specifically to an intelligent traffic path optimization method, device, electronic device and readable storage medium. Background Art
[0002] With the development of multi-task learning and weakly supervised learning techniques, as well as the advancement of traffic data collection technologies such as GPS and sensors, it has become easier to obtain massive traffic data. These technologies make it possible to reflect the operating status of vehicles through floating vehicle data, providing new solutions for traffic management and intelligence.
[0003] Existing technologies mainly include the use of OD (origin-destination) data, the application of weakly supervised learning, various methods of travel time estimation, and route estimation strategies. OD data estimates travel time through the location information of the origin and destination, while weakly supervised learning is learned when labels are incomplete or inaccurate. Travel time estimation methods cover traditional methods, deep learning-based methods, and graph neural network methods. Route estimation addresses privacy and data acquisition issues by inferring potential routes through road network information.
[0004] However, existing technologies have some defects in data collection and processing: the data provided by loop sensors is sparse and cannot fully reflect traffic conditions; in terms of spatiotemporal modeling, existing models often ignore the complex structure of real-world road networks and the differences in individual driving behaviors. In addition, the route estimation process may produce unrealistic routes, and the time estimation may be inaccurate due to ignoring the interactive relationship between intersections and road sections. Summary of the invention
[0005] In view of the above problems, the present application provides an intelligent traffic path optimization method, device, electronic device and readable storage medium.
[0006] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide an intelligent traffic path optimization method, comprising: Embed the link and node attributes of the real road network based on the corresponding embedding matrix to form road attribute embedding features; According to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network; Generating an initial transition probability and a first set of candidate paths based on the start-end point pair data, and searching the first set of candidate paths to screen out an optimal path and its estimated travel time that are consistent with the observed travel time; Estimate the travel time distribution parameters and transition probabilities of road segments and intersections, generate a second set of candidate paths, update the model parameters based on the loss function feedback, and output the optimized model parameters and the optimal path and its travel time.
[0007] The initial transition probability and the first candidate path set are generated based on the start-end point pair data, and the first candidate path is searched to screen out the optimal path and its estimated travel time that are consistent with the observed travel time, specifically including: Generate initial transition probability and first candidate path set based on start-end point pair data; generating transition probabilities between road segments based on road network characteristics, and inferring routes using the transition probabilities between the road segments; Performing a pruning operation on the first candidate path set according to a length and a probability threshold; A depth-first search algorithm is used to select an optimal path from the first candidate path set.
[0008] The step of selecting the optimal path from the first candidate path set using a depth-first search algorithm specifically includes: Use the depth-first search algorithm to search from the starting point to the end point to access the first candidate path set To search all possible paths; Calculate the posterior probability of each path visited , evaluate the possibility of each path becoming the optimal path to obtain a second set of candidate paths; and Calculate the sum of the predicted travel time of each path in the second candidate path set by formula (9), and select the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path; (9) In formula (9), represents the optimal path, T represents the observed travel time, Indicates i The predicted travel time of road segment e, Indicates i The predicted travel time of intersection v, Indicates the first j path.
[0009] Among them, the travel time distribution parameters and transition probabilities of road segments and intersections are estimated, a second set of candidate paths is generated, and model parameters are updated according to loss function feedback, and optimized model parameters and optimal paths and their travel times are output, including: Using the generated transition probabilities, a third candidate path set is generated through a path search algorithm; Update the model parameters based on the results of the loss function based on the reverse algorithm; pass -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimates, outputting the optimal path and the corresponding travel time.
[0010] Among them, through -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimation, outputting the optimal path and corresponding travel time, including: use - Greedy algorithm, determine whether the path satisfies formula (9); The path that satisfies formula (9) is The probability of being selected, and the path that will not satisfy formula (9), in Under probability, the random selection m The most probable route; The KL divergence calculation is performed based on the input of the path probability distribution predicted by the model and the inverse estimated loss distribution obtained based on the actual observation data; wherein the KL divergence is defined as formula (27): (27) In formula (27), represents the probability distribution of each route in the third candidate path set, Based on observational data and the inverse estimated loss distribution between the true situation; Represents probability distribution and The KL divergence between Represents probability distribution Middle i The probability of an event, Represents probability distribution Middle i The probability of an event; According to the input of the transition probability predicted by the model and the actual observed travel time data, a negative log-likelihood loss is calculated; wherein the negative log-likelihood loss is defined by formula (28) to minimize the negative log-likelihood function; (28) In formula (28), represents the negative log-likelihood loss, represents the trainable parameters of the model, Indicates that the model is in a given previous state and model parameters In the case of The probability of represents the length of the observation sequence; The negative log-likelihood is combined with the KL divergence and the loss of the travel time distribution by formula (29) Combined to form the total loss function of the model , so as to guide the model to consider the accurate prediction of travel time, the accurate prediction of path transfer probability, and the consistency between the model prediction and the actual observation data during the training process through the total loss function, and finally output the optimal path and its corresponding travel time; (29) in, and represents the hyperparameter, represents the loss of travel time distribution, as defined in formula (25): (25) In formula (25), represents the aggregation function of the observed data Z, and K represents the number of samples in the bag; The behavior aggregation function representing the distribution of travel times predicted by the model; Represents the variance of the travel time distribution predicted by the model.
[0011] According to the comprehensive feature representation of the nodes and edges, the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network are estimated, including: Predicting and filling missing travel time data through tensor decomposition according to the comprehensive feature representation of the nodes and edges; Estimate the travel time distribution parameters of each road segment and intersection in the road network through formulas (21) to (24); (twenty one) (twenty two) (twenty three) (twenty four) In formulas (21) to (24), Represents road segment e The mean of the travel time distribution; Indicated in In the layer, road segment e The eigenvector of Indicates the road segment used to calculate e The weight matrix of the mean of ; Indicates the road segment used to calculate e The bias term of the mean of ; Represents tensor multiplication; Indicates that during a specific period of time Observed travel time data within ; Represents road segment e The standard deviation of the travel time distribution; Indicates the road segment used to calculate e The weight matrix of the standard deviation of Indicates the road segment used to calculate e The bias term of the standard deviation of Indicates intersection v The mean of the travel time distribution; Indicated in Layer, intersection v The eigenvector of Indicates the intersection to be calculated v The weight matrix of the mean of ; Indicates the intersection to be calculated v The bias term of the mean of ; Indicates intersection v The standard deviation of the travel time distribution; Indicates the intersection to be calculated v The weight matrix of the standard deviation of Indicates the intersection to be calculated v The bias term of the standard deviation of Through the fully connected neural network according to the edge features Learning and generating transition probabilities; wherein the fully connected neural network is defined by formula (26); (26) In formula (26), and Respectively expressed in In the layer, nodes i and j The eigenvector of Represents the feature cascade operator; Represents a slave node i Transfer to Node j The conversion probability.
[0012] Among them, according to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network, specifically including: According to the embedded features of the road attributes, a relational graph convolutional network is used to process the features of nodes and edges in the road network to capture the global and local features of the road network; wherein the relational graph convolutional network is defined as formula (12); (12) In formula (12), r Represents a type of relationship in the graph; R Represents the set of all relationship types in the graph; i represents a node in the graph, j Representation Node i In relationship r A neighbor node under ; Representation Node i In relationship r The set of all neighbor nodes under ; Indicates In the layer, nodes i The eigenvector of represents the activation function; Indicated in In the layer, nodes i The eigenvector of Indicated in In the layer, the weight matrix corresponding to the node itself; Indicated in In the layer, nodes j The eigenvector of Indicated in Layer, relationship r The corresponding weight matrix; represents the normalization constant; Using a gated recurrent unit to process time series data to capture dynamic characteristics of a road network; wherein the gated recurrent unit processes the time series data to capture the dynamic characteristics of a road network by using formulas (13) to (16); the gated recurrent unit is defined by formulas (17) to (20); (13) (14) (15) (16) In formulas (13) to (16), represents the hidden state of the gated recurrent unit at layer 0; represents the input feature vector at layer 0; represents the initial hidden state; , , Respectively indicated in the 1st, 2nd, The output feature vector of the layer; Indicates that the neighbor nodes of layer 0 and layer 1 j The feature vectors are concatenated; Indicates concatenating the input feature vectors of layer 0 and layer 1; Indicates that the The gated recurrent unit hidden state of the layer and Neighbor nodes of the layer j The eigenvector of To splice; Indicates that the The gated recurrent unit hidden state of the layer and The input feature vector of the layer To splice; (17) (18) (19) (20) In formula (17), represents the value of the update gate, represents the input weight matrix of the update gate, Indicates that at time step t The input feature vector is represents the hidden state weight matrix of the update gate, Indicates that at time step The hidden state of represents the bias term of the update gate; in formula (18), represents the value of the reset gate, represents the input weight matrix of the reset gate, represents the hidden state weight matrix of the reset gate, represents the bias term of the reset gate; in formula (19), represents the candidate hidden state, represents the input weight matrix of the candidate hidden states, The hidden state weight matrix representing the candidate hidden states, represents the bias term of the candidate hidden state; in formula (20), represents the final hidden state at time step t, represents the hidden state at the previous time step, represents the complement of the update gate; Fusing the features output by the graph convolution and gated loop processing to form a comprehensive feature representation of nodes and edges; and Based on the comprehensive feature representation of the nodes and edges, the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network are estimated.
[0013] The relational graph convolutional network is composed of N layers of relational graph convolutional networks and N gated recurrent units through stacking and connection, wherein n∈{1,2,3,...,N}, and n and N are integers; According to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network, specifically including: According to the road attribute embedding features, the n-th layer of the relationship graph convolution network receives the road attribute embedding features, aggregates and updates the features of nodes and edges; The nth gated recurrent unit corresponding to the nth layer of the graph convolutional network processes the time series data, receives the output of the nth layer of the graph convolutional network, updates the states of the nodes and edges, and captures the time dependency; When it is determined that n is not equal to N, n=n+1 is set, and the output of the nth gated recurrent unit is used as the input of the n+1th layer of the graph convolutional network, and the n+1th layer of the graph convolutional network receives the output of the nth gated recurrent unit, and aggregates and updates the features of the nodes and edges; The n+1th gated recurrent unit corresponding to the n+1th layer of the relationship graph convolutional network processes the time series data, receives the output of the n+1th layer of the relationship graph convolutional network, updates the states of the nodes and edges, and then executes a loop to determine whether n is equal to N.
[0014] In order to solve the above technical problems, another technical solution adopted by the present invention is to provide an intelligent traffic path optimization device, the device comprising: A road feature embedding unit, used for embedding the link and node attributes of the real road network based on the corresponding embedding matrix to form a road attribute embedding feature; A spatial graph convolution unit, used to embed features according to the road attributes, perform multi-level stacking processing through a relational graph convolutional network and a gated recurrent unit, and extract and enhance the spatiotemporal feature representation of links and nodes in the road network; a path search optimization unit, for generating an initial transfer probability and a first candidate path set based on the start-end point pair data, and searching the first candidate path set to screen out an optimal path and its estimated travel time that are consistent with the observed travel time; The multi-task learning unit is used to estimate the travel time distribution parameters and transition probabilities of road segments and intersections, generate a second set of candidate paths, update the model parameters based on the loss function feedback, and output the optimized model parameters and the optimal path and its travel time.
[0015] Wherein, the path search optimization unit includes: A path search module, used to generate an initial transition probability and initialize a first candidate path set based on start-end point pair data; A transition probability generation module, used to generate transition probabilities between road sections based on road network characteristics, and to infer routes using the transition probabilities between the road sections; A pruning operation module, used for performing a pruning operation on the first candidate path set generated by the path search module according to a length and a probability threshold; A depth-first search module is used to select an optimal path from the first candidate path set using a depth-first search algorithm according to the first candidate path plan generated by the path search module.
[0016] Wherein, the depth-first search module is used to:
[0017] Use the depth-first search algorithm to search from the starting point to the end point to access the first candidate path set To search all possible paths; Calculate the posterior probability of each path visited , evaluate the possibility of each path becoming the optimal path to obtain a second set of candidate paths; and Calculate the sum of the predicted travel time of each path in the second candidate path set by formula (9), and select the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path; (9) In formula (9), represents the optimal path, T represents the observed travel time, Indicates i The predicted travel time of road segment e, Indicates i The predicted travel time of intersection v, Indicates the first j path.
[0018] Wherein, the multi-task learning unit includes: A multi-layer perceptron module, for estimating travel time distribution parameters and transition probabilities of various road segments and intersections in a road network based on the comprehensive feature representation of nodes and edges output by the spatial graph convolution unit; Multi-task model training module for: Using the generated transition probabilities, a third candidate path set is generated through a path search algorithm; Update the model parameters based on the results of the loss function based on the reverse algorithm; pass -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimates, outputting the optimal path and the corresponding travel time.
[0019] Wherein, the multi-task model training module is used to: use - Greedy algorithm, determine whether the path satisfies formula (9); The path that satisfies formula (9) is The probability of being selected, and the path that will not satisfy formula (9), in Under probability, the random selection m The most probable route; The KL divergence calculation is performed based on the input of the path probability distribution predicted by the model and the inverse estimated loss distribution obtained based on the actual observation data; wherein the KL divergence is defined as formula (27): (27) In formula (27), represents the probability distribution of each route in the third candidate path set, Based on observational data and the inverse estimated loss distribution between the true situation; Represents probability distribution and The KL divergence between Represents probability distribution Middle i The probability of an event, Represents probability distribution Middle i The probability of an event; According to the input of the transition probability predicted by the model and the actual observed travel time data, a negative log-likelihood loss is calculated; wherein the negative log-likelihood loss is defined by formula (28) to minimize the negative log-likelihood function; (28) In formula (28), represents the negative log-likelihood loss, represents the trainable parameters of the model, Indicates that the model is in a given previous state and model parameters In the case of The probability of represents the length of the observation sequence; The negative log-likelihood is combined with the KL divergence and the loss of the travel time distribution by formula (29) Combined to form the total loss function of the model , so as to guide the model to consider the accurate prediction of travel time, the accurate prediction of path transfer probability, and the consistency between the model prediction and the actual observation data during the training process through the total loss function, and finally output the optimal path and its corresponding travel time; (29) in, and represents the hyperparameter, represents the loss of travel time distribution, as defined in formula (25): (25) In formula (25), represents the aggregation function of the observed data Z, and K represents the number of samples in the bag; The behavior aggregation function representing the distribution of travel times predicted by the model; Represents the variance of the travel time distribution predicted by the model.
[0020] Wherein, the multi-layer perceptron module is used for: Predicting and filling missing travel time data through tensor decomposition according to the comprehensive feature representation of the nodes and edges; Estimate the travel time distribution parameters of each road segment and intersection in the road network through formulas (21) to (24); (twenty one) (twenty two) (twenty three) (twenty four) In formulas (21) to (24), Represents road segment e The mean of the travel time distribution; Indicated in In the layer, road segment e The eigenvector of Indicates the road segment used to calculate e The weight matrix of the mean of ; Indicates the road segment used to calculate e The bias term of the mean of ; Represents tensor multiplication; Indicates that during a specific period of time Observed travel time data within ; Represents road segment e The standard deviation of the travel time distribution; Indicates the road segment used to calculate e The weight matrix of the standard deviation of Indicates the road segment used to calculate e The bias term of the standard deviation of Indicates intersection v The mean of the travel time distribution; Indicated in Layer, intersection v The eigenvector of Indicates the intersection to be calculated v The weight matrix of the mean of ; Indicates the intersection to be calculated v The bias term of the mean of ; Indicates intersection v The standard deviation of the travel time distribution; Indicates the intersection to be calculated v The weight matrix of the standard deviation of Indicates the intersection to be calculated v The bias term of the standard deviation of Through the fully connected neural network according to the edge features Learning and generating transition probabilities; wherein the fully connected neural network is defined by formula (26); (26) In formula (26), and Respectively expressed in In the layer, nodes i and j The eigenvector of Represents the feature cascade operator; Represents a slave node i Transfer to Node j The conversion probability.
[0021] Wherein, the spatial graph convolution unit comprises: A graph convolutional network module, used to process the features of nodes and edges in the road network using a graph convolutional network according to the embedded features of the road attributes generated by the road feature embedding unit, so as to capture the global and local features of the road network; wherein the graph convolutional network is defined as in formula (12); (12) In formula (12), r Represents a type of relationship in the graph;R Represents the set of all relationship types in the graph; i represents a node in the graph, j Representation Node i In relationship r A neighbor node under ; Representation Node i In relationship r The set of all neighbor nodes under ; Indicates In the layer, nodes i The eigenvector of represents the activation function; Indicated in In the layer, nodes i The eigenvector of Indicated in In the layer, the weight matrix corresponding to the node itself; Indicated in In the layer, nodes j The eigenvector of Indicated in Layer, relationship r The corresponding weight matrix; represents the normalization constant; A gated recurrent unit module, for processing time series data using a gated recurrent unit to capture dynamic characteristics of a road network; wherein the gated recurrent unit processes the time series data using formulas (13) to (16) to capture the dynamic characteristics of a road network; and the gated recurrent unit is defined using formulas (17) to (20); (13) (14) (15) (16) In formulas (13) to (16), represents the hidden state of the gated recurrent unit at layer 0; represents the input feature vector at layer 0; represents the initial hidden state; , , Respectively indicated in the 1st, 2nd, The output feature vector of the layer; Indicates that the neighbor nodes of layer 0 and layer 1 j The feature vectors are concatenated; Indicates concatenating the input feature vectors of layer 0 and layer 1; Indicates that the The gated recurrent unit hidden state of the layer and Neighbor nodes of the layer j The eigenvector of To splice; Indicates that the The gated recurrent unit hidden state of the layer and The input feature vector of the layer To splice; (17) (18) (19) (20) In formula (17), represents the value of the update gate, represents the input weight matrix of the update gate, Indicates that at time step t The input feature vector is represents the hidden state weight matrix of the update gate, Indicates that at time step The hidden state of represents the bias term of the update gate; in formula (18), represents the value of the reset gate, represents the input weight matrix of the reset gate, represents the hidden state weight matrix of the reset gate, represents the bias term of the reset gate; in formula (19), represents the candidate hidden state, represents the input weight matrix of the candidate hidden states, The hidden state weight matrix representing the candidate hidden states, represents the bias term of the candidate hidden state; in formula (20), represents the final hidden state at time step t, represents the hidden state at the previous time step, represents the complement of the update gate; The feature fusion module is used to fuse the features output by the relational graph convolution processing and the gated loop processing to form a comprehensive feature representation of nodes and edges.
[0022] The spatial graph convolution unit is composed of N layers of relational graph convolutional networks and N gated recurrent units through stacking and connection, where n∈{1,2,3,...,N}, and n and N are integers; The nth layer of the relationship graph convolutional network is used to receive the embedded features of the road attributes according to the embedded features of the road attributes, and aggregate and update the features of the nodes and edges; The nth gated recurrent unit corresponds to the nth layer of the graph convolutional network, is used to process time series data, receives the output of the nth layer of the graph convolutional network, updates the states of nodes and edges, and captures time dependencies; The spatial graph convolution unit is further used to set n=n+1 when it is determined that n is not equal to N, and use the output of the nth gated recurrent unit as the input of the n+1th layer of the graph convolution network, so that the n+1th layer of the graph convolution network receives the output of the nth gated recurrent unit, and aggregates and updates the features of the nodes and edges; The n+1th gated recurrent unit corresponds to the n+1th layer of the relationship graph convolutional network, is used to process time series data, receive the output of the n+1th layer of the relationship graph convolutional network, update the status of the nodes and edges, and then execute a loop to determine whether n is equal to N.
[0023] To solve the above technical problems, another technical solution adopted by the present invention is: to provide an electronic device, including: a processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor executes the computer instructions, the electronic device executes the steps of the intelligent traffic path optimization method as described above.
[0024] In order to solve the above technical problems, another technical solution adopted by the present invention is: providing a readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the steps of the intelligent traffic path optimization method as described above.
[0025] The present invention provides an intelligent traffic path optimization method, device, electronic device and readable storage medium, which utilizes large-scale floating vehicle data including speed and location information of vehicles at different times and locations, processes the features of nodes and edges in the road network through relational graph convolutional networks (RGCNs) and gated recurrent units (GRUs), and captures the global and local features of the road network; processes complex spatiotemporal data through relational graph convolutional networks and gated recurrent units, and learns the dynamic features of the road network. Through multi-level feature extraction and processing, the model provides more accurate travel time estimation. The present invention provides an effective start-end travel time estimation method by combining weakly supervised learning and deep learning technology, which can process complex road network data and provide accurate travel time estimation, and has the potential for wide application in intelligent transportation systems and traffic management. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flowchart of an intelligent traffic path optimization method provided by an embodiment of the present invention; Figure 2 yes Figure 1 A schematic diagram of a method flow chart of an embodiment of step S10; Figure 3 yes Figure 1 A schematic diagram of a method flow chart of an embodiment of step S11; Figure 4 yes Figure 3 A schematic diagram of a method flow of an embodiment of step S113; Figure 5 yes Figure 1 A schematic diagram of a method flow chart of another embodiment of step S11; Figure 6 yes Figure 1 A method flow diagram of an embodiment of step S12; Figure 7 yes Figure 6 A method flow diagram of an embodiment of step S123; Figure 8 yes Figure 1 A method flow diagram of an embodiment of step S13; Fig. 9 yes Figure 8 A schematic diagram of a method flow of an embodiment of step S132; Fig.10 It is a structural schematic diagram of an intelligent traffic path optimization device provided by an embodiment of the present invention; Fig.11 yes Fig.10 A schematic structural diagram of an embodiment of a spatial graph convolution unit in FIG. Fig.12 Schematic diagram of the stacked structure of the spatial graph convolution unit provided in an embodiment of the present invention; Fig.13 yes Fig.10 A schematic structural diagram of an embodiment of a path search optimization unit in FIG. Fig.14 yes Fig.10 A schematic diagram of a structure of an embodiment of a multi-task learning unit in; Fig.15 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.
[0027] The reference numerals in the above drawings are described as follows: 30. Intelligent traffic path optimization device; 31. Road feature embedding unit; 32. Spatial graph convolution unit; 320. Relational graph convolution network module; 321. Gated recurrent unit module; 322. Feature fusion module; 33. Path search optimization unit; 330. Path search module; 331. Transition probability generation module; 332. Pruning operation module; 333. Depth-first search module; 34. Multi-task learning unit; 340. Multi-layer perceptron module; 341. Multi-task model training module; 4. Electronic device; 41. Processor; 42. Memory; 43. Input device; 44. Output device; 45. Computer program. DETAILED DESCRIPTION
[0028] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0029] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.
[0030] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.
[0031] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.
[0032] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0033] Without further limitations, in this application, the words "include", "comprises", "has" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.
[0034] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.
[0035] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0036] In the existing technology, although the continuous progress of multi-task learning and weakly supervised learning technology and traffic data collection technology (such as GPS and sensors, etc.) has made it easy to obtain massive traffic data, the initial traffic condition data is mainly collected through loop sensors, which can only provide individual travel time for a certain section of road and usually face sparsity problems. Therefore, "floating car data" has become a solution, through floating vehicles equipped with GPS receivers to regularly record the timestamps, longitude and latitude, speed and other information of taxis, buses, private cars and online ride-hailing cars to reflect the operating status of the vehicles.
[0037] However, due to privacy and data acquisition issues, most of the existing technologies for estimating travel time based on floating vehicle data mainly estimate travel time through OD data (which only provides the location information of the starting point and the end point). OD-TTE technology predicts the travel time of users from the starting point to the end point by analyzing the user's running trajectory and geographic location information, which plays a key role in traffic flow prediction, path optimization, etc., and can provide scientific decision support for urban planning and traffic management.
[0038] Existing technologies are challenging in weakly supervised learning because general supervised learning methods require labeling of each data in the training set, which is costly. Weakly supervised learning methods focus on solving low-quality label scenarios such as incomplete supervision, imprecise supervision, and inaccurate supervision. The OD-TTE task can be considered as imprecise supervision that falls under the category of weakly supervised learning.
[0039] In terms of travel time estimation, existing technologies include traditional methods, deep learning-based methods, and graph neural network-based methods. Traditional methods include road segment-based methods and path-based methods, which may ignore the necessary intersection factors and the relationship between road segments. The nearest neighbor search method (NNS) and trajectory regression method predict travel time based on historical trajectories. The spatiotemporal graph neural network (STGNN) combines the spatiotemporal graph neural network with the time processing module, which can process spatial relationships and time trends at the same time.
[0040] In terms of route estimation, existing technologies face the problem of sparse trajectories due to privacy, commercial competition, and limitations of GPS devices, or in ETC and surveillance camera scenarios. A common strategy for solving sparse trajectories is to infer potential routes based on road network information.
[0041] In view of these defects of the prior art, the present invention provides an intelligent traffic path optimization method, device, electronic device and readable storage medium, which solves the problem of sparse loop sensor data in terms of driving data; in terms of spatiotemporal modeling, it solves the limitation of only modeling the road network as a grid-based map, and considers the graphical structure of the real-world road network and the differences in individual driving behaviors; in terms of route estimation, it solves the problem of ignoring the real traffic conditions and avoids the unreal routes that are easily generated in the path inference process; in terms of time estimation, it solves the problem of only considering the spatiotemporal attributes of the road section and ignoring the interactive relationship between the intersection and the road section. In this way, the present invention provides a more accurate and comprehensive OD-TTE framework to support the development of traffic management and intelligence, and achieve accurate travel time prediction while protecting user privacy.
[0042] See also Figure 1 , is a flow chart of an intelligent traffic path optimization method in an embodiment of the present invention. The method comprises: Step S10, embedding the link and node attributes of the real road network based on the corresponding embedding matrix to form a road attribute embedding feature.
[0043] Step S11, based on the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network.
[0044] Step S12, generating an initial transition probability and a first candidate path set based on the start-end point pair data, and searching the first candidate path set to screen out an optimal path and its estimated travel time that are consistent with the observed travel time.
[0045] Step S13, estimating the travel time distribution parameters and transition probabilities of road segments and intersections, generating a second set of candidate paths, updating model parameters according to loss function feedback, and outputting optimized model parameters and optimal paths and their travel times.
[0046] Please also see Figure 2 Step S10, i.e., embedding the link and node attributes of the real road network based on the corresponding embedding matrix to form a road attribute embedding feature, specifically includes: Step S100, based on the actual road network state, converting in the form of links and nodes, embedding each attribute based on the corresponding embedding matrix, and multiplying with the attribute to convert into a low-dimensional feature vector; and Step S101: concatenate the low-dimensional feature vectors of all attributes to form a feature vector containing road segment or intersection information.
[0047] The feature vector is passed to the spatial graph convolutional network as an output feature matrix.
[0048] Specifically, assume that each latent variable Obey Gaussian distribution , then travel time is modeled as having a specific mean and standard deviation The probability distribution of .
[0049] Given a pair of start and end points (OD pairs), the conditional probability described in formula (10) is used to describe the probability of In the case of In formula (10), represents the neural network, according to the road characteristics and weight To estimate the distribution parameters and .
[0050] (10) When conducting road network analysis and travel time estimation, road characteristics For estimating the travel time of a vehicle on the road The following is an explanation of these road features and how they are processed: (1) Road type is a characteristic that describes the grade and purpose of a road, such as main road, main road connector, secondary road, secondary road connector, tertiary road, residential road, service road, etc. Different types of roads may have different traffic flows, speed limits, and traffic rules, which may affect travel time.
[0051] (2) Number of lanes refers to the total number of drivable lanes on a road. More lanes usually means a higher road capacity, which may affect driving speed and time.
[0052] (3) Other road characteristics, including road length, whether it is a one-way street, speed limit, etc. These characteristics are directly related to the driving conditions of vehicles on the road; (4) Unique ID is the identifier of the road, which helps to uniquely identify a road in the dataset.
[0053] (5) Node labels refer to specific attributes of the intersection, such as whether there are traffic lights or speed cameras. These labels reflect the traffic control facilities at the intersection and may affect the waiting time and traffic efficiency of vehicles at the intersection.
[0054] (6) The number of node streets describes the number of streets connected by intersections, such as T-shaped, X-shaped, or five-way intersections. Different intersection types may lead to different traffic flow patterns and congestion conditions.
[0055] (7) Other node features, including: the unique ID and GPS coordinates of the intersection. The GPS coordinates help to accurately locate the intersection in geospatial space.
[0056] The above categorical attributes (such as road type or node label) are converted into low-dimensional feature vectors using an embedding method, and each attribute is mapped to a numerical vector by multiplying the embedding matrix with the attribute; wherein the embedding matrix is as described in formula (11). In formula (11), represents the number of possible values of the categorical feature, Represents the latitude of the embedding vector. (11) The embedded feature vectors of all attributes are concatenated together to form a comprehensive feature vector that contains all relevant information about the road segment or intersection. Through the embedding method, effective information can be shared between different road segments or intersections. For example, infrequently traveled road segments can be learned from frequently traveled road segments with similar semantic meanings.
[0057] Specifically, based on the actual road network state, each attribute is embedded based on the corresponding embedding matrix and multiplied with the attribute to convert it into a low-dimensional feature vector. The feature vectors of all attributes are concatenated together to form a feature vector containing all relevant information of the road segment or intersection, which is passed to the spatial graph convolutional network as the output feature matrix.
[0058] Please also see Figure 3 Step S11, i.e., according to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network, specifically comprising the following steps: Step S110, based on the embedded features of the road attributes, using relational graph convolutional networks (RGCNs) to process the features of nodes and edges in the road network, so as to capture the global and local features of the road network.
[0059] Specifically, the motivation for using relational graph convolutional networks (RGCNs) in the travel time estimation problem is to consider that the travel speeds of different road links in a road network are highly correlated with the type of road. For example, in the same area, the same type of road segments (such as main roads) tend to have similar travel speed distributions. This similarity means that the road type is an important feature that can be used to predict travel time.
[0060] The definition of relational graph convolutional networks (RGCNs) is as described in formula (12): (12) In formula (12), r Represents a type of relationship in the graph; R Represents the set of all relationship types in the graph; i represents a node in the graph, j Representation Node i In relationship r A neighbor node under ; Representation Node i In relationship r The set of all neighbor nodes under ; Indicates In the layer, nodes i The eigenvector of represents the activation function; Indicated in In the layer, nodes i The eigenvector of Indicated in In the layer, the weight matrix corresponding to the node itself; Indicated in In the layer, nodes j The eigenvector of Indicated in Layer, relationship r The corresponding weight matrix; represents the normalization constant; Specifically, Represents the model Road in layer The hidden state of , used to capture complex representations of road characteristics. Represents the road segment under relation r / A collection of intersection indexes used to reflect the topological relationship between different nodes in the road network. and Represents the learnable parameters in the model, corresponding to the weight under the relationship r and the weight of the node itself. These parameters are optimized during the training process to best capture the relationship between road characteristics and travel time. represents a normalization constant, which is usually set to the number of adjacent nodes, i.e. , which is used to ensure that the update of different nodes is not affected by the number of their adjacent nodes. Represents an activation function, such as ReLU or sigmoid function, which is used to introduce nonlinearity and enhance the expressive power of the model.
[0061] Step S111, using a gated recurrent unit to process time series data to capture the dynamic characteristics of the road network.
[0062] Specifically, the gated recurrent unit processes the time series data through formulas (13) to (16) to capture the dynamic characteristics of the road network.
[0063] (13) (14) (15) (16) in, represents the hidden state of the gated recurrent unit at layer 0; represents the input feature vector at layer 0; represents the initial hidden state; , , Respectively indicated in the 1st, 2nd, The output feature vector of the layer; Indicates that the neighbor nodes of layer 0 and layer 1 j The feature vectors are concatenated; Indicates concatenating the input feature vectors of layer 0 and layer 1; Indicates that the The gated recurrent unit hidden state of the layer and Neighbor nodes of the layer j The eigenvector of To splice; Indicates that the The gated recurrent unit hidden state of the layer and The input feature vector of the layer To splice; Specifically, , Indicated in In the gated recurrent unit (GRU) of the layer, the potential state (hidden state) of a node or edge contains the information of the node or edge in the time series. Represents the initial hidden state of the GRU, which is usually initialized to 0 and represents the state before the start of the sequence. Represents the hidden state of the GRU output.
[0064] Formulas (13) to (16) as shown above describe how the gated recurrent unit (GRU) updates its hidden state. These formulas involve the input of the current layer , the hidden state of the previous layer , and learnable parameters and the bias term . Represents the activation function, usually a sigmoid function, which is used to control the flow of information.
[0065] The Gated Recurrent Unit (GRU) is used as a special recurrent neural network (RNN) structure to process time series data in this application. The Gated Recurrent Unit (GRU) is able to process time-related data, such as travel time data in a road network, and processes this data incrementally, meaning that it can gradually update its internal state to reflect new time step information. The different types of time series features include: (1) Short-term characteristics, such as changes in traffic flow on a certain road within a short period of time (e.g., minutes or hours).
[0066] (2) Medium-term characteristics: may involve traffic patterns at different time periods of the day (such as morning rush hour and evening rush hour).
[0067] (3) Long-term characteristics: such as the impact of seasonal changes and holiday effects on traffic conditions.
[0068] The Gated Recurrent Unit (GRU) controls the flow of information through a gating mechanism (including an update gate and a reset gate), which enables it to effectively process these different types of time series features and maintain long-term dependencies in the time series. Specifically, the Gated Recurrent Unit (GRU) determines how much past information needs to be retained or updated to reflect the latest time step information through the update gate; the Gated Recurrent Unit (GRU) determines which historical information is no longer relevant or needs to be forgotten through the reset gate to avoid accumulating unnecessary noise in time series analysis.
[0069] In this way, the GRU is able to concatenate features from different time scales and update its internal state to reflect the latest traffic conditions. This is crucial for predicting future traffic conditions and travel times because it allows the model to take into account historical data while also being able to adapt to new changes. This ability makes the GRU a very popular tool for time series forecasting tasks, especially in the field of traffic and navigation systems.
[0070] Furthermore, the gated recurrent unit (GRU) is defined as in equations (17) to (20).
[0071] (17) (18) (19) (20) in, , , , , , It is a learnable parameter inside the GRU, which is optimized by the back-propagation algorithm during training to best fit the training data. , , is a bias term that provides flexibility to the model, allowing each gating mechanism to have a different baseline behavior in the absence of any input.
[0072] Formula (17) defines the gated recurrent unit (GRU) update gate , controls the degree of update of current input and past information. Among them, represents the sigmoid activation function, and represents the weight matrix, represents the bias term, represents the input of the current time step, represents the hidden state at the previous time step.
[0073] Formula (18) defines the reset gate of the gated recurrent unit (GRU) , determines how much of the past state should be forgotten to make room for information. and represents the weight matrix, Represents the bias term.
[0074] Formula (19) calculates the candidate hidden state , represents the potential new state of the current time step. Among them, and represents the weight matrix, represents the bias term, Represents the element-wise product (Hadamard product) of the reset gate output and the hidden state at the previous time step.
[0075] Formula (20) determines the new hidden state , is a weighted combination of the hidden state and the candidate state at the previous time step. Among them, An added section representing the new state of updating the door control.
[0076] With this design, the GRU is able to dynamically adjust its retention and update of past information, making it perform well in processing tasks with complex temporal dependencies. In road network analysis, the GRU can help the model capture and predict the dynamic changes of traffic flow, thereby improving the accuracy of travel time estimation.
[0077] Step S112, the features output by the relationship graph convolution processing and the gated loop processing are fused to form a comprehensive feature representation of the nodes and edges.
[0078] The comprehensive features include spatial and temporal information, providing rich context for subsequent travel time and conversion probability estimation.
[0079] Step S113, estimating the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network based on the comprehensive feature representation of the nodes and edges.
[0080] Please also see Figure 4Step S113, i.e., estimating the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network according to the comprehensive feature representation of the nodes and edges, specifically includes: Step S1130, predicting and filling missing travel time data through tensor decomposition based on the comprehensive feature representation of the nodes and edges.
[0081] Specifically, given a data pair from a starting point (O) to a destination (D), and a specific time period Observed travel time data within T These data are used to estimate travel times for all links and nodes in the network.
[0082] Step S1131, estimate the travel time distribution parameters of each road segment and intersection in the road network through formulas (21) to (24).
[0083] (twenty one) (twenty two) (twenty three) (twenty four) Assume that the travel time on each link and node follows a Gaussian distribution. μ (mean) and σ (Standard deviation) is the parameter that needs to be estimated in the model. denote the mean and variance of the linked Gaussian distribution respectively; They represent the mean and variance of the Gaussian distribution of the node respectively. Represents the hidden state obtained from the spatial graph convolutional network or the previous layer of neural network. , and represents the weights and biases of the fully connected layer (FC), which is used to extract the hidden state calculate μ (mean) and σ (standard deviation). represents the temporal embedding tensor, multiplied by the hidden state ( represents tensor multiplication) is used to generate the travel time distribution parameters for each time point. Represents the embedding vector in the real time interval.
[0084] Step S1132, using a fully connected neural network based on edge features Learn and generate transition probabilities.
[0085] Among them, MLP is a fully connected neural network that can learn the complex mapping relationship between input features and output weights, as described in formula (26). The input of MLP is the cascade (or concatenation) of the feature vectors of two nodes, that is, and . represents the feature concatenation operator, which concatenates two feature vectors into a longer vector. Used to represent slave nodes i Transfer to Node j The weight of .
[0086] (26) In this embodiment, the conversion probability is applied to the softmax layer to convert the original weight into a valid probability distribution. The Softmax function can convert any real number vector into a probability distribution, so that each element value in the vector is between 0 and 1, and the sum of all element values is 1. After processing by the Softmax layer, each weight is converted into a probability value, indicating that i Transfer to Node j In this way, for each node, a probability distribution can be generated that describes the probability that it may transfer to any other node in the network.
[0087] See also Figure 5 In another embodiment, the relational graph convolutional network (RGCNs) structure is composed of N layers of relational graph convolutional networks and N gated recurrent units through stacking and connection, where n∈{1,2,3,...,N}, and n and N are integers. Step S11, that is, according to the road attribute embedding features, multi-level stacking processing is performed through the relational graph convolutional network and the gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network, specifically: In step S210, according to the embedded features of the road attributes, the n-th layer of relational graph convolutional networks (RGCNs) receives the embedded features of the road attributes, aggregates and updates the features of the nodes and edges.
[0088] This layer deals with spatial relationships, which are based on the topological structure of the road network.
[0089] Step S211, the nth gated recurrent unit corresponding to the nth layer of the relationship graph convolutional network processes the time series data, receives the output of the nth layer of the relationship graph convolutional network, updates the states of the nodes and edges, and captures the time dependency.
[0090] The nth gated recurrent unit controls the flow of information by updating gates and resetting gates, so that the model can capture long-term temporal dependencies.
[0091] Step S212, determine whether n is equal to N; if so, the process ends; otherwise, proceed to step S213; Step S213, let n=n+1, and use the output of the nth gated recurrent unit as the input of the n+1th layer relational graph convolutional network, the n+1th layer relational graph convolutional network (RGCNs) receives the output of the nth gated recurrent unit, aggregates and updates the features of nodes and edges.
[0092] Step S214, the n+1th gated recurrent unit corresponding to the n+1th layer of the relationship graph convolutional network processes the time series data, receives the output of the n+1th layer of the relationship graph convolutional network, updates the status of the nodes and edges, and returns to step S212.
[0093] As mentioned above, the output of the gated recurrent unit is used as the input of the next layer of the graph convolutional network. The graph convolutional network of the subsequent layer continues to process the output of the previous layer, and each layer may focus on adjacency relationships of different scales or types. The stacked graph convolutional network structure is able to capture more complex spatial features and patterns in road networks. The graph convolutional network and the gated recurrent unit are stacked multiple times to form a multi-layer network. In this structure, each layer further extracts and abstracts features based on the previous layer. After being processed by multiple layers of stacked graph convolutional networks and gated recurrent units, the model finally outputs the spatial feature representation of each node and edge. These features contain rich spatial and temporal information and can be used for various downstream tasks such as travel time estimation, traffic prediction, etc.
[0094] Please also see Figure 6 , step S12, i.e., generating an initial transition probability and a first candidate path set based on the start-end point pair data, and searching the first candidate path to screen out the optimal path and its estimated travel time that are consistent with the observed travel time, specifically includes the following steps: Step S120 , generating an initial transition probability and a first candidate path set based on the start-point-end point pair data.
[0095] Among them, Origin-Destination (OD) is usually derived from a concept in traffic planning and traffic flow analysis, which is used to describe the starting point (Origin) and destination (Destination) of traffic flow. In practical applications, OD data can come from multiple different channels: (1) Floating Car Data: Trajectory data collected by taxis, buses, private cars, etc. equipped with GPS. These data record the speed and location information of vehicles at different times and locations.
[0096] (2) Fixed traffic detectors: such as loop sensors, magnetometer detectors, highway cameras, etc. These devices are installed on the road to detect the number, speed and other information of passing vehicles.
[0097] (3) Mobile phone or vehicle GPS tracking: Through location data that the user agrees to share, an individual’s travel starting and ending points can be collected.
[0098] (4) Transportation card data: such as the IC card in the public transportation system, which records the information of passengers entering and leaving the station, and can indirectly infer the starting and ending points of the trip.
[0099] (5) Questionnaire: travel data collected through resident travel surveys or specific transportation research projects.
[0100] (6) Transportation management agencies: such as city transportation commissions or transportation bureaus, who may have a large amount of traffic flow and travel pattern data.
[0101] (7) Social media and location-sharing applications: location information shared by users on social media or data generated when using location-sharing applications.
[0102] (8) Dedicated traffic data collection services: Some companies or research institutions may provide professional traffic data collection services to collect OD information.
[0103] In this embodiment, the start-point-end-point OD pair data is derived from floating vehicle data (Floating Car Data).
[0104] Step S121, generating transition probabilities between road sections based on road network characteristics, and inferring routes using the transition probabilities between road sections.
[0105] The road network is represented as a directed graph, and features are defined for nodes (intersections) and edges (road sections), such as intersection type, traffic signals, road type, number of lanes, etc.
[0106] Specifically, the road network is a directed graph, which can be expressed as: (1) (2) in, represents a set of nodes (i.e., intersections), Represents a set of directed edges / links (i.e., road segments); Represents a characteristic function that can be applied to , can also be applied to .
[0107] According to formula (1), represents a node graph, represents a link graph; where the node graph In , The features of can be intersection type, traffic signal; link map In , The features may be road type, road lanes, and speed limits.
[0108] (3) Furthermore, a data pair of the start point and the end point OD represents a tuple as described in formula (3); wherein, and Represent the starting section and the ending section respectively. Indicates the start time interval of a day (e.g. 8:00am-9:00am, assuming that the traffic conditions of all road segments and intersections remain unchanged in the same time slot).
[0109] A simple path It can be expressed as a series of time-ordered links, as described in formula (4): (4) Each link satisfies .
[0110] A route r is a sequence of alternating links and intersections, which can be described as formula (5): (5) in, For side , is the length of r.
[0111] “Generating transition probabilities between road segments based on road network characteristics” specifically includes: Based on each road segment in the road network , collect edge features related to the road segment ; Wherein, the edge features may include road conditions, traffic flow, speed limits, etc.; Use formula (6) to calculate the Transfer to road section The conditional probability .
[0112] The conditional probability is obtained by transforming the edge features Substitute the exponential function and divide by all the segments It is normalized by the sum of the exponential functions of the starting transition probabilities.
[0113] (6) In formula (6), Indicates that from the road section The collection of all road sections that can be reached directly from the departure point.
[0114] In order to conveniently represent the transition probability between all road segments in the road network, a transition matrix is constructed , whose size is , each element in the matrix Indicates that from the road section Transfer to road section Probability .
[0115] Step S122: performing a pruning operation on the first candidate path set according to the length and probability threshold.
[0116] Pruning is an optimization technique used to reduce computation and improve efficiency during path search, especially in complex highway networks. When there are a large number of possible routes from a starting point (the "O" in the OD pair) to a destination (the "D" in the OD pair), not all of them need to be considered. By setting a specific threshold, the number of first candidate paths can be reasonably reduced to focus on only those that are most likely or reasonable.
[0117] Therefore, in this embodiment, step S122, i.e., performing a pruning operation on the first candidate path set according to the length and probability threshold, specifically includes: performing length pruning on the first candidate path set, by comparing the length of each path with the shortest path length and the distance threshold The sum of the paths is used to determine whether the path is too long, thereby obtaining a set of paths with reasonable lengths after pruning; and probabilistic pruning is performed on the first candidate path set, by calculating the co-occurrence probability of each path and comparing it with the probability threshold to determine whether the probability of the path appearing is high enough, thereby obtaining a set of paths with reasonable probabilities after pruning.
[0118] (1) Length pruning: Perform length pruning according to formula (7) to remove paths that are longer than the known shortest path; where the “shortest path” refers to the path with the shortest direct distance from the starting point to the end point or the shortest cumulative length of the sections passed through among all the first candidate paths; From the starting point To the end The length of a simple route r satisfies formula (7): (7) in, is the shortest path, is the distance threshold. When the length of a path exceeds , then the path is considered too long and is unlikely to be the optimal path, so it can be pruned.
[0119] (2) Probabilistic pruning: According to formula (8), a probability pruning operation is performed to remove paths with low co-occurrence probability.
[0120] The co-occurrence probability refers to the probability of a path appearing given a starting point and an end point. The co-occurrence probability of a path can be calculated by multiplying all transition probabilities on the path. The co-occurrence probability of path r can be expressed as follows: (8) in, represents the initial starting point, and , because the probability of starting from the starting point is certain. If the co-occurrence probability of a path is lower than a certain threshold, it means that the path is less likely to appear in the actual traffic flow and can be pruned.
[0121] Through these two pruning methods, the number of first candidate paths can be effectively reduced, and only those paths with reasonable length and high probability of occurrence can be retained for further analysis and evaluation. This not only improves the efficiency of path search, but also helps to improve the quality of the final path recommendation.
[0122] Step S123: Select an optimal path from the first candidate path set using a depth-first search algorithm.
[0123] Specifically, the Depth First Search (DFS) algorithm is a graph traversal algorithm that starts from the starting point and searches deeply along the path until it reaches the end or cannot go any further, then backtracks and tries other paths.
[0124] Please also see Figure 7 In this embodiment, step S123, i.e., selecting the optimal path from the first candidate path set using a depth-first search algorithm, specifically includes: Step S1230, using a depth-first search (DFS) algorithm to search for access to the first candidate path set from the starting point to the end point To search all possible paths; Step S1231, calculate the posterior probability of each path visited , evaluate the possibility of each path becoming the optimal path to obtain a second set of candidate paths; and Step S1232, calculating the sum of the predicted travel time of each path in the second candidate path set by formula (9), and selecting the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path.
[0125] (9) In formula (9), it is defined how to select the optimal path, taking into account the difference between the predicted travel time and the observed travel time. represents the optimal path, T represents the observed travel time, represents the first candidate path set from the starting point to the end point, Indicates i The predicted travel time for each road segment, Indicates i The predicted travel time for each intersection, Indicates the first j path.
[0126] By calculating the posterior probability as a preliminary screening mechanism, we can help determine which paths are more likely to match the actual driving situation, which can reduce the number of paths that need further detailed evaluation. Using the posterior probability for screening before calculating the sum of predicted travel times can avoid unnecessary detailed calculations for those paths with very low probabilities, thereby improving the overall calculation efficiency. Therefore, the posterior probability can assist the decision-making process, especially when there are multiple paths with similar sums of predicted travel times, the posterior probability can be used as an auxiliary basis to select the final optimal path.
[0127] As mentioned above, the selection of the optimal path is not only based on the closeness of the sum of predicted travel times to the observed travel times, but also takes into account the posterior probability of the path, ensuring that the selected path is statistically credible. In a dynamic traffic environment, real-time data may affect the posterior probability and predicted travel time. Therefore, these two metrics can be dynamically adjusted to reflect the latest traffic conditions. By minimizing the difference between the predicted travel time and the observed travel time and maximizing the posterior probability, an optimal path that both conforms to the actual travel data and has high statistical credibility can be found.
[0128] Please also see Figure 8 In this embodiment, step S13, i.e., estimating the travel time distribution parameters and transition probabilities of the road segments and intersections, generating a second set of candidate paths, updating the model parameters according to the loss function feedback, and outputting the optimized model parameters and the optimal path and its travel time, specifically includes: Step S130, using the generated conversion probability to generate a third candidate path set through a path search algorithm; Step S131, updating the model parameters according to the result of the loss function based on the reverse algorithm; Step S132, by -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimates, outputting the optimal path and the corresponding travel time.
[0129] The DFS algorithm and formula (9) have already selected the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path. However, the optimal path selected by this method may cause the model to fall into a local optimal solution, that is, the model may ignore other paths that may be equally effective or better. This situation is common in path search, especially in complex traffic networks. Therefore, the optimal path is also selected by - Greedy algorithm is used to screen to avoid technical problems of local optimal solutions.
[0130] Please also see Fig. 9 , step S132, that is, by -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimation, outputting the optimal path and the corresponding travel time. Specifically, it includes the following steps: Step S1320, use - Greedy algorithm, determine whether the path satisfies formula (9); if so, proceed to step S1321; otherwise, proceed to step S1322.
[0131] Step S1321: The path that satisfies formula (9) is The probability of being selected. Then, enter step S1323.
[0132] Step S1322: The paths that do not satisfy formula (9) are Under probability, the random selection m Then, the process proceeds to step S1323.
[0133] Step S1323, performing KL divergence calculation processing based on the input of the path probability distribution predicted by the model and the inverse estimated loss distribution obtained based on the actual observation data, so as to optimize the model parameters and improve the accuracy of the path probability prediction.
[0134] In this embodiment, in order to infer the most likely route based on the actual situation (observed travel time), the Kullback-Leibler (KL) divergence is used to measure the consistency, specifically: (27) in, is the probability distribution of each route in the third candidate path set, Based on observational data The inverse estimated loss distribution between and the true situation.
[0135] In this way, the model parameters are optimized by formula (27) to minimize , which means adjusting the model parameters so that the route probability distribution predicted by the model As close as possible to the distribution based on the observed data ; In this way, the model can more accurately reflect the actual traffic conditions and travel time, optimizing the model towards higher route probabilities and more accurate travel time estimates.
[0136] Step S1324 , based on the input of the transition probability predicted by the model and the actual observed travel time data, a negative log-likelihood (NLL) loss is calculated to optimize the model parameters and improve the accuracy of the path prediction.
[0137] While KL divergence provides a way to measure the difference between the predicted distribution and the actual distribution, the negative log-likelihood (NLL) loss is directly evaluated for each prediction step of the model. By minimizing the NLL loss, the model is able to more accurately predict the transition probability from one road segment to another, thereby optimizing path selection.
[0138] In this embodiment, for the route selected by equation (9), the negative log-likelihood function is minimized by the negative log-likelihood (NLL) loss defined as equation (28) to optimize the model parameters and improve the accuracy of path prediction.
[0139] (28) in, Represents the trainable parameters of the model, which are optimized during training to minimize the loss (posterior probability); Indicates that the model is in a given previous state and model parameters In the case of The probability of Represents the length of the observation sequence.
[0140] Step S1325, negative log likelihood (NLL) is combined with KL divergence and loss of travel time distribution Combined to form the total loss function of the model , that is, as described in formula (29); wherein the total loss function is used to guide the model to simultaneously consider the accurate prediction of driving time, the accurate prediction of path transfer probability, and the consistency between the model prediction and the actual observation data during the training process, and finally output the optimal path and its corresponding driving time.
[0141] (29) in, and Represents a hyperparameter used to balance the three loss terms , , The weights in the total loss function. The choice of these parameters depends on how much each loss term affects the model performance and how important they are in a specific application scenario. It is usually used to balance the importance of travel time distribution loss. Used to balance the importance of transition probability loss, It is used to balance the importance of KL divergence loss.
[0142] Since the normal distribution is closed to addition, the loss function is defined as formula (25): (25) Loss Function Based on negative log likelihood, it is used to measure the consistency between the travel time distribution predicted by the model and the actual observed data. Represents an aggregate function, represents the number of samples in a bag, Represents observation data.
[0143] Travel time distribution loss function , this loss term is for the parameters of the travel time distribution predicted by the model (mean μ and variance σ ) to ensure that the model can accurately predict the travel time distribution of each path, thereby improving the accuracy of travel time estimation. , this loss term optimizes the transition probability from one road segment to another predicted by the model, ensuring that the model can accurately predict the movement pattern of vehicles in the road network, thereby improving the accuracy of path selection. KL divergence loss This loss term uses the Kullback-Leibler divergence to measure the difference between the path probability distribution predicted by the model and the inverse estimated loss distribution based on actual observed data, pushing the distribution predicted by the model closer to the actual distribution, thereby improving the model's adaptability to real traffic conditions. During the training process, the model minimizes the total loss function Lto adjust its parameters. This is usually done through gradient descent or other optimization algorithms, with the goal of finding a set of parameters that minimizes the total loss and thus achieves the best performance on all relevant tasks. In this way, the model is able to strike a balance across multiple tasks, improving its accuracy and reliability in complex traffic network analysis.
[0144] As described above, an intelligent traffic path optimization method provided in an embodiment of the present invention utilizes large-scale floating vehicle data including speed and location information of vehicles at different times and locations, processes the features of nodes and edges in the road network through relational graph convolutional networks (RGCNs) and gated recurrent units (GRUs), and captures the global and local features of the road network; processes complex spatiotemporal data through relational graph convolutional networks and gated recurrent units, and learns the dynamic features of the road network. Through multi-level feature extraction and processing, the model provides more accurate travel time estimation. The present invention provides an effective start-end travel time estimation method by combining weakly supervised learning and deep learning technology, which can process complex road network data and provide accurate travel time estimation, and has the potential for wide application in intelligent transportation systems and traffic management.
[0145] See also Fig.10 , is a schematic diagram of the module structure of an intelligent traffic path optimization device in an embodiment of the present invention. The intelligent traffic path optimization device 30 includes: a road feature embedding unit 31, a spatial graph convolution unit 32, a path search optimization unit 33 and a multi-task learning unit 34.
[0146] The road feature embedding unit 31 is used to embed the link and node attributes of the real road network based on the corresponding embedding matrix to form a road attribute embedding feature.
[0147] The spatial graph convolution unit 32 is used to embed features according to the road attributes, perform multi-level stacking processing through a relational graph convolution network and a gated recurrent unit, and extract and enhance the spatiotemporal feature representation of links and nodes in the road network.
[0148] The path search optimization unit 33 is used to generate an initial transition probability and a first candidate path set based on the start-end point pair data, and search the first candidate path set to screen out an optimal path and its estimated travel time that are consistent with the observed travel time.
[0149] The multi-task learning unit 34 is used to estimate the travel time distribution parameters and transition probabilities of road segments and intersections, generate a second set of candidate paths, update model parameters according to loss function feedback, and output optimized model parameters and optimal paths and their travel times.
[0150] The road feature embedding unit 31 is specifically used to convert the real road network state in the form of links and nodes, embed each attribute based on the corresponding embedding matrix, and multiply it with the attribute to convert it into a low-dimensional feature vector; and splice the feature vectors of all attributes together to form a feature vector containing all relevant information of the road segment or intersection. The feature vector is passed to the spatial graph convolutional network as an output feature matrix for use.
[0151] The function of the road feature embedding unit 31 is to convert the structured data in the road network into a numerical feature vector suitable for machine learning processing. This conversion process involves embedding the attributes of road segments and intersections into a low-dimensional space and constructing a feature vector that can be used as input to the subsequent spatial graph convolutional network (GCN) module. The following is a detailed explanation of this process: Assume that each latent variable Obey Gaussian distribution , travel time is modeled as having a specific mean and standard deviation The probability distribution of .
[0152] Given a pair of start and end points (OD pairs), the conditional probability described in formula (10) is used to describe the probability of In the case of In formula (10), It is a neural network that and weight To estimate the distribution parameters and .
[0153] (10) The road feature embedding unit 31 uses an embedding method to convert the above-mentioned classification attributes (such as road type or node label) into a low-dimensional feature vector, and maps each attribute to a numerical vector by multiplying the embedding matrix with the attribute; wherein the embedding matrix is as described in formula (11). In formula (11), represents the number of possible values of the categorical feature, Represents the latitude of the embedding vector.
[0154] (11) The road feature embedding unit 31 concatenates the embedded feature vectors of all attributes to form a comprehensive feature vector, which contains all relevant information of the road segment or intersection. Through the embedding method, different road segments or intersections can share effective information. For example, a road segment that is not frequently traveled can learn from a road segment that is frequently traveled with similar semantic meanings.
[0155] Please also see Fig.11 , is a functional structure diagram of a spatial graph convolution unit in an embodiment of the present invention. The spatial graph convolution unit 32 comprises: a relational graph convolution network module 320, a gated recurrent unit module 321 and a feature fusion module 322.
[0156] After obtaining the embedded features of the road attributes generated by the road feature embedding unit 31, the spatial graph convolution unit 32 introduces a relational graph convolution network module 320 for modeling complex spatial relationships in the dual graph; the features of the nodes and links processed by the relational graph convolution network module 320 are used to capture the complex interactions between nodes under different types of relationships, and a gated recurrent unit (GRU) module 321 is stacked to capture the long-term dependencies in the time series data, and the fused feature representation of the nodes and links is obtained, and the feature representation is used for estimating the driving time and generating the transition probability in the subsequent multi-task learning module.
[0157] The relational graph convolutional network module 320 is used to process the features of nodes and edges in the road network using relational graph convolutional networks (RGCNs) based on the embedded features of the road attributes generated by the road feature embedding unit 31, so as to capture the global and local features of the road network.
[0158] The motivation for introducing RGCNs (Relational Graph Convolutional Networks) in the travel time estimation problem by the spatial graph convolution unit 32 is to consider that the travel speeds of different road links in a road network are highly correlated with the type of road. For example, in the same area, the same type of road segments (such as main roads) tend to have similar travel speed distributions. This similarity means that the road type is an important feature that can be used to predict travel time.
[0159] The definition of relational graph convolutional networks (RGCNs) is as described in formula (12).
[0160] (12) in, Represents the model Road in layer The hidden state of , used to capture complex representations of road characteristics. Represents the road segment under relation r / A collection of intersection indexes, which reflects the topological relationship between different nodes in the road network. and are learnable parameters in the model, corresponding to the weights under the relation r and the weights of the nodes themselves. These parameters are optimized during the training process to best capture the relationship between road characteristics and travel time. is a normalization constant, usually set to the number of neighboring nodes, i.e. , which is used to ensure that the update of different nodes is not affected by the number of their adjacent nodes. Represents an activation function, such as ReLU or sigmoid function, which is used to introduce nonlinearity and enhance the expressive power of the model.
[0161] Relational Graph Convolutional Networks (RGCNs) consider the relationships between road types and link types to better model the topological structure and properties of road networks.
[0162] The gated recurrent unit module 321 is used to process different types of time series features in the road network through formulas (13) to (16) to capture the dynamic characteristics of the road network.
[0163] (13) (14) (15) (16) in, , Indicated in In the gated recurrent unit (GRU) of the layer, the potential state (hidden state) of a node or edge contains the information of the node or edge in the time series. Represents the initial hidden state of the GRU, which is usually initialized to 0 and represents the state before the start of the sequence. Represents the hidden state of the GRU output.
[0164] Formulas (13) to (16) as shown above describe how the gated recurrent unit (GRU) updates its hidden state. These formulas involve the input of the current layer , the hidden state of the previous layer , and learnable parameters and the bias term . Represents the activation function, usually a sigmoid function, which is used to control the flow of information.
[0165] Furthermore, the gated recurrent unit (GRU) is defined as in formulas (17) to (20).
[0166] (17) (18) (19) (20) in, , , , , , It is a learnable parameter inside the GRU, which is optimized by the back-propagation algorithm during training to best fit the training data. , , is a bias term that provides flexibility to the model, allowing each gating mechanism to have a different baseline behavior in the absence of any input.
[0167] Formula (17) defines the gated recurrent unit (GRU) update gate , controls the degree of update of current input and past information. Among them, represents the sigmoid activation function, and represents the weight matrix, represents the bias term, represents the input of the current time step, represents the hidden state at the previous time step.
[0168] Formula (18) defines the reset gate of the gated recurrent unit (GRU) , determines how much of the past state should be forgotten to make room for information. and represents the weight matrix, Represents the bias term.
[0169] Formula (19) calculates the candidate hidden state , represents the potential new state of the current time step. Among them, and represents the weight matrix, represents the bias term, Represents the element-wise product (Hadamard product) of the reset gate output and the hidden state at the previous time step.
[0170] Formula (20) determines the new hidden state , is a weighted combination of the hidden state and the candidate state at the previous time step. Among them, An added section representing the new state of updating the door control.
[0171] With this design, the Gated Recurrent Unit (GRU) is able to dynamically adjust its retention and update of past information, making it perform well in processing tasks with complex temporal dependencies. In road network analysis, GRU can help the model capture and predict the dynamic changes of traffic flow, thereby improving the accuracy of travel time estimation.
[0172] The feature fusion module 322 is used to fuse the features output by the relationship graph convolution processing and the gated loop processing to form a comprehensive feature representation of the nodes and edges.
[0173] The comprehensive features include spatial and temporal information, providing rich context for subsequent travel time and conversion probability estimation.
[0174] Please also see Fig.12 In this embodiment, the spatial graph convolution unit 32 includes N layers of relational graph convolutional network modules 320 and N gated recurrent unit modules 321, where n∈{1,2,3,...,N}, and n and N are integers. These modules are stacked and connected to form a stacked relational graph convolutional network (R-GCNs) structure for processing road network data.
[0175] Specifically, the nth spatial graph convolution unit 32 inputs the embedded features of the road attributes generated by the road feature embedding unit 31, and aggregates and updates the features of the nodes and edges according to the embedded features of the road attributes. The nth gated recurrent unit corresponding to the nth layer of the relational graph convolution network processes the time series data, receives the output of the nth layer of the relational graph convolution network, updates the states of the nodes and edges, and captures the time dependency.
[0176] Specifically, the spatial graph convolution unit 32 is initialized and is ready to perform multi-level stacking processing through its internal N-layer relationship graph convolution network module 320 and N gated recurrent unit modules 321 to extract and enhance the spatiotemporal feature representation of links and nodes in the road network. For the n-th layer relationship graph convolution network module 320 within the spatial graph convolution unit 32, the embedded features of the road attributes are received, and the features of the nodes and edges are aggregated and updated. The spatial relationship processed by this layer is based on the topological structure of the road network. The n-th gated recurrent unit module 321 corresponding to the n-th layer relationship graph convolution network module 320 processes time series data, receives the output of the n-th layer relationship graph convolution network module 320, and updates the status of nodes and edges to reflect changes in time. The n-th gated recurrent unit module 321 controls the flow of information by updating gates and resetting gates, so that the spatial graph convolution unit 32 can capture long-term temporal dependencies. After the processing of each layer is completed, the control logic of the spatial graph convolution unit 32 will check whether the index n of the current layer has reached the total number of layers N: if so, the process ends, indicating that the processing of all layers has been completed; otherwise, the next layer is processed. The control logic of the spatial graph convolution unit 32 sets n=n+1, and uses the output of the nth gated recurrent unit module 321 as the input of the next layer of relationship graph convolution network module 320. The n+1th layer relationship graph convolution network module 320 receives this input, aggregates and updates the features of the nodes and edges. The n+1th gated recurrent unit module 321 processes time series data, receives the output of the n+1th layer relationship graph convolution network module 320, and updates the status of the nodes and edges to reflect changes in time. Then, continue the loop until all layers are processed.
[0177] As described above, the spatial graph convolution unit 32 inputs the embedded features of the road attributes generated by the road feature embedding unit 31; the relationship graph convolution network module 320 located in the first layer receives the embedded features of the road attributes and starts to aggregate and update the features of the nodes and edges. The spatial relationship processed by this layer is based on the topological structure of the road network. After the relationship graph convolution network module 320 module of the first layer, the gated recurrent unit module 321 of the corresponding layer is used to process time series data. The gated recurrent unit module 321 receives the output of the relationship graph convolution network module 320 and updates the states of the nodes and edges to reflect the changes in time; wherein the gated recurrent unit module 321 controls the flow of information by updating the gate and resetting the gate, so that the model can capture long-term time dependencies. The output of the gated recurrent unit module 321 is used as the input of the relationship graph convolution network module 320 of the next layer. The relationship graph convolution network module 320 of the subsequent layer continues to process the output of the previous layer, and each layer may focus on adjacency relationships of different scales or types. The stacked graph convolutional network module 320 is able to capture more complex spatial features and patterns in the road network. The graph convolutional network module 320 and the gated recurrent unit module 321 are stacked multiple times to form a multi-layer network. In this structure, each layer further extracts and abstracts features based on the previous layer. After being processed by multiple layers of stacked graph convolutional network modules 320 and gated recurrent unit modules 321, the model finally outputs the spatial feature representation of each node and edge. These features contain rich spatial and temporal information and can be used for various downstream tasks such as travel time estimation, traffic prediction, etc.
[0178] The stacking operation of relational graph convolutional networks (RGCNs) allows the model to pass and update information between multiple layers, which helps capture more complex structures and patterns in road networks. The stacking operation also helps prevent information from being lost during the transfer process. Combined with the spatial feature representation of nodes and links, RGCNs are able to simulate temporal trends in a stacked architecture, which is very important for predicting travel time changes over different time periods.
[0179] In this way, RGCNs are able to provide a comprehensive feature representation for each road segment and intersection, which can be used in the subsequent multi-task learning module to estimate the travel time and transition probability between generated road segments.
[0180] Please also see Fig.13 , is a schematic diagram of the structure of the path search optimization unit 33 in the embodiment of the present invention. The path search optimization unit 33 includes: a path search module 330, a conversion probability generation module 331, a pruning operation module 332 and a depth-first search module 333.
[0181] The path search module 330 is used to generate an initial transition probability and initialize a first candidate path set based on the start-end point pair data.
[0182] In this embodiment, the start-point-end point pair data is derived from floating vehicle data (Floating Car Data).
[0183] The transition probability generating module 331 is used to generate transition probabilities between road sections based on road network characteristics, and to infer routes using the transition probabilities between road sections.
[0184] Specifically, the road network is a directed graph, which can be expressed as: (1) (2) in, represents a set of nodes (i.e., intersections), Represents a set of directed edges / links (i.e., road segments); Represents a characteristic function that can be applied to , can also be applied to .
[0185] According to formula (1), represents a node graph, represents a link graph; where the node graph In , The features of can be intersection type, traffic signal; link map In , The features may be road type, road lanes, and speed limits.
[0186] (3) Furthermore, a data pair of the start point and the end point OD represents a tuple as described in formula (3); wherein, and Represent the starting section and the ending section respectively. Indicates the start time interval of a day (e.g. 8:00am-9:00am, assuming that the traffic conditions of all road segments and intersections remain unchanged in the same time slot).
[0187] A simple path It can be expressed as a series of time-ordered links, as described in formula (4): (4) Each link satisfies .
[0188] route r is a sequence consisting of alternating links and crosspoints, which can be described as formula (5): (5) in, For side , is the length of r.
[0189] Based on the above road network feature representation, the transition probability generation module 331 generates the transition probability between road segments based on the road network features, specifically: Based on each road segment in the road network , collect edge features related to the road segment ; Wherein, the edge features may include road conditions, traffic flow, speed limits, etc.; and Use formula (6) to calculate the Transfer to road section The conditional probability ; Wherein, the conditional probability is obtained by transforming the edge features Substitute the exponential function and divide by all the segments It is normalized by the sum of the exponential functions of the starting transition probabilities.
[0190] (6) In formula (6), Indicates that from the road section The collection of all road sections that can be reached directly from the departure point.
[0191] In order to conveniently represent the transition probability between all road segments in the road network, a transition matrix is constructed , whose size is , each element in the matrix Indicates that from the road section Transfer to road section Probability .
[0192] The pruning operation module 332 is used to perform a pruning operation on the first candidate path set generated by the path search module 330 according to the length and probability threshold.
[0193] In this embodiment, the pruning operation module 332 performs length pruning on the first candidate path set by comparing the length of each path with the shortest path length and the distance threshold. The sum of the paths is used to determine whether the path is too long, thereby obtaining a set of paths with reasonable lengths after pruning; and probabilistic pruning is performed on the first candidate path set, by calculating the co-occurrence probability of each path and comparing it with the probability threshold to determine whether the probability of the path appearing is high enough, thereby obtaining a set of paths with reasonable probabilities after pruning.
[0194] (1) Length pruning: The pruning operation module 332 performs a length pruning operation according to formula (7) to remove paths that are longer than the known shortest path; wherein the “shortest path” refers to the path with the shortest direct distance from the starting point to the end point or the shortest cumulative length of the sections passed through among all the first candidate paths; (7) in, is the shortest path, is the distance threshold. When the length of a path exceeds , then the path is considered too long and is unlikely to be the optimal path, so it can be pruned.
[0195] (2) Probabilistic pruning: The pruning module 332 performs a probability pruning operation according to formula (8) to remove paths with low co-occurrence probability. The co-occurrence probability refers to the probability of a path appearing given a starting point and an end point. The co-occurrence probability of a path can be calculated by multiplying all the transition probabilities on the path. If a path r consists of a series of edges The co-occurrence probability of the path can be expressed as described in formula (8): (8) in, represents the initial starting point, and , because the probability of starting from the starting point is certain. If the co-occurrence probability of a path is lower than a certain threshold, it means that the path is less likely to appear in the actual traffic flow and can be pruned.
[0196] Through these two pruning methods, the number of first candidate paths can be effectively reduced, and only those paths with reasonable length and high probability of occurrence can be retained for further analysis and evaluation. This not only improves the efficiency of path search, but also helps to improve the quality of the final path recommendation.
[0197] The depth-first search module 333 is used to select an optimal path from the first candidate path set generated by the path search module 330 using a depth-first search algorithm.
[0198] In this implementation, the depth-first search module 333 is used to: Use the DFS algorithm to search from the starting point to the end point to access the first candidate path set To search all possible paths; Calculate the posterior probability of each path visited , evaluate the possibility of each path becoming the optimal path to obtain a second set of candidate paths; and The sum of the predicted travel time of each path in the second candidate path set is calculated by formula (9), and the path that minimizes the difference between the predicted travel time and the observed travel time is selected as the optimal path.
[0199] (9) in, represents the optimal path, T represents the observed travel time, represents the first candidate path set from the starting point to the end point, Indicates i The predicted travel time for each road segment, Indicates i The predicted travel time for each intersection, Indicates the first j path.
[0200] The depth-first search module 333 calculates the posterior probability as a preliminary screening mechanism to help determine which paths are more likely to meet the actual driving conditions, which can reduce the number of paths that need further detailed evaluation. Using the posterior probability for screening before calculating the total predicted travel time can avoid unnecessary detailed calculations for those paths with extremely low probabilities, thereby improving the overall calculation efficiency. Therefore, the posterior probability can assist the decision-making process, especially when there are multiple paths with similar total predicted travel times, the posterior probability can be used as an auxiliary basis to select the final optimal path.
[0201] As mentioned above, the selection of the optimal path is not only based on the closeness of the sum of predicted travel times to the observed travel times, but also takes into account the posterior probability of the path, ensuring that the selected path is statistically credible. In a dynamic traffic environment, real-time data may affect the posterior probability and predicted travel time. Therefore, these two metrics can be dynamically adjusted to reflect the latest traffic conditions. By minimizing the difference between the predicted travel time and the observed travel time and maximizing the posterior probability, an optimal path that both conforms to the actual travel data and has high statistical credibility can be found.
[0202] Please also see Fig.14 , is a functional structure diagram of a multi-task learning unit in an embodiment of the present invention. The multi-task learning unit 34 comprises: a multi-layer perceptron module 340 and a multi-task model training module 341.
[0203] The multi-task learning unit 34 is used to use a multi-layer perceptron (MLP) to simultaneously estimate the travel time distribution parameters (such as mean and variance) and transition probabilities of road segments and intersections from the output of the spatial graph convolution unit 32; using the generated transition probabilities, a set of candidate paths is generated through a path search algorithm, and the model parameters are updated based on the result of the loss function based on the reverse algorithm, and the local optimal solution is avoided through the ϵ-greedy algorithm, and the KL divergence is used to guide the model to optimize in the direction of more accurate route probability and travel time estimation, and finally output the optimal path and the corresponding travel time.
[0204] The multi-layer perceptron (MLP) module 340 is used to estimate the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network based on the comprehensive feature representation of the nodes and edges output by the spatial graph convolution unit 32.
[0205] Specifically, given a data pair from a starting point (O) to a destination (D), and a specific time period Observed travel time data within T These data are used to estimate the travel time of all links and nodes in the network. Since the data may be incomplete (i.e., there are missing values), the multi-layer perceptron (MLP) module 340 predicts and fills in the missing travel time data through tensor decomposition.
[0206] Since urban travel time has typical spatiotemporal distribution characteristics, it can usually be divided into two levels: one is the modeling of road segments or intersections in space, and the other is time embedding in time (such as weather ID and holiday ID). Based on the above spatiotemporal embedding, the first-order CP decomposition is used to reconstruct the travel time distribution. Specifically, the multi-layer perceptron (MLP) module 340 estimates the travel time distribution parameters of each road segment and intersection in the road network through formulas (21) to (24).
[0207] (twenty one) (twenty two) (twenty three) (twenty four) Assume that the travel time on each link and node follows a Gaussian distribution. μ (mean) and σ (Standard deviation) is the parameter that needs to be estimated in the model. denote the mean and variance of the linked Gaussian distribution respectively; They represent the mean and variance of the Gaussian distribution of the node respectively. Represents the hidden state obtained from the spatial graph convolutional network or the previous layer of neural network. , and represents the weights and biases of the fully connected layer (FC), which is used to extract the hidden state calculate μ (mean) and σ (standard deviation). represents the temporal embedding tensor, multiplied by the hidden state ( represents tensor multiplication) is used to generate the travel time distribution parameters for each time point. Represents the embedding vector in the real time interval.
[0208] Since the normal distribution is closed to addition, the loss function can be derived as: (25) Loss Function Based on negative log likelihood, it is used to measure the consistency between the travel time distribution predicted by the model and the actual observed data. Represents an aggregate function, represents the number of samples in a bag, Represents observation data.
[0209] The multi-layer perceptron (MLP) module 340 is also used to The learned and generated transition probability, that is, the transition probability.
[0210] Among them, MLP is a fully connected neural network that can learn the complex mapping relationship between input features and output weights, as described in formula (26). The input of MLP is the cascade (or concatenation) of the feature vectors of two nodes, that is, and . represents the feature concatenation operator, which concatenates two feature vectors into a longer vector. Used to represent slave nodes i Transfer to Node j The weight of .
[0211] (26) In this embodiment, the conversion probability output by the multi-layer perceptron module 340 is applied to the softmax layer to convert the original weight into a valid probability distribution. The Softmax function can convert any real number vector into a probability distribution, so that each element value in the vector is between 0 and 1, and the sum of all element values is 1. After being processed by the Softmax layer, each weight is converted into a probability value, indicating that iTransfer to Node j In this way, for each node, a probability distribution can be generated that describes the probability that it may transfer to any other node in the network.
[0212] In this embodiment, the spatial graph convolution unit 32 is composed of a stacked relational graph convolution network (R-GCNs) structure by stacking and connecting multiple relational graph convolution network modules 320 and multiple gated recurrent unit modules 321. In the last two layers of the graph convolution network (R-GCNs) structure, the fully connected neural network MLP is used to learn from the features of the nodes and calculate the transition probability from one node (road section or intersection) to another node.
[0213] The multi-task model training module 341 is used to: Using the generated transition probabilities, a third candidate path set is generated through a path search algorithm; Update the model parameters according to the results of the loss function based on the reverse algorithm; and pass -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimates, ultimately outputting the optimal path and the corresponding travel time.
[0214] As described above, the depth-first search module 333 has selected the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path through the DFS algorithm and formula (9). However, the optimal path selected by this method may cause the model to fall into a local optimal solution, that is, the model may ignore other paths that may be equally effective or better. This situation is common in path search, especially in complex traffic networks. Therefore, the multi-task model training module 341 is also used to select the optimal path through - A greedy algorithm is used to screen the optimal path to avoid the technical problem of local optimal solution. Specifically, the multi-task model training module 341 uses - Greedy algorithm, which converts the path that satisfies formula (9) into is selected with probability; otherwise, Under probability, the random selection m The most probable route.
[0215] Specifically, the multi-task model training module 341 is used to perform KL divergence calculation processing based on the input of the path probability distribution predicted by the model and the inverse estimated loss distribution obtained based on the actual observation data, so as to optimize the model parameters and improve the accuracy of the path probability prediction.
[0216] In this embodiment, in order to infer the most likely route based on the actual situation (observed travel time), the Kullback-Leibler (KL) divergence is used to measure the consistency, specifically: (27) in, is the probability distribution of each route in the third candidate path set, Based on observational data The inverse estimated loss distribution between and the true situation.
[0217] Thus, the multi-task model training module 341 optimizes the model parameters by formula (27) to minimize , which means adjusting the model parameters so that the route probability distribution predicted by the model As close as possible to the distribution based on the observed data ; In this way, the model can more accurately reflect the actual traffic conditions and travel time, optimizing the model towards higher route probabilities and more accurate travel time estimates.
[0218] Furthermore, the multi-task model training module 341 is also used to calculate the negative log-likelihood (NLL) loss based on the input of the transition probability predicted by the model and the actual observed travel time data, so as to optimize the model parameters and improve the accuracy of the path prediction.
[0219] While KL divergence provides a way to measure the difference between the predicted distribution and the actual distribution, the negative log-likelihood (NLL) loss is directly evaluated for each prediction step of the model. By minimizing the NLL loss, the model is able to more accurately predict the transition probability from one road segment to another, thereby optimizing path selection.
[0220] In this embodiment, the multi-task model training module 341 minimizes the negative log-likelihood function for the route selected by equation (9) by using the negative log-likelihood (NLL) loss defined by equation (28) to optimize model parameters and improve the accuracy of path prediction.
[0221] (28) in, Represents the trainable parameters of the model, which are optimized during training to minimize the loss (posterior probability); Indicates that the model is in a given previous state and model parameters In the case of The probability of Represents the length of the observation sequence.
[0222] The multi-task model training module 341 is also used to combine the NLL loss with the KL divergence and the loss of the driving time distribution. Combined together to form the total loss function of the model , that is, as described in formula (29). This total loss function guides the model to consider the accurate prediction of travel time, the accurate prediction of path transition probability, and the consistency between model prediction and actual observation data during training.
[0223] (29) in, and Represents a hyperparameter used to balance the three loss terms , , The weights in the total loss function. The choice of these parameters depends on how much each loss term affects the model performance and how important they are in a specific application scenario. It is usually used to balance the importance of travel time distribution loss. Used to balance the importance of transition probability loss, It is used to balance the importance of KL divergence loss.
[0224] (25) Loss Function Based on negative log likelihood, it is used to measure the consistency between the travel time distribution predicted by the model and the actual observed data. Represents an aggregate function, represents the number of samples in a bag, Represents observation data.
[0225] Travel time distribution loss function , this loss term is for the parameters of the travel time distribution predicted by the model (mean μ and variance σ ) to ensure that the model can accurately predict the travel time distribution of each path, thereby improving the accuracy of travel time estimation. , this loss term optimizes the transition probability from one road segment to another predicted by the model, ensuring that the model can accurately predict the movement pattern of vehicles in the road network, thereby improving the accuracy of path selection. KL divergence loss This loss term uses the Kullback-Leibler divergence to measure the difference between the path probability distribution predicted by the model and the inverse estimated loss distribution based on actual observed data, pushing the distribution predicted by the model closer to the actual distribution, thereby improving the model's adaptability to real traffic conditions. During the training process, the model minimizes the total loss functionL to adjust its parameters. This is usually done through gradient descent or other optimization algorithms, with the goal of finding a set of parameters that minimizes the total loss and thus achieves the best performance on all relevant tasks. In this way, the model is able to strike a balance across multiple tasks, improving its accuracy and reliability in complex traffic network analysis.
[0226] The advantages and beneficial effects of an intelligent traffic path optimization method have been described above and will not be repeated here. Moreover, since an intelligent traffic path optimization device is applied to an intelligent traffic path optimization method, it satisfies the intelligent traffic path optimization method and has the same advantages and beneficial effects.
[0227] One of the embodiments of the present invention further provides a readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the steps of the intelligent traffic path optimization method described in any of the above embodiments.
[0228] One of the embodiments of the present invention also provides an electronic device, including: a processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor executes the computer instructions, the electronic device executes the steps of the intelligent traffic path optimization method described in any of the above embodiments.
[0229] See also Fig.15 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention.
[0230] The electronic device 4 includes a processor 41, a memory 42, an input device 43, and an output device 44. The processor 41, the memory 42, the input device 43, and the output device 44 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present invention. It should be understood that in various embodiments of the present invention, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0231] The processor 41 described in the embodiment of the present application can be implemented by hardware, firmware, software or a combination thereof, and can use a circuit, a single or multiple application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, at least one of a microprocessor, and also includes other physical, biological or chemical structures that can achieve similar or equivalent functions to the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in the various embodiments of the present application, or any combination of the steps mentioned therein. In the electronic device 4 of this embodiment, the processor 41 can be a single processor or a combination of two or more processors in terms of physical entity, such as a combination of a CPU and a GPU, a combination of a CPU and an FPGA, a combination of a CPU and an ASIC, a combination of a CPU and a coprocessor, and a combination of a CPU and a DSP, etc. In the embodiment, these combinations are collectively referred to as processors like a single processor.
[0232] The computer program 45 involved in the embodiment can be stored in a computer device readable storage medium, which includes but is not limited to a disk, a tape, a magnetic card, a floppy disk, a flash memory, an optical disk, an optical card, a read-only memory (ROM), a random access memory (RAM), an erasable programmable ROM (EPROM) and an electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical or chemical structures that can achieve similar or equivalent functions to the storage media listed above, such as DNA, RNA, protein and other units with information storage capabilities. In a specific embodiment, the storage medium involved can be one of the above-mentioned media types, or a combination of the above-mentioned media types. In different embodiments, the computer program involved in the embodiment can be stored in a single medium in a centralized manner, or can be stored in multiple media in a distributed manner.
[0233] The memory 42 containing a computer device readable storage medium may be a non-volatile memory or a random access memory. These computer device readable storage media may be built into the device, or may be connected to the device involved in the embodiment as an external device or part of an external device. In some embodiments, the memory with a computer device readable storage medium is deployed locally; in other embodiments, a scheme of deploying the memory away from the processor may also be adopted, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network (LAN), a wide area network (WLAN), a storage area network (SAN), etc., or a suitable combination thereof, as long as the computer device can access the memory. In addition, the computer program involved in the embodiment may be stored in plaintext / ciphertext form, or may be designed as training data, which may be integrated and reorganized by model training and implicitly stored in the parameter state of a deep neural network or other machine learning model.
[0234] like Fig.15 In the illustrated embodiment, the computer program 45 is stored in the memory 42 of the electronic device 4, but the reader should be aware that other solutions that can enable the processor to execute the computer program are feasible.
[0235] The input device 43 is used to input data and / or signals, and the output device 44 is used to output data and / or signals. The output device 44 and the input device 43 may be independent devices or an integrated device.
[0236] It can be understood that in the embodiment of the present invention, the memory 42 is not only used to store related instructions, and the embodiment of the present invention does not limit the specific data stored in the memory.
[0237] Understandably, Fig.15 Only a simplified design of an electronic device is shown. In practical applications, the electronic device may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all intelligent traffic path optimization methods that can implement the embodiments of the present invention are within the protection scope of the present invention.
[0238] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical or other forms.
[0239] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0240] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0241] 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, all or part of the technical solution of the present invention can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a management server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: read-only memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0242] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. An intelligent traffic path optimization method, characterized in that: The method comprises: Embed the link and node attributes of the real road network based on the corresponding embedding matrix to form road attribute embedding features; According to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network; Generating an initial transition probability and a first set of candidate paths based on the start-end point pair data, and searching the first set of candidate paths to screen out an optimal path and its estimated travel time that are consistent with the observed travel time; Estimate the travel time distribution parameters and transition probabilities of road segments and intersections, generate a second set of candidate paths, update the model parameters based on the loss function feedback, and output the optimized model parameters and the optimal path and its travel time.
2. The intelligent traffic path optimization method according to claim 1, characterized in that: Generating an initial transition probability and a first candidate path set based on the start-end point pair data, and searching the first candidate path to screen out an optimal path and its estimated travel time that are consistent with the observed travel time, specifically including: Generate initial transition probability and first candidate path set based on start-end point pair data; generating transition probabilities between road segments based on road network characteristics, and inferring routes using the transition probabilities between the road segments; Performing a pruning operation on the first candidate path set according to a length and a probability threshold; A depth-first search algorithm is used to select an optimal path from the first candidate path set.
3. The intelligent traffic path optimization method according to claim 2, characterized in that: The selecting the optimal path from the first candidate path set using a depth-first search algorithm specifically includes: Use the depth-first search algorithm to search from the starting point to the end point to access the first set of selected paths To search all possible paths; Calculate the posterior probability of each path visited , evaluate the possibility of each path becoming the optimal path to obtain a second set of candidate paths; and Calculate the sum of the predicted travel time of each path in the second candidate path set by formula (9), and select the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path; (9) In formula (9), represents the optimal path, T represents the observed travel time, Indicates i Road sections e The predicted travel time, Indicates i intersection v The predicted travel time, Indicates the first j path.
4. The intelligent traffic path optimization method according to claim 3, characterized in that: Estimate the travel time distribution parameters and transition probabilities of road segments and intersections, generate a second set of candidate paths, and update the model parameters based on the loss function feedback, outputting the optimized model parameters and the optimal path and its travel time, including: Using the generated transition probabilities, a third candidate path set is generated through a path search algorithm; Update the model parameters based on the results of the loss function based on the reverse algorithm; pass -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimates, outputting the optimal path and the corresponding travel time.
5. The intelligent traffic path optimization method according to claim 4, characterized in that: pass -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimation, outputting the optimal path and corresponding travel time, including: use - Greedy algorithm, determine whether the path satisfies formula (9); The path that satisfies formula (9) is The probability of being selected, and the path that will not satisfy formula (9), in Under probability, the random selection m The most probable route; The KL divergence calculation is performed based on the input of the path probability distribution predicted by the model and the inverse estimated loss distribution obtained based on the actual observation data; wherein the KL divergence is defined as formula (27): (27) In formula (27), represents the probability distribution of each route in the third candidate path set, Based on observational data and the inverse estimated loss distribution between the true situation; Represents probability distribution and The KL divergence between Represents probability distribution Middle i The probability of an event, Represents probability distribution Middle i The probability of an event; According to the input of the transition probability predicted by the model and the actual observed travel time data, a negative log-likelihood loss is calculated; wherein the negative log-likelihood loss is defined by formula (28) to minimize the negative log-likelihood function; (28) In formula (28), represents the negative log-likelihood loss, represents the trainable parameters of the model, Indicates that the model is in a given previous state and model parameters In the case of The probability of represents the length of the observation sequence; The negative log-likelihood is combined with the KL divergence and the loss of the travel time distribution by formula (29) Combined to form the total loss function of the model , so as to guide the model to consider the accurate prediction of travel time, the accurate prediction of path transfer probability, and the consistency between the model prediction and the actual observation data during the training process through the total loss function, and finally output the optimal path and its corresponding travel time; (29) in, and represents the hyperparameter, represents the loss of travel time distribution, as defined in formula (25): (25) In formula (25), represents the aggregation function of the observed data Z, and K represents the number of samples in the bag; The behavior aggregation function representing the distribution of travel times predicted by the model; Represents the variance of the travel time distribution predicted by the model.
6. The intelligent traffic path optimization method according to claim 4, characterized in that: Based on the comprehensive feature representation of the nodes and edges, the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network are estimated, including: Predicting and filling missing travel time data through tensor decomposition according to the comprehensive feature representation of the nodes and edges; Estimate the travel time distribution parameters of each road segment and intersection in the road network through formulas (21) to (24); (21) (22) (23) (24) In formulas (21) to (24), Represents road segment e The mean of the travel time distribution; Indicated in In the layer, road segment e The eigenvector of Indicates the road segment used to calculate e The weight matrix of the mean of ; Indicates the road segment used to calculate e The bias term of the mean of ; Represents tensor multiplication; Indicates that during a specific period of time Observed travel time data within ; Represents road segment e The standard deviation of the travel time distribution; Indicates the road segment used to calculate e The weight matrix of the standard deviation of Indicates the road segment used to calculate e The bias term of the standard deviation of Indicates intersection v The mean of the travel time distribution; Indicated in Layer, intersection v The eigenvector of Indicates the intersection to be calculated v The weight matrix of the mean of ; Indicates the intersection to be calculated v The bias term of the mean of ; Indicates intersection v The standard deviation of the travel time distribution; Indicates the intersection to be calculated v The weight matrix of the standard deviation of Indicates the intersection to be calculated v The bias term of the standard deviation of Through the fully connected neural network according to the edge features Learning and generating transition probabilities; wherein the fully connected neural network is defined by formula (26); (26) In formula (26), and Respectively expressed in In the layer, nodes i and j The eigenvector of Represents the feature cascade operator; Represents a slave node i Transfer to Node j The conversion probability.
7. The intelligent traffic path optimization method according to claim 1, characterized in that: According to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network, specifically including: According to the embedded features of the road attributes, a relational graph convolutional network is used to process the features of nodes and edges in the road network to capture the global and local features of the road network; wherein the relational graph convolutional network is defined as formula (12); (12) In formula (12), r Represents a type of relationship in the graph; R Represents the set of all relationship types in the graph; i represents a node in the graph, j Representation Node i In relationship r A neighbor node under ; Representation Node i In relationship r The set of all neighbor nodes under ; Indicates In the layer, nodes i The eigenvector of represents the activation function; Indicated in In the layer, nodes i The eigenvector of Indicated in In the layer, the weight matrix corresponding to the node itself; Indicated in In the layer, nodes j The eigenvector of Indicated in In the layer, the weight matrix corresponding to the relationship; represents the normalization constant; Using a gated recurrent unit to process time series data to capture dynamic characteristics of a road network; wherein the gated recurrent unit processes the time series data to capture the dynamic characteristics of a road network by using formulas (13) to (16); the gated recurrent unit is defined by formulas (17) to (20); (13) (14) (15) (16) In formulas (13) to (16), represents the hidden state of the gated recurrent unit at layer 0; represents the input feature vector at layer 0; represents the initial hidden state; , , Respectively indicated in the 1st, 2nd, The output feature vector of the layer; Indicates that the neighbor nodes of layer 0 and layer 1 j The feature vectors are concatenated; Indicates concatenating the input feature vectors of layer 0 and layer 1; Indicates that the The gated recurrent unit hidden state of the layer and Neighbor nodes of the layer j The eigenvector of To splice; Indicates that the The gated recurrent unit hidden state of the layer and The input feature vector of the layer To splice; (17) (18) (19) (20) In formula (17), represents the value of the update gate, represents the input weight matrix of the update gate, Indicates that at time step t The input feature vector is represents the hidden state weight matrix of the update gate, Indicates that at time step The hidden state of represents the bias term of the update gate; in formula (18), represents the value of the reset gate, represents the input weight matrix of the reset gate, represents the hidden state weight matrix of the reset gate, represents the bias term of the reset gate; in formula (19), represents the candidate hidden state, represents the input weight matrix of the candidate hidden states, The hidden state weight matrix representing the candidate hidden states, represents the bias term of the candidate hidden state; in formula (20), represents the final hidden state at time step t, represents the hidden state at the previous time step, represents the complement of the update gate; Fusing the features output by the graph convolution and gated loop processing to form a comprehensive feature representation of nodes and edges; and Based on the comprehensive feature representation of the nodes and edges, the travel time distribution parameters and transition probabilities of each road segment and intersection in the road network are estimated.
8. The intelligent traffic path optimization method according to claim 7, characterized in that: The relational graph convolutional network consists of N Layer-wise graph convolutional networks and N The gated recurrent units are stacked and connected, where n ∈{1,2,3,……, N },and n , N is an integer; According to the road attribute embedding features, multi-level stacking processing is performed through a relational graph convolutional network and a gated recurrent unit to extract and enhance the spatiotemporal feature representation of links and nodes in the road network, specifically including: According to the road attribute embedding feature, n The layer-relation graph convolutional network receives the embedded features of the road attributes, aggregates and updates the features of nodes and edges; Corresponding to the n Layer-wise graph convolutional network n A gated recurrent unit processes time series data, receives the n The output of the layer-by-layer graph convolutional network updates the states of nodes and edges and captures temporal dependencies; In judgment n Not equal to N season n = n +1, and the n The output of the gated recurrent unit is taken as the n +1 layer of graph convolutional network input, the n +1 layer of graph convolutional network receives the n The output of the gated recurrent unit aggregates and updates the features of nodes and edges; Corresponding to the n +1 layer of graph convolutional network n +1 gated recurrent unit processes time series data and receives the n +1 layer of graph convolutional network output, update the status of nodes and edges, and then loop to execute judgment n Is it equal to N .
9. An intelligent traffic path optimization device, characterized in that: The device comprises: A road feature embedding unit, used for embedding the link and node attributes of the real road network based on the corresponding embedding matrix to form a road attribute embedding feature; A spatial graph convolution unit, for embedding features according to the road attributes, performing multi-level stacking processing through a relational graph convolutional network and a gated recurrent unit, and extracting and enhancing the spatiotemporal feature representation of links and nodes in the road network; A path search optimization unit, for generating an initial transfer probability and a first candidate path set based on the start-end point pair data, and searching the first candidate path set to screen out an optimal path and its estimated travel time that are consistent with the observed travel time; The multi-task learning unit is used to estimate the travel time distribution parameters and transition probabilities of road segments and intersections, generate a second set of candidate paths, update the model parameters based on the loss function feedback, and output the optimized model parameters and the optimal path and its travel time.
10. The intelligent traffic path optimization device according to claim 9, characterized in that: The path search optimization unit comprises: A path search module, used to generate an initial transition probability and initialize a first candidate path set based on start-end point pair data; A transition probability generation module, used to generate transition probabilities between road sections based on road network characteristics, and to infer routes using the transition probabilities between the road sections; A pruning operation module, used for performing a pruning operation on the first candidate path set generated by the path search module according to a length and a probability threshold; A depth-first search module is used to select an optimal path from the first candidate path set using a depth-first search algorithm according to the first candidate path plan generated by the path search module.
11. The intelligent traffic path optimization device according to claim 10, characterized in that: The depth-first search module is used to: Use the depth-first search algorithm to search from the starting point to the end point to access the first candidate path set To search all possible paths; Calculate the posterior probability of each path visited , evaluate the possibility of each path becoming the optimal path to obtain the second candidate path set; as well as Calculate the sum of the predicted travel time of each path in the second candidate path set by formula (9), and select the path that minimizes the difference between the predicted travel time and the observed travel time as the optimal path; (9) In formula (9), represents the optimal path, T represents the observed travel time, Indicates i Road sections e The predicted travel time, Indicates i The predicted travel time of intersection v, Indicates the first j path.
12. The intelligent traffic path optimization device according to claim 11, characterized in that: The multi-task learning unit comprises: A multi-layer perceptron module, for estimating travel time distribution parameters and transition probabilities of various road segments and intersections in a road network based on the comprehensive feature representation of nodes and edges output by the spatial graph convolution unit; Multi-task model training module for: Using the generated transition probabilities, a third candidate path set is generated through a path search algorithm; Update the model parameters based on the results of the loss function based on the reverse algorithm; pass -The greedy algorithm avoids local optimal solutions and uses KL divergence to guide the model to optimize towards more accurate route probability and travel time estimates, outputting the optimal path and the corresponding travel time.
13. The intelligent traffic path optimization device according to claim 12, characterized in that: The multi-task model training module is used to: use - Greedy algorithm, determine whether the path satisfies formula (9); The path that satisfies formula (9) is The probability of being selected, and the path that will not satisfy formula (9), in Under probability, the random selection m The most probable route; The KL divergence calculation is performed based on the input of the path probability distribution predicted by the model and the inverse estimated loss distribution obtained based on the actual observation data; wherein the KL divergence is defined as formula (27): (27) In formula (27), represents the probability distribution of each route in the third candidate path set, Based on observational data and the inverse estimated loss distribution between the true situation; Represents probability distribution and The KL divergence between Represents probability distribution Middle i The probability of an event, Represents probability distribution Middle i The probability of an event; According to the input of the transition probability predicted by the model and the actual observed travel time data, a negative log-likelihood loss is calculated; wherein the negative log-likelihood loss is defined by formula (28) to minimize the negative log-likelihood function; (28) In formula (28), represents the negative log-likelihood loss, represents the trainable parameters of the model, Indicates that the model is in a given previous state and model parameters In the case of probability; represents the length of the observation sequence; The negative log-likelihood is combined with the KL divergence and the loss of the travel time distribution by formula (29) Combined to form the total loss function of the model , so as to guide the model to consider the accurate prediction of travel time, the accurate prediction of path transfer probability, and the consistency between the model prediction and the actual observation data during the training process through the total loss function, and finally output the optimal path and its corresponding travel time; (29) in, and represents the hyperparameter, represents the loss of travel time distribution, as defined in formula (25): (25) In formula (25), Represents observation data Z Aggregation functions, K represents the number of samples in the bag; The behavior aggregation function representing the distribution of travel times predicted by the model; Represents the variance of the travel time distribution predicted by the model.
14. The intelligent traffic path optimization device according to claim 12, characterized in that: The multi-layer perceptron module is used to: Predicting and filling missing travel time data through tensor decomposition according to the comprehensive feature representation of the nodes and edges; Estimate the travel time distribution parameters of each road segment and intersection in the road network through formulas (21) to (24); (21) (22) (23) (24) In formulas (21) to (24), represents the mean value of the travel time distribution of road segment e; Indicated in In the layer, road segment e The eigenvector of represents the weight matrix used to calculate the mean of road segment e; Indicates the road segment used to calculate e The bias term of the mean of ; Represents tensor multiplication; Indicates that during a specific period of time Observed travel time data within ; Represents road segment e The standard deviation of the travel time distribution; Indicates the road segment used to calculate e The weight matrix of the standard deviation of Indicates the road segment used to calculate e The bias term of the standard deviation of Indicates intersection v The mean of the travel time distribution; Indicated in Layer, intersection v The eigenvector of Indicates the intersection to be calculated v The weight matrix of the mean of ; Indicates the intersection to be calculated v The bias term of the mean of ; Indicates intersection v The standard deviation of the travel time distribution; Indicates the intersection to be calculated v The weight matrix of the standard deviation of Indicates the intersection to be calculated v The bias term of the standard deviation of Through the fully connected neural network according to the edge features Learning and generating transition probabilities; wherein the fully connected neural network is defined by formula (26); (26) In formula (26), and Respectively expressed in In the layer, nodes i and j The eigenvector of Represents the feature cascade operator; Represents a slave node i Transfer to Node j The conversion probability.
15. The intelligent traffic path optimization device according to claim 9, characterized in that: The spatial graph convolution unit comprises: A graph convolutional network module, used to process the features of nodes and edges in the road network using a graph convolutional network according to the embedded features of the road attributes generated by the road feature embedding unit, so as to capture the global and local features of the road network; wherein the graph convolutional network is defined as in formula (12); (12) In formula (12), r Represents a type of relationship in the graph; R Represents the set of all relationship types in the graph; i represents a node in the graph, j Representation Node i In relationship r A neighbor node under ; Representation Node i In relationship r The set of all neighbor nodes under ; Indicates In the layer, nodes i The eigenvector of represents the activation function; Indicated in In the layer, nodes i The eigenvector of Indicated in In the layer, the weight matrix corresponding to the node itself; Indicated in In the layer, nodes j The eigenvector of Indicated in In the layer, the weight matrix corresponding to the relationship; represents the normalization constant; A gated recurrent unit module, for processing time series data using a gated recurrent unit to capture dynamic characteristics of a road network; wherein the gated recurrent unit processes the time series data using formulas (13) to (16) to capture the dynamic characteristics of a road network; and the gated recurrent unit is defined using formulas (17) to (20); (13) (14) (15) (16) In formulas (13) to (16), represents the hidden state of the gated recurrent unit at layer 0; represents the input feature vector at layer 0; represents the initial hidden state; , , Respectively indicated in the 1st, 2nd, The output feature vector of the layer; Indicates that the neighbor nodes of layer 0 and layer 1 j The feature vectors are concatenated; Indicates concatenating the input feature vectors of layer 0 and layer 1; Indicates that the The gated recurrent unit hidden state of the layer and Neighbor nodes of the layer j The eigenvector of To splice; Indicates that the The gated recurrent unit hidden state of the layer and The input feature vector of the layer To splice; (17) (18) (19) (20) In formula (17), represents the value of the update gate, represents the input weight matrix of the update gate, Indicates that at time step t The input feature vector is represents the hidden state weight matrix of the update gate, Indicates that at time step The hidden state of represents the bias term of the update gate; in formula (18), represents the value of the reset gate, represents the input weight matrix of the reset gate, represents the hidden state weight matrix of the reset gate, represents the bias term of the reset gate; in formula (19), represents the candidate hidden state, represents the input weight matrix of the candidate hidden states, The hidden state weight matrix representing the candidate hidden states, represents the bias term of the candidate hidden state; in formula (20), represents the final hidden state at time step t, represents the hidden state at the previous time step, represents the complement of the update gate; The feature fusion module is used to fuse the features output by the relational graph convolution processing and the gated loop processing to form a comprehensive feature representation of nodes and edges.
16. The intelligent traffic path optimization device according to claim 15, characterized in that: The spatial graph convolution unit consists of N Layer-wise graph convolutional networks and N The gated recurrent units are stacked and connected, where n ∈{1,2,3,……, N },and n , N is an integer; No. n A layer relationship graph convolutional network, used for receiving the embedded features of the road attributes according to the road attribute embedding features, and aggregating and updating the features of nodes and edges; No. n gated recurrent unit, corresponding to the n A layer relationship graph convolutional network, used to process time series data, receives the first n The output of the layer-by-layer graph convolutional network updates the states of nodes and edges and captures temporal dependencies; The spatial graph convolution unit is also used to judge n Not equal to N season n = n +1, and the n The output of the gated recurrent unit is taken as the n +1 layer of graph convolutional network input, so that the n +1 layer of graph convolutional network receives the n The output of the gated recurrent unit aggregates and updates the features of nodes and edges; No. n +1 gated recurrent unit, corresponding to the n +1 layer of relational graph convolutional network, used to process time series data, receiving the n +1 layer of graph convolutional network output, update the status of nodes and edges, and then loop to execute judgment n Is it equal to N .
17. An electronic device comprising: A processor and a memory, characterized in that the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor executes the computer instructions, the electronic device executes the steps of the intelligent traffic path optimization method as described in any one of claims 1 to 8.
18. A readable storage medium having a computer program stored therein, characterized in that: The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the steps of the intelligent traffic path optimization method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Travel time estimation method of dual graph convolutional network based on intersection joint modeling
CN116246457A
Hybrid A* automatic driving connection vehicle parking path planning method
CN118579061A