Method for detecting vehicle control function and electronic equipment
By using time sequence data decomposition and prediction models to identify abnormal vehicle control function when the vehicle is executed, the problem of difficulty in detecting abnormal vehicle control function in the prior art is solved, and the safety of the vehicle and the experience of using the vehicle are improved.
Patent Information
- Application Number
- CN202411033043.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-08
AI Technical Summary
The prior art is difficult to detect abnormalities in vehicle control functions in real-time in the actual use scenarios of vehicles, resulting in the impact of vehicle safety and reliability, and the inability to detect potential faults in time.
By obtaining historical operation and environmental timing data when the vehicle performs vehicle control functions, performing trend, season and residual decomposition, using prediction models (such as LSTM and Informer models) to predict the operation and environmental data of the current moment, and comparing the prediction data in real time with real-time Actual data, identify abnormal vehicle control function.
It realizes timely identification of abnormal vehicle control functions during vehicle operation, improves user's car use experience, ensures vehicle safety and reliability, and reduces maintenance costs.
Smart Images

Figure CN118915550A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle function detection, and more specifically, to a method and electronic device for detecting a vehicle control function in the field of vehicle function. Background Art
[0002] At present, with the development of intelligent technology, more and more intelligent functions are integrated into vehicles to meet the intelligent needs of users in different scenarios. Most of these functions can be controlled by the electronic control unit (ECU) and control system in the vehicle, so these functions are also called "vehicle control functions".
[0003] In order to ensure that the vehicle control function can better serve users, in general, manufacturers need to test the vehicle control function before the vehicle leaves the factory, so as to promptly detect abnormalities in the vehicle control function and ensure the safety and reliability of the vehicle. Summary of the invention
[0004] The present application provides a method and electronic device for detecting vehicle control functions. The method can timely detect abnormalities of the vehicle control functions during the vehicle executing the vehicle control functions, thereby improving the user's vehicle experience.
[0005] In a first aspect, a method for detecting a vehicle control function is provided, the method comprising: when a vehicle executes the vehicle control function, obtaining a plurality of time series data in a historical operation process, the plurality of time series data comprising a plurality of operation time series data and a plurality of environmental time series data; determining a plurality of predicted operation data and a plurality of predicted environmental data of the vehicle at a current moment based on the plurality of time series data; determining whether the vehicle control function is abnormal at the current moment based on the plurality of predicted operation data, the plurality of predicted environmental data, the plurality of time series data, and the plurality of actual operation data and the plurality of actual environmental data at the current moment.
[0006] In the above technical solution, a method for detecting a vehicle control function is proposed during the operation of the vehicle. The method can obtain multiple time series data of the vehicle during the operation of the vehicle when the vehicle control function is turned on. Among them, the multiple time series data include multiple operation time series data and multiple environmental time series data. The multiple operation time series data specifically refer to the vehicle's own operation parameters at multiple consecutive moments during the execution of the vehicle control function. Operation parameters such as vehicle speed, acceleration, etc. Multiple environmental time series data specifically refer to the environmental parameters of the vehicle at multiple consecutive moments during the execution of the vehicle control function. Environmental parameters such as ambient temperature, wind speed, etc. Through multiple time series data, multiple predicted operation data and multiple predicted environmental data of the vehicle at the current moment are determined. The predicted data can be considered as the operation data and environmental data that the vehicle should reach at the current moment in theory when the vehicle executes the vehicle control function. Finally, based on multiple time series data, multiple predicted operation data and multiple predicted environmental data, it is determined whether the vehicle control function is abnormal at the current moment, and the abnormal condition of the vehicle control function can be quickly identified by comparing the deviation between the predicted data and the actual data in real time, and abnormal problems of the vehicle can be discovered in time.
[0007] In combination with the first aspect, in some possible implementations, the multiple predicted operating data and multiple predicted environmental data of the vehicle at the current moment are determined based on the multiple time series data, including: determining M operating series data from the multiple operating series data, and determining N environmental time series data from the multiple environmental time series data, the M operating series data and the N environmental time series data are both continuous data, and M and N are both positive integers; for any time series data among the M operating series data and the N environmental time series data, based on a preset decomposition method, decomposing the time series data into trend item time series data, seasonal item time series data and residual item time series data; determining M predicted operating data and N predicted environmental data based on the M trend item operating series data, the M seasonal item operating series data, the M residual item operating series data, the N trend item environmental time series data, the N seasonal item environmental time series data and the N residual item environmental time series data.
[0008] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method determines M predicted operation data and N predicted environmental data based on M trend item operation series data, M seasonal item operation series data, M residual item operation series data, N trend item environmental time series data, N seasonal item environmental time series data and N residual item environmental time series data, including: determining a trend item time series data sequence based on the M trend item operation series data and the N trend item environmental time series data; inputting the trend item time series data sequence into a trend item data prediction model, encoding the trend item time series data sequence through the trend item data prediction model to obtain a trend item time series data vector of the trend item time series data sequence; decoding the trend item time series data vector to obtain M+N predicted trend item data at the current moment; decoding the trend item time series data vector based on the M residual item operation series data and the N residual item environmental time series data. environmental time series data, determine the residual time series data sequence; input the residual time series data sequence into the residual item data prediction model, and process the residual time series data sequence through the encoder in the residual item data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain the encoder output; process the encoder output through the decoder of the residual item data prediction model based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain the decoder output; process the decoder output through the fully connected layer in the residual item data prediction model to obtain the M+N predicted residual item data at the current moment; determine the M predicted operation data and the N predicted environmental data according to the M+N predicted trend item data, the M+N predicted residual item data, the M seasonal item operation series data and the N seasonal item environmental time series data.
[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the training process of the trend item data prediction model includes: inputting the sample trend item time series data sequence into the trend item data prediction model, encoding the sample trend item time series data sequence based on the gating mechanism through the trend item data prediction model, and obtaining the sample trend item time series data vector of the sample trend item time series data sequence; decoding the sample trend item time series data vector to obtain M+N sample predicted trend item data; based on the difference information between the M+N sample predicted trend item data and the M+N labeled trend item data corresponding to the sample trend item time series data sequence, training the trend item data prediction model.
[0010] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the training process of the residual item data prediction model includes: inputting the sample residual time series data sequence into the residual item data prediction model, and processing the sample residual time series data sequence through the encoder in the residual item data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain a sample encoder output; processing the sample encoder output through the decoder of the residual item data prediction model based on a masked multi-head probabilistic sparse self-attention structure and a multi-head self-attention structure to obtain a sample decoder output; processing the sample decoder output through the fully connected layer in the residual item data prediction model to obtain M+N sample predicted residual item data; and training the residual item data prediction model based on the difference information between the M+N sample predicted residual item data and the M+N labeled residual item data corresponding to the sample residual item time series data sequence.
[0011] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, before determining whether the vehicle control function is abnormal at the current moment based on the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and the multiple actual environment data at the current moment, the method also includes: obtaining M historical predicted operation time series data and N historical predicted environment time series data corresponding to the multiple time series data; and, determining whether the vehicle control function is abnormal at the current moment based on the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and the multiple actual environment data at the current moment, includes: determining M predicted operation time series data based on the M historical predicted operation time series data and the M predicted operation data, and, determining N predicted environment time series data based on the N historical predicted environment time series data and the N predicted environment data. environmental timing data; determining M actual operating timing data according to the multiple actual operating data and the M operating timing data, and determining N actual environmental timing data according to the multiple actual environmental data and the N environmental timing data; determining M first differences according to the M predicted operating timing data and the M actual operating timing data; determining N second differences according to the N predicted environmental timing data and the N actual environmental timing data; determining P operating timing data according to the multiple operating timing data and the multiple actual operating data, and determining Q environmental timing data according to the multiple environmental timing data and the multiple actual environmental data, the P operating timing data and the Q environmental timing data are both discrete data, and P and Q are both positive integers; determining whether the vehicle control function is abnormal according to the M first differences, the N second differences, the P operating timing data and the Q environmental timing data.
[0012] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the determining whether the vehicle control function is abnormal is based on the M first differences, the N second differences, the P operating time series data and the Q environmental time series data, including: inputting the M first differences, the N second differences, the P operating time series data and the Q environmental time series data into an abnormality detection model, and outputting the abnormality probability of the vehicle control function through the abnormality detection model; when the abnormality probability is less than or equal to the preset probability, determining that the vehicle control function is normal; when the abnormality probability is greater than the preset probability, determining that the vehicle control function is abnormal.
[0013] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the training process of the anomaly detection model includes: determining the sample input sequence of the anomaly detection model based on M first sample differences, N second sample differences, P sample runtime timing data and Q sample environment timing data; inputting the sample input sequence into the anomaly detection model and outputting the sample anomaly probability; and training the anomaly detection model based on the difference information between the sample anomaly probability and the labeled probability corresponding to the sample input sequence.
[0014] In combination with the first aspect and the above-mentioned implementation manner, in some possible implementation manners, the method further includes: in the case of determining that the vehicle control function is abnormal, determining whether the P operation time series data include the first abnormal data, and / or, whether the Q environmental time series data include the second abnormal data; in the case that the P operation time series data include the first abnormal data, determining that the abnormal source of the vehicle control function is the first abnormal data; and / or, in the case that the Q environmental time series data include the second abnormal data, determining that the abnormal source is the second abnormal data; in the case that the P operation time series data do not include the first abnormal data, determining that the abnormal source is the second abnormal data. Abnormal data, and the Q environmental timing data do not include the second abnormal data, for any first difference among the M first difference values, if the first difference value is greater than the first threshold value corresponding to the first difference value, it is determined that the source of the abnormality is the operating data corresponding to the first difference value; and / or, when the P operating timing data do not include the first abnormal data, and the Q environmental timing data do not include the second abnormal data, for any second difference value among the N second difference values, if the second difference value is greater than the second threshold value corresponding to the second difference value, it is determined that the source of the abnormality is the environmental data corresponding to the second difference value.
[0015] In the above technical solution, when the abnormality detection model determines that the vehicle control function is abnormal, the method of the present application can further determine the abnormal source of the vehicle control function. When determining the source of the abnormality, since the P operating time series data and the Q environmental time series data are all discrete data. For example, the P operating time series data can be the window status, the brake system status; the Q environmental time series data can be the road type. When the vehicle control function abnormality is detected, first consider whether it is caused by discrete data. The reason is that discrete data usually represents the state or configuration of the system, such as working mode, system enable / disable status, etc. The anomalies of these data often point directly to specific problems in the system, and their changes are usually discontinuous. Compared with continuous data, it is easier to identify and locate problems, and possible fault sources can be quickly screened out. Discrete data anomalies may have a greater impact on system safety and function. Therefore, the detection of discrete data anomalies is given a higher priority.
[0016] When checking discrete data, the present application first determines whether P operation time series data include the first abnormal data. If so, the abnormal source is directly determined to be the first abnormal data, and determines whether Q environmental time series data include the second abnormal data. If so, the abnormal source is directly determined to be the second abnormal data. On the contrary, when P operation time series data do not include the first abnormal data and Q environmental time series data do not include the second abnormal data, the M first differences between the predicted value and the true value of the continuous operation time series data and the N second differences between the predicted value and the true value of the continuous environmental time series data are considered. For any first difference among the M first differences, if the first difference is greater than the first threshold corresponding to the first difference, the operation data corresponding to the first difference is determined to be the abnormal source. Similarly, for any second difference among the N second differences, if the second difference is greater than the first threshold corresponding to the second difference, the environmental data corresponding to the second difference is determined to be the abnormal source. Thus, through the above process, when the vehicle control function is abnormal, the abnormal source of the vehicle control function can be accurately located, which is convenient for users to repair and handle.
[0017] In a second aspect, a device for detecting a vehicle control function is provided, the device comprising: a timing data acquisition module, for acquiring a plurality of timing data in a historical operation process when the vehicle performs the vehicle control function, the plurality of timing data comprising a plurality of operation timing data and a plurality of environmental timing data; a data prediction module, for determining a plurality of predicted operation data and a plurality of predicted environmental data of the vehicle at a current moment based on the plurality of timing data; an abnormality detection module, for determining whether the vehicle control function is abnormal at the current moment based on the plurality of predicted operation data, the plurality of predicted environmental data, the plurality of timing data, and the plurality of actual operation data and the plurality of actual environmental data at the current moment.
[0018] In combination with the second aspect, in some possible implementations, the data prediction module is specifically used to: determine M runtime series data from the multiple runtime series data, and determine N environmental time series data from the multiple environmental time series data, the M runtime series data and the N environmental time series data are both continuous data, and M and N are both positive integers; for any time series data among the M runtime series data and the N environmental time series data, based on a preset decomposition method, decompose the time series data into trend item time series data, seasonal item time series data and residual item time series data; determine M predicted runtime data and N predicted environmental data based on the M trend item runtime series data, the M seasonal item runtime series data, the M residual item runtime series data, the N trend item environmental time series data, the N seasonal item environmental time series data and the N residual item environmental time series data.
[0019] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the data prediction module is also used to: determine the trend item time series data sequence according to the M trend item running time series data and the N trend item environmental time series data; input the trend item time series data sequence into the trend item data prediction model, encode the trend item time series data sequence through the trend item data prediction model, and obtain the trend item time series data vector of the trend item time series data sequence; decode the trend item time series data vector to obtain the M+N predicted trend item data at the current moment; determine the residual time series data sequence according to the M residual item running time series data and the N residual item environmental time series data; input the residual time series data sequence into the residual item data prediction model, and encode the trend item time series data sequence through the trend item data prediction model to obtain the trend item time series data vector of the trend item time series data sequence; decode the trend item time series data vector to obtain the M+N predicted trend item data at the current moment; The encoder in the residual item data prediction model processes the residual time series data sequence based on the superposition of at least one multi-head probabilistic sparse self-attention structure and self-attention extraction operation to obtain the encoder output; the decoder of the residual item data prediction model processes the encoder output based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain the decoder output; the decoder output is processed by the fully connected layer in the residual item data prediction model to obtain the M+N predicted residual item data at the current moment; according to the M+N predicted trend item data, the M+N predicted residual item data, the M seasonal item operation series data and the N seasonal item environmental time series data, the M predicted operation data and the N predicted environmental data are determined.
[0020] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the data prediction module is also used to: input the sample trend item time series data sequence into the trend item data prediction model, and through the trend item data prediction model, encode the sample trend item time series data sequence based on the gating mechanism to obtain the sample trend item time series data vector of the sample trend item time series data sequence; decode the sample trend item time series data vector to obtain M+N sample predicted trend item data; and train the trend item data prediction model based on the difference information between the M+N sample predicted trend item data and the M+N labeled trend item data corresponding to the sample trend item time series data sequence.
[0021] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the data prediction module is also used to: input the sample residual time series data sequence into the residual item data prediction model, and process the sample residual time series data sequence through the encoder in the residual item data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain a sample encoder output; process the sample encoder output through the decoder of the residual item data prediction model based on a masked multi-head probabilistic sparse self-attention structure and a multi-head self-attention structure to obtain a sample decoder output; process the sample decoder output through the fully connected layer in the residual item data prediction model to obtain M+N sample predicted residual item data; and train the residual item data prediction model based on the difference information between the M+N sample predicted residual item data and the M+N labeled residual item data corresponding to the sample residual item time series data sequence.
[0022] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, before determining whether the vehicle control function is abnormal at the current moment based on the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and the multiple actual environment data at the current moment, the device also includes: a prediction data acquisition module, used to acquire M historical prediction operation time series data and N historical prediction environment time series data corresponding to the multiple time series data; and the abnormality detection module is specifically used to: determine M prediction operation time series data based on the M historical prediction operation time series data and the M prediction operation data, and, determine N prediction environment time series data based on the N historical prediction environment time series data and the N prediction environment data; determine N prediction environment time series data based on the multiple actual operation data and the M operation time series data , determine M actual operation timing data, and, according to the multiple actual environment data and the N environment timing data, determine N actual environment timing data; according to the M predicted operation timing data and the M actual operation timing data, determine M first differences; according to the N predicted environment timing data and the N actual environment timing data, determine N second differences; according to the multiple operation timing data and the multiple actual operation data, determine P operation timing data, and, according to the multiple environment timing data and the multiple actual environment data, determine Q environment timing data, the P operation timing data and the Q environment timing data are both discrete data, and P and Q are both positive integers; according to the M first differences, the N second differences, the P operation timing data and the Q environment timing data, determine whether the vehicle control function is abnormal.
[0023] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the abnormality detection module is also used to: input the M first differences, the N second differences, the P runtime time series data and the Q environmental time series data into the abnormality detection model, and output the abnormality probability of the vehicle control function through the abnormality detection model; when the abnormality probability is less than or equal to the preset probability, determine that the vehicle control function is normal; when the abnormality probability is greater than the preset probability, determine that the vehicle control function is abnormal.
[0024] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the anomaly detection module is also used to: determine the sample input sequence of the anomaly detection model based on M first sample differences, N second sample differences, P sample runtime timing data and Q sample environment timing data; input the sample input sequence into the anomaly detection model and output the sample anomaly probability; and train the anomaly detection model based on the difference information between the sample anomaly probability and the labeled probability corresponding to the sample input sequence.
[0025] In combination with the second aspect and the above-mentioned implementation manner, in some possible implementation manners, the device further includes: an abnormality source determination module, which is used to determine whether the P operation time series data include first abnormal data and / or whether the Q environmental time series data include second abnormal data when it is determined that the vehicle control function is abnormal; when the P operation time series data include the first abnormal data, determine that the abnormality source of the vehicle control function is the first abnormal data; and / or, when the Q environmental time series data include the second abnormal data, determine that the abnormality source is the second abnormal data; when the P operation time series data do not include the first abnormal data, determine that the abnormality source is the second abnormal data. Including the first abnormal data, and when the Q environmental time series data do not include the second abnormal data, for any first difference among the M first difference values, if the first difference value is greater than a first threshold value corresponding to the first difference value, it is determined that the source of the abnormality is the operating data corresponding to the first difference value; and / or, when the P operating time series data do not include the first abnormal data, and the Q environmental time series data do not include the second abnormal data, for any second difference value among the N second difference values, if the second difference value is greater than a second threshold value corresponding to the second difference value, it is determined that the source of the abnormality is the environmental data corresponding to the second difference value.
[0026] In a third aspect, an electronic device is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the method in the first aspect or any possible implementation of the first aspect.
[0027] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0028] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a schematic diagram of a scenario in which a vehicle performs a vehicle control function provided by an embodiment of the present application;
[0030] Figure 2 is a schematic diagram of a scenario for detecting a vehicle control function provided in an embodiment of the present application;
[0031] Figure 3 is a schematic flow chart of a method for detecting a vehicle control function provided in an embodiment of the present application;
[0032] Figure 4 It is a schematic diagram of an LSTM model encoding provided in an embodiment of the present application;
[0033] Figure 5 is a schematic diagram of another scenario for detecting a vehicle control function provided in an embodiment of the present application;
[0034] Figure 6 is a structural schematic diagram of a device for detecting a vehicle control function provided in an embodiment of the present application;
[0035] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0037] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0038] Before introducing the solutions of the embodiments of the present application, the professional terms that may be involved in the embodiments of the present application are first explained.
[0039] Vehicle control function, also known as vehicle control system function, refers to the collection of various electronic control systems on the vehicle used to monitor, manage and execute the dynamic characteristics of the vehicle. These systems collect information about the vehicle and the surrounding environment through sensors, then make decisions based on this information and implement control actions through actuators to ensure driving safety, improve driving experience and increase fuel efficiency.
[0040] Vehicle control functions are divided into the following categories according to their functions: power control system, chassis control system, safety control system, assisted driving and automatic driving function control system, and infotainment and vehicle networking control system.
[0041] Figure 1 It is a schematic diagram of a scenario in which a vehicle performs a vehicle control function provided in an embodiment of the present application.
[0042] For example, Figure 1 As shown, for a vehicle 101 equipped with an automatic emergency braking system (Automatic Emergency Braking, AEB), AEB, as a common vehicle control function, can monitor the environment in front of the vehicle 101, identify potential obstacles in front of the vehicle 101, and control the vehicle 101 to brake in time during the driving process of the vehicle 101.
[0043] like Figure 1 As shown, when the vehicle 101 is driving, if there is a pedestrian 102 crossing the sidewalk 103 in front of it. AEB can identify the pedestrian 102 in front of the vehicle 101 through the integrated camera, radar and other sensors, and judge whether there is a collision risk between the vehicle 101 and the pedestrian 102 based on the information collected by the sensors (such as vehicle speed, distance between the vehicle 101 and the pedestrian 102, and relative speed between the vehicle 101 and the pedestrian 102). When there is a collision risk, AEB can first remind the driver to brake through sound signals, visual signals or seat vibrations. If the driver does not give timely feedback, AEB will automatically apply braking force to control the vehicle 101 to slow down or stop as much as possible to avoid collision.
[0044] Based on the actual application scenarios of the above vehicle control functions, vehicles usually include multiple vehicle control functions. For example, common vehicle control functions include steering assist system, blind spot detection (BSD) system, lane keeping assist (Lane Keeping Assist System, LKA) system, navigation system, engine management system (Engine Management System, EMS), etc.
[0045] In order to make these vehicle control functions work better in the vehicle and improve the user's driving experience, abnormal detection of vehicle control functions has also become a concern for vehicle manufacturers. Abnormalities in vehicle control functions not only affect the safety of the vehicle, but may also affect the performance of the vehicle. For example, abnormalities in the engine management system or transmission control may lead to increased fuel consumption, decreased power and other problems. In addition, abnormal detection of vehicle control functions can also help users identify potential signs of failure in a timely manner, avoid unplanned downtime caused by sudden failures, and reduce vehicle maintenance costs.
[0046] In the related art, when testing the vehicle control function, the test vehicle is generally controlled to run in a test environment corresponding to the vehicle control function, and the tester determines whether there is any abnormality in the vehicle control function through the running status of the vehicle during the test.
[0047] During the above-mentioned vehicle control function testing process, the testing environment is often unable to fully simulate real road conditions, environmental factors, etc., resulting in the test results being unable to accurately reflect the operating status of the vehicle control function during the user's actual driving process, and thus, during the user's actual use of the vehicle, it is impossible to promptly discover abnormal conditions of the vehicle control function.
[0048] Based on the above problems, an embodiment of the present application proposes a method for detecting vehicle control functions. The method can detect abnormalities of the vehicle control functions in a timely manner during the process of the vehicle executing the vehicle control functions, thereby improving the user's vehicle experience.
[0049] Figure 2 It is a schematic diagram of a scenario for detecting a vehicle control function provided in an embodiment of the present application.
[0050] For example, Figure 2 As shown, based on the continuous development of Internet of Vehicles technology, the vehicle 101 can establish a communication connection with a cloud server (also called a cloud platform) 201 to facilitate two-way transmission of information with the cloud platform 201.
[0051] In a possible implementation, the vehicle 101 can exchange data with the cloud platform 201 through a telematics box (T-box) in the vehicle 101. The cloud platform 201 is specifically a telematics service provider (TSP) of the vehicle 101.
[0052] In an embodiment of the present application, the vehicle 101 can send various data collected by various sensors during operation to the cloud server 201 in real time.
[0053] Optionally, the multiple data are divided into two types according to different sources. One is the operation data of the vehicle 101 itself, such as engine speed, vehicle speed, fuel quantity, accelerator pedal opening, acceleration, anti-lock braking system (ABS) status, etc. The other is the environmental data during the driving process of the vehicle 101, including ambient temperature, altitude, wind speed, road type, etc.
[0054] When the vehicle 101 is performing the vehicle control function, the cloud platform 201 can determine whether there is any abnormality in the vehicle control function through receiving various data.
[0055] When the vehicle control function is abnormal, the cloud platform 201 can also locate the source of the abnormality based on various data, and generate prompt information to send to the vehicle or the user's terminal device, reminding the user to repair and handle it in time, ensuring the safety of the vehicle 101 during driving and improving the user's car experience.
[0056] A method for detecting a vehicle control function provided in an embodiment of the present application is described in detail below.
[0057] Figure 3 is a schematic flow chart of a method for detecting a vehicle control function provided in an embodiment of the present application. It should be understood that the method can be applied to an electronic device, which can be Figure 2 In addition, the method can also be applied to the vehicle 101, specifically to any electronic control unit (ECU) in the vehicle 101. The following embodiment of the present application takes the cloud platform 201 as an example to describe in detail a method for detecting a vehicle control function provided in the embodiment of the present application.
[0058] For example, Figure 3 As shown, the method 300 includes:
[0059] 301 , when the vehicle performs a vehicle control function, a plurality of time series data in a historical operation process is obtained, where the plurality of time series data includes a plurality of operation time series data and a plurality of environment time series data.
[0060] It should be understood that the cloud platform's abnormal detection of the vehicle control function in the embodiment of the present application can be based on the operating data and environmental data reported by the vehicle when the vehicle control function is turned on (that is, the vehicle executes the vehicle control function), and real-time monitoring of whether the vehicle's operation is normal during the period when the vehicle control function is turned on, thereby determining whether the vehicle control function is normal.
[0061] Specifically, during the operation of the vehicle, regardless of whether the vehicle control function is turned on or not, the vehicle can send the operation data and environmental data collected by various sensors to the cloud platform through the T-box. Among them, the operation data is used to indicate the operation status of the vehicle itself, such as vehicle speed, acceleration, steering wheel angle, etc. The environmental data is used to indicate the environmental status during the operation of the vehicle, such as ambient temperature, wind speed, road type, etc. Based on this, the cloud platform can obtain the operation data and environmental data of the vehicle at multiple times during driving.
[0062] Optionally, the environmental data in the embodiment of the present application includes ambient temperature, humidity, altitude, wind speed, road type, traffic conditions, wind direction, terrain conditions, etc. Among them, the traffic conditions are used to indicate whether the road where the current vehicle is located is congested or unobstructed. The operating data includes engine speed, vehicle speed, fuel quantity, coolant temperature, intake temperature, exhaust temperature, fuel pressure, fuel temperature, battery voltage, engine load, throttle opening, turbocharger pressure, air flow, fuel flow, ignition advance angle, tire pressure, steering angle, acceleration, vehicle position, mileage, fuel consumption, transmission status, brake system status, air conditioning system status, ABS status, and vehicle electronic stability system (Electronic Stability Program, ESP) status.
[0063] When the vehicle control function is turned on, the cloud platform can determine the vehicle's multiple predicted operating data and multiple predicted environmental data at the current moment through multiple operating time series data and multiple environmental time series data within a period of historical time during the vehicle control function activation process. In addition, the cloud platform can also obtain multiple actual operating data and multiple actual environmental data of the vehicle at the current moment through the vehicle T-box. The cloud platform can determine whether the vehicle control function is abnormal by combining the above multiple data.
[0064] Among them, the vehicle control function refers to any vehicle control function in the vehicle.
[0065] Optionally, the vehicle control function may be activated by any of a click operation, a voice command or a gesture operation.
[0066] For example, taking the vehicle control function as the Adaptive Cruise Control (ACC) function in the vehicle as an example, the user can click the physical button corresponding to the adaptive cruise function to control the activation of the ACC function; alternatively, the user can control the activation of the ACC function through voice commands, such as the voice of "activate the adaptive cruise function"; alternatively, the user can also control the activation of the ACC function through the preset gesture operation corresponding to the ACC function; alternatively, the user can also click the virtual button of the ACC function in the vehicle or the virtual button of the ACC function in the terminal device application to control the activation of the ACC function.
[0067] During the process of activating the vehicle control function, the cloud platform can obtain multiple time series data within a historical period after the vehicle control function is activated based on the received operation data and environmental data. The multiple time series data include multiple operation time series data and multiple environmental time series data.
[0068] Optionally, a historical duration may be a duration corresponding to n collection moments.
[0069] Exemplarily, when the vehicle control function is turned on, with the current collection time as the end time, the cloud platform can obtain multiple operating time series data and multiple environmental time series data of n collection times before the current collection time.
[0070] Assume that the multiple operating data include vehicle speed and acceleration, and the multiple environmental data include environmental temperature and humidity. Then the multiple operating time series data acquired by the cloud platform may include vehicle speed time series data and acceleration time series data. The vehicle speed time series data can be expressed as: {V t1 、V t2 、V t3 、V t4 ,……,V tn}, the acceleration time series data can be expressed as: {a t1 、a t2 、a t3 、a t4 ,……,a tn Similarly, the multiple environmental time series data may include environmental temperature time series data and wind speed time series data. The environmental temperature time series data may be expressed as: {T t1 , T t2 , T t3 , T t4 ,……,T tn}, the humidity time series data can be expressed as: {R t1 , R t2 , R t3 , R t4 ,……,R tn}.
[0071] Based on the above process, the cloud platform can obtain multiple time series data consisting of multiple runtime time series data and multiple environment data.
[0072] 302. Determine, based on the multiple time series data, multiple predicted operation data and multiple predicted environment data of the vehicle at the current moment.
[0073] After the cloud platform obtains multiple time series data, it can make predictions based on the multiple time series data to determine multiple predicted operating data and multiple predicted environmental data of the vehicle at the current moment.
[0074] During the prediction process, the cloud platform can perform a series of processing on multiple time series data to obtain multiple prediction operation data and multiple prediction environment data.
[0075] In a possible implementation, multiple predicted operation data and multiple predicted environment data of the vehicle at the current moment are determined based on multiple time series data, including:
[0076] Determine M runtime series data from the plurality of runtime series data, and determine N environment series data from the plurality of environment series data, wherein the M runtime series data and the N environment series data are both continuous data, and M and N are both positive integers;
[0077] For any time series data among the M operation time series data and the N environment time series data, based on a preset decomposition method, the time series data is decomposed into trend item time series data, seasonal item time series data and residual item time series data;
[0078] According to M trend item operation series data, M season item operation series data, M residual item operation series data, N trend item environment series data, N season item environment series data and N residual item environment series data, M predicted operation data and N predicted environment data are determined.
[0079] Specifically, for multiple runtime time series data and multiple environment time series data, according to different data types, they can be divided into continuous data and discrete data. Continuous data refers to data that can take any value within a certain range. Discrete data refers to data that can only take a limited number or fixed values.
[0080] For example, in the embodiment of the present application, the braking system status, air conditioning system status, road type and terrain conditions are all discrete data, while the vehicle speed, fuel volume, acceleration, etc. are continuous data.
[0081] Based on this, the cloud platform can determine M continuous runtime series data from multiple runtime series data, and determine N continuous environment series data from multiple environment series data.
[0082] Among the multiple operating data in the embodiment of the present application, the continuous data include engine speed, vehicle speed, fuel quantity, coolant temperature, intake temperature, exhaust temperature, fuel pressure, fuel temperature, battery voltage, engine load, throttle opening, turbocharger pressure, air flow, fuel flow, ignition advance, tire pressure, steering angle, acceleration, vehicle position, mileage, fuel consumption, etc. Therefore, the continuous time series data in the multiple operating time series data include the time series data corresponding to the above multiple operating data respectively.
[0083] Assume that each of the multiple time series data is obtained by acquiring data at n acquisition moments. Then, among the M operation time series data, each operation time series data includes the operation data at n acquisition moments. For example, the vehicle speed operation time series data includes the vehicle speed at n consecutive acquisition moments.
[0084] After obtaining M runtime time series data and N environmental time series data, for any one of the time series data, the cloud platform can decompose the time series data according to a preset decomposition method to obtain trend item time series data, seasonal item time series data and residual item time series data.
[0085] Optionally, the preset decomposition method is specifically seasonal and trend decomposition using local weighted regression (Seasonal and Trend decomposition using Loess, STL).
[0086] STL is a data decomposition method in time series analysis, which is mainly used to decompose time series data into trend term (Trend), seasonal term (Seasonal) and residual term (Residual).
[0087] Among them, the trend term is used to reflect the long-term change direction of the data; the seasonal term is used to reflect the cyclical fluctuations of the data; the residual term is used to reflect the random fluctuations in the data after removing the trend term and the seasonal term. Loess is a nonparametric regression method used to extract trends and seasonal patterns from smoothed data.
[0088] STL decomposition specifically includes three steps: seasonal decomposition, trend decomposition, and residual component. First, the Loess smoothing technique is applied to the original time series data, and a local linear regression model is fitted at each time point to obtain the seasonal term time series data. After obtaining the seasonal term time series data, the seasonal term time series data is subtracted from the original time series data to obtain the residual sequence without the seasonal term. The Loess smoothing technique is applied again to estimate the trend term time series data. Finally, the seasonal term time series data and the trend term time series data are subtracted from the original time series data to obtain the residual term time series data.
[0089] There is a relationship between the seasonal term time series data, the trend term time series data and the residual term time series data as shown in the following formula (1):
[0090] Y t =T t +S t +R t Formula (1)
[0091] Wherein, in formula (1):
[0092] Y t : The value of the time series data at time t;
[0093] T t : The trend item corresponding to time t;
[0094] S t : seasonal term corresponding to time t;
[0095] R t : The residual term corresponding to time t.
[0096] The trend item data at multiple moments constitute the trend item time series data of the time series data; the season item data at multiple moments constitute the season item time series data of the time series data; the residual item data at multiple moments constitute the residual item time series data.
[0097] That is to say, after performing STL decomposition on each time series data, we can get a trend item time series data, a season item time series data and a residual item time series data. For example, assuming that the time series data is vehicle speed time series data, the corresponding trend item time series data can be expressed as: {V Tt1 、V Tt2 、V Tt3 、V Tt4 , ……V Ttn}; The corresponding seasonal time series data can be expressed as: {V St1 、V St2 、V St3 、V St4 , ……V Stn}; The corresponding residual term time series data can be expressed as: {V Rt1 、V Rt2 、V Rt3 、V Rt4 , ……V Rtn}.
[0098] From then on, the cloud platform can obtain M trend item runtime time series data, M season item runtime time series data, M residual item runtime time series data, N trend item runtime time series data, N season item runtime time series data and N residual item environmental time series data.
[0099] The cloud platform further obtains M predicted operation data corresponding to M operation series data and N predicted environment data corresponding to N environment operation series data based on the seasonal time series data, trend time series data and residual time series data obtained by the above decomposition. In other words, the prediction process in the embodiment of the present application is only for continuous data.
[0100] In a possible implementation, M forecast operation data and N forecast environment data are determined according to M trend item operation series data, M season item operation series data, M residual item operation series data, N trend item environment series data, N season item environment series data and N residual item environment series data, including:
[0101] Determine a trend item time series data sequence according to the M trend item running time series data and the N trend item environment time series data;
[0102] Input the trend item time series data sequence into the trend item data prediction model, encode the trend item time series data sequence through the trend item data prediction model, and obtain the trend item time series data vector of the trend item time series data sequence; decode the trend item time series data vector to obtain M+N predicted trend item data at the current moment;
[0103] Determine a residual time series data sequence according to the M residual item running time series data and the N residual item environment time series data;
[0104] The residual time series data sequence is input into the residual item data prediction model, and the residual time series data sequence is processed by the encoder in the residual item data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain the encoder output; the encoder output is processed by the decoder of the residual item data prediction model based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain the decoder output; the decoder output is processed by the fully connected layer in the residual item data prediction model to obtain M+N predicted residual item data at the current moment;
[0105] According to M+N forecast trend item data, M+N forecast residual item data, M seasonal item operation time series data and N seasonal item environment time series data, M forecast operation data and N forecast environment data are determined.
[0106] For the three types of data obtained by decomposition, the cloud platform can implement different processing procedures. The following introduces the data processing process separately according to the different data.
[0107] Part 1: The processing process of trend item time series data.
[0108] Specifically, for all trend item time series data, namely, M trend item runtime time series data and N trend item environment time series data, the cloud platform can combine the M trend item runtime time series data and the N trend item environment time series data to obtain a trend item time series data set (trend item time series data sequence).
[0109] For example, it is assumed that the M trend item operation time series data are the vehicle speed trend item time series data and the acceleration trend item time series data, which are respectively recorded as “{V Tt1 、V Tt2 、V Tt3 、V Tt4 , ……V Ttn} and {a Tt1 、a Tt2 、a Tt3 、a Tt4 , ...a TtnThe N trend item environmental time series data are the environmental temperature trend item time series data and the humidity trend item time series data, respectively recorded as “{T Tt1 , T Tt2 , T Tt3 , T Tt4 ,……T Ttn} and {R Tt1 , R Tt2 , R Tt3 , R Tt4 ,……R Ttn}". Then the obtained trend item time series data set can be expressed as: {V Tt1 、V Tt2 、V Tt3 、V Tt4 , ……V Ttn 、a Tt1 、a Tt2 、a Tt3 、a Tt4 , ...a Ttn , T Tt1 , T Tt2 , T Tt3 , T Tt4 ,……T Ttn , R Tt1 , R Tt2 , R Tt3 , R Tt4 ,……R Ttn}, that is, the trend item time series data sequence in the embodiment of the present application.
[0110] Further, in an embodiment of the present application, the cloud platform can predict the trend item time series data based on the above-mentioned trend item time series data sequence to obtain M+N predicted trend item data at the current moment.
[0111] When predicting the trend item time series data, the cloud platform can input the trend item time series data sequence obtained above into the trend item data prediction model, process the trend item time series data sequence through the trend item data prediction model, and obtain M+N predicted trend item data.
[0112] Optionally, the trend item data prediction model may be a Long Short-Term Memory (LSTM) model.
[0113] Specifically, when the trend item time series data sequence is input into the trend item data prediction model, the trend item data prediction model can first encode the trend item time series data sequence based on the gating mechanism of the model itself to obtain the feature vector of the trend item time series data sequence, that is, the trend item time series data vector. Then the trend item time series data vector is input into the fully connected layer of the LSTM model for decoding to obtain M+N predicted trend item data.
[0114] When the above trend item time series data sequence is input into the LSTM model, based on the basic principle of the LSTM model, the LSTM model contains multiple time steps. The cloud platform can divide the above trend item time series data sequence into input data of each of the multiple time steps according to time.
[0115] Specifically, in combination with the above example, the trend item time series data sequence {V Tt1 、V Tt2 、V Tt3 、V Tt4 , ……V Ttn 、a Tt1 、a Tt2 、a Tt3 、a Tt4 , ...a Ttn , T Tt1 , T Tt2 , T Tt3 , T Tt4 ,……T Ttn , R Tt1 , R Tt2 , R Tt3 , R Tt4 ,……R Ttn} corresponds to n moments. Therefore, by dividing, we can get n vectors corresponding to n time steps. The n vectors are represented as: {V Tt1 、a Tt1 , T Tt1 , R Tt1}、{V Tt2 、a Tt2 , T Tt2 , R Tt2}、{V Tt3 、a Tt3 , T Tt3 , R Tt3}……and {V Ttn 、a Ttn , T Ttn , R Ttn}. Each vector is the input of a time step in the LSTM model, and the number of time steps is determined according to actual needs.
[0116] The above n vectors are input into the LSTM model respectively. Since the LSTM model processes multiple different types of data at each time step during the training process, the LSTM model can not only learn the changing trend of each type of data itself, but also learn the interaction and mutual influence between various parameters through processing multiple time steps during the training process.
[0117] Through each training, the LSTM model will adjust the internal parameters of the model through the gap between the predicted value and the actual value (i.e., the loss function) until the loss function is less than a certain value. In this case, it is considered that the LSTM model has accurately learned the changing trends of each of the above data, as well as the interactions and mutual influences between various parameters, and can accurately predict future trend item data.
[0118] The following describes the training process of the LSTM model.
[0119] In a possible implementation, the training process of the trend item data prediction model includes:
[0120] Inputting the sample trend item time series data sequence into the trend item data prediction model, encoding the sample trend item time series data sequence based on the gating mechanism through the trend item data prediction model, and obtaining the sample trend item time series data vector of the sample trend item time series data sequence;
[0121] Decode the sample trend item time series data vector to obtain M+N sample prediction trend item data;
[0122] Based on the difference information between the M+N sample predicted trend item data and the M+N labeled trend item data corresponding to the sample trend item time series data sequence, the trend item data prediction model is trained.
[0123] The LSTM model includes multiple cells, each of which includes multiple gating units, and one gating unit corresponds to a gating operation. Therefore, each cell can be regarded as a set of gating operations. For example, multiple gating units include input gates, forget gates, and output gates, where the input gate is used to control the degree to which the input parameters received by each gating unit flow into the cell state, the forget gate is used to control which part of the input parameters should be forgotten or discarded from the cell state, and the output gate is used to control which information in the cell state should be used to form the output of the current time step and passed to the next time step.
[0124] Next, pass Figure 4 The basic principles of the LSTM model in the embodiments of the present application are introduced.
[0125] Figure 4 This is a schematic diagram of an LSTM model encoding provided in an embodiment of the present application.
[0126] For example, Figure 4 The figure shows the data processing flow of an LSTM unit (i.e., a cell) of the LSTM model. An LSTM unit is also a repeating module of the LSTM model. Each time step corresponds to an LSTM unit, and multiple LSTM units constitute the LSTM layer of the LSTM model.
[0127] Depend on Figure 4 It can be seen that each LSTM unit includes a forget gate, an input gate and an output gate, which are the multiple gate control units described above.
[0128] The main task of the forget gate is to receive the previous cell state C transmitted by the previous LSTM unit. t-1 , and decide to keep and forget C t-1 The above process is through the sigmoid layer of the forget gate (i.e. Figure 4 This is done by looking at the forget gate σ in h t-1 (the hidden features of the previous LSTM unit) and x t (the data of the current LSTM unit) to output a vector between 0 and 1. The vector takes values 0-1 to represent the previous cell state C t-1 Which information needs to be retained. Among them, 0 means none of them are retained, and 1 means all of them are retained. The processing process of the forget gate can be specifically expressed by the following formula (2):
[0129] f t =σ(W f ·[h t-1 , x t ]+b f ) Formula (2)
[0130] The next step is to decide what to give to the previous cell state C t-1 What new information is added? First, use h t-1 and x t The sigmoid layer through an input gate determines which information i is updated t , and then use h t-1 and x t A new candidate cell state C't is obtained through a tanh layer of an input gate, which can be specifically expressed by the following formulas (3)-(4).
[0131] i t =σ(W t ·[h t-1 , x t ]+b i ) Formula (3)
[0132] C' t =tanh(W c ·[h t-1 , x t ]+b C ) Formula (4)
[0133] Then update the previous cell state C t-1 , and get the new cell state Ct The updating step is to choose to forget the previous cell state C through the forget gate t-1 Which part of the candidate cell state C't is selected by the input gate to obtain the new cell state C t , which is the cell state of the current LSTM unit. The update operation can be specifically expressed by the following formula (5).
[0134] C t =f t *C t-1 +i t *C' t Formula (5)
[0135] After updating the cell state, you need to t-1 and x t Determine the cell state C t The features can be obtained through the sigmoid layer of the output gate, and then the cell state C t After the tanh layer of the output gate, a vector is obtained. The vector is multiplied by the judgment condition obtained by the output gate to obtain the final output result, that is, the hidden feature. The above process can be specifically expressed by the following formulas (6)-(7).
[0136] o t =σ(W o [h t-1 , x t ]+b o ) Formula (6)
[0137] h t =o t *tanh(C t ) Formula (7)
[0138] Based on the above principles, when multiple vectors are input into the trend item data prediction model, the LSTM model can perform a set of gating operations on each vector.
[0139] During the training process, the embodiment of the present application can use the sample trend item time series data sequence as the input sample data of the trend item data prediction model, and use the multiple labeled trend item data corresponding to the sample trend item time series data sequence as the output sample data, so that the LSTM model attempts to learn the preset mapping relationship between the input sample data and the output sample data.
[0140] In any round of training, the loss value of this round of training is determined based on the difference information between the M+N sample prediction trend item data and the M+N labeled trend item data corresponding to the sample trend item time series data sequence. The gradient descent method uses the loss value of this round of training to perform back propagation in the trend item data prediction model to adjust the parameters of the cells in the trend item data prediction model to complete this round of training.
[0141] Exemplarily, during the LSTM model training process, each trend item time series data in the sample trend item time series data sequence is input into each LSTM unit in chronological order. Each LSTM unit processes a sample trend item time series data through a corresponding gating mechanism. During the processing of each LSTM unit, LSTM will decide which important information in the sample trend item time series data in the current time step needs to be retained and which unimportant information is discarded according to the decision of the input gate and the forget gate, and update the cell state accordingly. As the time step passes, the cell state of each LSTM unit can gradually accumulate over time to obtain important information in the sample trend item time series data sequence. Since the cell state in the LSTM model can transmit important information of the input sample data across multiple time steps, the LSTM model can learn all important information from the beginning of the sequence to the current time step, that is, the long-term dependency between the input sequence data. In addition, the input gate of the LSTM unit can also enable the LSTM model to capture short-term changes in the data in the sequence by filtering the input data of the current time step, and respond to the rapid fluctuations of the captured data through the output gate to achieve the capture of short-term changes.
[0142] Based on the long-term and short-term effects learned during each training process, the LSTM model can use the latent features of the last time step as the feature vector of the LSTM model, that is, the sample trend item time series data vector, during each training. This process can be regarded as the "encoding process of the trend item data prediction model."
[0143] After obtaining the sample trend item time series data vector, the LSTM model outputs the latent features to the fully connected layer. The fully connected layer includes a set of weight matrices and bias vectors. The weight matrix is used to convert the latent features into vectors of different dimensions. The fully connected layer multiplies the latent feature vector with the weight matrix and adds the bias vector to obtain the output vector. Finally, the output vector is passed through an activation function to obtain the final output, that is, M sample prediction trend item data. This process can be regarded as the "decoding process of the trend item data prediction model."
[0144] In any round of training, the cloud platform calculates the difference between M+N sample prediction trend item data and M+N labeled trend item data through the loss function. When the loss value corresponding to the loss function is detected to be less than or equal to a certain value, it means that the trend item data prediction model training is completed.
[0145] When the model training is successful, the cloud platform can input the aforementioned multiple vectors into the trend item data prediction model, perform the above encoding and corresponding decoding process, and obtain M+N predicted trend item data, which are recorded as “{V Ttn+1-p 、a Ttn+1-p , T Ttn+1-p , R Ttn+1-p}".
[0146] Therefore, through the above process, the cloud platform can obtain M+N predicted trend item data by predicting M runtime time series data and N environment time series data.
[0147] Part 2: The processing of residual data.
[0148] Specifically, for all residual item time series data, namely, M residual item runtime time series data and N residual item environment time series data, the cloud platform can combine the M residual item runtime time series data and the N residual item environment time series data to obtain a residual item time series data set (residual item time series data sequence).
[0149] For example, it is assumed that the M residual items are the time series data of the vehicle speed residual item and the time series data of the acceleration residual item, which are respectively recorded as “{V Rt1 、V Rt2 、V Rt3 、V Rt4 , ……V Rtn} and {a Rt1 、a Rt2 、a Rt3 、a Rt4 , ...a Rtn The N residual item environment time series data are the environment temperature residual item time series data and the humidity residual item time series data, respectively recorded as “{T Rt1 , T Rt2 , T Rt3 , T Rt4 ,……T Rtn} and {R Rt1 , R Rt2 , R Rt3 , R Rt4 ,……R Rtn}". Then the residual term time series data set can be expressed as: {V Rt1 、V Rt2 、V Rt3 、VRt4 , ……V Rtn 、a Rt1 、a Rt2 、a Rt3 、a Rt4 , ...a Rtn , T Rt1 , T Rt2 , T Rt3 , T Rt4 ,……T Rtn , R Rt1 , R Rt2 , R Rt3 , R Rt4 ,……R Rtn}, that is, the residual term time series data sequence in the embodiment of the present application.
[0150] Furthermore, the cloud platform can predict the residual item time series data based on the above residual item time series data sequence to obtain M+N predicted residual item data at the current moment.
[0151] When predicting the residual item time series data, the cloud platform can input the residual item time series data sequence obtained above into the residual item data prediction model, process the residual item time series data sequence through the residual item data prediction model, and obtain M+N predicted residual item data.
[0152] Optionally, the residual item data prediction model is an Informer model, including an encoder and a decoder.
[0153] Specifically, the residual item data prediction model includes three stages when processing the residual item time series data sequence. The encoder encodes the residual time series data sequence to obtain the encoder output; the encoder output is used as the input of the decoder and decoded by the decoder to obtain the decoder output; finally, the decoder output is linearly combined and activated by the fully connected layer to obtain M+N predicted residual item data.
[0154] The following first introduces the training process of the residual data prediction model.
[0155] In one possible implementation, the training process of the residual data prediction model includes:
[0156] Inputting the sample residual time series data sequence into the residual term data prediction model, processing the sample residual time series data sequence through the encoder in the residual term data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain a sample encoder output;
[0157] The decoder of the residual data prediction model processes the sample encoder output based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain the sample decoder output;
[0158] The sample decoder output is processed through the fully connected layer in the residual item data prediction model to obtain M+N sample prediction residual item data;
[0159] Based on the difference information between the M+N sample prediction residual item data and the M+N labeled residual item data corresponding to the sample residual item time series data sequence, the residual item data prediction model is trained.
[0160] The Informer model mainly uses the probabilistic attention mechanism to predict long sequence data. The sample residual time series data sequence is input into the encoder, and after the superposition of at least one multi-head probabilistic sparse self-attention structure and self-attention extraction operation, the sample residual time series data sequence is processed to obtain the encoder output, which is the data feature extracted by the encoder.
[0161] In the Informer model, the sample prediction residual data sequence can be divided into multiple vectors corresponding to multiple time steps according to time. Then, the Informer model embeds and position-encodes the vector of each time step, maps the vector to a high-dimensional space, obtains the embedding vector of the vector, and then position-encodes the embedding vector to obtain an embedding vector with position information. This step ensures that the Informer model can distinguish different positions in the sample sequence.
[0162] Furthermore, the encoder in the Informer model receives a sequence of position-encoded embedding vectors as input, and the self-attention layer in the encoder calculates the query vector, key vector, and value vector for each position-encoded embedding vector. Specifically, each position-encoded embedding vector is linearly transformed through three different fully connected layers to generate the query vector, key vector, and value vector of the position-encoded embedding vector.
[0163] The Informer model uses multi-head probabilistic sparse self-attention. Instead of calculating all key vectors and value vectors, it randomly selects a portion of positions from the sequence of key vectors and value vectors as sampling points through probability distribution. Global attention calculation is performed on the sampling points, that is, the dot product between all query vectors and the key vector of the sampling point is calculated, and the attention weight matrix is determined by the softmax function. The attention weight matrix then performs weighted summation on the value vector to obtain the context vector.
[0164] Since the Informer model uses multi-head attention, the self-attention layer is usually designed in a multi-head form. The above process of obtaining the context vector will be executed independently in multiple parallel attention heads, and each attention head will obtain the corresponding context vector.
[0165] At the final output stage of the encoder, the context vectors obtained by each attention head are concatenated together to obtain a multi-dimensional vector that contains the information learned by all attention heads.
[0166] The concatenated multidimensional vector undergoes a linear transformation to obtain the sample encoder output.
[0167] The sample encoder output will be used as the input of the decoder in the Informer model. The decoder processes the sample encoder output through the above-mentioned masked multi-head probabilistic sparse self-attention mechanism, and takes into account the decoder's own input (i.e., the generated partial sequence). After a series of attention calculations and residual connections, as well as possible feedforward network layers and layer normalization steps, the decoder will generate its own output sequence, i.e., the sample decoder output. The sample decoder output is converted into the actual prediction value through a linear layer (fully connected layer) and a softmax operation, i.e., the M+N sample prediction residual item data in the embodiment of the present application.
[0168] During the training process, the loss function of the Informer model is determined by calculating the difference information between the M+N sample prediction residual item data and the M+N labeled residual item data corresponding to the sample residual item time series data sequence, and backpropagation is performed based on the loss function. The model parameters are updated using the optimizer until the loss function of the Informer model is less than a certain value, and the model training is successful.
[0169] After the model is successfully trained, in the actual application process, the residual time series data sequence is input into the Informer model, and processed by the encoder and decoder respectively to obtain M+N prediction residual item data, which are recorded as "{V Rtn+1-p 、a Rtn+1-p , T Rtn+1-p , R Rtn+1-p}".
[0170] Therefore, through the above process, the cloud platform can obtain M residual item operation data and N residual item environment time series data through prediction, and obtain M+N predicted residual item data.
[0171] Seasonal time series data are usually considered to be cyclical and therefore no prediction is performed.
[0172] After obtaining the M+N forecast trend item data and M+N forecast residual item data at the current moment, due to the STL decomposition process, the data at a certain moment is equal to the sum of the trend item data, residual item data and seasonal item data at that moment. The seasonal item data is considered to be cyclical, so the seasonal item operation data and seasonal item environmental data at the current moment can be determined based on the M seasonal item operation sequence data and N seasonal item environmental data. Combined with the above data examples, the seasonal item operation data at the current moment can be recorded as "{V Stn+1-p 、a Stn+1-p}”, the seasonal environmental data at the current moment can be recorded as “{T Stn+1-p , R Stn+1-p}".
[0173] The M+N predicted trend items at the current moment obtained by the above prediction are: Ttn+1 、a Ttn+1 , T Ttn+1 , R Ttn+1}, M+N prediction residual data {V Rtn+1-p 、a Rtn+1-p , T Rtn+1-p , R Rtn+1-p By adding the values of the forecast season item, forecast trend item and forecast residual item of the same data, the forecast value of the data at the current moment can be obtained, thereby obtaining M forecast operation data and N forecast environment data at the current moment.
[0174] For example, V Stn+1-p 、V Ttn+1-p and V Rtn+1-p By summing, we can get the current speed V tn+1-p (p means prediction); a Stn+1 、a Ttn+1 and a Rtn+1 By summing, we can get the acceleration a at the current moment. tn+1-p ; T Stn+1 , T Ttn+1 and T Rtn+1 By summing, we can get the current ambient temperature T tn+1-p ; R Stn+1 , R Ttn+1 and R Rtn+1 By summing, we can get the humidity R at the current moment. tn+1-p Among them, V tn+1-p and a tn+1-p It constitutes M prediction operation data, T tn+1-p and R tn+1-p Constitutes N predicted environmental data.
[0175] Therefore, through the above process, the cloud platform can obtain M predicted operation data and N predicted environment data at the current moment.
[0176] 303 , determining whether the vehicle control function is abnormal at the current moment based on a plurality of predicted operation data, a plurality of predicted environment data, a plurality of time series data, and a plurality of actual operation data and a plurality of actual environment data at the current moment.
[0177] After obtaining M predicted operation data and N predicted environment data through step 302, in the embodiment of the present application, when judging whether the vehicle control function is abnormal, the cloud platform can specifically compare the multiple predicted operation data and multiple predicted environment data at the current moment with the multiple actual operation data and multiple actual environment data at the current moment to judge the degree of difference between the actual operation data and the predicted operation data of the vehicle at the current moment, as well as the degree of difference between the actual environment data and the predicted environment data at the current moment when the vehicle is executing the vehicle control function, so as to judge whether the vehicle control function is abnormal during operation.
[0178] Specifically, when determining whether the vehicle control function is abnormal, the cloud platform has previously obtained multiple time series data during the historical driving process, namely multiple operation time series data and multiple environmental time series data. These data are actually the actual operation data and actual environmental data during the historical driving process. In addition, since the data prediction process is also ongoing, the cloud platform can also obtain the prediction data corresponding to multiple time series data, and evaluate whether the vehicle control function is abnormal based on the prediction data and actual data at multiple consecutive moments.
[0179] In a possible implementation, before determining whether the vehicle control function is abnormal at the current moment according to the plurality of predicted operation data, the plurality of predicted environment data, the plurality of time series data, and the plurality of actual operation data and the plurality of actual environment data at the current moment, the method includes:
[0180] Obtain M historical prediction operation time series data and N historical prediction environment time series data corresponding to the multiple time series data;
[0181] And, determining whether the vehicle control function is abnormal at the current moment according to the plurality of predicted operation data, the plurality of predicted environment data, the plurality of time series data, and the plurality of actual operation data and the plurality of actual environment data at the current moment, including:
[0182] Determine M prediction operation time series data according to M historical prediction operation time series data and M prediction operation data, and determine N prediction environment time series data according to N historical prediction environment time series data and N prediction environment data;
[0183] Determine M actual operation sequence data according to the plurality of actual operation data and the M operation sequence data, and determine N actual environment sequence data according to the plurality of actual environment data and the N environment sequence data;
[0184] Determine M first difference values according to the M predicted running time series data and the M actual running time series data;
[0185] Determine N second difference values according to the N predicted environment time series data and the N actual environment time series data;
[0186] Determine P pieces of running time series data according to a plurality of running time series data and a plurality of actual running time series data, and determine Q pieces of environment time series data according to a plurality of environment time series data and a plurality of actual environment data, wherein the P pieces of running time series data and the Q pieces of environment time series data are both discrete data, and P and Q are both positive integers;
[0187] Whether the vehicle control function is abnormal is determined based on the M first differences, the N second differences, the P operating time series data, and the Q environmental time series data.
[0188] Since only continuous data is predicted in the embodiment of the present application, the cloud platform can determine M predicted running time series data after obtaining M historical predicted running time series data and M predicted running data. Similarly, the cloud platform can determine N predicted environment time series data based on N historical predicted environment time series data and N predicted environment data.
[0189] Exemplarily, in combination with the above examples, the M predicted operation data in the embodiment of the present application are "{V tn+1-p 、a tn+1-p}”, N predicted environmental data are {T tn+1-p , R tn+1-p}. Assume that the M historical forecasting runtime data obtained are “{V t1-p 、V t2-p 、V t3-p 、V t4-p , ……V tn-p} and {a t1-p 、a t2-p 、a t3-p 、a t4-p , ...a tn-p}". N historical prediction environment time series data are "{T t1-p , T t2-p , T t3-p , T t4-p ,……T tn-p}, and {R t1-p , R t2-p , R t3-p , R t4-p ,……R tn-p}".
[0190] Furthermore, the cloud platform can determine M predicted operation time series data from M predicted operation data and M historical predicted operation time series data according to different operation data. The M predicted operation time series data correspond to n+1 moments. For example, the M predicted operation time series data include “{V t1-p 、V t2-p 、V t3-p 、V t4-p , ……V tn-p 、V tn+1-p} and {a t1-p 、a t2-p 、a t3-p 、a t4-p , ...a tn-p 、a tn+1-p}". The N prediction environment time series data include "{T t1-p , T t2-p , T t3-p , T t4-p ,……T tn-p , T tn+1-p} and {R t1-p , R t2-p , R t3-p , R t4-p ,……R tn-p , R tn+1-p}".
[0191] In addition, the cloud platform can determine M actual operation data at the current moment from the multiple actual operation data obtained at the current moment, and can determine M actual operation time series data by combining with M historical operation time series data. Similarly, the cloud platform can determine N actual environment data at the current moment from the multiple actual environment data obtained at the current moment, and can determine N actual environment time series data by combining with N historical environment time series data.
[0192] For example, the M running time series data are {V t1 、V t2 、V t3 、V t4 , ……V tn} and {a t1 、a t2 、a t3 、a t4 、a tn}, and record the corresponding M actual operation data as “V tn+1 and a tn+1 ”, the cloud platform can determine M actual running time data as “{V t1 、V t2 、V t3 、Vt4 , ……V tn 、V tn+1} and {a t1 、a t2 、a t3 、a t4 、a tn 、a tn+1}".
[0193] The time series data of N environments are {T t1 , T t2 , T t3 , T t4 ,……,T tn} and {R t1 , R t2 , R t3 , R t4 ,……R tn}, and record the corresponding N actual environment data as “T tn+1 and R tn+1 ”, the cloud platform can determine N actual environment time series data as “{T t1 , T t2 , T t3 , T t4 ,……,T tn , T tn+1} and {R t1 , R t2 , R t3 , R t4 ,……R tn , R tn+1}".
[0194] Furthermore, the cloud platform can calculate the difference between the predicted value and the actual value of each operation data one by one based on the M predicted operation time series data and the M actual operation time series data to obtain M first differences, and calculate the difference between the predicted value and the actual value of each environment data one by one based on the N predicted environment time series data and the N actual environment time series data to obtain N second differences.
[0195] It should be understood that the environmental data and operating data collected by the cloud platform, in addition to the aforementioned M continuous operating time series data and N continuous environmental time series data, may also include discrete operating time series data and discrete environmental time series data. Discrete data in the embodiment of the present application refers to data of types such as state class and road type. These data may also affect the operation of the vehicle control function. For example, assume that the vehicle control function is an air conditioning control system. If the user feels that the in-car environment is too high and needs to adjust the in-car temperature through the air conditioner, the user can turn on the air conditioner through the control operation and adjust the target temperature so that the air conditioning control system controls the temperature of the air conditioner to run to the target temperature. If the window state is open during the process of the air conditioning control system controlling the air conditioning. In this case, the temperature in the car may not reach the target temperature for a long time, resulting in a large difference between the actual temperature and the target temperature, and the user will mistakenly believe that the air conditioning control system is abnormal.
[0196] Therefore, taking the above situation into consideration, when the cloud platform determines whether the vehicle control function is abnormal, in addition to combining actual operation data, actual environmental data, predicted operation data and predicted environmental data, it also needs to take into account the impact of discrete data on the vehicle control function.
[0197] When determining whether the vehicle control function is abnormal, the cloud platform can determine P operation time series data from multiple operation time series data and multiple actual operation data, and determine Q environmental time series data from multiple environmental time series data and multiple actual environmental data. The P operation time series data and the Q environmental time series data are both discrete data.
[0198] For example, it is assumed that the discrete time series data in the plurality of operation time series data include the braking system state time series data and the air conditioning system state time series data, which are recorded as “{E t1 、E t2 、E t3 、E t4 ……、E tn} and {A t1 , A t2 , A t3 , A t4 ……、A tn Correspondingly, the discrete data in the multiple actual operation data also include the braking system status data and the air conditioning system status data, which are recorded as “{E tn+1} and {A tn+1 The discrete time series data in the multiple environmental time series data include road type time series data, which is recorded as “{L t1 , L t2 , L t3 , L t4 ……、L tnCorrespondingly, the discrete data in the multiple actual environment data also include road type data, which is recorded as “{L tn+1}".
[0199] Cloud platform according to {E t1 、E t2 、E t3 、E t4 ……、E tn} and {E tn+1}, and {A t1 , A t2 , A t3 , A t4 ……、A tn} and {A tn+1}, determine the P running time data as "{E t1 、E t2 、E t3 、E t4 ……、E tn 、E tn+1}" and "{A t1 , A t2 , A t3 , A t4 ……、A tn , A tn+1}". The cloud platform is based on {L t1 , L t2 , L t3 , L t4 ……、L tn} and {L tn+1}, determine the Q environmental time series data as "{L t1 , L t2 , L t3 , L t4 ……、L tn , L tn+1}".
[0200] The cloud platform further determines whether the vehicle control function is abnormal based on the M first differences, the N second differences, the P operating time series data, and the Q environmental time series data.
[0201] In a possible implementation, determining whether the vehicle control function is abnormal according to the M first differences, the N second differences, the P operation time series data, and the Q environment time series data includes:
[0202] Inputting M first differences, N second differences, P operation time series data, and Q environment time series data into an anomaly detection model, and outputting an abnormal probability of the vehicle control function through the anomaly detection model;
[0203] When the abnormal probability is less than or equal to the preset probability, it is determined that the vehicle control function is normal;
[0204] When the abnormality probability is greater than the preset probability, it is determined that the vehicle control function is abnormal.
[0205] Specifically, the cloud platform can input M first differences, N second differences, P operation time series data, and Q environment time series data into the anomaly detection model, so that the anomaly detection model outputs the abnormal probability of the vehicle control function. When the abnormal probability is greater than the preset probability, it is determined that the vehicle control function is abnormal; when the abnormal probability is less than or equal to the preset probability, it is determined that the vehicle control function is normal. Among them, the preset probability can be a critical probability for distinguishing whether the vehicle control function is normal or abnormal.
[0206] Optionally, the type of the anomaly detection model can be an LSTM model, a convolutional neural network (CNN), a multilayer perceptron (MLP), a recurrent neural network (RNN) model, etc. The embodiment of the present application does not limit the type of the anomaly detection model.
[0207] The following first introduces the training process of the anomaly detection model.
[0208] In one possible implementation, the training process of the anomaly detection model includes:
[0209] Determine a sample input sequence of an anomaly detection model according to the M first sample differences, the N second sample differences, the P sample runtime time series data, and the Q sample environment time series data;
[0210] Input the sample input sequence into the anomaly detection model and output the sample anomaly probability;
[0211] The anomaly detection model is trained based on the difference information between the sample anomaly probability and the labeled probability corresponding to the sample input sequence.
[0212] Exemplarily, the anomaly detection model is taken as an LSTM model. When training the anomaly detection model, M first sample differences, N second sample differences, P sample operation time series data and Q sample environment time series data can be divided into multiple sample input vectors in the order of time, and each sample input vector includes the first sample difference, the second sample difference, the sample operation data and the sample environment data at a moment. Multiple sample input vectors constitute a sample input sequence, which is used as the input of the anomaly detection model. Specifically, in the order of time, each sample input vector is used as the input of a time step of the LSTM model, so that each time step in the LSTM model learns the association relationship between multiple first sample differences, multiple second sample differences, P sample operation time series data and Q sample environment time series data through the corresponding gating mechanism, and finally outputs a sample abnormality probability, that is, the sample probability of abnormal vehicle control function predicted by the anomaly detection model. In addition, when the LSTM model is trained, the labeled probability corresponding to the sample input sequence (that is, the actual abnormal probability of the vehicle control function) can also be obtained, and the difference between the labeled probability and the output sample abnormality probability is calculated to train the LSTM model.
[0213] During the LSTM model training process, the internal parameters of the model are continuously adjusted through back propagation. When the loss function of the LSTM model meets certain conditions, the LSTM model training is successful.
[0214] In the process of applying the anomaly detection model, M first differences, N second differences, P operation time series data and Q environment time series data are input into the anomaly detection model, and the model can output the anomaly probability. When the anomaly probability is greater than the preset probability, it means that the vehicle control function is abnormal; on the contrary, when the anomaly probability is less than or equal to the preset probability, it means that the vehicle control function is normal.
[0215] Therefore, through the above process, the cloud platform can complete the detection of the vehicle control function.
[0216] In addition, when the vehicle control function is abnormal, in order to facilitate users to repair and handle it in time, the cloud platform can further locate the source of the abnormality.
[0217] In a possible implementation, the method further includes:
[0218] In the case where it is determined that the vehicle control function is abnormal, determining whether the P operation time series data include first abnormal data, and / or whether the Q environment time series data include second abnormal data;
[0219] When the P pieces of operation time series data include the first abnormal data, determining that the abnormal source of the vehicle control function is the first abnormal data; and / or, when the Q pieces of environment time series data include the second abnormal data, determining that the abnormal source is the second abnormal data;
[0220] When the P pieces of running time series data do not include the first abnormal data, and the Q pieces of environment time series data do not include the second abnormal data, for any first difference among the M first differences, if the first difference is greater than a first threshold value corresponding to the first difference, it is determined that the source of the abnormality is the running data corresponding to the first difference; and / or,
[0221] When P runtime time series data do not include the first abnormal data and Q environmental time series data do not include the second abnormal data, for any second difference among the N second difference values, if the second difference value is greater than the second threshold value corresponding to the second difference value, it is determined that the source of the abnormality is the environmental data corresponding to the second difference value.
[0222] Specifically, when the vehicle control function is abnormal, since discrete data generally has fixed values, it is easy to locate and troubleshoot. Therefore, the cloud platform can first check the discrete data.
[0223] When checking discrete data, the cloud platform can first determine the P preset operating time series data corresponding to the P operating time series data when the vehicle control function is operating normally. The P preset operating time series data represent the P operating time series data when the vehicle control function is normal. Further, the P operating time series data are compared with the P preset operating time series data to determine whether there is a first abnormal data in the P operating time series data. When the P operating time series data include the first abnormal data, the first abnormal data is located as the source of the abnormality. Similarly, for the Q environmental time series data, it can also be determined in the above manner whether the Q environmental time series data include the second abnormal data. When included, the first abnormal data is determined as the source of the abnormality.
[0224] On the contrary, when the P running time series data do not include the first abnormal data, and the Q environment time series data do not include the second abnormal data, it means that there is no problem with the discrete data screening. In this case, the cloud platform can further screen the continuous data.
[0225] Specifically, for any first difference among the M first differences, the first difference is compared with the first threshold value corresponding to the first difference, and the first threshold value is the maximum difference between the actual value and the predicted value allowed at any time for the operating data corresponding to the first difference when the vehicle control function is running. When the first difference is greater than the first threshold value, the operating data corresponding to the first difference is determined as the source of the abnormality. Similarly, for any second difference among the N second differences, the second difference is compared with the second threshold value corresponding to the second difference, and the second threshold value is the maximum difference between the actual value and the predicted value allowed at any time for the environmental data corresponding to the second difference when the vehicle control function is running. When the second difference is greater than the second threshold value, the environmental data corresponding to the second difference is determined as the source of the abnormality.
[0226] After the source of the abnormality is determined, the cloud platform can generate target prompt information based on the source of the abnormality and send it to the vehicle or the user's terminal device to prompt the user to deal with the abnormality of the vehicle control function in a timely manner.
[0227] In the above technical solution, when the abnormality detection model determines that the vehicle control function is abnormal, the method of the present application can further determine the abnormal source of the vehicle control function. When determining the source of the abnormality, since the P operating time series data and the Q environmental time series data are all discrete data. For example, the P operating time series data can be the window status, the brake system status; the Q environmental time series data can be the road type. When the vehicle control function abnormality is detected, first consider whether it is caused by discrete data. The reason is that discrete data usually represents the state or configuration of the system, such as working mode, system enable / disable status, etc. The anomalies of these data often point directly to specific problems in the system, and their changes are usually discontinuous. Compared with continuous data, it is easier to identify and locate problems, and possible fault sources can be quickly screened out. Discrete data anomalies may have a greater impact on system safety and function. Therefore, the detection of discrete data anomalies is given a higher priority.
[0228] When checking discrete data, the present application first determines whether P operation time series data include the first abnormal data. If so, the abnormal source is directly determined to be the first abnormal data, and determines whether Q environmental time series data include the second abnormal data. If so, the abnormal source is directly determined to be the second abnormal data. On the contrary, when P operation time series data do not include the first abnormal data and Q environmental time series data do not include the second abnormal data, the M first differences between the predicted value and the true value of the continuous operation time series data and the N second differences between the predicted value and the true value of the continuous environmental time series data are considered. For any first difference among the M first differences, if the first difference is greater than the first threshold corresponding to the first difference, the operation data corresponding to the first difference is determined to be the abnormal source. Similarly, for any second difference among the N second differences, if the second difference is greater than the first threshold corresponding to the second difference, the environmental data corresponding to the second difference is determined to be the abnormal source. Thus, through the above process, when the vehicle control function is abnormal, the abnormal source of the vehicle control function can be accurately located, which is convenient for users to repair and handle.
[0229] In summary, the embodiment of the present application proposes a method for detecting a vehicle control function during vehicle operation, and the method can obtain multiple time series data of the vehicle during operation when the vehicle control function is turned on. Among them, the multiple time series data include multiple operation time series data and multiple environmental time series data. Multiple operation time series data specifically refer to the vehicle's own operation parameters at multiple consecutive moments during the execution of the vehicle control function. Operation parameters such as vehicle speed, acceleration, etc. Multiple environmental time series data specifically refer to the environmental parameters of the vehicle at multiple consecutive moments during the execution of the vehicle control function. Environmental parameters such as ambient temperature, wind speed, etc. Through multiple time series data, multiple predicted operation data and multiple predicted environmental data of the vehicle at the current moment are determined. The predicted data can be considered as the operation data and environmental data that the vehicle should reach at the current moment in theory when the vehicle executes the vehicle control function. Finally, based on multiple time series data, multiple predicted operation data and multiple predicted environmental data, it is determined whether the vehicle control function is abnormal at the current moment, and the abnormal condition of the vehicle control function can be quickly identified by comparing the deviation between the predicted data and the actual data in real time, and abnormal problems of the vehicle can be discovered in time.
[0230] For ease of understanding, the following Figure 5 The overall process of the embodiment of the present application is introduced.
[0231] Figure 5 It is a schematic diagram of another scenario for detecting vehicle control functions provided in an embodiment of the present application.
[0232] For example, Figure 5 As shown, the overall vehicle control function detection process is as follows:
[0233] The cloud platform first obtains multiple time series data, including multiple runtime data and multiple environment time series data. Further, the cloud platform determines M continuous runtime data from the multiple runtime data, and determines N continuous environment time series data from the multiple environment time series data.
[0234] STL decomposition is performed on M runtime time series data and N environmental time series data to obtain M trend item runtime time series data, M season item runtime time series data and M residual item runtime time series data, as well as N trend item environmental time series data, N season item environmental time series data and N residual item environmental time series data.
[0235] For the M trend item running time series data and the N trend item environment time series data, the LSTM model is used for prediction to obtain the M+N predicted trend item data at the current moment; for the M residual item running time series data and the N residual item environment time series data, the Informer model is used for prediction to obtain the M+N predicted residual item data at the current moment.
[0236] Through M+N forecast trend item data, M+N forecast residual item data, M seasonal item operation time series data and N seasonal item environment time series data, M forecast operation data and N forecast environment data are obtained.
[0237] Furthermore, the cloud platform can also obtain M historical prediction runtime time series data and N historical prediction environment time series data corresponding to multiple time series data, and obtain M prediction runtime time series data based on the M historical prediction runtime time series data and the M prediction runtime data at the current moment, and obtain N prediction environment time series data based on the N historical prediction environment time series data and the N prediction environment data.
[0238] The cloud platform also obtains M actual runtime sequence data based on multiple runtime sequence data and multiple actual runtime data at the current moment, and obtains N actual environment sequence data based on multiple environment sequence data and multiple actual environment data at the current moment.
[0239] M first difference values are obtained through M predicted operating time series data and M actual operating time series data, and N second difference values are obtained through N predicted environment time series data and N actual environment time series data.
[0240] In addition, the cloud platform can also determine P runtime sequence data based on multiple actual runtime data and multiple runtime sequence data, and determine Q environment sequence data based on multiple actual environment data and multiple environment sequence data.
[0241] P operation time series data, Q environment time series data, M first differences and N second differences are used as inputs of the anomaly detection model at the same time, so that the model outputs an abnormality probability, and determines whether the vehicle control function is abnormal based on the abnormality probability.
[0242] Figure 6 A schematic diagram of the structure of a device for detecting vehicle control functions provided in an embodiment of the present application.
[0243] For example, Figure 6 As shown, the device 600 includes:
[0244] A time series data acquisition module 601 is used to acquire a plurality of time series data in a historical operation process when the vehicle performs a vehicle control function, wherein the plurality of time series data includes a plurality of operation time series data and a plurality of environment time series data;
[0245] A data prediction module 602, configured to determine a plurality of predicted operating data and a plurality of predicted environmental data of the vehicle at a current moment according to the plurality of time series data;
[0246] The abnormality detection module 603 is used to determine whether the vehicle control function is abnormal at the current moment based on the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and the multiple actual environment data at the current moment.
[0247] In one possible implementation, the data prediction module 602 is specifically used to: determine M runtime series data from the multiple runtime series data, and determine N environmental time series data from the multiple environmental time series data, the M runtime series data and the N environmental time series data are both continuous data, and M and N are both positive integers; for any time series data among the M runtime series data and the N environmental time series data, based on a preset decomposition method, decompose the time series data into trend item time series data, seasonal item time series data and residual item time series data; determine M predicted runtime data and N predicted environmental data based on the M trend item runtime series data, the M seasonal item runtime series data, the M residual item runtime series data, the N trend item environmental time series data, the N seasonal item environmental time series data and the N residual item environmental time series data.
[0248] In one possible implementation, the data prediction module 602 is further used to: determine a trend item time series data sequence based on the M trend item running time series data and the N trend item environmental time series data; input the trend item time series data sequence into a trend item data prediction model, encode the trend item time series data sequence through the trend item data prediction model, and obtain a trend item time series data vector of the trend item time series data sequence; decode the trend item time series data vector to obtain M+N predicted trend item data at the current moment; determine a residual time series data sequence based on the M residual item running time series data and the N residual item environmental time series data; input the residual time series data sequence into the residual item data prediction model, and obtain the residual item data prediction model through the residual item data prediction model. The encoder in the prediction model processes the residual time series data sequence based on the superposition of at least one multi-head probabilistic sparse self-attention structure and the self-attention extraction operation to obtain the encoder output; the decoder of the residual item data prediction model processes the encoder output based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain the decoder output; the decoder output is processed by the fully connected layer in the residual item data prediction model to obtain the M+N predicted residual item data at the current moment; according to the M+N predicted trend item data, the M+N predicted residual item data, the M seasonal item operation series data and the N seasonal item environmental time series data, the M predicted operation data and the N predicted environmental data are determined.
[0249] In one possible implementation, the data prediction module 602 is also used to: input the sample trend item time series data sequence into the trend item data prediction model, and through the trend item data prediction model, encode the sample trend item time series data sequence based on the gating mechanism to obtain the sample trend item time series data vector of the sample trend item time series data sequence; decode the sample trend item time series data vector to obtain M+N sample predicted trend item data; and train the trend item data prediction model based on the difference information between the M+N sample predicted trend item data and the M+N labeled trend item data corresponding to the sample trend item time series data sequence.
[0250] In one possible implementation, the data prediction module 602 is also used to: input the sample residual time series data sequence into the residual item data prediction model, and process the sample residual time series data sequence through the encoder in the residual item data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain a sample encoder output; process the sample encoder output through the decoder of the residual item data prediction model based on a masked multi-head probabilistic sparse self-attention structure and a multi-head self-attention structure to obtain a sample decoder output; process the sample decoder output through the fully connected layer in the residual item data prediction model to obtain M+N sample predicted residual item data; and train the residual item data prediction model based on the difference information between the M+N sample predicted residual item data and the M+N labeled residual item data corresponding to the sample residual item time series data sequence.
[0251] Optionally, before determining whether the vehicle control function is abnormal at the current moment based on the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and the multiple actual environment data at the current moment, the device also includes: a predicted data acquisition module, used to acquire M historical predicted operation time series data and N historical predicted environment time series data corresponding to the multiple time series data; and the abnormality detection module 603 is specifically used to: determine M predicted operation time series data based on the M historical predicted operation time series data and the M predicted operation data, and, determine N predicted environment time series data based on the N historical predicted environment time series data and the N predicted environment data; determine M actual operation times based on the multiple actual operation data and the M operation time series data. sequence data, and, based on the multiple actual environment data and the N environment sequence data, determine N actual environment sequence data; based on the M predicted operation sequence data and the M actual operation sequence data, determine M first differences; based on the N predicted environment sequence data and the N actual environment sequence data, determine N second differences; based on the multiple operation sequence data and the multiple actual operation data, determine P operation sequence data, and, based on the multiple environment sequence data and the multiple actual environment data, determine Q environment sequence data, the P operation sequence data and the Q environment sequence data are both discrete data, and P and Q are both positive integers; based on the M first differences, the N second differences, the P operation sequence data and the Q environment sequence data, determine whether the vehicle control function is abnormal.
[0252] In one possible implementation, the anomaly detection module 603 is also used to: input the M first differences, the N second differences, the P operating time series data, and the Q environmental time series data into an anomaly detection model, and output the abnormal probability of the vehicle control function through the anomaly detection model; when the abnormal probability is less than or equal to a preset probability, determine that the vehicle control function is normal; when the abnormal probability is greater than the preset probability, determine that the vehicle control function is abnormal.
[0253] In one possible implementation, the anomaly detection module 603 is also used to: determine the sample input sequence of the anomaly detection model based on M first sample differences, N second sample differences, P sample runtime time series data and Q sample environment time series data; input the sample input sequence into the anomaly detection model and output the sample anomaly probability; and train the anomaly detection model based on the difference information between the sample anomaly probability and the labeled probability corresponding to the sample input sequence.
[0254] Optionally, the device also includes: an abnormal source determination module, which is used to determine whether the P operating time series data include the first abnormal data and / or whether the Q environmental time series data include the second abnormal data when it is determined that the vehicle control function is abnormal; when the P operating time series data include the first abnormal data, determine that the abnormal source of the vehicle control function is the first abnormal data; and / or, when the Q environmental time series data include the second abnormal data, determine that the abnormal source is the second abnormal data; when the P operating time series data do not include the first abnormal data and the Q environmental time series data do not include the second abnormal data, for any first difference among the M first difference values, if the first difference value is greater than the first threshold value corresponding to the first difference value, determine that the abnormal source is the operating data corresponding to the first difference value; and / or, when the P operating time series data do not include the first abnormal data and the Q environmental time series data do not include the second abnormal data, for any second difference among the N second difference values, if the second difference value is greater than the second threshold value corresponding to the second difference value, determine that the abnormal source is the environmental data corresponding to the second difference value.
[0255] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. It should be understood that the electronic device can be Figure 2 The cloud platform 201 shown may also be Figure 2 Any ECU in the vehicle 101.
[0256] For example, Figure 7 As shown, the electronic device 700 includes: a memory 701 and a processor 702, wherein the memory 701 stores an executable program code 7011, and the processor 702 is used to call and execute the executable program code 7011 to perform a method for detecting a vehicle control function.
[0257] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to perform a method for detecting a vehicle control function provided in an embodiment of the present application.
[0258] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0259] In the case of dividing each functional module according to each function, the device may also include a time series data acquisition module, a data prediction module, an anomaly detection module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0260] It should be understood that the device provided in this embodiment is used to execute the above-mentioned method for detecting a vehicle control function, and thus can achieve the same effect as the above-mentioned implementation method.
[0261] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to an electronic device, the processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device in executing relevant program codes, etc.
[0262] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0263] In addition, the device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a method for detecting vehicle control functions provided in the above embodiments.
[0264] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a method for detecting a vehicle control function provided in the above embodiment.
[0265] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement a method for detecting a vehicle control function provided in the above embodiment.
[0266] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0267] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0268] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0269] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting a vehicle control function, characterized in that: The method comprises: When the vehicle performs a vehicle control function, a plurality of time series data in a historical operation process is acquired, wherein the plurality of time series data includes a plurality of operation time series data and a plurality of environment time series data; Determining, based on the plurality of time series data, a plurality of predicted operating data and a plurality of predicted environmental data of the vehicle at a current moment; According to the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and multiple actual environment data at the current moment, it is determined whether the vehicle control function is abnormal at the current moment.
2. The method according to claim 1, characterized in that The step of determining a plurality of predicted operation data and a plurality of predicted environment data of the vehicle at a current moment according to the plurality of time series data comprises: Determine M runtime series data from the plurality of runtime series data, and determine N environment series data from the plurality of environment series data, wherein the M runtime series data and the N environment series data are both continuous data, and M and N are both positive integers; For any time series data among the M operation time series data and the N environment time series data, based on a preset decomposition method, decompose the time series data into trend item time series data, seasonal item time series data and residual item time series data; According to M trend item operation series data, M season item operation series data, M residual item operation series data, N trend item environment series data, N season item environment series data and N residual item environment series data, M predicted operation data and N predicted environment data are determined.
3. The method according to claim 2, characterized in that The method of determining M predicted operation data and N predicted environment data according to M trend item operation time series data, M season item operation time series data, M residual item operation time series data, N trend item environment time series data, N season item environment time series data and N residual item environment time series data includes: Determine a trend item time series data sequence according to the M trend item running time series data and the N trend item environment time series data; Inputting the trend item time series data sequence into a trend item data prediction model, encoding the trend item time series data sequence through the trend item data prediction model to obtain a trend item time series data vector of the trend item time series data sequence; decoding the trend item time series data vector to obtain M+N predicted trend item data at the current moment; Determine a residual time series data sequence according to the M residual item running time series data and the N residual item environment time series data; The residual time series data sequence is input into the residual item data prediction model, and the residual time series data sequence is processed by the encoder in the residual item data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain the encoder output; the encoder output is processed by the decoder of the residual item data prediction model based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain the decoder output; the decoder output is processed by the fully connected layer in the residual item data prediction model to obtain the M+N predicted residual item data at the current moment; The M predicted operation data and the N predicted environment data are determined based on the M+N predicted trend item data, the M+N predicted residual item data, the M seasonal item operation time series data and the N seasonal item environment time series data.
4. The method according to claim 3, characterized in that The training process of the trend item data prediction model includes: Inputting a sample trend item time series data sequence into the trend item data prediction model, encoding the sample trend item time series data sequence based on a gating mechanism through the trend item data prediction model, and obtaining a sample trend item time series data vector of the sample trend item time series data sequence; Decoding the sample trend item time series data vector to obtain M+N sample prediction trend item data; The trend item data prediction model is trained based on the difference information between the M+N sample predicted trend item data and the M+N labeled trend item data corresponding to the sample trend item time series data sequence.
5. The method according to claim 3, characterized in that: The training process of the residual term data prediction model includes: Inputting the sample residual time series data sequence into the residual term data prediction model, and processing the sample residual time series data sequence through the encoder in the residual term data prediction model based on at least one multi-head probabilistic sparse self-attention structure and the superposition of self-attention extraction operations to obtain a sample encoder output; Processing the sample encoder output by the decoder of the residual data prediction model based on the masked multi-head probabilistic sparse self-attention structure and the multi-head self-attention structure to obtain a sample decoder output; Processing the sample decoder output through the fully connected layer in the residual item data prediction model to obtain M+N sample prediction residual item data; The residual item data prediction model is trained based on the difference information between the M+N sample prediction residual item data and the M+N labeled residual item data corresponding to the sample residual item time series data sequence.
6. The method according to claim 2, characterized in that Before determining whether the vehicle control function is abnormal at the current moment based on the multiple predicted operation data, the multiple predicted environment data, the multiple time series data, and the multiple actual operation data and the multiple actual environment data at the current moment, the method further includes: Obtaining M historical prediction operation time series data and N historical prediction environment time series data corresponding to the multiple time series data; And, determining whether the vehicle control function is abnormal at the current moment according to the plurality of predicted operation data, the plurality of predicted environment data, the plurality of time series data, and the plurality of actual operation data and the plurality of actual environment data at the current moment includes: Determine M prediction operation time series data according to the M historical prediction operation time series data and the M prediction operation data, and determine N prediction environment time series data according to the N historical prediction environment time series data and the N prediction environment data; Determine M actual operation timing data according to the multiple actual operation data and the M operation timing data, and determine N actual environment timing data according to the multiple actual environment data and the N environment timing data; Determine M first difference values according to the M predicted running time series data and the M actual running time series data; Determine N second difference values according to the N predicted environment time series data and the N actual environment time series data; Determine P pieces of operation timing data according to the plurality of operation timing data and the plurality of actual operation data, and determine Q pieces of environment timing data according to the plurality of environment timing data and the plurality of actual environment data, wherein the P pieces of operation timing data and the Q pieces of environment timing data are both discrete data, and P and Q are both positive integers; Whether the vehicle control function is abnormal is determined according to the M first difference values, the N second difference values, the P operation time series data, and the Q environment time series data.
7. The method according to claim 6, characterized in that The determining whether the vehicle control function is abnormal according to the M first differences, the N second differences, the P operation time series data, and the Q environment time series data includes: Inputting the M first differences, the N second differences, the P operation time series data, and the Q environment time series data into an abnormality detection model, and outputting the abnormality probability of the vehicle control function through the abnormality detection model; When the abnormal probability is less than or equal to a preset probability, determining that the vehicle control function is normal; When the abnormal probability is greater than the preset probability, it is determined that the vehicle control function is abnormal.
8. The method according to claim 7, characterized in that The training process of the anomaly detection model includes: Determine a sample input sequence of the anomaly detection model according to the M first sample difference values, the N second sample difference values, the P sample runtime time series data, and the Q sample environment time series data; Inputting the sample input sequence into the anomaly detection model and outputting the sample anomaly probability; The anomaly detection model is trained based on the difference information between the sample anomaly probability and the labeling probability corresponding to the sample input sequence.
9. The method according to claim 8, characterized in that The method further comprises: In the case where it is determined that the vehicle control function is abnormal, determining whether the P operation time series data include first abnormal data, and / or whether the Q environmental time series data include second abnormal data; In a case where the P pieces of operating time series data include the first abnormal data, determining that the abnormal source of the vehicle control function is the first abnormal data; and / or, in a case where the Q pieces of environmental time series data include the second abnormal data, determining that the abnormal source is the second abnormal data; When the P running time series data do not include the first abnormal data, and the Q environment time series data do not include the second abnormal data, for any first difference among the M first differences, if the first difference is greater than a first threshold corresponding to the first difference, it is determined that the source of the abnormality is the running data corresponding to the first difference; and / or, When the P runtime time series data do not include the first abnormal data, and the Q environmental time series data do not include the second abnormal data, for any second difference among the N second difference values, if the second difference value is greater than the second threshold value corresponding to the second difference value, it is determined that the source of the abnormality is the environmental data corresponding to the second difference value.
10. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the method according to any one of claims 1 to 9.
