Automobile energy prediction method and device, electronic equipment and medium
By constructing electrochemical and vehicle speed maps, using graph convolutional neural network and attention coefficient fusion mechanism, the SOC prediction model is optimized, and the problem of low prediction accuracy of SOC in new energy vehicles is solved, achieving more efficient prediction results.
Patent Information
- Application Number
- CN202411285113.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-20
AI Technical Summary
The prior art fails to fully consider other factors during vehicle driving in the SOC prediction of new energy vehicles, resulting in low prediction accuracy.
By constructing electrochemical graphs and vehicle speed graphs, the electrochemical and vehicle speed features are extracted using graph convolution neural network model, and the attention coefficient is used for feature fusion, the consistency constraint attention fusion mechanism is designed, and the SOC prediction model is optimized.
It improves the accuracy and efficiency of SOC prediction, solves the oversmoothing problem caused by multi-layer GCN propagation process, realizes the efficient fusion of electrochemical and vehicle speed characteristics, and improves the accuracy and stability of prediction.
Smart Images

Figure CN119170154A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of new energy vehicles, and specifically, to a method, device, electronic equipment and medium for predicting vehicle energy. Background Art
[0002] Extended-range electric vehicles are vehicles driven by pure electricity. They are powered by power batteries and a small range extender. While increasing the vehicle's cruising range, their adaptability to working conditions is also improved. They are rated as new energy vehicles with high research and development prospects. Energy prediction can help optimize the energy consumption of extended-range vehicles, ensure that the engine power generation system is started in time for charging when the battery is low, so as to extend the cruising range, accurately predict the energy consumption demand in the future driving stage, and better control the charging and discharging strategies to achieve the best energy utilization efficiency. Energy prediction needs to consider the battery's state of charge (SOC). SOC prediction can predict the change of battery SOC. Through the results of SOC prediction, future energy consumption trends can be estimated. However, the current SOC prediction is usually based on battery characteristics and the current state of the battery, combined with the current and voltage changes during charging and discharging to estimate the change of battery SOC. Although this method is simple, it does not take into account other factors in the vehicle's driving process, and the prediction accuracy is relatively low.
[0003] In view of this, this application is hereby filed. Summary of the invention
[0004] The purpose of this application is to provide a vehicle energy prediction method, device, electronic equipment and medium to improve the energy prediction accuracy of new energy vehicles.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a method for predicting automobile energy, comprising:
[0007] Constructing an electrochemical map and a vehicle speed map according to electrochemical data of the power battery and vehicle speed data; the electrochemical data includes current data or voltage data;
[0008] Inputting the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical characteristics and required vehicle speed characteristics; the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers;
[0009] generating a first attention coefficient according to the required electrochemical characteristic, and generating a second attention coefficient according to the required vehicle speed characteristic;
[0010] Outputting a predicted SOC value according to the required electrochemical characteristic, the required vehicle speed characteristic, the first attention coefficient, and the second attention coefficient;
[0011] Determining an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value, and the SOC actual value;
[0012] The optimized prediction model is used to predict the SOC of the vehicle.
[0013] As a further preferred technical solution, the electrochemical map and the vehicle speed map are constructed according to the electrochemical data of the power battery and the vehicle speed data, including:
[0014] The electrochemical data of the power battery and the vehicle speed data are respectively extracted using a one-dimensional convolutional neural network to obtain initial electrochemical features and initial vehicle speed features;
[0015] An electrochemical map and a vehicle speed map are constructed according to the initial electrochemical characteristics and the initial vehicle speed characteristics.
[0016] As a further preferred technical solution, the electrochemical map and the vehicle speed map are input into a graph convolutional neural network model to extract the required electrochemical characteristics and the required vehicle speed characteristics, including:
[0017] Inputting the electrochemical graph and the vehicle speed graph into a graph convolutional neural network model, and extracting output features of adjacent layers in the graph convolution propagation process;
[0018] Determine, based on the output feature, the similarity between the nodes corresponding to the output feature;
[0019] When the mean value of the similarities of all nodes reaches a set threshold, the graph convolutional neural network model is judged to have converged, and the output features of the corresponding graph convolutional layer are used as the required electrochemical features and the required vehicle speed features.
[0020] As a further preferred technical solution, the generating of the first attention coefficient according to the required electrochemical characteristics and the generating of the second attention coefficient according to the required vehicle speed characteristics include:
[0021] Inputting the required electrochemical features into graph convolution to obtain a first weight coefficient of each node; processing the first weight coefficient using a tanh function and a Softmax function to obtain a first attention coefficient;
[0022] The required vehicle speed feature is input into the graph convolution to obtain the second weight coefficient of each node; the second weight coefficient is processed by using tanh and Softmax functions to obtain the second attention coefficient.
[0023] As a further preferred technical solution, the first attention coefficient is calculated using the following formula: a1=Softmax(tanh(H'1)), where a1 is the first attention coefficient, H'1 is H out1 The features after graph convolution aggregation, H out1 is the desired electrochemical characteristic, W1 is the first weight coefficient, To perform symmetric normalization operation on the adjacency matrix A1;
[0024] The second attention coefficient is calculated using the following formula: a2=Softmax(tanh(H'2)), where a2 is the second attention coefficient, H'2 is H out2 The features after graph convolution aggregation, H out2 is the required vehicle speed characteristic, W2 is the second weight coefficient, To perform symmetric normalization operation on the adjacency matrix A2.
[0025] As a further preferred technical solution, outputting the SOC prediction value according to the required electrochemical characteristics, the required vehicle speed characteristics, the first attention coefficient, and the second attention coefficient includes:
[0026] determining a first intermediate value according to the required vehicle speed characteristic and the first attention coefficient;
[0027] determining a second intermediate value based on the desired electrochemical characteristic and the second attention coefficient;
[0028] An SOC prediction value is output based on the first intermediate value and the second intermediate value.
[0029] As a further preferred technical solution, determining an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value and the SOC actual value includes:
[0030] Determining a consistency constraint error according to the first attention coefficient and the second attention coefficient;
[0031] Determining the MSE loss according to the SOC prediction value and the SOC actual value;
[0032] An optimized prediction model is determined according to the consistency constraint error and the MSE loss.
[0033] In a second aspect, the present application provides a vehicle energy prediction device, comprising:
[0034] A graph construction module, used to construct an electrochemical graph and a vehicle speed graph according to electrochemical data of the power battery and vehicle speed data; the electrochemical data includes electrochemical data or voltage data;
[0035] A feature extraction module, used for inputting the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical features and required vehicle speed features; the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers;
[0036] an attention coefficient generating module, configured to generate a first attention coefficient according to the required electrochemical characteristic, and to generate a second attention coefficient according to the required vehicle speed characteristic;
[0037] An SOC prediction value output module, configured to output an SOC prediction value according to the required electrochemical characteristics, the required vehicle speed characteristics, the first attention coefficient, and the second attention coefficient;
[0038] A model optimization module, used to determine an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value and the SOC actual value;
[0039] The prediction module is used to predict the SOC of the vehicle using the optimized prediction model.
[0040] In a third aspect, the present application provides an electronic device, including:
[0041] at least one processor, and a memory communicatively coupled to at least one of the processors;
[0042] The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors so that at least one of the processors can perform the above method.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable the computer to execute the above method.
[0044] Compared with the prior art, the beneficial effects of this application are:
[0045] The automobile energy prediction method provided in the present application constructs an electrochemical graph and a vehicle speed graph based on the electrochemical data (including current data or voltage data) of the power battery and the vehicle speed data, while considering the influence of the battery electrochemistry and vehicle speed on the SOC, and then uses a graph convolutional neural network model to extract the required electrochemical characteristics and the required vehicle speed characteristics, wherein the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers, thereby solving the over-smoothing problem caused by the multi-layer GCN (Graph Convolutional Network) propagation process, and then by adopting the first attention coefficient and the second attention coefficient, a consistency constrained attention fusion mechanism is designed to efficiently fuse the electrochemical characteristics and vehicle speed characteristics, and consistently face the task of accurately predicting SOC, thereby effectively improving the accuracy and efficiency of SOC prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 It is a flow chart of the automobile energy prediction method of the present application;
[0048] Figure 2 It is a schematic diagram of the construction process of the current diagram and vehicle speed diagram of the present application;
[0049] Figure 3 This is a schematic diagram of the structure of the convolutional neural network model of this application;
[0050] Figure 4 This is a schematic diagram of the structure of the consistency constraint attention fusion mechanism of this application;
[0051] Figure 5 It is a structural schematic diagram of the automobile energy prediction device of the present application;
[0052] Figure 6 It is a structural schematic diagram of the electronic device of the present application. DETAILED DESCRIPTION
[0053] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0054] The automobiles mentioned in this application include new energy vehicles, which include: extended-range electric vehicles, pure electric vehicles, hybrid electric vehicles, fuel cell electric vehicles, and hydrogen engine car lights.
[0055] Example 1
[0056] Figure 1 It is a flow chart of an automobile energy prediction method provided in this embodiment. The method can be executed by an automobile energy prediction device. The device can be composed of software and / or hardware and is generally integrated in an electronic device. The electronic device can be a vehicle controller, etc. For ease of understanding, each step in the control method of this embodiment is executed by the vehicle controller.
[0057] like Figure 1 As shown, this embodiment provides a method for predicting automobile energy, comprising the following steps:
[0058] S110, constructing an electrochemical map and a vehicle speed map according to electrochemical data of the power battery and vehicle speed data; the electrochemical data includes current data or voltage data.
[0059] The above-mentioned “electrochemical data of the power battery” refers to the data sequence of the electrochemical index (such as current or voltage) of the power battery changing with time. The above-mentioned “vehicle speed data” refers to the data sequence of the vehicle speed changing with time.
[0060] Optionally, constructing an electrochemical map and a vehicle speed map according to electrochemical data of the power battery and vehicle speed data includes:
[0061] The electrochemical data of the power battery and the vehicle speed data are respectively extracted using a one-dimensional convolutional neural network to obtain initial electrochemical features and initial vehicle speed features;
[0062] An electrochemical map and a vehicle speed map are constructed according to the initial electrochemical characteristics and the initial vehicle speed characteristics.
[0063] Take the electrochemical data as current data as an example, Figure 2 The figure shows the schematic diagram of the construction process of the current map and the vehicle speed map. Specifically, when the 1-dimensional convolutional neural network (1dCNN) is used for feature extraction in this embodiment, two 1dCNNs are used to extract features from the current data and the vehicle speed data respectively, and the initial electrochemical feature H1 and the initial vehicle speed feature H2 are obtained, where H1 = Convld (X1), X1 is the current data, and H2 = Convld (X2), X2 is the vehicle speed data. Then, the initial electrochemical feature H1 is multiplied by its transposed matrix to obtain the adjacency matrix Multiply the initial vehicle speed feature H2 with its transposed matrix to obtain the adjacency matrix Furthermore, the current graph G1 = (A1, H1) and the vehicle speed graph G2 = (A2, H2) are obtained. The current graph and the vehicle speed graph are used as the input of the current graph convolutional neural network and the input of the vehicle speed graph convolutional neural network respectively.
[0064] Optionally, the above-mentioned “1-dimensional convolutional neural network” can also be replaced by a multilayer perceptron (MLP).
[0065] S120. Input the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical characteristics and required vehicle speed characteristics; the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers.
[0066] In graph convolutional neural networks, multi-layer GCNs may cause over-smoothing problems. Over-smoothing means that in a multi-layer GCN, the representations of nodes gradually tend to be similar or equal, resulting in a decrease in the differences between nodes. This over-smoothing phenomenon may have a negative impact on tasks such as node classification and graph structure analysis, because the information of the nodes is overly blurred, making it difficult to distinguish the characteristics of different nodes. Over-smoothing is usually caused by the fact that the graph convolution operation of each layer aggregates and averages the neighbor information of the node, resulting in the continuous smoothing of the node features. However, if the number of GCN layers is too small, then each node can only be updated using limited neighbor information, which may lead to limited information propagation and inability to fully utilize the information in the entire graph structure. Therefore, how to control the number of graph convolution layers is an urgent problem to be solved. Therefore, the graph convolutional neural network model of the present application can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers, and thus has the function of adaptively adjusting the number of propagation layers, which can solve the over-smoothing problem caused by the multi-layer GCN propagation process. The model structure is as follows: Figure 3 shown.
[0067] Optionally, inputting the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical characteristics and required vehicle speed characteristics includes:
[0068] Inputting the electrochemical graph and the vehicle speed graph into a graph convolutional neural network model, and extracting output features of adjacent layers in the graph convolution propagation process;
[0069] Determine, based on the output feature, the similarity between the nodes corresponding to the output feature;
[0070] When the mean value of the similarities of all nodes reaches a set threshold, the graph convolutional neural network model is judged to have converged, and the output features of the corresponding graph convolutional layer are used as the required electrochemical features and the required vehicle speed features.
[0071] Specifically, taking the electrochemical data as current data as an example, first input G1=(A1, H1) and G2=(A2, H2) into the graph convolutional neural network model, and extract the features of each graph structure and the corresponding features through graph convolution. The input of each layer of GCN is the adjacency matrix A i and the node feature H i , let the feature representation be a learnable weight matrix W (l) The input features of the lth convolution calculation are used to extract the hidden features. Indicates that the final output of the lth layer is The calculation process is as follows: Where i=1,2, corresponding to the current and speed data types respectively, are the weight matrices corresponding to the two data types at the l-1 layer, Represents the features output after the lth graph convolution, For the adjacency matrix A i Symmetric normalization operation is performed and ReLU is the activation function.
[0072] Then calculate the similarity between node features between layers during graph convolution propagation, for example, the features obtained for layer l-1 And the features obtained in layer l The cosine similarity is calculated on the corresponding nodes. The cosine similarity formula is as follows: Among them, i=1,2, represents the two data types of current and vehicle speed, ij represents the jth node corresponding to the current and vehicle speed, When i=1, it represents the feature vector of the current feature at the j node of the l-1 layer and the feature vector of the current feature at the j node of the l layer. When i=2, it represents the feature vector of the vehicle speed feature at the j node of the l-1 layer and the feature vector of the vehicle speed feature at the j node of the l layer. They represent the norm of the corresponding feature vectors. It is worth noting that the value range of cosine similarity is between -1 and 1, where 1 represents complete similarity, -1 represents complete dissimilarity, and 0 represents no relationship.
[0073] Then, after calculating the similarity of all nodes, we take the average value to get an overall similarity measure. If the average value of the similarity of all nodes is greater than the set threshold (such as 0.6), it means that the similarity between most nodes is high and a certain degree of aggregation has been reached. It is thus determined that the graph convolution propagation process has converged. At this point, the graph convolution aggregation operation is no longer performed. The features of the corresponding graph convolution layer are output to obtain the required current feature H out1 and the required vehicle speed characteristic H out2 .
[0074] S130. Generate a first attention coefficient according to the required electrochemical characteristics, and generate a second attention coefficient according to the required vehicle speed characteristics.
[0075] Optionally, generating a first attention coefficient according to the required electrochemical characteristic and generating a second attention coefficient according to the required vehicle speed characteristic include:
[0076] Inputting the required electrochemical features into graph convolution to obtain a first weight coefficient of each node; processing the first weight coefficient using a tanh function and a Softmax function to obtain a first attention coefficient;
[0077] The required vehicle speed feature is input into the graph convolution to obtain the second weight coefficient of each node; the second weight coefficient is processed by using tanh and Softmax functions to obtain the second attention coefficient.
[0078] In order to further improve the prediction accuracy, Figure 4 As shown, this application designs a consistency constraint attention fusion mechanism to extract the required electrochemical features H out1 and the required vehicle speed characteristic H out2 Efficient fusion, consistently oriented towards accurate prediction of SOC tasks.
[0079] Specifically, the desired electrochemical characteristics H out1 The weight coefficient of each node is obtained by inputting it into the graph convolution, and then the weight coefficient is processed by tanh and Softmax functions to obtain the electrochemical characteristic H out1 The generated attention coefficient a1 is calculated as follows: a1=Softmax(tanh(H'1)), where a1 is the first attention coefficient. H'1 is H out1 The features after graph convolution aggregation, H out1 is the desired electrochemical characteristic, W1 is the first weight coefficient, To perform symmetric normalization operation on the adjacency matrix A1.
[0080] For the required vehicle speed characteristic H out2 Perform the same operation as above and change H out2 The weight coefficient of each node is obtained from the input graph convolution, and then the weight coefficient is processed by tanh and Softmax functions to obtain the vehicle speed feature H out2 The generated attention coefficient a2 is calculated as follows: a2=Softmax(tanh(H'2)), where a2 is the second attention coefficient. H'2 is H out2 The features after graph convolution aggregation, Hout2 is the required vehicle speed characteristic, W2 is the second weight coefficient, To perform symmetric normalization operation on the adjacency matrix A2.
[0081] S140. Output an SOC prediction value according to the required electrochemical characteristics, the required vehicle speed characteristics, the first attention coefficient, and the second attention coefficient.
[0082] Optionally, outputting the SOC prediction value according to the required electrochemical characteristic, the required vehicle speed characteristic, the first attention coefficient, and the second attention coefficient includes:
[0083] determining a first intermediate value according to the required vehicle speed characteristic and the first attention coefficient;
[0084] determining a second intermediate value based on the desired electrochemical characteristic and the second attention coefficient;
[0085] An SOC prediction value is output based on the first intermediate value and the second intermediate value.
[0086] Optionally, the SOC prediction value is calculated using the following formula:
[0087] H all =a1·H out2 +a2·H out1 ; Among them, H all is the SOC prediction value, a1 is the first attention coefficient, H out1 is the desired electrochemical characteristic, a2 is the second attention coefficient, H out2 is the required vehicle speed characteristic. out2 is the first intermediate value, a2·H out1 is the second intermediate value.
[0088] Specifically, the final feature H can be obtained by a fully connected layer all The above cross-attention guidance can better integrate the electrochemical characteristics and vehicle speed characteristics to obtain the final output feature H all , better oriented to the common task of SOC prediction.
[0089] S150. Determine an optimized prediction model based on the first attention coefficient, the second attention coefficient, the SOC predicted value and the SOC actual value.
[0090] Optionally, determining an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value and the SOC actual value includes:
[0091] Determining a consistency constraint error according to the first attention coefficient and the second attention coefficient;
[0092] Determining the MSE loss according to the SOC prediction value and the SOC actual value;
[0093] An optimized prediction model is determined according to the consistency constraint error and the MSE loss.
[0094] Since the electrochemical characteristics and vehicle speed characteristics are aimed at the same SOC prediction task, the more similar the attention coefficients a1 and a2 generated by each are, the stronger the consistency of the characteristics of the two in SOC prediction. Therefore, we introduce a consistency constraint, calculate the distance between the two attention coefficients through the Euclidean distance, and optimize this consistency constraint through the loss function. The model will be encouraged to generate more similar attention coefficients to enhance the consistency of electrochemical characteristics and vehicle speed characteristics, and improve the accuracy and stability of SOC prediction. Consistency constraint error L att The calculation is done using the following formula:
[0095] The MSE loss can be expressed as: In the formula, ω is the model parameter, y i is the actual value of SOC, is the predicted SOC value.
[0096] In the process of model optimization, the loss function consists of two parts, where the MSE (mean square error) loss is used to estimate the error between the predicted SOC and the true SOC, and the consistency constraint error L att As a regularization term. Therefore, the final objective function is L total =L MSE (ω)+αL att , where α ranges from 0.2 to 0.4. By continuously adjusting the model parameters, the objective function is continuously reduced, thus continuously optimizing the prediction model.
[0097] S160: Use the optimized prediction model to predict the SOC of the vehicle.
[0098] It can be understood that the specific execution process of this step is similar to S120 to S140 and will not be repeated here.
[0099] The above-mentioned automobile energy prediction method constructs an electrochemical graph and a vehicle speed graph based on the electrochemical data (including current data or voltage data) of the power battery and the vehicle speed data, while considering the influence of battery electrochemistry and vehicle speed on SOC, and then uses a graph convolutional neural network model to extract the required electrochemical characteristics and the required vehicle speed characteristics. The graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers, solves the over-smoothing problem caused by the multi-layer GCN (Graph Convolutional Network) propagation process, and then designs a consistency constrained attention fusion mechanism by adopting the first attention coefficient and the second attention coefficient, which efficiently integrates the electrochemical characteristics and vehicle speed characteristics, and is consistent with the task of accurately predicting SOC, effectively improving the accuracy and efficiency of SOC prediction.
[0100] Example 2
[0101] like Figure 5 As shown, this embodiment provides a vehicle energy prediction device, including:
[0102] A graph construction module 201 is used to construct an electrochemical graph and a vehicle speed graph according to electrochemical data of the power battery and vehicle speed data; the electrochemical data includes electrochemical data or voltage data;
[0103] A feature extraction module 202, used for inputting the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical features and required vehicle speed features; the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers;
[0104] An attention coefficient generating module 203, configured to generate a first attention coefficient according to the required electrochemical characteristic, and to generate a second attention coefficient according to the required vehicle speed characteristic;
[0105] An SOC prediction value output module 204 is configured to output an SOC prediction value according to the required electrochemical characteristics, the required vehicle speed characteristics, the first attention coefficient, and the second attention coefficient;
[0106] A model optimization module 205, configured to determine an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC prediction value, and the SOC actual value;
[0107] The prediction module 206 is used to predict the SOC of the vehicle using the optimized prediction model.
[0108] The device is used to execute the above method, and thus has at least functional modules and beneficial effects corresponding to the above method.
[0109] Example 3
[0110] like Figure 6 As shown, this embodiment provides an electronic device, including:
[0111] at least one processor; and
[0112] a memory communicatively connected to at least one of the processors; wherein,
[0113] The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to perform the above method. At least one processor in the electronic device can perform the above method, and thus has at least the same advantages as the above method.
[0114] Optionally, the electronic device also includes an interface for connecting various components, including a high-speed interface and a low-speed interface. Various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on a memory to display graphical information of a GUI (Graphical User Interface) on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors can be used together with multiple memories, and / or multiple buses can be used together with multiple memories. Similarly, multiple electronic devices can be connected (for example, as a server array, a group of blade servers, or a multi-processor system), and each device provides some necessary operations. Figure 6 A processor 301 is taken as an example.
[0115] The memory 302, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the automobile energy prediction method in the embodiment of the present application (for example, the graph construction module, feature extraction module, attention coefficient generation module, SOC prediction value output module, model optimization module, prediction module in the automobile energy prediction device). The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, realizing the above-mentioned automobile energy prediction method.
[0116] The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 302 may further include a memory remotely arranged relative to the processor 301, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The electronic device may further include: an input device 303 and an output device 304. The processor 301, the memory 302, the input device 303 and the output device 304 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0118] The input device 303 can receive input digital or character information, and the output device 304 can include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device can include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device can be a touch screen.
[0119] Example 4
[0120] This embodiment provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable the computer to execute the above method. The computer instructions on the computer-readable storage medium are used to enable the computer to execute the above method, and thus have at least the same advantages as the above method.
[0121] The medium in this application may adopt any combination of one or more computer-readable media. The medium may be a computer-readable signal medium or a computer-readable storage medium. The medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of the medium (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, the medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.
[0122] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0123] The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
[0124] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0126] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for predicting automobile energy, characterized in that: include: Constructing an electrochemical map and a vehicle speed map according to electrochemical data of the power battery and vehicle speed data; the electrochemical data includes current data or voltage data; Inputting the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical characteristics and required vehicle speed characteristics; the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers; generating a first attention coefficient according to the required electrochemical characteristic, and generating a second attention coefficient according to the required vehicle speed characteristic; Outputting a predicted SOC value according to the required electrochemical characteristic, the required vehicle speed characteristic, the first attention coefficient, and the second attention coefficient; Determining an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value, and the SOC actual value; The optimized prediction model is used to predict the SOC of the vehicle.
2. The automobile energy prediction method according to claim 1, characterized in that: The step of constructing an electrochemical map and a vehicle speed map according to the electrochemical data of the power battery and the vehicle speed data includes: The electrochemical data of the power battery and the vehicle speed data are respectively extracted using a one-dimensional convolutional neural network to obtain initial electrochemical features and initial vehicle speed features; An electrochemical map and a vehicle speed map are constructed according to the initial electrochemical characteristics and the initial vehicle speed characteristics.
3. The automobile energy prediction method according to claim 1, characterized in that: The step of inputting the electrochemical graph and the vehicle speed graph into a graph convolutional neural network model to extract required electrochemical characteristics and required vehicle speed characteristics includes: Inputting the electrochemical graph and the vehicle speed graph into a graph convolutional neural network model, and extracting output features of adjacent layers in the graph convolution propagation process; Determine, based on the output feature, the similarity between the nodes corresponding to the output feature; When the mean value of the similarities of all nodes reaches a set threshold, the graph convolutional neural network model is judged to have converged, and the output features of the corresponding graph convolutional layer are used as the required electrochemical features and the required vehicle speed features.
4. The automobile energy prediction method according to claim 1, characterized in that: The step of generating a first attention coefficient according to the required electrochemical characteristic and generating a second attention coefficient according to the required vehicle speed characteristic comprises: Inputting the required electrochemical features into graph convolution to obtain a first weight coefficient of each node; processing the first weight coefficient using a tanh function and a Softmax function to obtain a first attention coefficient; The required vehicle speed feature is input into the graph convolution to obtain the second weight coefficient of each node; the second weight coefficient is processed by using tanh and Softmax functions to obtain the second attention coefficient.
5. The automobile energy prediction method according to claim 4, characterized in that: The first attention coefficient is calculated using the following formula: a1=Softmax(tanh(H'1)), where a1 is the first attention coefficient, H'1 is H out1 The features after graph convolution aggregation, H out1 is the desired electrochemical characteristic, W1 is the first weight coefficient, To perform symmetric normalization operation on the adjacency matrix A1; The second attention coefficient is calculated using the following formula: a2=Softmax(tanh(h'2)), where a2 is the second attention coefficient, H'2 is H out2 The features after graph convolution aggregation, H out2 is the required vehicle speed characteristic, W2 is the second weight coefficient, To perform symmetric normalization operation on the adjacency matrix A2.
6. The automobile energy prediction method according to claim 1, characterized in that: The outputting of the SOC prediction value according to the required electrochemical characteristic, the required vehicle speed characteristic, the first attention coefficient, and the second attention coefficient includes: determining a first intermediate value according to the required vehicle speed characteristic and the first attention coefficient; determining a second intermediate value based on the desired electrochemical characteristic and the second attention coefficient; An SOC prediction value is output based on the first intermediate value and the second intermediate value.
7. The automobile energy prediction method according to claim 1, characterized in that: The step of determining an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value, and the SOC actual value includes: Determining a consistency constraint error according to the first attention coefficient and the second attention coefficient; Determining the MSE loss according to the SOC prediction value and the SOC actual value; An optimized prediction model is determined according to the consistency constraint error and the MSE loss.
8. An automobile energy prediction device, characterized in that: include: A graph construction module, used to construct an electrochemical graph and a vehicle speed graph according to electrochemical data of the power battery and vehicle speed data; the electrochemical data includes electrochemical data or voltage data; A feature extraction module, used for inputting the electrochemical map and the vehicle speed map into a graph convolutional neural network model to extract required electrochemical features and required vehicle speed features; the graph convolutional neural network model can adaptively adjust the number of propagation layers based on the similarity between corresponding nodes between layers; an attention coefficient generating module, configured to generate a first attention coefficient according to the required electrochemical characteristic, and to generate a second attention coefficient according to the required vehicle speed characteristic; An SOC prediction value output module, configured to output an SOC prediction value according to the required electrochemical characteristics, the required vehicle speed characteristics, the first attention coefficient, and the second attention coefficient; A model optimization module, used to determine an optimized prediction model according to the first attention coefficient, the second attention coefficient, the SOC predicted value and the SOC actual value; The prediction module is used to predict the SOC of the vehicle using the optimized prediction model.
9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to at least one of the processors; The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors so that the at least one processor can execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 7.
