Vehicle speed prediction method and device based on graph structure adaptive updating and computer equipment
By introducing a graph update module into the graph convolution network, updating the graph structure and eliminating redundant vehicle speed characteristics, the problem of traditional vehicle speed prediction methods neglecting spatial characteristics and trends is solved, and higher prediction accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202411681587.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-11
AI Technical Summary
The traditional non-parametric vehicle speed prediction method ignores the spatial characteristic information between vehicle speeds and fails to fully consider the trend of vehicle speed changes at different time points, resulting in a decrease in the prediction efficiency and accuracy of the model.
Adaptive update method based on graph structure is adopted, by setting up a graph update module in the graph convolution network, the difference coefficient matrix is generated based on the input adjacency matrix, the graph structure is updated, redundant vehicle speed characteristics are eliminated, excessive smoothing is avoided, and the accuracy of vehicle speed prediction is improved.
By eliminating redundant vehicle speed characteristics, the accuracy and efficiency of vehicle speed prediction are improved, the problem of oversmoothing is avoided, and the prediction ability of the model is enhanced.
Smart Images

Figure CN119598129A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of vehicle speed prediction, and in particular to a vehicle speed prediction method, apparatus and computer equipment based on adaptive updating of graph structure. Background Art
[0002] In order to cope with the dual challenges of reducing fuel consumption and strict emissions faced by the new energy vehicle industry, the optimization of power system control strategies based on vehicle prediction status has become a research hotspot in the intelligent driving of new energy vehicles. Especially in the energy management strategy of EREV (Extended-Range Electric Vehicles), optimizing fuel consumption strategies by predicting the future speed change curve of the vehicle has become one of the key technologies to improve fuel energy utilization.
[0003] Traditional vehicle speed prediction methods are mainly divided into two categories: parametric and non-parametric. The parametric method uses a predetermined model structure to predict vehicle speed based on theoretical background, while the non-parametric method does not rely on a pre-defined model structure, but learns the model structure and parameters from historical vehicle speed data. In recent years, non-parametric vehicle speed prediction methods based on neural networks have attracted widespread attention due to their advantages in dealing with nonlinear problems. In particular, non-parametric vehicle speed prediction methods that use long short-term memory networks (LSTM) can effectively solve the gradient vanishing and explosion problems of vehicle speed prediction when processing time series data, and can capture the long-term dependency of vehicle speed features. However, the inventors realized that traditional non-parametric vehicle speed prediction methods often ignore the spatial feature information between vehicle speeds, fail to fully consider the trend of vehicle speed changes at different time points, and at the same time, redundant vehicle speed information may also lead to a decrease in the model's prediction efficiency and accuracy. Summary of the invention
[0004] In view of the above-mentioned deficiencies or shortcomings, the present application provides a vehicle speed prediction method, device and computer equipment based on adaptive updating of graph structure. The present application sets a graph update module between each two adjacent graph convolution layers in the graph convolution network. The graph update module can generate a difference coefficient matrix based on the adjacency matrix of the previous graph convolution layer input and the adjacency matrix generated by the previous graph convolution layer, and update the graph structure based on the difference coefficient matrix, eliminating redundant vehicle speed features to avoid over-smoothing of the vehicle speed prediction results, and improving the accuracy of vehicle speed prediction.
[0005] According to a first aspect, the present application provides a vehicle speed prediction method based on graph structure adaptive updating, the method comprising:
[0006] Obtain vehicle speed data under different driving conditions;
[0007] Building a historical vehicle speed graph structure based on vehicle speed data, the historical vehicle speed graph structure including a plurality of initial node data and an initial adjacency matrix;
[0008] Input the historical vehicle speed graph structure into the specified graph convolution network; the graph convolution network includes at least 3 graph convolution layers connected in series and a graph update module provided between each two adjacent graph convolution layers; multiple initial node data and an initial adjacency matrix are used as input data of the first graph convolution layer, each graph convolution layer is used to extract vehicle speed features from the data input to this layer, and the input data of each graph convolution layer includes node data and an adjacency matrix; the graph update module is used to record the adjacency matrix input to the previous graph convolution layer as the first adjacency matrix, generate a corresponding adjacency matrix for the vehicle speed features output by the previous graph convolution layer, recorded as the second adjacency matrix, generate a difference coefficient matrix based on the first adjacency matrix and the second adjacency matrix, update the second adjacency matrix based on the difference coefficient matrix, and obtain a third adjacency matrix, and use the vehicle speed features extracted by the previous graph convolution layer and the third adjacency matrix as input data of the next graph convolution layer, and the vehicle speed features belong to the node data;
[0009] Get the speed prediction result obtained by the graph convolutional network output based on the speed features extracted by the last graph convolutional layer.
[0010] In some embodiments, constructing a historical vehicle speed graph structure based on vehicle speed data includes:
[0011] Divide the vehicle speed data into historical vehicle speed data for multiple time periods;
[0012] The historical vehicle speed data of each time period is used as the initial node data;
[0013] Perform feature extraction on each initial node data to obtain a node feature matrix, and multiply the node feature matrix with its transposed matrix to obtain an initial adjacency matrix;
[0014] The historical vehicle speed graph structure is obtained based on the initial node data and the initial adjacency matrix.
[0015] In some embodiments, each difference coefficient in the difference coefficient matrix is used to reflect the strength of the correlation between the corresponding connection edge and the vehicle speed prediction; the operation of the graph updating module updating the second adjacency matrix based on the difference coefficient matrix includes:
[0016] Based on the difference coefficient matrix, nodes in the second adjacency matrix with weak correlation with the vehicle speed prediction are determined and eliminated; nodes with weak correlation refer to nodes whose corresponding difference coefficients are less than a preset difference threshold.
[0017] In some embodiments, the operation of the graph updating module updating the second adjacency matrix based on the difference coefficient matrix further includes:
[0018] Based on the difference coefficient matrix, nodes in the second adjacency matrix with strong correlation with vehicle speed prediction are determined, and the nodes are enhanced based on the difference coefficients corresponding to the nodes; nodes with strong correlation refer to nodes whose corresponding difference coefficients are not less than a preset difference threshold.
[0019] In some embodiments, the graph convolutional network also includes a vehicle speed feature aggregation module and a fully connected layer. The vehicle speed feature aggregation module is used to aggregate the vehicle speed features extracted by each graph convolutional layer to obtain aggregated features; the fully connected layer is used to generate a vehicle speed prediction result based on the aggregated features.
[0020] In some embodiments, the vehicle speed feature aggregation module aggregates the vehicle speed features extracted by each graph convolution layer to obtain an operation of the aggregated features, including:
[0021] Calculate the feature attention coefficients corresponding to each graph convolution layer except the last graph convolution layer;
[0022] According to each feature attention coefficient, the vehicle speed feature extracted by the corresponding graph convolution layer is enhanced to obtain the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer;
[0023] The enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer are aggregated to obtain the aggregated features.
[0024] In some embodiments, the vehicle speed feature aggregation module aggregates the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features, including:
[0025] The enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer are summed with the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features.
[0026] According to a second aspect, the present application provides a vehicle speed prediction device based on graph structure adaptive update, the prediction device comprising:
[0027] A vehicle speed data acquisition module is used to acquire vehicle speed data under different driving conditions;
[0028] A vehicle speed graph structure creation module is used to construct a historical vehicle speed graph structure based on vehicle speed data, wherein the historical vehicle speed graph structure includes a plurality of initial node data and an initial adjacency matrix;
[0029] A convolutional network input module is used to input the historical vehicle speed graph structure into a specified graph convolutional network; the graph convolutional network includes at least three graph convolutional layers connected in series and a graph update module provided between each two adjacent graph convolutional layers; a plurality of initial node data and an initial adjacency matrix are used as input data of the first graph convolutional layer, each graph convolutional layer is used to extract vehicle speed features from the input data, and the input data of each graph convolutional layer includes node data and an adjacency matrix; a graph update module is used to record the adjacency matrix input to the previous graph convolutional layer as the first adjacency matrix, generate a corresponding adjacency matrix for the vehicle speed features output by the previous graph convolutional layer, recorded as the second adjacency matrix, generate a difference coefficient matrix based on the first adjacency matrix and the second adjacency matrix, update the second adjacency matrix based on the difference coefficient matrix, obtain a third adjacency matrix, and use the vehicle speed features extracted by the previous graph convolutional layer and the third adjacency matrix as input data of the next graph convolutional layer, and the vehicle speed features belong to the node data;
[0030] The prediction result generation module is used to obtain the vehicle speed prediction result output by the graph convolutional network based on the vehicle speed features extracted by the last graph convolutional layer.
[0031] According to a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned vehicle speed prediction methods based on adaptive updating of a graph structure.
[0032] According to a fourth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned vehicle speed prediction methods based on adaptive updating of graph structure are implemented.
[0033] The vehicle speed prediction method with adaptive graph structure update in the above-mentioned embodiment of the present application can be applied to a specified vehicle speed prediction device, which first obtains the vehicle speed data under different driving conditions, and then constructs a historical vehicle speed graph structure based on the vehicle speed data. The historical vehicle speed graph structure includes multiple initial node data and an initial adjacency matrix, and the historical vehicle speed graph structure is input into a specified graph convolutional network. Among them, the graph convolution network includes at least three graph convolution layers connected in series and a graph update module arranged between each two adjacent graph convolution layers; multiple initial node data and initial adjacency matrix are used as input data of the first graph convolution layer, each graph convolution layer in the graph convolution network is used to extract vehicle speed features from the data input to this layer, and the input data of each graph convolution layer includes node data and adjacency matrix, and the following vehicle speed features belong to node data; and the graph update module arranged between each two adjacent graph convolution layers can generate a corresponding adjacency matrix based on the adjacency matrix record of the input previous graph convolution layer and the vehicle speed features output by the previous graph convolution layer, generate a difference coefficient matrix, and update the graph structure based on the difference coefficient matrix, eliminating redundant vehicle speed features to avoid over-smoothing of vehicle speed prediction results, thereby improving the accuracy of vehicle speed prediction. In addition, the graph update module can also eliminate nodes with weak correlation in the difference coefficient matrix, and / or enhance nodes with strong correlation, eliminate redundant edge connections of the adjacency matrix before updating, and enhance strongly correlated connection edges, thereby further improving the accuracy of vehicle speed prediction. Finally, the vehicle speed prediction device obtains the vehicle speed prediction result output by the graph convolutional network based on the vehicle speed features extracted by the last graph convolutional layer. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flow chart of a vehicle speed prediction method based on adaptive updating of a graph structure in one or more embodiments of the present application;
[0035] Figure 2 A flow chart of a method for generating a historical vehicle speed graph structure in one or more embodiments of the present application;
[0036] Figure 3 A flowchart of adaptively updating a graph structure of a graph convolutional network having three graph convolutional layers in one or more embodiments of the present application;
[0037] Figure 4 A flowchart of a graph update module designed for a graph convolution network with three graph convolution layers in one or more embodiments of the present application when performing adjacency matrix processing;
[0038] Figure 5 A flow chart of a method for generating aggregation features by a vehicle speed aggregation module in one or more embodiments of the present application;
[0039] Figure 6A flow chart of a vehicle speed aggregation module designed for a graph convolution network with three graph convolution layers in one or more embodiments of the present application when performing vehicle speed feature aggregation;
[0040] Figure 7 A schematic diagram of the structure of a vehicle speed prediction device based on graph structure adaptive updating in one or more embodiments of the present application;
[0041] Figure 8 This is a diagram of the internal structure of a computer device in one or more embodiments of the present application. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] The vehicle speed prediction technology in intelligent driving plays a vital role in the autonomous driving system. It predicts the future speed of the vehicle based on sensor data and algorithm models to optimize driving decisions and improve safety. The vehicle speed prediction method based on adaptive updating of graph structure provided in the present application improves the accuracy of vehicle speed prediction and can provide users with a better experience in the intelligent driving process. It can be specifically executed by a vehicle speed prediction device, which can be but not limited to a vehicle-mounted terminal and a cloud server. The present application provides a vehicle speed prediction method based on adaptive updating of graph structure according to the first aspect, such as Figure 1 As shown, the method includes:
[0044] S110: Obtain vehicle speed data under different driving conditions.
[0045] Specifically, the driving conditions include the vehicle's driving road environment, weather environment, and internal driving force conditions. The vehicle will show different speed values x(t) changing with time t under different driving conditions. The speed data X 0 It is extracted from the curve of vehicle speed value x(t) changing with time t under different driving conditions.
[0046] S120: constructing a historical vehicle speed graph structure based on the vehicle speed data, wherein the historical vehicle speed graph structure includes a plurality of initial node data and an initial adjacency matrix.
[0047] Specifically, the vehicle speed prediction device determines multiple initial node data based on the vehicle speed data, and then inputs the multiple initial node data into a specified neural network model to determine an initial adjacency matrix, which is used to represent the connection relationship between nodes corresponding to each initial node data.
[0048] In some embodiments, a historical vehicle speed graph structure is constructed based on vehicle speed data, such as Figure 2 As shown, the method includes:
[0049] S210: Divide the vehicle speed data into historical vehicle speed data of multiple time periods.
[0050] S220: Using the historical vehicle speed data of each time period as initial node data.
[0051] Specifically, the vehicle speed prediction device can divide the vehicle speed data X into 0 Divide the time period and obtain n historical vehicle speed data [x 1 (T),...,x n (T)] = X, and each historical vehicle speed data is used as the initial node data. The value of the above n is determined by the effective time t interval length and the division length T of the speed value x(t) changing with time t curve. In addition, the value of each historical vehicle speed data can be the speed value at the starting point of the time period interval, or the speed value at the end point of the time period interval.
[0052] S230: Extract features from each initial node data to obtain a node feature matrix, and multiply the node feature matrix by its transposed matrix to obtain an initial adjacency matrix.
[0053] Specifically, the vehicle speed prediction device can use a specified neural network model to predict each initial node data [x 1 (T),...,x n (T)] = X to extract features and obtain the feature matrix H = CNN (X), where H is an n-row 1-column node feature matrix with a feature size of n. Then the feature matrix H and its transposed matrix H T Multiply to get the adjacency matrix A 0 =H·H T , A 0 The size is n×n. Exemplarily, the neural network model may be a CNN (Convolutional Neural Network) model.
[0054] S240: Obtaining a historical vehicle speed graph structure based on each initial node data and the initial adjacency matrix.
[0055] Finally, the vehicle speed prediction device is based on each initial node data X and the adjacency matrix A 0 Build a G 0 =(X, A 0 ) represents the historical speed graph structure, A 0 Each element in is used to reflect the connection relationship between every two nodes in the n initial node data. For example Figure 3 As shown, the historical vehicle speed graph structure is a vehicle speed graph containing 8 nodes. In this way, the vehicle speed data feature extraction under different driving conditions is realized, the trend of vehicle speed change at different time points is considered, and the historical vehicle speed graph structure is constructed.
[0056] S130: Input the historical vehicle speed graph structure into the specified graph convolution network; the graph convolution network includes at least 3 graph convolution layers connected in series and a graph update module arranged between each two adjacent graph convolution layers; multiple initial node data and an initial adjacency matrix are used as input data of the first graph convolution layer, each graph convolution layer is used to extract vehicle speed features from the data input to this layer, and the input data of each graph convolution layer includes node data and an adjacency matrix; a graph update module is used to record the adjacency matrix input to the previous graph convolution layer as the first adjacency matrix, generate a corresponding adjacency matrix for the vehicle speed features output by the previous graph convolution layer, recorded as the second adjacency matrix, generate a difference coefficient matrix based on the first adjacency matrix and the second adjacency matrix, update the second adjacency matrix based on the difference coefficient matrix, and obtain a third adjacency matrix, and use the vehicle speed features extracted by the previous graph convolution layer and the third adjacency matrix as input data of the next graph convolution layer, and the vehicle speed features belong to the node data.
[0057] GCN (Graph Convolutional Networks) is a neural network model that can process graph structured data. It can consider the topological relationship between vehicle speed information and efficiently extract the hidden spatial features between nodes. When extracting features through graph convolutional networks, if Figure 3 If only one graph convolution layer is set in the convolutional network, the spatial features between nodes cannot be extracted well. If multiple graph convolution layers are stacked in the graph convolutional network, it will lead to the problem of over-smoothing. Over-smoothing means that in multiple layers of graph convolution layers, the representation of nodes gradually tends to be similar or equal, resulting in a decrease in the difference between nodes, excessive fuzzification of node information, and difficulty in distinguishing the features of different nodes. In addition, during the layer-to-layer propagation process, the changing trend of vehicle speed at different times and redundant vehicle speed information will be ignored, resulting in reduced model prediction efficiency and accuracy. In this regard, this embodiment stacks multiple layers (at least 3 layers) of graph convolution layers in the graph convolution network, and a graph update module is also set between each two adjacent graph convolution layers. Through the graph update module, the vehicle speed feature extracted by the previous graph convolution layer can be used to generate an adjacency matrix corresponding to the vehicle speed feature through a specified convolutional neural network, and then the adjacency matrices related to the adjacent graph convolution layers are differenced to obtain a difference coefficient matrix. The node connection relationship in the graph structure is updated based on the difference coefficient matrix, and redundant features are screened and eliminated. Such an operation can not only extract the spatial features between nodes well, but also avoid the problem of over-smoothing, thereby ensuring the prediction efficiency and accuracy of the model.
[0058] Specifically, the serial order of each graph convolution GCN (Graph Convolutional Networks) is determined according to the requirements of the vehicle speed prediction task. Each graph convolution layer performs the same processing logic of extracting vehicle speed features from input data, and each graph update module also performs the same adjacency matrix and difference coefficient matrix generation logic. Among them, each difference coefficient matrix can be used to represent the node connection changes between adjacent graph convolution layers.
[0059] For example, Figure 3-4 The graph convolution network with three graph convolution layers shown in the figure has the adjacency matrix A mentioned above as input to the first graph convolution layer. 0 And each initial node data X, then the first graph convolution layer performs the graph convolution process as described below:
[0060]
[0061] Among them, H 1 represents the vehicle speed feature output by the first graph convolutional layer, For the initial adjacency matrix A 0 Perform symmetric normalization operation, ReLU is the activation function, W 1 is the weight matrix corresponding to the first graph convolutional layer.
[0062] The graph update module first extracts the vehicle speed features output by the first graph convolutional layer in the same way as the above-mentioned CNN to extract the initial adjacency matrix, and extracts the feature matrix H 1 Instead of transposing the feature matrix Multiply to get the adjacency matrix The size is still n×n.
[0063] Then the graph update module transforms the adjacency matrix A 1 and the initial adjacency matrix A 0 Perform difference processing to obtain a difference coefficient matrix a whose size is still n×n 1 .
[0064] In some embodiments, each difference coefficient in the difference coefficient matrix is used to reflect the strength of the correlation between the corresponding connection edge and the vehicle speed prediction; the operation of the graph updating module updating the second adjacency matrix based on the difference coefficient matrix includes:
[0065] Based on the difference coefficient matrix, nodes in the second adjacency matrix with weak correlation with the vehicle speed prediction are determined and eliminated; nodes with weak correlation refer to nodes whose corresponding difference coefficients are less than a preset difference threshold.
[0066] Specifically, a larger difference coefficient indicates that the features between the corresponding nodes have a stronger interaction after graph convolution, which means that the node connection corresponding to the value is strongly correlated with the vehicle speed prediction task. On the contrary, a smaller difference coefficient indicates that the corresponding node is weakly correlated with the vehicle speed prediction task. Such edge connections can be called redundant edge connections. Therefore, the vehicle speed prediction device can determine the difference coefficients in the difference coefficient matrix that are less than a preset threshold, and then return the elements in the second adjacency matrix corresponding to these difference coefficients to 0, thereby eliminating redundant edge connections and improving the accuracy and reliability of vehicle speed prediction.
[0067] In some embodiments, the operation of the graph updating module updating the second adjacency matrix based on the difference coefficient matrix further includes:
[0068] Based on the difference coefficient matrix, nodes in the second adjacency matrix with strong correlation with vehicle speed prediction are determined, and the nodes are enhanced based on the difference coefficients corresponding to the nodes; nodes with strong correlation refer to nodes whose corresponding difference coefficients are not less than a preset difference threshold.
[0069] Specifically, the difference coefficients in the difference coefficient matrix that are less than a preset threshold value can be reset to 0, and then the difference coefficient matrix after the reset to 0 is multiplied by the adjacency matrix, thereby eliminating redundant edge connections and enhancing the nodes in the second adjacency matrix that have a strong correlation with the vehicle speed prediction based on the difference coefficients, thereby enhancing the connection edges with strong correlation and further improving the accuracy and reliability of the vehicle speed prediction.
[0070] In other embodiments, each difference coefficient in the difference coefficient matrix may be first mapped to the range of (0, 1), and then the difference coefficients in the difference coefficient matrix whose mapping values are less than a preset difference threshold value such as 0.4 are set to 0 (i.e., returned to 0), and finally the difference coefficient matrix after the return to 0 processing is multiplied by the second adjacency matrix.
[0071] For example, the difference coefficient matrix a 1 For example, a 1 It can be calculated by the following formula:
[0072] a 1 =f(A 1 -A 0 );
[0073] Among them, f is the Sigmoid function, and a is obtained 1 After that, the vehicle speed prediction device will a 1 The difference coefficients in are first mapped to the range of (0, 1), and then a 1 The difference coefficients with mapping values less than 0.4 are set to 0, and then the difference coefficient matrix a after zero processing is 1 With the adjacency matrix A 1After multiplication, we get A′ 1
[0074] Furthermore, the data input to the second graph convolutional layer is A′ mentioned above 1 And the extracted feature matrix H 1 , and then the second graph convolution layer performs the graph convolution process as described below:
[0075]
[0076] Among them, H 2 represents the vehicle speed feature output by the second graph convolutional layer, For A′ 1 Perform symmetric normalization operation, W 2 is the weight matrix corresponding to the second graph convolutional layer.
[0077] Then the graph update module of the second graph convolutional layer extracts the vehicle speed features output by the second graph convolutional layer in a similar way to extracting the initial adjacency matrix through CNN. 2 Instead of transposing the feature matrix Multiply to get the adjacency matrix The size is still n×n. Then the graph update module of the second graph convolutional layer converts the adjacency matrix A 2 and the adjacency matrix A′ 1 Perform difference processing to obtain a difference coefficient matrix a whose size is still n×n 2 .
[0078] Similarly, assuming that the difference coefficient is mapped to the range of (0, 1) and the difference threshold is set to 0.4, the vehicle speed prediction device first converts a 2 The difference coefficients of the mapped values less than 0.4 are set to 0, and then enhanced in the following way:
[0079] a 2 =f(A 2 -A′ 1 );
[0080] Among them, f is the Sigmoid function, and then the speed prediction device returns the difference coefficient matrix a after zero processing 2 With the adjacency matrix A 2 After multiplication, we get A′ 2 , A′ 2 is the adjacency matrix that has been eliminated and enhanced.
[0081] Similarly, the data input to the third graph convolutional layer is A′ mentioned above 2 And the extracted feature matrix H 2 , and then the third graph convolution layer performs the graph convolution process as described below:
[0082]
[0083] Among them, H 3 represents the vehicle speed feature output by the third graph convolutional layer, For A′ 2 Perform symmetric normalization operation, W 3 is the weight matrix corresponding to the second graph convolutional layer.
[0084] Finally, due to Figure 4-5 The graph convolution network shown has only three graph convolution layers. Therefore, the third graph convolution layer as the last one does not have a graph update module, and does not perform subsequent feature matrix generation, elimination processing, and enhancement processing.
[0085] S140: Obtain a vehicle speed prediction result output by the graph convolutional network based on the vehicle speed features extracted by the last graph convolutional layer.
[0086] Specifically, the total number of graph convolution layers can be greater than 3, and the last graph convolution layer performs the same graph convolution processing as above. Assuming that the total number of graph convolution layers is k, and k is greater than 3, the vehicle speed feature extracted by the last graph convolution layer is H k-1 , the data input to the last graph convolution layer also includes the adjacency matrix A′ k-1 , and then the last graph convolution layer performs the graph convolution process as described below:
[0087]
[0088] Among them, H k Represents the vehicle speed feature output by the last graph convolutional layer; For A′ 2 Perform symmetric normalization operation, W k is the weight matrix corresponding to the last graph convolution layer.
[0089] The graph convolution network may include a fully connected layer, and the vehicle speed features output by the last graph convolution layer will be input into the fully connected layer for processing, and finally the vehicle speed prediction result is obtained. Through the steps of the above method, a graph update module is set between each two adjacent graph convolution layers in the graph convolution network. The graph update module can generate a difference coefficient matrix based on the adjacency matrix input to the previous graph convolution layer and the adjacency matrix generated by the previous graph convolution layer, and update the graph structure based on the difference coefficient matrix, eliminating redundant vehicle speed features to avoid over-smoothing of the vehicle speed prediction result, and improving the accuracy of vehicle speed prediction.
[0090] In some embodiments, in addition to the fully connected layer, the graph convolution network also includes a vehicle speed feature aggregation module, which is set between the last graph convolution layer and the fully connected layer. The vehicle speed feature aggregation module is used to aggregate the vehicle speed features extracted by each graph convolution layer to obtain aggregated features; the fully connected layer is used to generate a vehicle speed prediction result based on the aggregated features.
[0091] Specifically, after the fully connected layers FC are connected to the vehicle speed feature aggregation module, FC converts the input aggregated feature map into the vector required for the classification of the vehicle speed prediction results, realizing the learning process of the graph convolutional network from inputting the historical vehicle speed graph structure to outputting the updated vehicle speed graph structure, thereby enhancing the model expression ability and robustness of the graph convolutional network.
[0092] In some embodiments, the vehicle speed feature aggregation module aggregates the vehicle speed features extracted by each graph convolution layer to obtain an operation of the aggregated features, such as Figure 5 As shown, the method includes:
[0093] S310: Calculate the feature attention coefficients corresponding to each graph convolution layer except the last graph convolution layer.
[0094] Specifically, the feature attention coefficient corresponding to the graph convolution layer is determined according to the set magnification function, the first adjacency matrix of the input graph convolution layer and the second adjacency matrix generated by the corresponding graph update module. The magnification function includes but is not limited to an exponential function, a power function and a logarithmic function.
[0095] For example, in Figure 3-4 In the graph convolution network with three graph convolution layers shown in the figure, except for the third graph convolution layer, the first graph convolution layer and the second graph convolution layer need to calculate the feature attention coefficient. It is known that the first adjacency matrix of the input first graph convolution layer is A 0 , and the second adjacency matrix generated by its corresponding graph update module is A 1 , the exponential function fa is selected as the amplification function, and the feature attention coefficient of the first graph convolutional layer is calculated as follows:
[0096] a a1 =fa(A 1 -A 0 ).
[0097] Similarly, it is known that the first adjacency matrix of the second graph convolutional layer is A′ 1 , and the second adjacency matrix generated by its corresponding graph update module is A 2 , then the feature attention coefficient of the second graph convolutional layer is calculated as follows:
[0098] a a2 =fa(A2 -A′ 1 ).
[0099] In some other embodiments, the graph convolutional network may have k graph convolutional layers, k is greater than 3, and the first adjacency matrix of the input k-1th graph convolutional layer is known to be A′ k-2 , and the second adjacency matrix generated by its corresponding graph update module is A k-1 , then the feature attention coefficient of the k-1th graph convolutional layer is calculated as follows:
[0100] a ak-2 =fa(A k-1 -A′ k-2 ).
[0101] S320: Enhance the vehicle speed features extracted by the corresponding graph convolutional layers according to the feature attention coefficients to obtain enhanced vehicle speed features corresponding to each graph convolutional layer except the last graph convolutional layer.
[0102] Specifically, the vehicle speed feature aggregation module can perform enhancement processing by multiplying each feature attention coefficient by the vehicle speed feature extracted by the corresponding graph convolution layer, thereby obtaining an enhanced vehicle speed feature.
[0103] For example, in Figure 3-4 In the graph convolution network with three graph convolution layers shown in 6, the vehicle speed feature aggregation module can convert a a1 The vehicle speed feature H extracted by the first graph convolution layer 1 Multiply, and a a2 Then it is combined with the vehicle speed feature H extracted by the second graph convolution layer 2 Multiply them together to get the enhanced vehicle speed characteristic a a1 H 1 with a a2 H 2 .
[0104] S330: Aggregate the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain an aggregated feature.
[0105] Specifically, the vehicle speed feature aggregation method includes but is not limited to direct summation, weighted summation, multiplication and product, and calling a function model to complete the aggregation operation. In this way, the vehicle speed features of each layer are aggregated, which is conducive to improving the accuracy of vehicle speed prediction.
[0106] In some embodiments, the vehicle speed feature aggregation module aggregates the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features, including:
[0107] The enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer are summed with the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features.
[0108] Specifically, for a graph convolution network with k graph convolution layers, where k is greater than 3, the vehicle speed feature aggregation module can calculate the aggregated features using the following formula:
[0109]
[0110] Among them, H out represents the aggregation feature, represents the sum of the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer, H k Represents the enhanced vehicle speed features corresponding to the last graph convolutional layer.
[0111] For example, for Figure 3-4 , 6 shows a graph convolution network with three graph convolution layers. The vehicle speed feature aggregation module calculates the aggregated features using the following formula:
[0112] H out =a a1 H 1 +a a2 H 2 +H k ;
[0113] In this way, the vehicle speed characteristics of each layer are summed and aggregated, which is beneficial to improving the accuracy of vehicle speed prediction.
[0114] It should be noted that, with respect to the various steps included in the vehicle speed prediction method based on adaptive updating of graph structure provided in any of the above embodiments, unless otherwise specified in this document, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of these steps can include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0115] According to the second aspect, the present application provides a vehicle speed prediction device based on graph structure adaptive update, such as Figure 7 As shown, the prediction device comprises:
[0116] The vehicle speed data acquisition module 110 is used to acquire the vehicle speed data under different driving conditions;
[0117] A vehicle speed graph structure creation module 120, for constructing a historical vehicle speed graph structure based on vehicle speed data, wherein the historical vehicle speed graph structure includes a plurality of initial node data and an initial adjacency matrix;
[0118] A convolution network input module 130 is used to input the historical vehicle speed graph structure into a specified graph convolution network; the graph convolution network includes at least three graph convolution layers connected in series and a graph update module provided between each two adjacent graph convolution layers; a plurality of initial node data and an initial adjacency matrix are used as input data of the first graph convolution layer, each graph convolution layer is used to extract vehicle speed features from the data input to this layer, and the input data of each graph convolution layer includes node data and an adjacency matrix; a graph update module is used to record the adjacency matrix input to the previous graph convolution layer as the first adjacency matrix, generate a corresponding adjacency matrix for the vehicle speed features output by the previous graph convolution layer, recorded as the second adjacency matrix, generate a difference coefficient matrix based on the first adjacency matrix and the second adjacency matrix, update the second adjacency matrix based on the difference coefficient matrix, obtain a third adjacency matrix, and use the vehicle speed features extracted by the previous graph convolution layer and the third adjacency matrix as input data of the next graph convolution layer, and the vehicle speed features belong to the node data;
[0119] The prediction result generation module 140 is used to obtain the vehicle speed prediction result output by the graph convolutional network based on the vehicle speed features extracted by the last graph convolutional layer.
[0120] The vehicle speed graph structure creation module 120 is also used to divide the vehicle speed data into historical vehicle speed data of multiple time periods; use the historical vehicle speed data of each time period as initial node data; perform feature extraction on each initial node data to obtain a node feature matrix, multiply the node feature matrix and its transposed matrix to obtain an initial adjacency matrix; and obtain a historical vehicle speed graph structure based on each initial node data and the initial adjacency matrix.
[0121] In some embodiments, each difference coefficient in the difference coefficient matrix is used to reflect the strength of the correlation between the corresponding connection edge and the vehicle speed prediction; the operation of the graph update module to update the second adjacency matrix based on the difference coefficient matrix includes: determining the nodes in the second adjacency matrix that have weak correlation with the vehicle speed prediction based on the difference coefficient matrix, and eliminating the nodes; nodes with weak correlation refer to nodes whose corresponding difference coefficients are less than a preset difference threshold.
[0122] In some embodiments, the operation of the graph update module to update the second adjacency matrix based on the difference coefficient matrix also includes: determining the nodes in the second adjacency matrix that have a strong correlation with the vehicle speed prediction based on the difference coefficient matrix, and enhancing the nodes based on the difference coefficients corresponding to the nodes; nodes with a strong correlation refer to nodes whose corresponding difference coefficients are not less than a preset difference threshold.
[0123] In some embodiments, the graph convolutional network also includes a vehicle speed feature aggregation module and a fully connected layer. The vehicle speed feature aggregation module is used to aggregate the vehicle speed features extracted by each graph convolutional layer to obtain aggregated features; the fully connected layer is used to generate a vehicle speed prediction result based on the aggregated features.
[0124] In some embodiments, the vehicle speed feature aggregation module aggregates the vehicle speed features extracted by each graph convolution layer to obtain an operation of obtaining an aggregated feature, including: calculating the feature attention coefficient corresponding to each graph convolution layer except the last graph convolution layer; enhancing the vehicle speed features extracted by the corresponding graph convolution layer according to each feature attention coefficient to obtain enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer; aggregating the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain an aggregated feature.
[0125] In some embodiments, the vehicle speed feature aggregation module aggregates the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features, including: summing the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features.
[0126] For the specific limitations of the vehicle speed prediction device applicable to adaptive updating of graph structure, please refer to the limitations of the vehicle speed prediction method applicable to adaptive updating of graph structure above, which will not be repeated here. Each module in the above-mentioned vehicle speed prediction device applicable to adaptive updating of graph structure can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0127] According to a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned vehicle speed prediction methods based on adaptive updating of a graph structure.
[0128] According to a fourth aspect, the present application provides a computer device, such as Figure 8 As shown, the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any step of the above-mentioned vehicle speed prediction method based on adaptive updating of graph structure is implemented.
[0129] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the vehicle speed prediction based on the adaptive update of the graph structure. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, any of the above-mentioned vehicle speed prediction methods based on the adaptive update of the graph structure is implemented.
[0130] Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (RamCUs), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0131] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0132] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
[0133] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A vehicle speed prediction method based on graph structure adaptive updating, characterized in that: include: Obtain vehicle speed data under different driving conditions; Constructing a historical vehicle speed graph structure based on the vehicle speed data, wherein the historical vehicle speed graph structure includes a plurality of initial node data and an initial adjacency matrix; Input the historical vehicle speed graph structure into a specified graph convolution network; the graph convolution network includes at least three graph convolution layers connected in series and a graph update module provided between each two adjacent graph convolution layers; the multiple initial node data and the initial adjacency matrix are used as input data of the first graph convolution layer, each graph convolution layer is used to extract vehicle speed features from the data input to this layer, and the input data of each graph convolution layer includes node data and an adjacency matrix; the graph update module is used to record the adjacency matrix input to the previous graph convolution layer as the first adjacency matrix, generate a corresponding adjacency matrix for the vehicle speed features output by the previous graph convolution layer, recorded as the second adjacency matrix, generate a difference coefficient matrix based on the first adjacency matrix and the second adjacency matrix, update the second adjacency matrix based on the difference coefficient matrix, obtain a third adjacency matrix, use the vehicle speed features extracted by the previous graph convolution layer and the third adjacency matrix as input data of the next graph convolution layer, and the vehicle speed features belong to the node data; Obtain a vehicle speed prediction result output by the graph convolutional network based on the vehicle speed features extracted by the last graph convolutional layer.
2. The method according to claim 1, characterized in that The constructing a historical vehicle speed graph structure based on the vehicle speed data includes: Dividing the vehicle speed data into historical vehicle speed data for multiple time periods; The historical vehicle speed data of each time period is used as the initial node data; Performing feature extraction on each of the initial node data to obtain a node feature matrix, and multiplying the node feature matrix with its transposed matrix to obtain an initial adjacency matrix; The historical vehicle speed graph structure is obtained based on each of the initial node data and the initial adjacency matrix.
3. The method according to claim 2, characterized in that Each difference coefficient in the difference coefficient matrix is used to reflect the correlation between the corresponding connection edge and the vehicle speed prediction; The operation of the graph updating module updating the second adjacency matrix based on the difference coefficient matrix includes: Determine, based on the difference coefficient matrix, a node in the second adjacency matrix that has a weak correlation with the vehicle speed prediction, and eliminate the node; The weakly correlated nodes refer to nodes whose corresponding difference coefficients are smaller than a preset difference threshold.
4. The method according to claim 3, characterized in that The graph updating module updates the second adjacency matrix based on the difference coefficient matrix, and further includes: Based on the difference coefficient matrix, nodes in the second adjacency matrix that are highly correlated with the vehicle speed prediction are determined, and the nodes are enhanced based on the difference coefficients corresponding to the nodes; the nodes that are highly correlated refer to nodes whose corresponding difference coefficients are not less than a preset difference threshold.
5. The method according to claim 1, characterized in that The graph convolution network also includes a vehicle speed feature aggregation module and a fully connected layer. The vehicle speed feature aggregation module is used to aggregate the vehicle speed features extracted by each graph convolution layer to obtain aggregated features; the fully connected layer is used to generate the vehicle speed prediction result based on the aggregated features.
6. The method according to claim 5, characterized in that The vehicle speed feature aggregation module aggregates the vehicle speed features extracted by each graph convolution layer to obtain an operation of aggregated features, including: Calculate the feature attention coefficients corresponding to each graph convolution layer except the last graph convolution layer; According to each feature attention coefficient, the vehicle speed feature extracted by the corresponding graph convolution layer is enhanced to obtain the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer; The enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer are aggregated to obtain the aggregated features.
7. The method according to claim 6, characterized in that The vehicle speed feature aggregation module aggregates the enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer and the vehicle speed features extracted by the last graph convolution layer to obtain the operation of the aggregated features, including: The enhanced vehicle speed features corresponding to each graph convolution layer except the last graph convolution layer are summed with the vehicle speed features extracted by the last graph convolution layer to obtain the aggregated features.
8. A vehicle speed prediction device based on graph structure adaptive update, characterized in that: include: A vehicle speed data acquisition module is used to acquire vehicle speed data under different driving conditions; A vehicle speed graph structure creation module, used to construct a historical vehicle speed graph structure based on the vehicle speed data, wherein the historical vehicle speed graph structure includes a plurality of initial node data and an initial adjacency matrix; A convolutional network input module, used to input the historical vehicle speed graph structure into a specified graph convolutional network; the graph convolutional network includes at least three graph convolutional layers connected in series and a graph update module provided between each two adjacent graph convolutional layers; the multiple initial node data and the initial adjacency matrix are used as input data of the first graph convolutional layer, each graph convolutional layer is used to extract vehicle speed features from the data input to this layer, and the input data of each graph convolutional layer includes node data and an adjacency matrix; the graph update module is used to record the adjacency matrix input to the previous graph convolutional layer as the first adjacency matrix, generate a corresponding adjacency matrix for the vehicle speed features output by the previous graph convolutional layer, recorded as the second adjacency matrix, generate a difference coefficient matrix based on the first adjacency matrix and the second adjacency matrix, update the second adjacency matrix based on the difference coefficient matrix, obtain a third adjacency matrix, use the vehicle speed features extracted by the previous graph convolutional layer and the third adjacency matrix as input data of the next graph convolutional layer, and the vehicle speed features belong to the node data; The prediction result generation module is used to obtain the vehicle speed prediction result output by the graph convolution network based on the vehicle speed features extracted by the last graph convolution layer.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.