Intelligent diagnosis method and system for vehicle computer based on UDS standard
Through the intelligent vehicle-machine diagnosis method based on UDS standards, the chaotic random algorithm and machine learning algorithm are used to solve the problems of sensor data error and hacker attack risks in intelligent vehicle-machine diagnosis technology, and efficient sensor status monitoring and fault diagnosis are achieved to ensure that Vehicle security and privacy.
Patent Information
- Application Number
- CN202410942008.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-07-15
AI Technical Summary
The existing intelligent vehicle diagnostic technology relies on sensor detection data and is susceptible to environmental factors, resulting in reduced diagnostic accuracy and risk of being hacked. Sensor errors and faults cannot be detected in time, affecting vehicle safety.
Using the intelligent vehicle-machine diagnosis method based on UDS standards, the communication verification code is generated through chaotic random algorithms, and the sensor data inspection and wireless communication are realized. The fault diagnosis is carried out in combination with machine learning algorithms, which reduces the process of sensor data reading, transmission and storage. risk of hacking attacks.
It realizes comprehensive sensor status monitoring in a short period of time, reduces the computing power of the car computer, improves diagnosis accuracy, and protects the privacy of the car owners, and discovers sensor abnormalities and fault hazards.
Smart Images

Figure CN118884932B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle computer intelligent diagnosis, and in particular to a vehicle computer intelligent diagnosis method and system based on the UDS standard. Background Art
[0002] Intelligent vehicle diagnostic technology refers to the use of advanced sensors, data processing algorithms and communication technologies to monitor and analyze the status of the vehicle in real time, so as to achieve early detection, diagnosis and early warning of potential vehicle problems. The following is an introduction to some current intelligent vehicle diagnostic technologies and their shortcomings:
[0003] OBD (On_Board Diagnostics) system: The OBD system can read the vehicle's fault code and monitor the vehicle's performance parameters. Features: High popularity, can provide instant fault feedback. ADAS (Advanced Driver_Assistance Systems) monitors the vehicle's driving status through sensors such as cameras and radars, and assists in driving. It can warn of potential safety issues, collect vehicle operation data, and predict possible vehicle problems through big data analysis.
[0004] The above-mentioned vehicle intelligent diagnosis technology mainly relies on the detection data of various sensors, but the sensors may have errors due to environmental factors (such as temperature and humidity), affecting the accuracy of diagnosis.
[0005] Moreover, the above-mentioned vehicle intelligent diagnosis technology is generally based on the fault code status reading of the sensor to realize the fault judgment. When the vehicle is in operation, it is impossible to find the error and fault trend of the sensor in time.
[0006] In addition, there may be a risk of hacker attacks during the reading, transmission and storage of vehicle sensor data, which may leak the privacy of car owners.
[0007] Therefore, it is urgent to design an intelligent diagnosis method and supporting system for vehicle computers to provide more convenient and efficient protection for the safe operation of the car and the car owners. Summary of the invention
[0008] In order to solve the above technical problems of vehicle intelligent diagnosis, the present invention provides a vehicle intelligent diagnosis method and system based on the UDS standard. The following technical solutions are adopted:
[0009] The vehicle computer intelligent diagnosis method based on the UDS standard includes the following steps:
[0010] Step 1, numbering the physical areas where multiple ECU control units of the target vehicle are located, and then ECU numbering the multiple ECU control units in the physical areas;
[0011] Step 2, the central diagnostic device generates a physical area number and two ECU numbers based on a chaotic random algorithm at set time intervals, and generates a communication verification code based on the combination of the physical area number and the two ECU numbers, and the central diagnostic device sends the communication verification code to the regional communication module corresponding to the physical area number to request communication;
[0012] Step 3, the regional communication module parses the communication verification code. The first half of the communication verification code is the encryption verification code, and the second half is the number combination code. If the encryption verification code passes the verification and the number combination code conforms to the standard format, the regional communication module establishes communication with the central diagnostic device, collects sensor data of the two ECU control units with corresponding ECU numbers, and sends them to the central diagnostic device.
[0013] In step 4, the central diagnostic device parses the sensor data of the two ECU control units corresponding to the ECU numbers, performs fault diagnosis on the sensor data based on the machine learning algorithm, and outputs the fault diagnosis results.
[0014] By adopting the above technical solution, during the normal driving of the car, the car computer generally does not monitor all sensors in real time. Here, the UDS-based consultation mode is used to implement sensor data inspection. A chaotic random algorithm is used to generate a physical area number and two ECU numbers for inspection. The inspection time interval can be set to seconds. In this way, comprehensive detection can be achieved within minutes, which reduces the computing power occupied by the car computer at the same time, and can also monitor the sensor status in a short period of time.
[0015] In the communication process between the central diagnostic device and the ECU control unit in the physical area, a direct connection is not used. Instead, wireless communication is carried out in the form of regional arrangement of regional communication modules. The wireless communication is also verified based on the standard number combination code. Since the standard number combination code changes in real time according to different target vehicles, the standard number combination code also contains the physical area number and ECU number data generated by the chaotic random algorithm. After parsing the communication verification code and completing the verification, the regional communication module can directly wirelessly transmit the sensor data corresponding to the ECU number data back to the central diagnostic device, which greatly reduces the risk of hacker attacks in the process of reading, transmitting and storing vehicle sensor data, and protects the privacy of car owners.
[0016] The central diagnostic device performs fault diagnosis on sensor data based on machine learning algorithms. It can detect current sensor abnormalities and potential sensor failures.
[0017] Optionally, the specific method of step 1 is to divide all ECU control units into an engine compartment area, a fuel management area, a front underbody area, a rear underbody area, an interior area and a trunk area according to physical areas, and number the physical areas as A1, A2, A3, A4, A5 and A6 respectively, and number multiple ECU control units in each physical area as Exy, where x represents the physical area code and y represents the ECU serial number code.
[0018] By adopting the above technical solution, the physical area is divided into the engine compartment area, the fuel management area, the front underbody area, the rear underbody area, the interior area and the trunk area. Of course, the division of areas can also be adjusted according to actual conditions. The ECU control unit is actually an electronic device that collects and processes sensor data from sensors one by one. Generally, there are many sensors in one area, especially in the engine compartment area.
[0019] Optionally, the standard format of the communication verification code is EFG_Az_xy1xy2, where EFG is the encrypted verification code, Az is the physical area number, xy1 is the first ECU number generated by the chaotic random algorithm, and xy2 is the second ECU number.
[0020] Optionally, the encrypted verification code changes based on time, where E is the hour code, F is the minute code, and G is the last digit of the engine code of the target car.
[0021] By adopting the above technical solution, the standard format of the communication verification code is divided into three parts. The first part EFG is an encrypted verification code, where E is the hour code of the current time, F is the minute code of the current time, and G is the last digit of the engine code of the target car. Since the wireless communication time is in milliseconds, if the current time is 59 seconds, you can wait for 2 seconds to communicate with the next minute code to avoid communication verification failure caused by skipping. The middle part Az of the communication verification code is the code of the physical area, which can directly realize the positioning of the area. The last part xy1xy2 is the specific ECU number;
[0022] Using this form of encryption can reduce the risk of sensor data leakage, ensure the data security of the target car, and protect the privacy of the car owner.
[0023] Optionally, in step 2, the specific method of the chaotic random algorithm is: first, a Logistic mapping function is defined, and a chaotic sequence with a length of 1000 is generated, and then a function is defined to select one of the six physical regions, and a code of the physical region is generated;
[0024] Define another function to generate two ECU numbers. These numbers are randomly generated within the selected physical area code domain, and finally output the selected physical area number and the two ECU numbers.
[0025] By adopting the above technical solution, the chaotic random algorithm can realize a random sampling mode, and can also realize random inspection while randomly generating codes, thereby increasing the difficulty of deciphering the communication verification code.
[0026] Optionally, in step 4, a specific method for performing fault diagnosis on sensor data based on a machine learning algorithm is:
[0027] Obtain raw data sets from multiple sensors. The central diagnostics unit first extracts features and labels from the raw data sets, then uses the train_test_split function to split the raw data sets into training sets and test sets, and then uses StandardScaler to standardize the data. Use the classifier RandomForestClassifier to train the machine learning model.
[0028] Evaluate the performance of the machine learning model on the test set and complete the architecture and training of the machine learning model;
[0029] The same preprocessing steps are performed on the new sensor data, and then the trained machine learning model is used to perform fault diagnosis and output the diagnosis results.
[0030] Optionally, the machine learning algorithm is random forest. The steps to construct a random forest are:
[0031] Step 41, randomly extracting a subset from the original data set for training to form a self-service sampling data set;
[0032] Step 42, feature subset: when constructing each decision tree, randomly select a subset from the feature set to form a feature subset;
[0033] Step 43, for each self-sampling data set, a decision tree is constructed using the feature subset;
[0034] In step 44, the final prediction result of the random forest is the average of the prediction results of all decision trees.
[0035] Optionally, the core formula for the classification problem is: ,in is the final classification result, is the predicted probability of the i-th category, and argmax_sum indicates the category with the largest sum of probabilities.
[0036] Through the above technical solutions, random forest is an ensemble learning method based on decision trees, which improves the accuracy and robustness of prediction by combining multiple decision trees.
[0037] The vehicle intelligent diagnosis system based on the UDS standard is used to implement the vehicle intelligent diagnosis method based on the UDS standard. The vehicle intelligent diagnosis system includes multiple groups of ECU control units, multiple regional communication modules and a central diagnostic device. The number of the multiple regional communication modules is consistent with the physical area. The regional communication module includes a data collector, a memory, a chip and a wireless communication module. The regional communication module is installed in the middle of the physical area. The multiple data input ends of the data collector are respectively communicated with the multiple ECU control units in the physical area. The ECU control unit is communicated with the sensor near the physical area to collect sensor data. The data output end of the data collector is communicated with the memory. The chip and the wireless communication module are respectively communicated with the memory. The central diagnostic device is respectively wirelessly connected to the wireless communication modules of the multiple regional communication modules. The chip is communicated with the wireless communication module. Communication verification code data is collected and verified. If the verification is successful, the regional communication module is controlled to send sensor data to the central diagnostic device. The central diagnostic device performs fault diagnosis on the sensor data based on the trained machine learning algorithm and outputs the fault diagnosis result.
[0038] Optionally, the central diagnostic device includes a central wireless communication module, a central memory and a vehicle computer chip, wherein the central wireless communication module is wirelessly connected with the wireless communication module to collect sensor data and store the data in the central memory, and the vehicle computer chip is pre-installed with a trained machine learning algorithm;
[0039] The central wireless communication module and the wireless communication module realize wireless communication based on Bluetooth or RF radio frequency technology.
[0040] By adopting the above technical solution, wireless communication can be achieved based on Bluetooth or RF radio frequency technology, and the security of sensor data can be guaranteed by verifying the communication verification code.
[0041] In summary, the present invention includes at least one of the following beneficial technical effects:
[0042] The present invention can provide a vehicle intelligent diagnosis method and system based on the UDS standard, adopt a UDS-based inquiry mode to implement sensor data inspection, adopt a chaotic random algorithm to generate a physical area number and two ECU numbers for inspection, and the set inspection time interval can be in the second level, so that comprehensive detection can be basically achieved within a minute level, reducing the occupation of vehicle computing power at the same time, and can also realize sensor status monitoring in a short period of time; in the communication process between the central diagnostic device and the ECU control unit in the physical area, the regional communication module is arranged in the form of regional wireless communication, and the wireless communication is also verified based on the standard number combination code. After parsing the communication verification code and completing the verification, the regional communication module can directly wirelessly transmit the sensor data corresponding to the ECU number data back to the central diagnostic device, which greatly reduces the risk of hacker attacks in the process of reading, transmitting and storing vehicle sensor data, and protects the privacy of the car owner; the central diagnostic device performs fault diagnosis on the sensor data based on the machine learning algorithm, and can find the current sensor abnormality and the hidden fault of the sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of the vehicle intelligent diagnosis method based on the UDS standard of the present invention;
[0044] Figure 2 It is a schematic diagram of the component connection principle of the vehicle intelligent diagnosis system of the present invention based on the UDS standard.
[0045] Explanation of the reference numerals: 1. ECU control unit; 2. Regional communication module; 21. Data collector; 22. Memory; 23. Chip; 24. Wireless communication module; 3. Central diagnostic device; 31. Central wireless communication module; 32. Central memory; 33. Vehicle chip; 100. Sensor. DETAILED DESCRIPTION
[0046] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0047] The embodiment of the present invention discloses a vehicle computer intelligent diagnosis method and system based on the UDS standard.
[0048] Reference Figure 1 and Figure 2 The vehicle intelligent diagnosis method based on the UDS standard includes the following steps:
[0049] Step 1, numbering the physical areas where multiple groups of ECU control units 1 of the target vehicle are located, and then ECU numbering the multiple ECU control units 1 in the physical areas;
[0050] Step 2, the central diagnostic device 3 generates a physical area number and two ECU numbers based on a chaotic random algorithm at set time intervals, and generates a communication verification code based on the combination of the physical area number and the two ECU numbers, and the central diagnostic device 3 sends the communication verification code to the regional communication module 2 corresponding to the physical area number to request communication;
[0051] Step 3, the regional communication module 2 parses the communication verification code, the first half of the communication verification code is the encryption verification code, and the second half is the number combination code. If the encryption verification code passes the verification and the number combination code conforms to the standard format, the regional communication module 2 establishes communication with the central diagnostic device 3, collects the sensor data of the two ECU control units 1 corresponding to the ECU number, and sends them to the central diagnostic device 3;
[0052] In step 4, the central diagnostic device 3 parses the sensor data of the two ECU control units 1 corresponding to the ECU numbers, performs fault diagnosis on the sensor data based on a machine learning algorithm, and outputs the fault diagnosis result.
[0053] During normal driving of the car, the car computer generally does not monitor all sensors in real time. Here, the UDS-based consultation mode is used to implement sensor data inspection. A chaotic random algorithm is used to generate a physical area number and two ECU numbers for inspection. The inspection interval can be set at the second level. In this way, comprehensive inspection can be achieved within minutes, which reduces the computing power occupied by the car computer at the same time and can also monitor the sensor status in a short period of time.
[0054] In the communication process between the central diagnostic device 3 and the ECU control unit 1 in the physical area, a direct connection is not used. Instead, wireless communication is performed in the form of regional arrangement of regional communication modules 2. The wireless communication is also verified based on the standard number combination code. Since the standard number combination code changes in real time according to different target vehicles, the standard number combination code also includes the physical area number and ECU number data generated by the chaotic random algorithm. After parsing the communication verification code and completing the verification, the regional communication module 2 can directly wirelessly transmit the sensor data corresponding to the ECU number data back to the central diagnostic device 3, which greatly reduces the risk of hacker attacks in the process of reading, transmitting and storing vehicle sensor data, and protects the privacy of the car owner.
[0055] The central diagnostic device 3 performs fault diagnosis on the sensor data based on a machine learning algorithm, and can detect the current abnormal conditions of the sensor and potential faults of the sensor.
[0056] The specific method of step 1 is to divide all ECU control units 1 into an engine compartment area, a fuel management area, a front underbody area, a rear underbody area, an interior area and a trunk area according to physical areas, and number the physical areas as A1, A2, A3, A4, A5 and A6 respectively, and number the multiple ECU control units 1 in each physical area as Exy, where x represents the physical area code and y represents the ECU serial number code.
[0057] The physical area is divided into the engine compartment area, the fuel management area, the front underbody area, the rear underbody area, the interior area and the trunk area. Of course, the division of the areas can be adjusted according to actual conditions. The ECU control unit 1 is actually an electronic device that collects and processes the sensor data of the sensor 100 one by one. Generally, there are many sensors 100 in one area, especially in the engine compartment area.
[0058] The engine compartment area includes air flow meter, intake temperature sensor, oxygen sensor, engine coolant temperature sensor, crankshaft position sensor, camshaft position sensor, knock sensor, etc.
[0059] The standard format of the communication verification code is EFG_Az_xy1xy2, where EFG is the encrypted verification code, Az is the physical area number, xy1 is the first ECU number generated by the chaotic random algorithm, and xy2 is the second ECU number.
[0060] The encrypted verification code changes based on time, where E is the hour code, F is the minute code, and G is the last digit of the target car's engine code.
[0061] The standard format of the communication verification code is divided into three parts. The first part EFG is an encrypted verification code, where E is the hour code of the current time, F is the minute code of the current time, and G is the last digit of the engine code of the target car. Since the wireless communication time is in milliseconds, if the current time is 59 seconds, you can wait for 2 seconds to communicate with the next minute code to avoid communication verification failure caused by skipping minutes. The middle part of the communication verification code Az is the code of the physical area, which can directly realize the positioning of the area. The last part xy1xy2 is the specific ECU number;
[0062] Using this form of encryption can reduce the risk of sensor data leakage, ensure the data security of the target car, and protect the privacy of the car owner.
[0063] In step 2, the specific method of the chaotic random algorithm is: first, a Logistic mapping function is defined and a chaotic sequence with a length of 1000 is generated, then a function is defined to select one of the six physical regions and a code of the physical region is generated;
[0064] Define another function to generate two ECU numbers. These numbers are randomly generated within the selected physical area code domain, and finally output the selected physical area number and the two ECU numbers.
[0065] The chaotic random algorithm can realize a random sampling mode. While randomly generating codes, it can also realize random inspections, increasing the difficulty of deciphering communication verification codes.
[0066] The code of the chaotic random algorithm is as follows:
[0067] import numpy as np
[0068] # Chaotic mapping function - Logistic mapping
[0069] def logistic_map(r, x):
[0070] return r * x * (1 - x)
[0071] # Initialization parameters
[0072] r = 3.99 # Logistic mapping parameters
[0073] x0 = 0.5 # Initial condition
[0074] n = 1000 # The length of the generated chaotic sequence
[0075] # Generate chaotic sequence
[0076] chaos_sequence = [x0]
[0077] for i in range(1, n):
[0078] chaos_sequence.append(logistic_map(r, chaos_sequence[-1]))
[0079] # Randomly select a physical region from the chaotic sequence
[0080] def select_physical_area(sequence, num_areas):
[0081] # Use the first value of the sequence to select the physical region
[0082] selected_index = int(sequence[0] * num_areas) % num_areas
[0083] return selected_index
[0084] # Generate physical area code
[0085] def generate_physical_area_code(index, num_bits):
[0086] # Convert region index to binary encoding
[0087] return format(index, '0{}b'.format(num_bits))
[0088] # Generate ECU number
[0089] def generate_ecu_number(sequence, index, num_ecus, num_bits):
[0090] # Use the subsequent values of the sequence to generate the ECU number
[0091] ecu_index1 = int(sequence[index + 1] * num_ecus) % num_ecus
[0092] ecu_index2 = int(sequence[index + 2] * num_ecus) % num_ecus
[0093] return format(ecu_index1, '0{}b'.format(num_bits)), format(ecu_index2, '0{}b'.format(num_bits))
[0094] # Define parameters for physical area and ECU number
[0095] num_physical_areas = 6 # Number of physical areas
[0096] physical_area_bits = 3 # Assume that the physical area is encoded as 3 bits
[0097] num_ecus = 64 # Assume each physical region has 64 ECUs
[0098] ecu_number_bits = 6 # Assume the ECU number is 6 bits
[0099] # Execute selection and generate encoding
[0100] selected_area_index = select_physical_area(chaos_sequence, num_physical_areas)
[0101] physical_area_code = generate_physical_area_code(selected_area_index,physical_area_bits)
[0102] ecu_number1, ecu_number2 = generate_ecu_number(chaos_sequence,selected_area_index, num_ecus, ecu_number_bits)
[0103] # Output results
[0104] print(f"Selected physical area index: {selected_area_index}")
[0105] print(f"Physical area code: {physical_area_code}")
[0106] print(f"ECU number 1: {ecu_number1}")
[0107] print(f"ECU number 2: {ecu_number2}").
[0108] In step 4, the specific method of fault diagnosis of sensor data based on machine learning algorithm is:
[0109] Obtaining raw data sets from various sensors, the central diagnostic device 3 first extracts features and labels from the raw data sets, then uses the train_test_split function to divide the raw data sets into training sets and test sets, and then uses StandardScaler to standardize the data; uses the classifier RandomForestClassifier to train the machine learning model;
[0110] Evaluate the performance of the machine learning model on the test set and complete the architecture and training of the machine learning model;
[0111] The same preprocessing steps are performed on the new sensor data, and then the trained machine learning model is used to perform fault diagnosis and output the diagnosis results.
[0112] The machine learning algorithm is random forest. The steps to build a random forest are:
[0113] Step 41, randomly extracting a subset from the original data set for training to form a self-service sampling data set;
[0114] Step 42, feature subset: when constructing each decision tree, randomly select a subset from the feature set to form a feature subset;
[0115] Step 43, for each self-sampling data set, a decision tree is constructed using the feature subset;
[0116] In step 44, the final prediction result of the random forest is the average of the prediction results of all decision trees.
[0117] The core formula for the classification problem is: ,in is the final classification result, is the predicted probability of the i-th category, and argmax_sum indicates the category with the largest sum of probabilities.
[0118] Through the above technical solutions, random forest is an ensemble learning method based on decision trees, which improves the accuracy and robustness of prediction by combining multiple decision trees.
[0119] The vehicle intelligent diagnosis system based on the UDS standard is used to implement the vehicle intelligent diagnosis method based on the UDS standard. The vehicle intelligent diagnosis system includes multiple groups of ECU control units 1, multiple regional communication modules 2 and a central diagnostic device 3. The number of multiple regional communication modules 2 is consistent with the physical area. The regional communication module 2 includes a data collector 21, a memory 22, a chip 23 and a wireless communication module 24. The regional communication module 2 is installed in the middle of the physical area. Multiple data input ends of the data collector 21 are respectively communicated with multiple ECU control units 1 in the physical area. The ECU control unit 1 is communicated with the sensor 100 near the physical area to collect sensor data. The data output end of the data collector 21 is communicated with the memory 22. The chip 23 and the wireless communication module 24 are respectively communicated with the memory 22. The central diagnostic device 3 is respectively wirelessly connected to the wireless communication modules 24 of the multiple regional communication modules 2. The chip 23 is communicated with the wireless communication module 24. The communication verification code data is collected and verified. If the verification is successful, the regional communication module 2 is controlled to send the sensor data to the central diagnostic device 3. The central diagnostic device 3 performs fault diagnosis on the sensor data based on the trained machine learning algorithm and outputs the fault diagnosis result.
[0120] The central diagnostic device 3 includes a central wireless communication module 31, a central memory 32 and a vehicle chip 33. The central wireless communication module 31 is connected to the wireless communication module 24 for wireless communication to collect sensor data and store the data in the central memory 32. The vehicle chip 33 is pre-installed with a trained machine learning algorithm.
[0121] The central wireless communication module 31 and the wireless communication module 24 realize wireless communication based on Bluetooth or RF radio frequency technology.
[0122] Wireless communication is achieved based on Bluetooth or RF radio frequency technology, and the security of sensor data can be guaranteed by verifying the communication verification code.
[0123] The following is a specific case study to illustrate the implementation principle of the vehicle intelligent diagnosis method and system based on the UDS standard:
[0124] At a certain point in time 11:28:26 during the driving process of the target vehicle, the central diagnostic device 3 generates a physical area number and two ECU numbers A1 and E11, E14 respectively; A2 represents the engine compartment area, E21 and E24 represent the air flow meter and the engine coolant temperature sensor respectively, and the central diagnostic device 3 generates a communication verification code EFG_A1_E11E14 based on the random selection result, and sends the communication verification code EFG_A1_E11E14 as a handshake code to the regional communication module 2 in the engine compartment area. The regional communication module 2 parses the communication verification code and verifies it, and finds that the communication verification code EFG_A1_E11E14 conforms to the standard format, and the encrypted verification code, hour code and minute code are correct. The data of the air flow meter and the engine coolant temperature sensor in the previous time end stored in the memory 22 are packaged and sent to the central wireless communication module 31, and transferred to the central memory 32. The vehicle chip 33 analyzes the sensor data of the air flow meter and the engine coolant temperature sensor based on the machine learning algorithm, and outputs the results that the air flow meter is normal and the engine coolant temperature sensor data is abnormal.
[0125] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. The vehicle computer intelligent diagnosis method based on the UDS standard is characterized by: The following steps are involved: Step 1, numbering the physical areas where the multiple groups of ECU control units (1) of the target vehicle are located, and then ECU numbering the multiple ECU control units (1) in the physical areas; Step 2, the central diagnostic device (3) generates a physical area number and two ECU numbers based on a chaotic random algorithm at every set time interval, and generates a communication verification code based on the combination of the physical area number and the two ECU numbers, and the central diagnostic device (3) sends the communication verification code to the regional communication module (2) corresponding to the physical area number to request communication; Step 3, the regional communication module (2) parses the communication verification code, the first half of the communication verification code is the encryption verification code, and the second half is the number combination code. If the encryption verification code passes the verification and the number combination code conforms to the standard format, communication is established with the central diagnostic device (3), and sensor data of the two ECU control units (1) corresponding to the ECU numbers are collected and sent to the central diagnostic device (3); Step 4, the central diagnostic device (3) analyzes the sensor data of the two ECU control units (1) corresponding to the ECU numbers, performs fault diagnosis on the sensor data based on a machine learning algorithm, and outputs a fault diagnosis result; The standard format of the communication verification code is EFG_Az_xy1xy2, where EFG is the encrypted verification code, Az is the physical area number, xy1 is the first ECU number generated by the chaotic random algorithm, and xy2 is the second ECU number; The encrypted verification code changes based on time, where E is the hour code, F is the minute code, and G is the last digit of the target car's engine code.
2. The vehicle computer intelligent diagnosis method based on the UDS standard according to claim 1 is characterized in that: The specific method of step 1 is to divide all ECU control units (1) into an engine compartment area, a fuel management area, a front underbody area, a rear underbody area, an interior area and a trunk area according to physical areas, and number the physical areas as A1, A2, A3, A4, A5 and A6 respectively, and number the multiple ECU control units (1) in each physical area as Exy, where x represents the physical area code and y represents the ECU serial number code.
3. The vehicle intelligent diagnosis method based on the UDS standard according to claim 1 is characterized in that: In step 2, the specific method of the chaotic random algorithm is: first, a Logistic mapping function is defined and a chaotic sequence with a length of 1000 is generated, then a function is defined to select one of the six physical regions and a code of the physical region is generated; Define another function to generate two ECU numbers. These numbers are randomly generated within the selected physical area code domain, and finally output the selected physical area number and the two ECU numbers.
4. The vehicle intelligent diagnosis method based on the UDS standard according to claim 3 is characterized in that: In step 4, the specific method of fault diagnosis of sensor data based on machine learning algorithm is: After obtaining the original data sets of various sensors, the central diagnostic device (3) first extracts features and labels from the original data sets, then uses the train_test_split function to divide the original data sets into training sets and test sets, and then uses StandardScaler to standardize the data; uses the classifier RandomForestClassifier to train the machine learning model; Evaluate the performance of the machine learning model on the test set and complete the architecture and training of the machine learning model; The same preprocessing steps are performed on the new sensor data, and then the trained machine learning model is used to perform fault diagnosis and output the diagnosis results.
5. The vehicle intelligent diagnosis method based on the UDS standard according to claim 4 is characterized in that: The machine learning algorithm is random forest. The steps to build a random forest are: Step 41, randomly extracting a subset from the original data set for training to form a self-service sampling data set; Step 42, feature subset: when constructing each decision tree, randomly select a subset from the feature set to form a feature subset; Step 43, for each self-sampling data set, a decision tree is constructed using the feature subset; In step 44, the final prediction result of the random forest is the average of the prediction results of all decision trees.
6. The vehicle computer intelligent diagnosis method based on the UDS standard according to claim 5 is characterized in that: The core formula for the classification problem is: ,in is the final classification result, is the predicted probability of the i-th category, and argmax_sum indicates the category with the largest sum of probabilities.
7. The vehicle intelligent diagnosis system based on UDS standard is characterized by: The vehicle intelligent diagnosis method based on the UDS standard is used to implement any one of claims 1 to 6, the vehicle intelligent diagnosis system comprises a plurality of ECU control units (1), a plurality of regional communication modules (2) and a central diagnostic device (3), the number of the plurality of regional communication modules (2) is consistent with the physical area, the regional communication module (2) comprises a data acquisition device (21), a memory (22), a chip (23) and a wireless communication module (24), the regional communication module (2) is installed in the middle of the physical area, the plurality of data input terminals of the data acquisition device (21) are respectively connected to the plurality of ECU control units (1) in the physical area, and the ECU control unit (1) is connected to the physical area near the physical area. The sensor (100) is connected in communication to collect sensor data, the data output end of the data collector (21) is connected in communication to the memory (22), the chip (23) and the wireless communication module (24) are respectively connected in communication to the memory (22), the central diagnostic device (3) is respectively connected in wireless communication to the wireless communication modules (24) of the plurality of regional communication modules (2), the chip (23) is connected in communication to the wireless communication module (24), the communication verification code data is collected and verified, if the verification is successful, the regional communication module (2) is controlled to send the sensor data to the central diagnostic device (3), and the central diagnostic device (3) performs fault diagnosis on the sensor data based on the trained machine learning algorithm and outputs the fault diagnosis result.
8. The vehicle intelligent diagnosis system based on the UDS standard according to claim 7 is characterized in that: The central diagnostic device (3) comprises a central wireless communication module (31), a central memory (32) and a vehicle computer chip (33); the central wireless communication module (31) is wirelessly connected to the wireless communication module (24) to collect sensor data and store the data in the central memory (32); and the vehicle computer chip (33) is pre-installed with a trained machine learning algorithm; The central wireless communication module (31) and the wireless communication module (24) realize wireless communication based on Bluetooth or RF radio frequency technology.
Citation Information
Patent Citations
Vehicular master device, update data verification method, and update data verification program
CN112543914A
Distributed diagnostic architecture for vehicle
CN114375270A
