Training Method of Road Condition Prediction Model, Road Condition Prediction Method and Device
By performing data transformation and feature extraction of residual graph convolution models on the historical road condition training set, and combining time and spatial characteristics, a visual road condition prediction model is built, which solves the problem of single prediction results in the existing technology, and improves the accuracy and user experience of road condition prediction.
Patent Information
- Application Number
- CN202111513950.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-12-10
AI Technical Summary
The existing road condition prediction method is characterized by traffic status information, with a single prediction result, which is difficult to meet the actual needs of users for complex and changing urban road conditions, and ignores the importance of visual information to traffic safety and driving experience.
By transforming data on the historical road condition training set, the residual graph convolution model is used to extract visual road condition characteristics, combining time and spatial characteristics, a prediction model with visual road condition characteristics is built, and the residual graph convolution model is used to extract and fully connect, the visual road condition prediction value is output, and the model parameters are updated through the loss function.
It enriches the road condition prediction results, improves the accuracy of model prediction, meets users' needs for visual road conditions, and improves traffic safety and driving experience.
Smart Images

Figure CN114283388B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and particularly to a method for training a road condition prediction model, a road condition prediction method, and a device therefor. Background Art
[0002] Before a user travels, predicting the urban road conditions can help the user judge the convenience and safety of the travel, so that the user can obtain a better travel experience. The road condition prediction solutions mainly include a knowledge-driven solution and a data-driven solution. Among them, the data-driven solution is to establish a road condition data set, and predict the road conditions by training a model to statistically learn the relationship between historical road conditions and future road conditions.
[0003] Currently, the data-driven solution uses historical traffic condition information as training data, such as historical road travel time and traffic flow. However, using traffic state information as training data, the features that the model can learn are too single, and the prediction obtained is only the road travel time between the departure place and the destination. In actual situations, urban road conditions are often complex and changeable, and a single prediction result is difficult to meet the actual needs of users. Summary of the Invention
[0004] The present application provides a method for training a road condition prediction model, a road condition prediction method, and a device therefor, so as to solve the technical problem that the existing road condition prediction method has a single prediction result.
[0005] To solve the above technical problem, an embodiment of the present application provides a method for training a road condition prediction model, including
[0006] Performing data transformation on a historical road condition training set to obtain a plurality of target graph data, where the historical road condition training set includes road network sample data and visual road condition sample data at multiple moments;
[0007] Using a preset residual graph convolutional model to extract features from the plurality of target graph data to obtain a plurality of residual graphs;
[0008] Fusing and fully connecting the plurality of residual graphs, and outputting a visual road condition prediction value;
[0009] Calculating a loss function of the residual graph convolutional model according to the visual road condition prediction value, and updating the model parameters of the residual graph convolutional model based on the loss function until the residual graph convolutional model reaches a preset convergence condition, so as to obtain a road condition prediction model.
[0010] In this embodiment, by performing data transformation on the historical road condition training set, multiple target graph data are obtained. Using a preset residual graph convolutional model, feature extraction is performed on the multiple target graph data to obtain multiple residual graphs, thereby capturing data features with directional correlation using the spatial dependence relationship of the graph data, so as to combine the time correlation features of the historical data in multiple time periods; fusing and fully connecting the multiple residual graphs, outputting a visual road condition prediction value, and calculating the loss function of the residual graph convolutional model based on the visual road condition prediction value, and updating the model parameters of the residual graph convolutional model based on the loss function until the residual graph convolutional model reaches a preset convergence condition, obtaining a road condition prediction model, thereby making full use of global features such as time and space, constructing a prediction model with visual road condition features, enriching the model prediction results and improving the model prediction accuracy.
[0011] In one embodiment, performing data transformation on the historical road condition training set to obtain multiple target graph data includes:
[0012] Based on multiple road segments in the road network sample data and the path length of each road segment, multiple weighted graphs are established;
[0013] Performing vector encoding on the visual road condition sample data to obtain feature vectors;
[0014] According to the correspondence between each road segment and the visual road condition sample data at each moment, establishing the association relationship between each weighted graph and the feature vector to obtain multiple target graph data.
[0015] In this embodiment, by constructing target graph data from the road segments, path lengths, and visual road conditions at multiple moments, the visual information of the road conditions is fully mined and utilized, which conforms to the main sensory experience of people in the traffic environment and provides new methods and ideas for traffic travel prediction.
[0016] In one embodiment, using a preset residual graph convolutional model to perform feature extraction on multiple target graph data to obtain multiple residual graphs includes:
[0017] Using the residual graph convolutional model to perform graph convolutional operations on multiple target graph data to extract the road condition spatial features of each target graph data;
[0018] Based on each road condition spatial feature, multiple residual graphs are output.
[0019] In this embodiment, through graph convolutional operations, the spatial features of non-Euclidean data can be effectively captured.
[0020] In one embodiment, based on each road condition spatial feature, outputting multiple residual graphs includes:
[0021] Using the residual graph convolution structure, map each road condition spatial feature to obtain multiple residual graphs. The residual graph convolution structure is as follows:
[0022]
[0023] Among them, G l+1 is the target graph data of the (l + 1)-th convolutional layer, G l is the target graph data of the l-th convolutional layer, F(G l , W l ) is the mapping function of the road condition spatial feature, is the residual graph.
[0024] In this embodiment, the residual graph convolution structure is adopted, which can capture more deep features, improve the receptive field of the model, and is applicable to the complex and changeable urban road network structure that cannot be processed by the convolutional neural network model for regular two-dimensional matrices.
[0025] In one embodiment, fuse and fully connect multiple residual graphs to output the visual road condition prediction value, including:
[0026] Use a preset gated recurrent unit to perform temporal fusion on multiple residual graphs based on each moment corresponding to the residual graphs to obtain a total residual graph;
[0027] Fully connect the total residual graph to output the visual road condition prediction value.
[0028] In this embodiment, through temporal fusion, the time features are combined to improve the accuracy of the future visual road condition prediction result.
[0029] Second, an embodiment of the present application provides a road condition prediction method, including:
[0030] Obtain the driving route between the departure place and the destination;
[0031] Perform data transformation on the driving route to obtain road condition map data;
[0032] Use the road condition prediction model to predict the target visual road condition data of the driving route at a future moment according to the road condition map data. The road condition prediction model is trained by the training method in the first aspect.
[0033] Third, an embodiment of the present application provides a training device for a road condition prediction model, including:
[0034] The first transformation module is used to perform data transformation on the historical road condition training set to obtain multiple target graph data. The historical road condition training set includes road network sample data and visual road condition sample data at multiple moments;
[0035] An extraction module, configured to use a preset residual graph convolutional model to extract features from multiple target graph data to obtain multiple residual graphs;
[0036] An output module, configured to fuse and fully connect multiple residual graphs and output a visual road condition prediction value;
[0037] An update module, configured to calculate a loss function of the residual graph convolutional model according to the visual road condition prediction value, and update model parameters of the residual graph convolutional model based on the loss function until the residual graph convolutional model reaches a preset convergence condition, so as to obtain a road condition prediction model.
[0038] Fourthly, an embodiment of the present application provides a road condition prediction device, including:
[0039] An acquisition module, configured to acquire a driving route between a departure place and a destination;
[0040] A second transformation module, configured to perform data transformation on the driving route to obtain road condition graph data;
[0041] A prediction module, configured to use a road condition prediction model to predict target visual road condition data of the driving route at a future moment according to the road condition graph data, where the road condition prediction model is trained by the training method in the first aspect.
[0042] Fifthly, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store a computer program, and when the computer program is executed by the processor, it implements the training method of the road condition prediction model in the first aspect or the road condition prediction method in the second aspect.
[0043] Sixthly, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the training method of the road condition prediction model in the first aspect or the road condition prediction method in the second aspect.
[0044] It should be noted that for the beneficial effects of the second to sixth aspects above, please refer to the relevant descriptions of the first aspect above, and details are not described herein again. Description of the Drawings
[0045] Figure 1 It is a schematic flow chart of the training method of the road condition prediction model provided by the embodiment of the present application;
[0046] Figure 2 It is a schematic diagram of the residual graph convolutional structure provided by the embodiment of the present application;
[0047] Figure 3 It is a schematic diagram of the overall network structure provided by the embodiment of the present application;
[0048] Figure 4Schematic diagram of the graph data structure provided by the embodiments of the present application;
[0049] Figure 5 Schematic flow chart of the road condition prediction method provided by the embodiments of the present application;
[0050] Figure 6 Schematic diagram of the structure of the training device for the road condition prediction model provided by the embodiments of the present application;
[0051] Figure 7 Schematic diagram of the structure of the road condition prediction device provided by the embodiments of the present application;
[0052] Figure 8 Schematic diagram of the structure of the electronic device provided by the embodiments of the present application. Detailed implementation manners
[0053] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0054] As recorded in the related background art, currently, data-driven solutions use historical traffic condition information as training data, such as historical road travel time and traffic flow. However, using traffic state information as training data, the features that the model can learn are too single, and what it predicts is only the road travel time between the departure place and the destination. In actual situations, urban road conditions are often complex and changeable. Using traffic state information as features ignores that visual information is the main information in the traffic environment during vehicle driving. The quality of visual road conditions is related to vehicle driving experience and traffic safety, and also seriously affects people's travel decisions. The lack of prediction of urban visual road conditions may lead to traffic safety accidents and extremely poor vehicle driving experiences for people, making it difficult to meet the actual needs of users.
[0055] To this end, the embodiments of the present application provide a method for training a road condition prediction model, a road condition prediction method, and a device. By performing data transformation on a historical road condition training set, multiple target graph data are obtained. Using a preset residual graph convolutional model, feature extraction is performed on the multiple target graph data to obtain multiple residual graphs, thereby capturing data features with directional correlation using the spatial dependence relationship of the graph data, so as to combine the time correlation features of the historical data in multiple time periods; the multiple residual graphs are fused and fully connected to output a visual road condition prediction value, and based on the visual road condition prediction value, the loss function of the residual graph convolutional model is calculated, and the model parameters of the residual graph convolutional model are updated based on the loss function until the residual graph convolutional model reaches a preset convergence condition, obtaining a road condition prediction model, thereby making full use of global features such as time and space to construct a prediction model with visual road condition features, enriching the model prediction results and improving the model prediction accuracy.
[0056] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for training a road condition prediction model provided by an embodiment of the present application. The training method of this embodiment can be applied to an electronic device, and the electronic device includes but is not limited to computing devices such as smart phones, tablet computers, laptop computers, and desktop computers. As Figure 1 shown, the method for training a road condition prediction model includes steps S101 to S104, which are described in detail as follows:
[0057] Step S101: Perform data transformation on a historical road condition training set to obtain multiple target graph data, where the historical road condition training set includes road network sample data and visual road condition sample data at multiple moments.
[0058] In this step, the road network sample data includes road segments and road segment lengths at multiple historical moments, and the visual road condition sample data includes but is not limited to meteorological data, illumination data, etc. corresponding to the road segments at multiple historical moments. Optionally, by representing the road network sample data in a preset data form, the graph data corresponding to each road network sample data is obtained, and then each graph data is associated with the sample features corresponding to the visual road condition sample data to obtain the target graph data.
[0059] Step S102: Use a preset residual graph convolutional model to perform feature extraction on the multiple target graph data to obtain multiple residual graphs.
[0060] In this step, due to the problem of gradient propagation, the depth of the graph convolutional neural network model usually does not exceed three layers. The shallow network structure limits the receptive field of the model and cannot capture more features, resulting in the inability to make the model better play its performance. In the embodiments of the present application, a residual graph convolutional model is adopted, and the residual structure is migrated to the graph convolutional neural network model, making the graph convolutional neural network model deeper, capable of stable convergence during training, and having better model expression ability.
[0061] In the residual graph learning framework of this embodiment, as Figure 2 shown in the residual graph convolutional structure, "ResGCN" represents the residual graph convolutional backbone network. The residual graph convolutional backbone network learns the underlying features H by fitting another mapping function F, and uses the mapping function F to transform the input target graph data and perform vertex addition to obtain the residual graph of the next layer.
[0062] Step S103: Fuse and fully connect the multiple residual graphs, and output the visual road condition prediction value.
[0063] In this step, due to the sample data at multiple historical moments, the time information between the sample data is fused through the fusion layer, the time correlation of the samples is extracted, and the fused residual graph is input into the fully connected layer to obtain the visual road condition prediction value.
[0064] Step S104: Calculate the loss function of the residual graph convolutional model according to the visual road condition prediction value, and update the model parameters of the residual graph convolutional model based on the loss function until the residual graph convolutional model reaches the preset convergence condition to obtain the road condition prediction model.
[0065] In this embodiment, after the residual graph convolutional model obtains the prediction value, backpropagation calculation is performed using the loss function, and the model parameters are continuously learned and updated to finally obtain the weight model. The loss function needs to be conducive to the learning and convergence of the model. The mean absolute error (MAE) Loss and Huber Loss can be used, which can assign smaller weights to outliers and will not sacrifice the prediction effects of other normal data points to reduce the overall performance of the model, and is more robust.
[0066] Exemplarily, as Figure 3 shown in the overall network structure, "input" represents the input layer, "backone" represents the residual graph convolutional backbone network layer, "fuse" represents the fusion layer, "FC" represents the fully connected layer, and "output" represents the output layer. "ResGCN" represents the residual graph convolutional backbone network, and GRU represents the gated recurrent unit.
[0067] Use the visual road condition information at historical moments as the model input. Specifically, X T represents the graph data at the current moment, XT-t For the map data before a fixed time interval, it can be the map data one minute, one hour, one day, or one week ago, with a total of N moments. After the data is input, the residual graph convolutional backbone network is used to extract the structured spatial features of the urban road network, obtaining N residual graphs. Then, by fusing the time information between the residual units, after fusion, a fully connected layer is performed, and finally, the predicted value of the visual road condition at the current moment is obtained. According to the predicted value of the visual road condition at the current moment and the map data at the current moment, the loss value of the loss function is calculated, and the model parameters of the residual graph convolutional model are updated until the loss value is less than the preset threshold or the number of iterations reaches the preset number, which indicates that the residual graph convolutional model reaches the preset convergence condition, stops the iteration, and obtains the road condition prediction model.
[0068] In this embodiment, the road network and the visual road condition are modeled as a convolutional graph. By constructing a residual graph convolutional model, the time dependence and spatial dependence of the visual road condition are fully utilized to predict the lighting information, meteorological information, etc. in the visual road condition at future moments. With the historical data of multiple times as the input, it can not only achieve short-term prediction but also be applicable to long-term prediction tasks. This method takes features such as lighting and weather conditions in the visual road condition as the prediction results, meeting people's visual requirements for road condition information and facilitating people's travel to a certain extent.
[0069] In one embodiment, based on Figure 1 the embodiment shown, the above step S101 specifically includes:
[0070] Based on multiple road segments in the road network sample data and the path length of each road segment, establish multiple weighted graphs;
[0071] Perform vector encoding on the visual road condition sample data to obtain feature vectors;
[0072] According to the correspondence between each road segment at each moment and the visual road condition sample data, establish the association relationship between each weighted graph and the feature vector to obtain multiple pieces of the target map data.
[0073] In this embodiment, as shown in Figure 4 the schematic diagram of the map data structure, the visual road condition is represented as a weighted graph G=(V, E), where V is a set of unordered vertices, V={ν1, ν2…ν N}, N is the number of nodes, and V represents the road segments; E is the set of edges, and the weight of the edge reflects the path length between the center points of two road segments. GCN associates each vertex V with the feature vector h v ∈R D where D is the dimension of the feature vector.
[0074] In one embodiment, based on Figure 1Based on the above - mentioned embodiments, step S102 specifically includes:
[0075] Using the residual graph convolution model, perform graph convolution operations on multiple pieces of the target graph data, and extract the road - condition spatial features of each piece of the target graph data;
[0076] Based on each of the road - condition spatial features, output multiple residual graphs.
[0077] In this embodiment, the weighted graph G can be represented as a whole by the features connecting unordered vertices, that is, h G =[h v1 ,h v2 ,…,h vN ∈R N×D , where N is the cardinality of the set V. Then the general graph convolution operation f at the l - th layer can be represented as the following aggregation and update operations:
[0078]
[0079] G l =(V l ,E l ) and G l+1 =(V l+1 ,E +1l ) are the input graph and the output graph at the l - th layer. and are the learnable parameters of the aggregation and update equations respectively. In most GCN frameworks, the aggregation function is used to compile information from the vertex neighborhood, while the update function performs a non - linear transformation on the aggregated information to calculate the new vertex representation.
[0080] The feature vector of the vertex, that is, the traffic data feature, can be information such as travel time, traffic flow, etc. In this embodiment, it is visual road - condition information (such as meteorology, illumination, etc.). Use to represent the visual road - condition of each road. Therefore, the prediction problem of the visual road - condition can be expressed as learning the mapping function f under the premise of the graph convolution network G and the feature matrix h, and then calculating the visual road - condition information at the future time T.
[0081] [h T+1 ,h T+2 ,…,h T+t =f(G,[h T-t ,…,h T-1 ,h T );
[0082] In the original graph learning framework, learn the mapping function f for the underlying features, which takes a graph data as input and outputs a new graph data. In this embodiment, however, learn the underlying features H by fitting a mapping function F. Optionally, such asFigure 2 Schematic diagram of the residual graph convolution structure shown, based on each of the road condition spatial features, outputting a plurality of the residual graphs, including:
[0083] Using the residual graph convolution structure, mapping each of the road condition spatial features to obtain a plurality of the residual graphs, the residual graph convolution structure being:
[0084]
[0085] where G l+1 is the target graph data of the (l + 1)-th convolutional layer, G l is the target graph data of the l-th convolutional layer, F(G l , W l ) is the mapping function of the road condition spatial features, is the residual graph.
[0086] In one embodiment, based on the embodiment shown in Figure 1 above, step S103 specifically includes:
[0087] Using a preset gated recurrent unit, based on each moment corresponding to the residual graph, performing temporal fusion on the plurality of residual graphs to obtain a total residual graph;
[0088] Performing a fully connected operation on the total residual graph and outputting the visual road condition prediction value.
[0089] In this embodiment, the gated recurrent unit GRU is a neural network for processing sequential data and is used in this embodiment to fuse the temporal information between each residual graph. The fully connected operation is a 1×1 convolutional structure.
[0090] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of a road condition prediction method provided by an embodiment of the present application. The road condition prediction method of this embodiment can be applied to an electronic device, and the electronic device includes, but is not limited to, computing devices such as smart phones, tablet computers, laptop computers, and desktop computers. It can be understood that the electronic device for implementing the above training method and the electronic device for implementing this road condition prediction method can be the same or different, that is, the above road condition prediction model can be trained on other electronic devices and then the trained model file can be transplanted to this electronic device. As Figure 5 shown, the road condition prediction method includes steps S501 to S503, which are described in detail as follows:
[0091] Step S501, obtaining the driving route between the departure place and the destination;
[0092] Step S502, performing data transformation on the driving route to obtain road condition map data;
[0093] Step S503: Using the road condition prediction model, based on the road condition map data, predict the target visual road condition data of the driving route at a future moment. The road condition prediction model is trained by the training method described in the first aspect.
[0094] In this embodiment, the driving route is planned based on the destination that the user wants to go to at the current moment and the current location. The driving route is divided into multiple sections, and each section corresponds to a path length. Graph data is constructed through the driving route, and the target visual road condition data corresponding to the driving route is predicted through the road condition prediction model.
[0095] To execute the training method of the road condition prediction model corresponding to the above method embodiment to achieve the corresponding functions and technical effects. Refer to Figure 6 , Figure 6 shows a structural block diagram of a training device for a road condition prediction model provided by an embodiment of the present application. For ease of explanation, only the parts related to this embodiment are shown. The training device for the road condition prediction model provided by the embodiment of the present application includes:
[0096] The first transformation module 601 is used to perform data transformation on the historical road condition training set to obtain multiple target graph data. The historical road condition training set includes road network sample data and visual road condition sample data at multiple moments;
[0097] The extraction module 602 is used to extract features from the multiple target graph data by using a preset residual graph convolutional model to obtain multiple residual graphs;
[0098] The output module 603 is used to fuse and fully connect the multiple residual graphs and output a visual road condition prediction value;
[0099] The update module 604 is used to calculate the loss function of the residual graph convolutional model according to the visual road condition prediction value, and update the model parameters of the residual graph convolutional model based on the loss function until the residual graph convolutional model reaches a preset convergence condition to obtain a road condition prediction model.
[0100] In one embodiment, the first transformation module 601 includes:
[0101] The first establishment unit is used to establish multiple weighted graphs based on multiple sections in the road network sample data and the path length of each section;
[0102] The encoding unit is used to perform vector encoding on the visual road condition sample data to obtain a feature vector;
[0103] A second establishing unit, configured to establish an association relationship between each of the weighted graphs and the feature vectors according to the correspondence between each road segment and the visual road condition sample data at each moment, so as to obtain a plurality of the target graph data.
[0104] In one embodiment, the extraction module 602 includes:
[0105] An extraction unit, configured to perform a graph convolution operation on a plurality of the target graph data by using the residual graph convolution model, and extract the road condition spatial features of each of the target graph data;
[0106] An output unit, configured to output a plurality of the residual graphs based on each of the road condition spatial features.
[0107] In one embodiment, the output unit includes:
[0108] A mapping sub-unit, configured to map each of the road condition spatial features by using a residual graph convolution structure to obtain a plurality of the residual graphs, and the residual graph convolution structure is:
[0109]
[0110] wherein, G l+1 is the target graph data of the (l + 1)-th convolutional layer, G l is the target graph data of the l-th convolutional layer, F(G l , W l ) is the mapping function of the road condition spatial features, is the residual graph.
[0111] In one embodiment, the output module 603 includes:
[0112] A fusion unit, configured to perform temporal fusion on a plurality of the residual graphs based on each moment corresponding to the residual graphs by using a preset gated recurrent unit to obtain a total residual graph;
[0113] A fully-connected unit, configured to perform a full connection on the total residual graph and output the visual road condition prediction value.
[0114] The above-mentioned training device for the road condition prediction model can implement the training method of the road condition prediction model in the above method embodiment. The optional items in the above method embodiment are also applicable to this embodiment, which will not be elaborated here. The remaining content of the embodiment of the present application can refer to the content of the above method embodiment, and will not be repeated in this embodiment.
[0115] In order to execute the corresponding road condition prediction method in the above method embodiment to achieve the corresponding functions and technical effects. Refer to Figure 7 , Figure 7The structural block diagram of a road condition prediction device provided by an embodiment of the present application is shown. For the sake of convenience of description, only the parts related to this embodiment are shown. The road condition prediction device provided by the embodiment of the present application includes:
[0116] An acquisition module 701, configured to acquire a driving route between a departure place and a destination;
[0117] A second transformation module 702, configured to perform data transformation on the driving route to obtain road condition map data;
[0118] A prediction module 703, configured to use a road condition prediction model to predict target visual road condition data of the driving route at a future moment according to the road condition map data, where the road condition prediction model is trained by the training method described in the first aspect.
[0119] The above road condition prediction device can implement the road condition prediction method of the above method embodiment. The optional items in the above method embodiment are also applicable to this embodiment and will not be elaborated here. The remaining content of the embodiment of the present application can refer to the content of the above method embodiment and will not be repeated in this embodiment.
[0120] Figure 8 The structural schematic diagram of an electronic device provided by an embodiment of the present application is shown. As Figure 8 shown, the electronic device 8 of this embodiment includes: at least one processor 80 ( Figure 8 only one is shown in the figure), a processor, a memory 81, and a computer program 82 stored in the memory 81 and operable on the at least one processor 80. When the processor 80 executes the computer program 82, the steps in any of the above method embodiments are implemented.
[0121] The electronic device 8 may be a computing device such as a smart phone, a tablet computer, a desktop computer, and a cloud server. The electronic device may include but is not limited to the processor 80 and the memory 81. Those skilled in the art can understand that Figure 8 merely examples of the electronic device 8, which do not constitute a limitation on the electronic device 8, and may include more or fewer components than shown in the figure, or combine some components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0122] The so-called processor 80 may be a Central Processing Unit (CPU), and the processor 80 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0123] In some embodiments, the memory 81 may be an internal storage unit of the electronic device 8, such as the hard disk or memory of the electronic device 8. In other embodiments, the memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 8. Further, the memory 81 may also include both the internal storage unit and the external storage device of the electronic device 8. The memory 81 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of the computer program. The memory 81 may also be used to temporarily store data that has been output or is to be output.
[0124] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0125] An embodiment of the present application provides a computer program product, and when the computer program product runs on an electronic device, the electronic device is caused to implement the steps in each of the above method embodiments when executed.
[0126] In several embodiments provided by the present application, it can be understood that each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, the program segment, or the part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
[0127] If the described functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs, Read-Only Memories), random access memories (RAMs, Random Access Memories), magnetic disks, or optical discs and other various media that can store program codes.
[0128] The specific embodiments described above have further elaborated on the purpose, technical solution, and beneficial effects of the present application. It should be understood that the above description is only for the specific embodiments of the present application and is not used to limit the protection scope of the present application. In particular, it is pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A training method for a road condition prediction model, characterized in that, Including: Performing data transformation on a historical road condition training set to obtain multiple target graph data, where the historical road condition training set includes road network sample data and visual road condition sample data at multiple moments; Using a preset residual graph convolutional model to perform feature extraction on the multiple target graph data to obtain multiple residual graphs; Fusing and fully connecting the multiple residual graphs to output a visual road condition prediction value; Calculating a loss function of the residual graph convolutional model according to the visual road condition prediction value, and updating model parameters of the residual graph convolutional model based on the loss function until the residual graph convolutional model reaches a preset convergence condition to obtain a road condition prediction model; The performing data transformation on the historical road condition training set to obtain multiple target graph data includes: Based on multiple road segments in the road network sample data and the path length of each road segment, establishing multiple weighted graphs; Performing vector encoding on the visual road condition sample data to obtain feature vectors; According to the correspondence between each road segment at each moment and the visual road condition sample data, establishing an association relationship between each weighted graph and the feature vector to obtain the multiple target graph data; The using a preset residual graph convolutional model to perform feature extraction on the multiple target graph data to obtain multiple residual graphs includes: Using the residual graph convolutional model to perform graph convolutional operations on the multiple target graph data to extract the road condition spatial features of each target graph data; Based on the road condition spatial features, outputting the multiple residual graphs; The establishing multiple weighted graphs based on multiple road segments in the road network sample data and the path length of each road segment includes: Representing the visual road condition as a weighted graph, where the unordered vertices of the weighted graph represent road segments, and the weight value of the edge of the visual weighted graph represents the path length between the central points of two road segments; The performing vector encoding on the visual road condition sample data to obtain feature vectors includes: Representing the feature vector of the unordered vertices as the visual road condition information, and using vectors to represent the visual road conditions of each road to obtain feature vectors.
2. The training method of the road condition prediction model according to claim 1, characterized in that The outputting multiple residual graphs based on the road condition spatial features includes: Using a residual graph convolutional structure to map each road condition spatial feature to obtain the multiple residual graphs, and the residual graph convolutional structure is: Among them, G l+1 is the target graph data of the (l + 1)-th convolutional layer, and G l is the target graph data of the l-th convolutional layer. F(G l , W l ) is the mapping function of the road condition spatial feature, is the residual graph.
3. The training method of the road condition prediction model according to claim 1, characterized in that, The fusing and fully connecting the multiple residual graphs to output a visual road condition prediction value includes: Using a preset gated recurrent unit to perform temporal fusion on the multiple residual graphs based on the respective moments corresponding to the residual graphs to obtain a total residual graph; Performing full connection on the total residual graph to output the visual road condition prediction value.
4. A road condition prediction method, characterized in that, Including: Obtaining a driving route between a starting point and a destination; Performing data transformation on the driving route to obtain road condition graph data; Using a road condition prediction model to predict target visual road condition data of the driving route at a future moment according to the road condition graph data, where the road condition prediction model is trained by the training method according to any one of claims 1 to 3.
5. A training device for a road condition prediction model, characterized in that, Including: A first transformation module for performing data transformation on a historical road condition training set to obtain multiple target map data, where the historical road condition training set includes road network sample data and visual road condition sample data at multiple moments; An extraction module for using a preset residual map convolution model to extract features from the multiple target map data to obtain multiple residual maps; An output module for fusing and fully connecting the multiple residual maps and outputting a visual road condition prediction value; An update module for calculating a loss function of the residual map convolution model according to the visual road condition prediction value and updating model parameters of the residual map convolution model based on the loss function until the residual map convolution model reaches a preset convergence condition to obtain a road condition prediction model.
6. A road condition prediction device, characterized in that, Comprising: An acquisition module for acquiring a driving route between a starting point and a destination; A second transformation module for performing data transformation on the driving route to obtain road condition map data; A prediction module for using the road condition prediction model to predict target visual road condition data of the driving route at a future moment according to the road condition map data, where the road condition prediction model is trained by the training method according to any one of claims 1 to 3.
7. An electronic device, characterized in that, Comprising a processor and a memory, where the memory is used to store a computer program, and when the computer program is executed by the processor, the steps of the training method of the road condition prediction model according to any one of claims 1 to 3 or the steps of the road condition prediction method according to claim 4 are implemented.
8. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, the steps of the training method of the road condition prediction model according to any one of claims 1 to 3 or the steps of the road condition prediction method according to claim 4 are implemented.
Citation Information
Patent Citations
Dynamic graph convolution traffic speed prediction method
CN111696355A