Vehicle energy consumption detection method and device

Through the deep learning model combined with the data of each vehicle system, the energy consumption range is adjusted in real time, the accuracy of energy consumption detection of new energy vehicles is solved, efficient monitoring and abnormal detection of the energy consumption of the whole vehicle is realized, and operating status judgment and safety are improved. sex.

CN118687871BActive Publication Date: 2024-12-27JINGWEI HIRAIN (TIANJIN) RES&DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411172865.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-27
Estimated Expiration
2044-08-26

Smart Images

  • Figure CN118687871B_ABST
    Figure CN118687871B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for detecting vehicle energy consumption. The method includes: obtaining the actual energy consumption of the vehicle to be detected, and the system operation data of each vehicle system of the vehicle to be detected, the vehicle to be detected includes multiple vehicle systems, and the data acquisition unit deployed in each vehicle system is used to collect the system operation data generated during the operation of the corresponding vehicle system; using multiple detection sub-models contained in the energy consumption detection model to calculate the energy consumption of the system operation data corresponding to each vehicle system, and obtain the system energy consumption corresponding to each vehicle system; determining the target energy consumption range corresponding to the vehicle to be detected according to the system energy consumption; when the actual energy consumption is outside the target energy consumption range, determining that the vehicle to be detected has energy consumption abnormalities. The solution provided by the present application can accurately determine the target energy consumption range, provide a basis for accurate detection of vehicle energy consumption, and ensure accurate judgment of the vehicle's operating status.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of vehicle detection technology, and in particular, relates to a method and device for detecting vehicle energy consumption. Background Art

[0002] Vehicle energy consumption is directly related to the cruising range of new energy vehicles. Therefore, monitoring and abnormality detection of vehicle energy consumption are of great significance.

[0003] The key to detecting abnormal vehicle energy consumption is to calculate the energy consumption through the vehicle's driving data, but the actual driving energy consumption of new energy vehicles is usually affected by a variety of unknown factors, which make the actual driving energy consumption of the vehicle outside the driving energy consumption range, resulting in misjudgment of the vehicle's operating status. For example, on a mountain road, the vehicle is in normal operation, but the actual driving energy consumption of the vehicle is higher than the nominal driving energy consumption. At this time, the vehicle's detection system determines that the vehicle's energy consumption is abnormal. Summary of the invention

[0004] The embodiments of the present application provide a method and device for detecting vehicle energy consumption, which can accurately determine the target energy consumption range, provide a basis for accurate detection of vehicle energy consumption, and ensure accurate judgment of the vehicle's operating status.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting vehicle energy consumption, the method comprising: obtaining actual energy consumption of a vehicle to be detected, and system operation data corresponding to each vehicle system of the vehicle to be detected, wherein the vehicle to be detected comprises multiple vehicle systems, each of which is deployed with a data acquisition unit, and the data acquisition unit is used to collect system operation data generated during the operation of the corresponding vehicle system; performing energy consumption calculations on the system operation data corresponding to each vehicle system through multiple detection sub-models included in an energy consumption detection model to obtain the system energy consumption corresponding to each vehicle system; determining a target energy consumption range corresponding to the vehicle to be detected based on a relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected; and determining that the vehicle to be detected has energy consumption abnormalities when the actual energy consumption is outside the target energy consumption range.

[0006] In a second aspect, an embodiment of the present application provides a vehicle energy consumption detection device, which includes: a data acquisition module, which is used to obtain the actual energy consumption of the vehicle to be detected, and the system operation data corresponding to each vehicle system of the vehicle to be detected, wherein the vehicle to be detected includes multiple vehicle systems, and a data acquisition unit is deployed in each vehicle system, and the data acquisition unit is used to collect the system operation data generated during the operation of the corresponding vehicle system; an energy consumption calculation module, which is used to perform energy consumption calculations on the system operation data corresponding to each vehicle system through multiple detection sub-models included in the energy consumption detection model, so as to obtain the system energy consumption corresponding to each vehicle system; a range determination module, which is used to determine the target energy consumption range corresponding to the vehicle to be detected according to the relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected; a vehicle detection module, which is used to determine that the vehicle to be detected has energy consumption abnormality when the actual energy consumption is outside the target energy consumption range.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the vehicle energy consumption detection method as described in the first aspect is implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the vehicle energy consumption detection method as described in the first aspect is implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the vehicle energy consumption detection method as described in the first aspect.

[0010] In the embodiment of the present application, the target energy consumption range of the vehicle is determined based on the system operating data of the vehicle to be detected. During the driving process of the vehicle, the system operating data of the vehicle will change in real time. It can be seen that in the embodiment of the present application, the target energy consumption range of the vehicle is not fixed, but changes in real time according to the operating status of the vehicle. That is, the target energy consumption range in the embodiment of the present application is adapted to the driving data of the vehicle. Therefore, the use of the target energy consumption range can accurately detect whether the vehicle to be detected has energy consumption abnormalities, thereby improving the accuracy of determining the vehicle's operating status.

[0011] In addition, in the embodiment of the present application, the target energy consumption range of the vehicle to be detected is obtained by performing energy consumption calculation on the system operation data of multiple vehicle systems of the vehicle to be detected through multiple detection sub-models, and the system operation data of the vehicle system can reflect the operating status of each vehicle system. That is, in the embodiment of the present application, the system operation data of multiple vehicle systems are fully utilized to make the target energy consumption range more accurate, thereby providing a basis for accurate detection of vehicle energy consumption and ensuring accurate judgment of the vehicle's operating status. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1 It is a flow chart of a method for detecting vehicle energy consumption provided by an embodiment of the present application;

[0014] Figure 2 This is a schematic diagram of energy consumption detection provided by an embodiment of the present application;

[0015] Figure 3 It is a schematic diagram of the training process of the energy consumption detection model provided by an embodiment of the present application;

[0016] Figure 4 It is a structural diagram of an LSTM-Transformer model provided by an embodiment of the present application;

[0017] Figure 5 is a schematic diagram of an LSTM network structure provided by an embodiment of the present application;

[0018] Figure 6 is a schematic diagram of a Transformer network structure provided by an embodiment of the present application;

[0019] Figure 7 It is a schematic diagram of network training corresponding to a detection sub-model provided in one embodiment of the present application;

[0020] Figure 8 is a performance prediction diagram of a detection sub-model provided by an embodiment of the present application;

[0021] Fig. 9 is a schematic diagram of model reasoning provided by an embodiment of the present application;

[0022] FIG10 (a) is a schematic diagram of an energy consumption detection result provided by an embodiment of the present application;

[0023] FIG10( b ) is a schematic diagram of an energy consumption detection result provided by another embodiment of the present application;

[0024] FIG. 11 ( a ) is a schematic diagram of a data display of vehicle speed provided by an embodiment of the present application;

[0025] FIG11( b ) is a schematic diagram of vehicle weight data display provided by an embodiment of the present application;

[0026] FIG11( c ) is a schematic diagram showing data of a hydraulic motor current provided by an embodiment of the present application;

[0027] FIG11( d ) is a schematic diagram showing data display of a hydraulic motor voltage provided by an embodiment of the present application;

[0028] Fig.12 is a schematic structural diagram of a vehicle energy consumption detection device provided by another embodiment of the present application;

[0029] Fig.13 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0030] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0031] 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 "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0032] For ease of understanding, before explaining the solution provided in this application, the background involved in the solution provided in this application is first explained.

[0033] The energy consumption of a vehicle is directly related to the range of new energy vehicles. Therefore, it is particularly important to monitor the energy consumption of the entire vehicle and detect abnormalities.

[0034] The energy consumption of a whole vehicle refers to the energy consumed by a new energy vehicle during use, including the energy consumption of the drive system, the energy consumption of the braking system, the energy consumption of the air conditioning system, etc. Due to the complex systems and diverse working conditions contained in new energy vehicles, abnormal problems with the energy consumption of the whole vehicle often occur, which greatly restricts the performance of the vehicle. If the energy consumption of the whole vehicle is abnormal, resulting in excessive energy consumption, the cruising range of the new energy vehicle will be reduced, affecting the market competitiveness of the vehicle.

[0035] The system of new energy vehicles involves multiple key parts, including thermal management system, drive system, steering system, braking system and low-voltage system. Among them, the thermal management system is crucial to the control of battery temperature. Abnormal temperature distribution affects the performance of the battery, shortens the battery life, and then causes abnormal energy consumption of the whole vehicle. The drive motor is one of the core components of electric vehicles. Its abnormal energy consumption can be caused by motor degradation, control system failure, etc. By monitoring the energy consumption of the motor, signs of motor performance degradation can be found in time. The steering system in new energy vehicles mainly relies on hydraulic motors. Its abnormal energy consumption is related to problems such as leakage in the hydraulic system and changes in liquid viscosity. Abnormal detection helps to detect hydraulic energy consumption problems in time and prevent these problems from developing further. The braking system is mainly implemented by the air pump system. Abnormal energy consumption may indicate that the air pump has reduced working efficiency and needs to be repaired. Abnormal energy consumption of the low-voltage system may be caused by faults such as overtemperature, undervoltage fault or overcurrent. By detecting abnormal energy consumption of the low-voltage system, the failure of the low-voltage system to supply power can be quickly discovered and solved to ensure the stable operation of the low-voltage system.

[0036] Therefore, in order to achieve comprehensive monitoring and detailed management of the energy consumption of the entire vehicle, developing an efficient method for detecting abnormal energy consumption of the entire vehicle has become a technical problem that needs to be solved urgently.

[0037] The key to detecting abnormalities in the energy consumption of the entire vehicle is to calculate the energy consumption through driving data, but the actual driving energy consumption of new energy vehicles is usually affected by a variety of unknown factors, which may cause the actual driving energy consumption to be outside the driving energy consumption range, resulting in misjudgment of the vehicle's operating status. For example, on a mountain road, the vehicle is in normal operation, but the actual driving energy consumption of the vehicle is higher than the nominal driving energy consumption. At this time, the vehicle's detection system determines that the vehicle's energy consumption is abnormal. The use of kinematic modeling to determine the driving energy consumption range will cause errors in energy consumption calculation due to the influence of these unknown factors.

[0038] In recent years, with the rapid development of big data and artificial intelligence technology, methods based on machine learning and deep learning have gradually become a trend. This type of data-driven method relies on a large amount of data and needs to collect data from various subsystems of the vehicle. Although most new energy vehicles currently have many sensors, a large amount of data has not been fully utilized. This type of method can give full play to the role of big data.

[0039] Based on the above concept, the embodiment of the present application provides a method and device for detecting vehicle energy consumption. The method provided by the embodiment of the present application combines rich sensor data and deep learning models to provide an accurate and reliable means for energy consumption management of new energy vehicles. By real-time monitoring of the energy consumption of each subsystem and timely detection of abnormalities, the operating efficiency and safety of new energy vehicles can be effectively improved.

[0040] The following first introduces the vehicle energy consumption detection method provided in the embodiment of the present application. Among them, the method provided in the embodiment of the present application can be applied to a cloud platform, which uses the vehicle energy consumption detection method provided in the embodiment of the present application to monitor the vehicle energy consumption in real time, so as to promptly alarm when the vehicle energy consumption is abnormal.

[0041] Figure 1 FIG. 1 is a flow chart of a method for detecting vehicle energy consumption provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0042] Step S101, obtaining the actual energy consumption of the vehicle to be detected and the system operation data corresponding to each vehicle system of the vehicle to be detected.

[0043] In step S101, the vehicle to be tested may be a new energy vehicle, for example, a pure electric vehicle, a fuel cell vehicle, a hybrid vehicle, a solar vehicle, a gas vehicle, a biofuel vehicle, a plug-in hybrid vehicle, a supercapacitor vehicle, a flywheel energy storage vehicle, a dual-fuel vehicle, a methanol vehicle, etc.

[0044] The vehicle to be tested includes multiple vehicle systems, wherein the multiple vehicle systems may include but are not limited to a thermal management system, a drive system, a steering system, a braking system, and a low-voltage system. A data acquisition unit is deployed in each vehicle system, and the data acquisition unit may be a sensor for collecting system operation data generated during the operation of the corresponding vehicle system. For different vehicle systems, the corresponding system operation data may be different. For example, for the thermal management system, it collects the temperature of each energy-consuming component and the ambient temperature through a temperature sensor; for the drive system, it collects the current of the drive motor through a current acquisition unit, collects the voltage of the drive motor through a voltage acquisition unit, and collects the speed of the drive motor through a speed sensor.

[0045] In step S101, the actual energy consumption of the vehicle to be tested can be determined by inputting the voltage and current of each vehicle system. The actual power of the vehicle to be tested is obtained by calculating the product of the voltage and current input to each vehicle system. By integrating the actual power over a period of time, the actual energy consumption of each vehicle system of the vehicle to be tested can be obtained.

[0046] Step S102 , calculating the energy consumption of the system operation data corresponding to each vehicle system respectively through a plurality of detection sub-models included in the energy consumption detection model, so as to obtain the system energy consumption corresponding to each vehicle system.

[0047] In step S102, the energy consumption detection model may be a deep learning model, which is composed of multiple detection sub-models, and the model structures corresponding to the multiple detection sub-models are the same, wherein different detection sub-models are used to calculate the system energy consumption of different vehicle systems. In the scenario where the vehicle to be detected includes a thermal management system, a drive system, a steering system, a braking system, and a low-voltage system, the energy consumption detection model includes five detection sub-models, which are used to calculate the system energy consumption of the above five vehicle systems.

[0048] Step S103, determining a target energy consumption range corresponding to the vehicle to be detected according to the relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected.

[0049] In step S103, the energy consumption range is used to characterize whether the energy consumption of the vehicle to be detected is abnormal, wherein the energy consumption range corresponding to the vehicle to be detected includes the energy consumption range of the entire vehicle to be detected and the energy consumption range corresponding to each vehicle system. For example, if the energy consumption of the entire vehicle system of the vehicle to be detected is within a certain energy consumption range, it can be determined that the system energy consumption of the vehicle to be detected is normal.

[0050] Step S104: when the actual energy consumption is outside the target energy consumption range, it is determined that the vehicle to be detected has abnormal energy consumption.

[0051] In the embodiment of the present application, the target energy consumption range of the vehicle to be detected is not fixed, but changes according to the system energy consumption, and the system energy consumption is determined based on the system operation data corresponding to each vehicle system. Therefore, in the embodiment of the present application, the target energy consumption range of the vehicle to be detected is determined based on the operating conditions of the vehicle to be detected, so that different target energy consumption ranges are used when the vehicle to be detected is in different operating conditions to detect whether there is energy consumption abnormality in the vehicle to be detected, which can improve the accuracy of energy consumption detection of the vehicle to be detected.

[0052] Based on the scheme defined by the above steps S101 to S104, it can be known that in the embodiment of the present application, the target energy consumption range of the vehicle is determined based on the system operation data of the vehicle to be detected, and during the driving of the vehicle, the system operation data of the vehicle will change in real time. It can be seen that in the embodiment of the present application, the target energy consumption range of the vehicle is not fixed, but changes in real time according to the operating status of the vehicle, that is, the target energy consumption range in the embodiment of the present application is adapted to the driving data of the vehicle. Therefore, the use of the target energy consumption range can accurately detect whether the vehicle to be detected has energy consumption abnormalities, thereby improving the accuracy of judging the vehicle's operating status.

[0053] In addition, in the embodiment of the present application, the target energy consumption range of the vehicle to be detected is obtained by performing energy consumption calculation on the system operation data of multiple vehicle systems of the vehicle to be detected through multiple detection sub-models, and the system operation data of the vehicle system can reflect the operating status of each vehicle system. That is, in the embodiment of the present application, the system operation data of multiple vehicle systems are fully utilized to make the target energy consumption range more accurate, thereby providing a basis for accurate detection of vehicle energy consumption and ensuring accurate judgment of the vehicle's operating status.

[0054] The following is an explanation of each step of the method provided in the embodiments of the present application.

[0055] First, the cloud platform obtains the system operation data transmitted by the vehicle to be detected. The vehicle to be detected transmits the whole vehicle message data through the remote communication terminal (Telematics Box, T-BOX). The whole vehicle message data contains the system operation data of multiple vehicle systems contained in the vehicle to be detected. As an example, the system operation data of multiple vehicle systems at the same time or in the same time period can be combined in a preset order to obtain the whole vehicle message data. After obtaining the whole vehicle message data, the cloud platform can obtain the system operation data corresponding to each vehicle system by parsing the whole vehicle message data. Then, the cloud platform inputs the system operation data corresponding to each vehicle system into the corresponding detection sub-model in the energy consumption detection model, and obtains the system energy consumption corresponding to the vehicle system output by each detection sub-model. Then, the cloud platform determines the target energy consumption range corresponding to the vehicle to be detected based on the relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected.

[0056] Specifically, for the target energy consumption range corresponding to the energy consumption of the whole vehicle, the cloud platform calculates the sum of the system energy consumptions of multiple vehicle systems to obtain the whole vehicle energy consumption of the vehicle to be detected; then, calculates the first standard deviation of the whole vehicle energy consumption of the vehicle to be detected within a preset first sliding window; calculates the sum of the first standard deviation of the whole vehicle energy consumption and the preset multiple to obtain the upper limit value of the target energy consumption range; calculates the difference between the first standard deviation of the whole vehicle energy consumption and the preset multiple to obtain the lower limit value of the target energy consumption range; determines the target energy consumption range according to the upper limit value and the lower limit value.

[0057] As an example, Figure 2 The energy consumption detection schematic diagram shown in the figure is to sum up the system energy consumption of all vehicle systems of the vehicle to be detected to obtain the whole vehicle energy consumption of the vehicle to be detected. ; The first standard deviation of vehicle energy consumption within the preset first sliding window is , then the target energy consumption range corresponding to the vehicle to be tested can be expressed as If the actual power consumption of the vehicle to be detected is within the range, it can be determined that the energy consumption of the vehicle to be detected is within the normal range; if the actual power consumption of the vehicle to be detected is outside the range, it can be determined that the energy consumption of the vehicle to be detected is abnormal.

[0058] For the target energy consumption range corresponding to the vehicle system, the cloud platform calculates the actual energy consumption of the target vehicle system based on the input voltage and input current of the target vehicle system; then, calculates the second standard deviation of the system energy consumption of the target vehicle system within a preset second sliding window; based on the second standard deviation and the actual energy consumption of the target vehicle system, determines the system energy consumption range corresponding to the target vehicle system; when the actual energy consumption of the target vehicle system is outside the system energy consumption range, determines that an abnormality exists in the target vehicle system.

[0059] In the above embodiment, the target vehicle system is any one of the multiple vehicle systems. The process of determining the energy consumption range corresponding to the target vehicle system is the same as the process of determining the energy consumption range corresponding to the whole vehicle, which will not be described in detail here.

[0060] It should be noted that by determining the energy consumption range corresponding to each vehicle system, it is possible to determine whether the energy consumption of each vehicle system is abnormal, and when the energy consumption of the vehicle system is abnormal, the abnormal vehicle system can be accurately located.

[0061] It can be seen from the scheme defined by steps S101 to S104 that, in the embodiment of the present application, the system energy consumption corresponding to each vehicle system is obtained by calculating the energy consumption of the system operation data of the vehicle system through the detection sub-model contained in the energy consumption detection model. Therefore, before performing energy consumption detection on the vehicle to be detected, it is necessary to train the detection sub-model, and then splice multiple detection sub-models to obtain the energy consumption detection model.

[0062] As an example, Figure 3 The training process of the energy consumption detection model is shown in Figure 3 As shown, the process mainly includes the following steps:

[0063] Step S301, acquiring message data of each vehicle system of the vehicle, parsing the message data to obtain an original data set corresponding to each vehicle system, the original data set being the system operation data corresponding to each vehicle system.

[0064] Step S302, divide the original data set into a normal set and an abnormal set, pre-process the normal set and the abnormal set, and divide the normal set into a training set, a validation set, and a test set, wherein the normal set does not contain data generated when the vehicle system operates abnormally; the abnormal set contains data generated when the vehicle system operates abnormally; the training set is used for training the detection sub-model, the validation set is used for verifying the detection sub-model, and the test set is used for testing the detection sub-model.

[0065] Step S303: train a detection sub-model for each vehicle system using the training set. The detection sub-model may be a LSTM (Long Short-Term Memory)-Transformer model.

[0066] Step S304: Test the detection sub-model using the test set, and count the energy consumption errors between the true value and the calculated value to verify the model performance. When the cumulative error is less than 10%, the training of the detection sub-model is completed.

[0067] Step S305 , running the detection sub-model through the normal set, calculating the standard deviation, and setting the target energy consumption range corresponding to the detection sub-model according to the 3σ criterion.

[0068] Step S306, running the detection sub-model through the anomaly set to calculate the anomaly detection evaluation index. When each detection sub-model reaches the required accuracy, it is determined that the energy consumption detection model training is completed.

[0069] Step S307, combining multiple detection sub-models, and adding an input module and an output module to the integrated energy consumption detection model.

[0070] Step S308, deploy an energy consumption detection model on the cloud platform to monitor the occurrence of abnormal conditions of the entire vehicle in real time. If an abnormality occurs, a warning is issued in a timely manner and notified to relevant vehicles and personnel.

[0071] It should be noted that in the embodiment of the present application, the model structures of the multiple detection sub-models included in the energy consumption detection model are the same, and the model training methods are also the same. The following explanation is given by taking the model training method of any one of the multiple detection sub-models as an example.

[0072] Specifically, first, the system operation data of the target vehicle system under the normal vehicle operation state sent by multiple vehicles are obtained, and the system operation data of the target vehicle system is preprocessed to obtain the preprocessed system operation data; then, the preprocessed system operation data is converted into time series data according to the collection time of the system operation data, and the time series data is segmented using a preset third sliding window to obtain multiple time segments; finally, the multiple time segments are used as training samples to train the long short-term memory network model to obtain the detection sub-model corresponding to the target vehicle system.

[0073] In the above embodiments, the target vehicle system is any one of a plurality of vehicle systems.

[0074] Before training the detection sub-model, it is necessary to establish a connection between the cloud platform and the remote communication terminal of each vehicle to receive the whole vehicle message data transmitted by each vehicle, and store the whole vehicle message data in the database for training the detection sub-model. The whole vehicle message data includes but is not limited to vehicle speed, vehicle weight, vehicle turning angle, ambient temperature, data collected by sensors of the braking system, data collected by sensors of the steering system, and data collected by sensors of the low-voltage system.

[0075] Specifically, first ensure that the vehicle has established an effective connection with the cloud platform, and configure the system to monitor the vehicle message data transmitted from the vehicle remote communication terminal T-BOX. Extract the data required for the training model from the vehicle message data, including but not limited to vehicle speed, vehicle weight, vehicle angle, drive motor current, drive motor voltage, hydraulic motor current, hydraulic motor voltage, air pump motor current, air pump motor voltage, low-voltage system current, low-voltage system voltage and ambient temperature. In the embodiment of the present application, the vehicle speed is used to record the real-time driving speed of the vehicle, and the impact of vehicle speed on energy consumption is crucial; the vehicle weight is used to provide detailed data about the load, which plays a vital role in estimating the power demand and energy consumption of the whole vehicle; the recording of the vehicle angle enables the detection sub-model to evaluate the steering state of the vehicle, providing a key angle for accurately predicting the vehicle's driving state and energy consumption changes; the current and voltage data of the drive motor, hydraulic motor, air pump motor, low-voltage system and thermal management system are used to calculate the real power of each vehicle system, and are also labels during model training, which plays a key role in the establishment of the vehicle energy consumption model. In addition, the monitoring of ambient temperature can reflect the impact of the surrounding environment on the performance of the vehicle system and the thermal management system.

[0076] After obtaining the vehicle message data, the system operation data of the target vehicle system within a period of time is parsed from the vehicle message data.

[0077] It should be noted that the vehicle message data is in dbc format, where dbc files are file formats that describe vehicle communication network information, including information such as signal definitions and node definitions. After obtaining the vehicle message data, the binary code in the vehicle message data is converted into an easy-to-understand numerical representation based on the correspondence between the dbc file and the mat format file. The parsed data is saved as a mat format file. The mat file is suitable for storing numerical data. This format makes the data easier to process and parse, facilitating subsequent modeling and analysis.

[0078] Furthermore, after obtaining the system operation data of the target vehicle system, the system operation data of the target vehicle system is preprocessed, wherein the preprocessing mainly includes downsampling processing and normalization processing.

[0079] Specifically, in the process of preprocessing the system operation data of the target vehicle system, the system operation data of the target vehicle system is downsampled to obtain the downsampled system operation data; and then the downsampled system operation data is normalized to obtain the preprocessed system operation data.

[0080] For downsampling, first obtain the first timestamp corresponding to each system operation data of the target vehicle system; then, perform downsampling processing on the system operation data of the target vehicle system, and determine the second timestamp corresponding to each downsampling point based on the first timestamp; finally, perform interpolation calculation on the sampling point corresponding to the second timestamp to obtain the downsampled system operation data.

[0081] It should be noted that in the embodiment of the present application, the system operation data is downsampled, and the sampling frequency corresponding to the system operation data is adjusted from the original audio to the second level, for example, the original sampling frequency of 0.1s is adjusted to 1s. In practical applications, the maximum and minimum values ​​of the timestamps corresponding to the system operation data are first counted, and then the timestamps (i.e., the second timestamps) corresponding to each sampling point (i.e., the sampling point after the sampling frequency is adjusted) are calculated after the sampling frequency is adjusted to 1s. Since there may be no corresponding data for the sampling point after the sampling frequency is adjusted, the data of the sampling point after the sampling frequency is adjusted is interpolated to obtain the downsampled system operation data. For example, if the original sampling frequency is 0.09s and the adjusted sampling frequency is 1s, there is no corresponding system operation data at the first sampling point. At this time, an interpolation algorithm can be used to perform interpolation calculations to obtain the value corresponding to the sampling point.

[0082] In addition, it should be noted that by downsampling the system operation data of the target vehicle system, the data dimension of the system operation data of the target vehicle system can be reduced, thereby reducing the computational burden and model complexity of model training and analysis, and improving the efficiency of model training.

[0083] Furthermore, after obtaining the downsampled system operation data, it is necessary to perform data screening on it.

[0084] In the embodiment of the present application, the abnormal data can be screened out from the downsampled system operation data according to the abnormal situation of the vehicle to form an abnormal set. Among them, the abnormal set contains some normal data. The abnormal set is obtained by segmenting a long time series. Each segment after segmentation is manually labeled, and the abnormal segment is marked as abnormal, and the rest is normal; then the time data of normal use of multiple vehicles for a long time is screened out to form the normal set. The normal set is different from the abnormal set. The normal set is a long-term time series data.

[0085] As an example, after obtaining the abnormal data, these abnormal data are divided into segments according to the set sliding window size. If there is excess time after segmentation, it is directly discarded. For example, if the remaining segment after segmentation is smaller than the size of the sliding window, the segment is discarded, and the non-discarded segment is marked as a fault, that is, the label is 1. The abnormal data will also contain some normal segments selected in the same way. These normal segments are marked as normal, that is, the label is 0. The data form of each segment can be expressed as: {data:{time:[2023_02_25_09_10_15, …, 2023_02_25_09_10_15], speed:[0.0,…, 0.0],…}, label:1}.

[0086] At the same time, in order to train the model, it is also necessary to filter out the normal set from the time data of multiple vehicles running normally for a long time. The normal set is composed of long-term time series data, which enables the model to fully learn the characteristics of normal operation in subsequent training. The data form of the normal set can be expressed as: {time:[2023_02_25_09_10_15, …, 2023_02_25_09_10_15], speed:[0.0,…, 0.0], …}.

[0087] It should be noted that in actual applications, new energy vehicles are complex and there are data errors caused by sensor calibration problems. Therefore, it is necessary to manually correct the system operation data collected by the sensor. For example, when it is detected that the vehicle weight sensor has a low value problem (for example, the vehicle weight is lower than the lower limit of the normal vehicle weight), the vehicle weight data collected during the period when the vehicle weight is in an abnormal state is corrected, for example, the current vehicle weight is compensated according to the deviation between the current vehicle weight and the normal vehicle weight.

[0088] As can be seen from the above, in the embodiment of the present application, the normal set corresponding to the system operation data of the target vehicle system is divided into a training set , validation set , test set The training time of deep learning models is usually long. In order to check the performance of the model in time during training, a validation set needs to be set. After training, in order to judge the generalization performance of the model, it is usually tested on the test set. In the embodiment of the present application, the normal set is divided into the training set in a ratio of 7:1:2. , validation set , test set .

[0089] After the downsampled system operation data is divided, the downsampled system operation data can also be normalized. Specifically, first, the mean of the downsampled system operation data and the standard deviation corresponding to the downsampled system operation data are calculated; then, the difference between the downsampled system operation data and the mean is calculated to obtain a first difference; then, the ratio of the first difference to the standard deviation is calculated to obtain the preprocessed system operation data.

[0090] It should be noted that data normalization performs zero-mean standardization on each feature, namely Z-score standardization, which can make features of different scales comparable and reduce the impact of data scale issues on the model.

[0091] In the embodiment of the present application, before normalizing the downsampled system operation data, the mean of the downsampled system operation data and the standard deviation corresponding to the downsampled system operation data are first calculated; then, the above mean is subtracted from each downsampled system operation data to move the center of the feature of the downsampled system operation data to near zero, eliminating the offset effect between the features. Next, each system operation data after subtracting the mean is divided by the above standard deviation to scale the scale of the feature value corresponding to the system operation data to a relatively consistent range, so as to eliminate the proportional differences between the features.

[0092] It should be noted that the above normalization method can ensure that all features have similar scales in the training set, making it easier for the model to learn the weight relationship between each feature.

[0093] At this point, the preprocessing of the system operation data of the target vehicle system is completed.

[0094] Next, the preprocessed system operation data is converted into time series data according to the collection time of the system operation data, and the time series data is segmented using a preset third sliding window to obtain a plurality of time segments.

[0095] Specifically, the time series data is spliced ​​to obtain a target matrix; then the target matrix is ​​segmented using a preset fourth sliding window to obtain multiple time segments.

[0096] In the above embodiment, the row vector of the target matrix represents the time series data corresponding to each time step, and the column vector of the target matrix represents the system operation data corresponding to the target vehicle system at each time point. Among them, the target matrix is ​​a two-dimensional matrix composed of multiple time series data, each row of the two-dimensional matrix is ​​the data of one time step, and each column is composed of multiple features. By splicing the time series data into a two-dimensional matrix, each feature can be integrated in the time dimension to form a structure with richer dimensions, so as to be better used by the deep learning model.

[0097] Next, the sliding window method is used to segment the time series data contained in the target matrix. , the window size of the sliding window and the position of the loop , the starting position of each time segment can be calculated and end position , the data of the corresponding window can be intercepted using the coordinates of the start position and the end position, where is the length of the data set. When training, it is the length of the training set. When verifying, it is the length of the verification set. The starting position and the ending position can be determined by formulas (1) and (2):

[0098] (1)

[0099] (2)

[0100] After obtaining multiple time segments, the multiple time segments can be used as training samples to train the long short-term memory network model to obtain a detection sub-model corresponding to the target vehicle system.

[0101] It should be noted that in the embodiment of the present application, the detection sub-model may be an LSTM-Transformer model, and its corresponding model structure is as follows: Figure 4 As shown, the detection sub-model consists of an LSTM model and a Transformer model, wherein the Transformer model is a model architecture for natural language processing and other sequence-to-sequence tasks. In the embodiment of the present application, the self-attention mechanism of the Transformer model is mainly used.

[0102] Before training the model, first use the obtained multiple time segments as input data Input to the LSTM model.

[0103] It should be noted that compared with the traditional RNN (Recurrent Neural Network), the LSTM model adds memory units and gating mechanisms. The memory unit is used to store the data filtered by the gating mechanism at each moment and pass the data to the next moment, so as to achieve the purpose of maintaining long-term memory. For example, in Figure 5 In the LSTM network structure diagram shown, Memory unit of time Generated after gating mechanism Pass on to the next moment.

[0104] The gate control mechanism is divided into forget gate, input gate, and output gate. The forget gate is used to determine which data in the previous moment needs to be forgotten. Figure 5 As shown, the forget gate needs to input the input data at this moment and the hidden state at the previous moment , and send them both into the activation function to get the result ,in, and represents the weight and bias of the forget gate, It can be expressed by formula (3):

[0105] (3)

[0106] The function of the input gate is to determine the data at this moment Which of them need to be saved in the newly generated memory unit? In. Figure 5 As shown, the input of the input gate is also the input data at this moment and the hidden state at the previous moment ,in, Depend on and Put it into the activation function to get the newly generated candidate memory unit yes and go through The function is obtained, where and represents the weight and bias of the input gate, and It can be expressed by formulas (4) and (5):

[0107] (4)

[0108] (5)

[0109] In formulas (4) and (5), and Represents the weights and biases of candidate memory cells.

[0110] Memory unit at time t It is obtained by combining the results of the forget gate and the input gate, as shown in formula (6):

[0111] (6)

[0112] The function of the output gate is to determine which data at this moment needs to be output. The input of the output gate is also the input data at this moment. and the hidden state at the previous moment , output a new vector for and Put it into the activation function to get, where, and represents the weight and bias of the output gate, as shown in formula (7):

[0113] (7)

[0114] The hidden state at this moment This is the memory unit at this moment. go through The result is obtained by multiplying the output gate result after the function, as shown in formula (8):

[0115] (8)

[0116] It will be passed to the next LSTM module as a hidden state variable and is also the output of this layer.

[0117] It should be noted that the above process is the process of data passing through an LSTM module, and the entire LSTM network is composed of multiple LSTM modules connected in series.

[0118] After passing through the LSTM network model, the data will be encoded first. The encoding is divided into value encoding and position encoding. The value encoding is implemented through the fully connected layer, and the position encoding is implemented through formula (9) and formula (10):

[0119] (9)

[0120] (10)

[0121] In formulas (9) and (10), Indicates location, Represents the dimension index, represents the dimension of the input feature; 10000 in formulas (9) and (10) represents a hyperparameter, which is used to control the frequency of position encoding. The larger the value of the hyperparameter, the lower the frequency produced, and the less sensitive the position encoding is to position differences.

[0122] As an example, Figure 6 A schematic diagram of the Transformer network structure is shown, Figure 6 As shown in the figure, after the encoding is completed, the data is sent to the Transformer network. The Transformer network is mainly composed of an encoder and a decoder. The encoder is composed of multiple identical layers, each layer contains two sub-layers, of which the first sub-layer is a multi-head self-attention structure. The input data pass , , The three matrices are converted into three vectors, and then the normalized dot product operation is used to obtain the attention result, as shown in formulas (11)-(15):

[0123] (11)

[0124] (12)

[0125] (13)

[0126] (14)

[0127] (15)

[0128] In formulas (11)-(15), For input data The corresponding sequence matrix; For input data The corresponding bond matrix; For input data The value matrix in the corresponding key-value pair; Q is the query vector; K is the key vector; V is the value vector; It is the dimension of the middle layer in the process of calculating the attention weight; head is the single-head attention weight; attention(Q,K,V) means the attention weight calculation for Q, K, and V; mult head is the multi-head attention weight; is the weight matrix; concat() is the concatenation function; Linear() is the linear activation function.

[0129] The second sublayer is a position-based feedforward neural network to extract richer semantic information. To prevent overfitting and gradient vanishing problems, both sublayers use residual connections.

[0130] A layer normalization method is used between two sub-layers to speed up training, as shown in formulas (16)-(18):

[0131] (16)

[0132] (17)

[0133] (18)

[0134] In formulas (16)-(18), It is the matrix Line The value of the column, For the The mean of the column, For the The standard deviation of the column. In order to avoid the denominator being zero, a minimum value is added. ; m is the number of elements in the jth column of the matrix; LayerNorm(x) means layer normalization processing of x.

[0135] The decoder has a similar structure to the encoder. In addition to the self-attention layer and the feedforward neural network layer, there is also an attention layer. The difference between this layer and the self-attention layer is that the input of Q comes from the output sequence, which captures the long-distance dependencies and semantic information in the input sequence. In addition, during the training process, in order to prevent the network from using elements that have not been decoded, a mask is required to cover these elements. During the prediction process, the initial decoding result will be set to empty.

[0136] In the embodiment of the present application, the number of attention heads of the Transformer is 8, and the number of layers of the encoder and decoder is 4. Finally, the data passing through the Transformer will enter the fully connected layer to unify the output to the required dimension.

[0137] As an example, Figure 7 The network training diagram corresponding to the detection sub-model is shown in Figure 7 In the process, the whole vehicle message data formed by data such as speed, turning angle, vehicle weight, and temperature are input into the LSTM-Transformer network corresponding to each vehicle system (i.e., drive system, steering system, braking system, low-voltage system, and thermal management system) to obtain the calculated energy consumption value output by the LSTM-Transformer network; at the same time, the actual energy consumption value of each vehicle system is calculated through the voltage and current of each vehicle system; then the MSE (Mean-Square Error) of the calculated energy consumption value and the actual energy consumption value is calculated, and the MSE is back-propagated to iteratively train the LSTM-Transformer network to obtain the detection sub-model.

[0138] After training the detection sub-model, it is necessary to predict the performance of the detection sub-model. As an example, Figure 8 Figure 2 shows a schematic diagram of the performance prediction of the detection sub-model. Figure 8 As shown in the figure, the trained detection sub-model is tested on the test set to obtain the cumulative error between the actual energy consumption value and the calculated energy consumption value. When the cumulative error is less than 10%, it can be determined that the prediction performance of the detection sub-model has met the requirements. The above cumulative error can be expressed by formula (19):

[0139] (19)

[0140] In formula (19), length is the data length of the test set; is the actual value of energy consumption; is the calculated value of energy consumption; cumulative error ratio is the cumulative error.

[0141] Next, the detection sub-model is run on the entire normal set, and the actual energy consumption value and the calculated energy consumption value of each sliding window are recorded. The calculated energy consumption value is obtained by integrating the power within the sliding window time. Since the detection sub-model itself has errors, the data itself will also have random errors. According to the 3σ principle, the energy consumption range of the normal set is ( ), is the energy consumption value within the sliding window. If it exceeds this range, it can be considered as an abnormality. It can be determined by formula (20):

[0142] (20)

[0143] Furthermore, after training the detection sub-model corresponding to the target vehicle system, it is necessary to obtain historical abnormal data of multiple vehicles and divide the historical abnormal data into multiple abnormal fragment data according to the preset fifth sliding window; then, the multiple abnormal fragment data are input into the detection sub-model of the target vehicle system to obtain the target system energy consumption output by the detection sub-model of the target vehicle system; then, the output accuracy of the detection sub-model is determined according to the target system energy consumption, and when the output accuracy reaches the preset accuracy, the detection sub-model of the target vehicle system is deployed in the energy consumption detection model.

[0144] As an example, Fig. 9 A schematic diagram of model reasoning is shown, such as Fig. 9 As shown in the figure, each time segment in the abnormal set is placed in the detection sub-model for inference calculation to obtain the energy consumption value corresponding to each time segment, and then anomaly detection is performed based on the calculated energy consumption value. When the energy consumption value is not within the normal range, the time segment is determined to be an abnormal segment, otherwise it is a normal segment. The number of correct and incorrect classifications is counted, and the values ​​of true positive TP (True Positive), true negative TN (True Negative), false positive FP (False Positive), and false negative FN (False Negative) in the confusion matrix are calculated, and finally the precision is obtained. , Accuracy , recall rate , When these values ​​meet the standards, it can be determined that the detection sub-model is successfully built.

[0145] The above accuracy , Accuracy , recall rate , The value of can be calculated by formula (21)-(24):

[0146] (twenty one)

[0147] (twenty two)

[0148] (twenty three)

[0149] (twenty four)

[0150] In addition, after obtaining the detection sub-model corresponding to the target vehicle system, the input modules corresponding to the detection sub-models corresponding to multiple vehicle systems can be combined according to a preset data receiving order to obtain a target input module; at the same time, the output modules of the detection sub-models corresponding to multiple vehicle systems can be combined according to a preset data receiving order to obtain a target output module; then, the detection sub-models corresponding to the multiple vehicle systems are combined according to a preset data receiving order to obtain a target detection model; finally, the target input module and the target output module are respectively configured as the input module and the output module of the target detection model to obtain an energy consumption detection model.

[0151] It should be noted that in the embodiment of the present application, the structures of the detection sub-models corresponding to multiple vehicle systems are the same, and only the input and output need to be replaced.

[0152] After obtaining the detection sub-models corresponding to different vehicle systems, multiple detection sub-models are combined into a complete system, and different detection sub-models are connected to a unified input module and output module, such as Fig. 9 As shown. In the input module, it is necessary to provide the vehicle speed, vehicle weight, turning angle, ambient temperature and current and voltage data of each subsystem at the second level as input, wherein the current and voltage are multiplied to obtain the actual energy consumption of each vehicle system. The input data are spliced ​​into a time series of a specified length and input into the detection sub-model. The embodiment of the present application determines whether an abnormality has occurred by comparing whether the actual energy consumption of the time series is within the range of plus or minus three times the standard deviation of the energy consumption calculated by the detection sub-model. The energy consumption detection results are shown in Figures 10 (a) and 10 (b). In Figures 10 (a) and 10 (b), the upper and lower limits of the normal power range determined by the power are used to represent the upper and lower limits of the energy consumption. The range determined by the upper and lower limits of the energy consumption is the energy consumption range. When the actual energy consumption is higher than the upper limit of the energy consumption or lower than the lower limit of the energy consumption, it can be determined that the vehicle system corresponding to the detection sub-model has an abnormal energy consumption problem.

[0153] The output module will display two levels of system abnormality results: one is to compare the energy consumption of the entire system, and the other is to compare the energy consumption of each vehicle system. In this way, when energy consumption abnormalities occur in the vehicle system, the vehicle system with problems can be located in time, which is convenient for further solving the energy consumption abnormality problem later.

[0154] Furthermore, after the performance of the energy consumption detection model is optimized, it is deployed to the cloud platform using the API (Application Programming Interface), so that the cloud platform uses the energy consumption detection model to evaluate whether there is any abnormality in the energy consumption of the entire vehicle to be detected, and / or evaluate whether there is any abnormality in the energy consumption of each vehicle system, and when energy consumption abnormalities are detected, timely warnings are issued to inform relevant vehicles and personnel.

[0155] In order to verify the accuracy of the method provided in the embodiment of the present application in detecting abnormal vehicle energy consumption, an experimental verification was carried out.

[0156] The data samples used in the experimental verification come from the new energy vehicles actually operated by a certain enterprise. These data are transmitted through the TBOX on the vehicle. The experimental data covers the information of 10 large new energy vehicles. The data collection period is 5 months, and the sampling frequency of each set of data is 0.1 seconds. Figures 11 (a), 11 (b), 11 (c), and 11 (d) respectively show the data display of vehicle speed (velocity), vehicle weight, hydraulic motor current, and voltage, where the sliding window size of the data is 10 and the step size is 1. The equipment used for model training is a small workstation, the CPU is Intel i9-12900K, equipped with two NVIDIA 4090 graphics cards, and the memory is four 32G memory sticks.

[0157] This verification experiment compares the following two energy consumption anomaly detection methods:

[0158] (1) Kinematic model: This method is mainly based on the kinematic model. By establishing the kinematic equation of the mechanical system and combining the system energy consumption characteristics and motion characteristics, the system energy consumption data is modeled and analyzed to detect abnormal energy consumption. In order to meet the accuracy requirements, this method requires more parameters to be calibrated.

[0159] (2) LSTM-Transformer model (the model trained in the embodiment of the present application): During training, the epoch is 500, the batch_size is 10000, the learning rate is 0.001, and the weight decay is 0.0001.

[0160] The result of energy consumption anomaly detection is whether the energy consumption is abnormal, which can be considered as a binary classification problem. The method provided in the embodiment of the present application is used to evaluate the energy consumption of the vehicle. Among them, the precision rate reflects the accuracy rate of the model when predicting positive samples, the accuracy rate reflects the overall accuracy rate of the model prediction results, the recall rate reflects the probability of missing negative samples, and the F1 score reflects the overall performance evaluation of the model. Time is the running time of the 10s time window data.

[0161] The above two methods were used to conduct tests in the anomaly set respectively, and the various indicators of total energy consumption anomaly detection are shown in Table 1. It can be seen from the results in the table that the LSTM-Transformer model indicators are slightly higher than the kinematic model, but the running time is much faster than the kinematic model. The above results show that since the kinematic model has many parameters and requires targeted calibration; the method provided in the embodiment of the present application has good robustness because it has fully learned the long-term laws of multiple vehicle systems. It can be seen that Table 1 can reflect the effectiveness and advancement of the method provided in the embodiment of the present application in detecting abnormal energy consumption.

[0162] Table 1

[0163]

[0164] Based on the above description, it can be known that the method provided in the embodiment of the present application can be applied to the abnormal detection of energy consumption of new energy vehicles. This method combines the advantages of LSTM network and Transformer structure, fully explores the hidden patterns in the time series, and achieves the purpose of calculating energy consumption data. Then, the energy consumption is compared with the actual energy consumption to complete the energy consumption abnormal detection task. This method is composed of multiple vehicle system energy consumption calculations. It can not only estimate the energy consumption of the whole vehicle, but also obtain the energy consumption of each vehicle system, and locate the module where the fault occurs in time. Finally, in order to unify the data of different vehicle systems, an input and output module is designed to integrate the data. This method efficiently completes the energy consumption abnormal detection task and can become a new and effective method in the field of energy consumption time series abnormal detection.

[0165] The present application also provides a vehicle energy consumption detection device, such as Fig.12 As shown, the device 1200 includes: a data acquisition module 1201 , an energy consumption calculation module 1202 , a range determination module 1203 and a vehicle detection module 1204 .

[0166] The data acquisition module 1201 is used to acquire the actual energy consumption of the vehicle to be detected and the system operation data corresponding to each vehicle system of the vehicle to be detected, wherein the vehicle to be detected includes multiple vehicle systems, each of which is equipped with a data acquisition unit, and the data acquisition unit is used to acquire the system operation data generated during the operation of the corresponding vehicle system;

[0167] The energy consumption calculation module 1202 is used to calculate the energy consumption of the system operation data corresponding to each vehicle system respectively through multiple detection sub-models included in the energy consumption detection model to obtain the system energy consumption corresponding to each vehicle system;

[0168] A range determination module 1203 is used to determine a target energy consumption range corresponding to the vehicle to be detected based on a relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected;

[0169] The vehicle detection module 1204 is used to determine that the energy consumption of the vehicle to be detected is abnormal when the actual energy consumption is outside the target energy consumption range.

[0170] In one example, the range determination module is specifically used to calculate the sum of the system energy consumption of multiple vehicle systems to obtain the whole vehicle energy consumption of the vehicle to be detected; calculate the first standard deviation of the whole vehicle energy consumption of the vehicle to be detected within a preset first sliding window; calculate the sum of the first standard deviation of the whole vehicle energy consumption and a preset multiple to obtain the upper limit value of the target energy consumption range; calculate the difference between the first standard deviation of the whole vehicle energy consumption and the preset multiple to obtain the lower limit value of the target energy consumption range; determine the target energy consumption range based on the upper limit value and the lower limit value.

[0171] In one example, the vehicle energy consumption detection device also includes: a whole vehicle detection module, used to calculate the actual energy consumption of the target vehicle system based on the input voltage and input current of the target vehicle system, wherein the target vehicle system is any one of a plurality of vehicle systems; calculate the second standard deviation of the system energy consumption of the target vehicle system within a preset second sliding window; determine the system energy consumption range corresponding to the target vehicle system based on the second standard deviation and the actual energy consumption of the target vehicle system; and determine that an abnormality exists in the target vehicle system when the actual energy consumption of the target vehicle system is outside the system energy consumption range.

[0172] In one example, the vehicle energy consumption detection device also includes: a sample acquisition module, a preprocessing module, a data conversion module, a data segmentation module and a model training module. The sample acquisition module is used to obtain the system operation data of the target vehicle system under the normal vehicle operation state sent by multiple vehicles, wherein the target vehicle system is any one of the multiple vehicle systems; the preprocessing module is used to preprocess the system operation data of the target vehicle system to obtain the preprocessed system operation data; the data conversion module is used to convert the preprocessed system operation data into time series data according to the acquisition time of the system operation data; the data segmentation module is used to segment the time series data using a preset third sliding window to obtain multiple time segments; the model training module is used to train the long short-term memory network model using multiple time segments as training samples to obtain the detection sub-model corresponding to the target vehicle system.

[0173] In one example, the preprocessing module includes: a downsampling module and a normalization module. The downsampling module is used to downsample the system operation data of the target vehicle system to obtain the downsampled system operation data; the normalization module is used to normalize the downsampled system operation data to obtain the preprocessed system operation data.

[0174] In one example, the downsampling module is specifically used to obtain a first timestamp corresponding to each system operation data of the target vehicle system; downsample the system operation data of the target vehicle system and determine the second timestamp corresponding to each downsampled point; interpolate the sampling point corresponding to the second timestamp according to the system operation data corresponding to the first timestamp to obtain the downsampled system operation data.

[0175] In one example, the normalization module is specifically used to calculate the mean of the system operation data after downsampling, and the standard deviation corresponding to the system operation data after downsampling; calculate the difference between the system operation data after downsampling and the mean to obtain a first difference; calculate the ratio of the first difference to the standard deviation to obtain the preprocessed system operation data.

[0176] In one example, the data segmentation module is specifically used to perform data splicing on time series data to obtain a target matrix, wherein the row vector of the target matrix represents the time series data corresponding to each time step, and the column vector of the target matrix represents the system operation data corresponding to the target vehicle system at each time point; the target matrix is ​​segmented using a preset fourth sliding window to obtain multiple time segments.

[0177] In one example, the vehicle energy consumption detection device also includes a model integration module, which is used to combine the input modules corresponding to the detection sub-models corresponding to multiple vehicle systems in a preset data receiving order to obtain a target input module; combine the output modules of the detection sub-models corresponding to multiple vehicle systems in a preset data receiving order to obtain a target output module; combine the detection sub-models corresponding to multiple vehicle systems in a preset data receiving order to obtain a target detection model; configure the target input module and the target output module as the input module and output module of the target detection model, respectively, to obtain an energy consumption detection model.

[0178] The vehicle energy consumption detection device provided in the embodiment of the present application can implement each process implemented in the aforementioned method embodiment, and will not be described again here to avoid repetition.

[0179] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0180] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0181] The electronic device may include a processor 1301 and a memory 1302 storing computer program instructions.

[0182] Specifically, the processor 1301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0183] The memory 1302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 1302 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1302 is a non-volatile solid-state memory.

[0184] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0185] The processor 1301 implements any one of the vehicle energy consumption detection methods in the above embodiments by reading and executing computer program instructions stored in the memory 1302 .

[0186] In one example, the electronic device may further include a communication interface 1303 and a bus 1310. Fig.13 As shown, the processor 1301, the memory 1302, and the communication interface 1303 are connected via a bus 1310 and communicate with each other.

[0187] The communication interface 1303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0188] Bus 1310 includes hardware, software or both, coupling the components of the electronic device to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, bus 1310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnect.

[0189] In addition, in combination with the vehicle energy consumption detection method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any vehicle energy consumption detection method in the above embodiment is implemented.

[0190] In addition, in combination with the vehicle energy consumption detection method in the above embodiment, the present application embodiment can provide a computer program product for implementation. When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device executes and implements any of the vehicle energy consumption detection methods in the above embodiment.

[0191] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0192] The functional modules shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0193] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0194] The above reference is made to the flowchart and / or block diagram of the detection method and device of vehicle energy consumption according to the embodiment of the present disclosure, and describes various aspects of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0195] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for detecting vehicle energy consumption, characterized in that: include: Acquire the actual energy consumption of the vehicle to be detected, and the system operation data corresponding to each vehicle system of the vehicle to be detected, wherein the vehicle to be detected includes multiple vehicle systems, each vehicle system is deployed with a data acquisition unit, and the data acquisition unit is used to collect the system operation data generated during the operation of the corresponding vehicle system; The energy consumption of the system operation data corresponding to each vehicle system is calculated respectively by using a plurality of detection sub-models included in the energy consumption detection model to obtain the system energy consumption corresponding to each vehicle system; Determining a target energy consumption range corresponding to the vehicle to be detected based on a relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected; When the actual energy consumption is outside the target energy consumption range, determining that the vehicle to be detected has abnormal energy consumption; Before calculating the energy consumption of the system operation data corresponding to each vehicle system by using multiple detection sub-models included in the energy consumption detection model to obtain the system energy consumption corresponding to each vehicle system, the method also includes: obtaining the system operation data of the target vehicle system under normal vehicle operation status sent by multiple vehicles, wherein the target vehicle system is any one of the multiple vehicle systems; preprocessing the system operation data of the target vehicle system to obtain preprocessed system operation data; converting the preprocessed system operation data into time series data according to the collection time of the system operation data; using a preset third sliding window to segment the time series data to obtain multiple time segments; using the multiple time segments as training samples to train the long short-term memory network model to obtain the detection sub-model corresponding to the target vehicle system.

2. The method according to claim 1, characterized in that Determining a target energy consumption range corresponding to the vehicle to be detected according to a relationship between the system energy consumption and the energy consumption range corresponding to the vehicle to be detected includes: Calculating the sum of the system energy consumptions of the multiple vehicle systems to obtain the whole vehicle energy consumption of the vehicle to be detected; Calculating a first standard deviation of the vehicle energy consumption of the vehicle to be detected within a preset first sliding window; Calculating the sum of the energy consumption of the whole vehicle and the first standard deviation of the preset multiple to obtain the upper limit value of the target energy consumption range; Calculating the difference between the energy consumption of the whole vehicle and the first standard deviation of the preset multiple to obtain the lower limit value of the target energy consumption range; The target energy consumption range is determined according to the upper limit value and the lower limit value.

3. The method according to claim 1, characterized in that After calculating the energy consumption of the system operation data corresponding to each vehicle system by using a plurality of detection sub-models included in the energy consumption detection model to obtain the system energy consumption corresponding to each vehicle system, the method further includes: Calculating actual energy consumption of the target vehicle system according to an input voltage and an input current of the target vehicle system, wherein the target vehicle system is any one of the multiple vehicle systems; Calculating a second standard deviation of the system energy consumption of the target vehicle system within a preset second sliding window; Determining a system energy consumption range corresponding to the target vehicle system based on the second standard deviation and the actual energy consumption of the target vehicle system; When the actual energy consumption of the target vehicle system is outside the system energy consumption range, it is determined that an abnormality exists in the target vehicle system.

4. The method according to claim 1, characterized in that Preprocessing the system operation data of the target vehicle system to obtain the preprocessed system operation data includes: Downsampling the system operation data of the target vehicle system to obtain downsampled system operation data; The down-sampled system operation data is normalized to obtain the pre-processed system operation data.

5. The method according to claim 4, characterized in that Downsampling the system operation data of the target vehicle system to obtain downsampled system operation data includes: Acquire a first timestamp corresponding to each system operation data collected from the target vehicle system; Downsampling the system operation data of the target vehicle system, and determining a second timestamp corresponding to each downsampling point based on the first timestamp; Interpolation calculation is performed on the sampling points corresponding to the second timestamp to obtain the down-sampled system operation data.

6. The method according to claim 4, characterized in that Normalizing the downsampled system operation data to obtain the preprocessed system operation data includes: Calculating the mean of the downsampled system operation data and the standard deviation corresponding to the downsampled system operation data; Calculating the difference between the downsampled system operation data and the mean value to obtain a first difference value; The ratio of the first difference to the standard deviation is calculated to obtain the preprocessed system operation data.

7. The method according to claim 1, characterized in that The time series data is segmented using a preset third sliding window to obtain multiple time segments, including: Performing data splicing on the time series data to obtain a target matrix, wherein the row vectors of the target matrix represent the time series data corresponding to each time step, and the column vectors of the target matrix represent the system operation data corresponding to the target vehicle system at each time point; The target matrix is ​​segmented using a preset fourth sliding window to obtain the multiple time segments.

8. The method according to claim 1, characterized in that After training the long short-term memory network model using the multiple time segments as training samples to obtain a detection sub-model corresponding to the target vehicle system, the method further includes: Combining the input modules corresponding to the detection sub-models corresponding to the multiple vehicle systems according to a preset data receiving order to obtain a target input module; Combining the output modules of the detection sub-models corresponding to the multiple vehicle systems according to the preset data receiving order to obtain a target output module; Combining the detection sub-models corresponding to the multiple vehicle systems according to the preset data receiving order to obtain a target detection model; The target input module and the target output module are respectively configured as the input module and the output module of the target detection model to obtain the energy consumption detection model.

9. A vehicle energy consumption detection device, characterized in that: include: A data acquisition module, used to acquire the actual energy consumption of the vehicle to be detected, and the system operation data corresponding to each vehicle system of the vehicle to be detected, wherein the vehicle to be detected includes multiple vehicle systems, each of which is equipped with a data acquisition unit, and the data acquisition unit is used to acquire the system operation data generated during the operation of the corresponding vehicle system; An energy consumption calculation module, used to calculate the energy consumption of the system operation data corresponding to each vehicle system respectively through a plurality of detection sub-models included in the energy consumption detection model, so as to obtain the system energy consumption corresponding to each vehicle system; A range determination module, used to determine a target energy consumption range corresponding to the vehicle to be detected based on a relationship between the system energy consumption and an energy consumption range corresponding to the vehicle to be detected; A vehicle detection module, used for determining that the detected vehicle has abnormal energy consumption when the actual energy consumption is outside the target energy consumption range; A sample acquisition module is used to calculate the energy consumption of the system operation data corresponding to each vehicle system through multiple detection sub-models included in the energy consumption detection model, and obtain the system operation data of the target vehicle system under normal vehicle operation status sent by multiple vehicles before obtaining the system energy consumption corresponding to each vehicle system, wherein the target vehicle system is any one of the multiple vehicle systems; a preprocessing module is used to preprocess the system operation data of the target vehicle system to obtain the preprocessed system operation data; a data conversion module is used to convert the preprocessed system operation data into time series data according to the collection time of the system operation data; a data segmentation module is used to segment the time series data using a preset third sliding window to obtain multiple time segments; a model training module is used to train a long short-term memory network model using the multiple time segments as training samples to obtain the detection sub-model corresponding to the target vehicle system.