CAN message information security fault detection automatic development method, apparatus and device, and storage medium

Through the processing and generation of CAN communication matrix software, the CAN message is safely checked and fault location, which solves the problems of low automation and low detection accuracy in the existing technology, and achieves efficient and accurate CAN message failures Test.

CN119414811APending Publication Date: 2025-02-11VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411519786.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the prior art, the degree of automation is low when performing fault detection on CAN messages and the accuracy of message detection is low.

Method used

By processing the CAN communication matrix, the summary requirement table containing the security verification packet is obtained, and the target requirement document is obtained based on the summary requirement table and the security verification error fault code, and the signal callback function code file of the message security verification error fault diagnosis signal is generated. , the declaration header file and source program file of the diagnostic fault code are obtained, and the diagnosis software is deployed to the electronic system of the actual vehicle to perform safety verification of the packets and locate the fault packets.

Benefits of technology

It realizes the automated development of CAN message information security fault detection, improves the accuracy and efficiency of detection, and ensures the quality and efficiency of software development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414811A_ABST
    Figure CN119414811A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic development method, device and equipment for CAN message information safety fault detection and a storage medium, and relates to the technical field of vehicle diagnos.The method comprises the steps that a CAN communication matrix is processed to obtain a summary demand table containing safety verification messages, obtaining a target demand document according to the summary demand table and the corresponding security check error fault code, generating a signal callback function code file of the message security check error fault diagnosis signal, a declaration header file of the diagnosis fault code and a source program file according to the target demand document, and obtaining diagnosis software based on the signal callback function code file, the declaration header file and the source program file. The method comprises the following steps: deploying diagnosis software into an electronic system of an actual vehicle, starting the diagnosis software, carrying out safety verification on a message to obtain safety verification information, reading a vehicle fault code when a safety verification error occurs when the safety verification information is subjected to safety verification, and positioning a fault message according to the vehicle fault code to realize automatic generation of a software function link. And the software development efficiency and quality are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle diagnosis technology, and in particular to a method, device, equipment and storage medium for automated development of CAN message information security fault detection. Background Art

[0002] The CAN bus protocol is known for its high stability and high fault tolerance. However, in actual use, users are still worried that CAN will receive wrong information, so CRC check and message counter check are introduced in the message data. As the CAN communication network of modern vehicle controllers becomes more and more complex, a controller may contain hundreds of communication messages, and the number of messages that need to be introduced for safety checks can basically reach more than 200. If the corresponding code development is completed manually by developers, the workload is huge, the efficiency is low, and the software quality is difficult to guarantee. At present, two timers are set to verify whether the message has a loss fault, and the Rolling Counter message frame leakage detection is used to detect the fault of continuous message loss. However, this method only determines the message information fault from a single method and cannot guarantee the accuracy of the detection result.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a CAN message information security fault detection automated development method, device, equipment and storage medium, aiming to solve the technical problems of low automation level and low message detection accuracy in the prior art when performing fault detection on CAN messages.

[0005] To achieve the above objectives, the present application proposes an automated development method for CAN message information security fault detection, the automated development method for CAN message information security fault detection comprising:

[0006] Processing the CAN communication matrix to obtain a summary requirement table containing safety check messages, and obtaining a target requirement document according to the summary requirement table and corresponding safety check error fault codes;

[0007] Generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code, and the source program file;

[0008] Deploy the diagnostic software to the electronic system of the actual vehicle, start the diagnostic software, perform security verification on the message, and obtain security verification information;

[0009] When a safety check error occurs when the safety check information is being safety checked, a vehicle fault code is read and a fault message is located according to the vehicle fault code.

[0010] In one embodiment, the step of processing the CAN communication matrix to obtain a summary requirement table including safety check messages, and obtaining a target requirement document according to the summary requirement table and the corresponding safety check error fault code comprises:

[0011] Filter the CAN communication matrix to obtain the message name, signal segment name, signal ID, and byte bit information of CRC check;

[0012] Generate a summary requirement table of security check messages according to the message name, the signal network segment name, the signal ID and the byte bit information of the CRC check;

[0013] Determine the message counter fault code and the CRC check fault code according to the byte bit information of the CRC check;

[0014] According to the summary requirement table, the message counter fault code and the CRC check fault code, a target requirement document is obtained.

[0015] In one embodiment, the step of generating a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file according to the target requirement document, and obtaining diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code, and the source program file comprises:

[0016] Identify the CAN identifier, network segment name, diagnostic trouble code-cyclic redundancy check result, diagnostic trouble code counter and CAN identification in the target requirement document requirements;

[0017] Generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file according to the CAN identifier, the network segment name, the diagnostic fault code-cyclic redundancy check result, the diagnostic fault code counter, and the CAN identifier;

[0018] The diagnostic software is obtained according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file.

[0019] In one embodiment, the step of obtaining the diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file comprises:

[0020] Generate a callback function structure according to the CAN identifier, the network segment name, the diagnostic trouble code-cyclic redundancy check result, the diagnostic trouble code counter and the CAN identifier;

[0021] Determine a fault signal variable according to the CAN identifier, the network segment name, the diagnostic trouble code-cyclic redundancy check result, the diagnostic trouble code counter and the CAN identifier;

[0022] The fault signal variable is added to the callback function structure, the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file to obtain the diagnostic software.

[0023] In one embodiment, the steps of deploying the diagnostic software to the electronic system of an actual vehicle, starting the diagnostic software, and performing security verification on the message to obtain security verification information include:

[0024] Compile the diagnostic software to generate a flash package;

[0025] The flashing package is deployed to the electronic system of the actual vehicle, and the diagnostic software is started to perform security verification on the message to obtain security verification information.

[0026] In one embodiment, the step of deploying the flash package to the electronic system of an actual vehicle, starting the diagnostic software, and performing security verification on the message to obtain security verification information includes:

[0027] Deploy the flashing package to the electronic system of the actual vehicle, start the diagnostic software, perform security check on the message, and obtain error information;

[0028] The error information is transmitted to the diagnostic protocol stack to obtain safety verification information.

[0029] In one embodiment, when a safety check error occurs during the safety check of the safety check information, the step of reading a vehicle fault code and locating a fault message according to the vehicle fault code includes:

[0030] When a safety check error occurs during the safety check of the safety check information, the message is identified to obtain a vehicle fault code;

[0031] The fault message is located according to the vehicle fault code and the target requirement document.

[0032] In addition, to achieve the above purpose, the present application also proposes a CAN message information security fault detection automatic development device, the CAN message information security fault detection automatic development device comprising:

[0033] A demand analysis module, used for processing the CAN communication matrix to obtain a summary demand table containing safety check messages, and obtaining a target demand document according to the summary demand table and the corresponding safety check error fault code;

[0034] A function generation module, used to generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file;

[0035] A software deployment module, used to deploy the diagnostic software to the electronic system of the actual vehicle, start the diagnostic software, perform security verification on the message, and obtain security verification information;

[0036] The fault diagnosis module is used to read the vehicle fault code and locate the fault message according to the vehicle fault code when a safety check error occurs during the safety check of the safety check information.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a CAN message information security fault detection automated development device, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the CAN message information security fault detection automated development method as described above.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the automated development method for CAN message information security fault detection as described above are implemented.

[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the CAN message information security fault detection automation development method as described above.

[0040] One or more technical solutions proposed in the present application have at least the following technical effects: a summary requirement table containing safety verification messages is obtained by processing the CAN communication matrix, a target requirement document is obtained according to the summary requirement table and the corresponding safety verification error fault code, a signal callback function code file of a message safety verification error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file are generated according to the target requirement document, diagnostic software is obtained according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file, the diagnostic software is deployed to the electronic system of an actual vehicle, and the diagnostic software is started to perform a safety check on the message to obtain safety verification information, when a safety check error occurs when the safety check information is performed, the vehicle fault code is read, the fault message is located according to the vehicle fault code, the software function link is automatically generated, and the efficiency and quality of software development are ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flow chart of the first embodiment of the method for automatic development of CAN message information security fault detection provided by the present application;

[0044] Figure 2 A summary table of security verification messages provided for an embodiment of the CAN message information security fault detection automated development method of the present application;

[0045] Figure 3 Table of software requirements for security check error diagnostic fault codes provided for the first embodiment of the CAN message information security fault detection automated development method of this application;

[0046] Figure 4 A schematic diagram of a portion of Python program code for a callback function for generating diagnostic fault codes provided in an embodiment of the CAN message information security fault detection automated development method of the present application;

[0047] Figure 5 The source code of the callback function function part for generating the CAN message security verification diagnostic fault code provided in the first embodiment of the CAN message information security fault detection automated development method of the present application;

[0048] Figure 6 A schematic diagram of a source program code portion of a header file of a callback function for generating a CAN message security verification diagnostic fault code provided in an embodiment of the CAN message information security fault detection automated development method of the present application;

[0049] Figure 7 Partial source code for implementing a callback function for generating a CAN message security verification diagnostic fault code provided in an embodiment of the CAN message information security fault detection automated development method of the present application;

[0050] Figure 8 A brief flow chart of the automated development method for CAN message information security fault detection provided in Example 2 of the present application;

[0051] Fig. 9 This is a schematic diagram of the module structure of the CAN message information security fault detection automation development device of the embodiment of the present application;

[0052] Fig.10 This is a schematic diagram of the device structure of the hardware operating environment involved in the automated development method for CAN message information security fault detection in the embodiment of the present application.

[0053] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0054] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0055] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0056] The main solution of the embodiment of the present application is: processing the CAN communication matrix to obtain a summary requirement table containing safety verification messages, and obtaining a target requirement document based on the summary requirement table and the corresponding safety verification error fault code; generating a signal callback function code file of a message safety verification error fault diagnostic signal, a declaration header file of the diagnostic fault code and a source program file based on the target requirement document, and obtaining diagnostic software based on the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file; deploying the diagnostic software to the electronic system of an actual vehicle, and starting the diagnostic software to perform a safety verification on the message to obtain safety verification information; when a safety verification error occurs when performing a safety verification on the safety verification information, reading the vehicle fault code, and locating the fault message based on the vehicle fault code.

[0057] In this embodiment, for ease of description, the following description is made by taking the automatic development device for identifying CAN message information security fault detection as the execution subject.

[0058] As the CAN communication network of modern vehicle controllers becomes more and more complex, a controller may contain hundreds of communication messages, and the number of messages that need to be introduced for security verification can basically reach more than 200. If developers rely entirely on manual code development, the workload is huge, the efficiency is low, and the software quality is difficult to guarantee.

[0059] This application provides a solution that uses Python scripts to identify and filter CAN communication matrix messages to obtain a message security check error diagnostic fault code information table. The program is used to automatically generate the fault code signal callback function code, and the function body header file and function implementation code are further obtained, so that the message security check error signal is converted into a fault signal, and the message security check error information corresponding to the fault code can be identified using a diagnostic instrument. At the same time, an automated development platform is built, and targeted automated implementation logic is formulated according to different vehicle model projects to achieve software reuse for multiple vehicle model platforms, which is of great significance to improving development efficiency and software quality, reducing development costs, and shortening development cycles.

[0060] It can be seen from the above embodiments that the present application obtains a summary requirement table containing safety verification messages by processing the CAN communication matrix, obtains a target requirement document based on the summary requirement table and the corresponding safety verification error fault code, generates a signal callback function code file of a message safety verification error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file based on the target requirement document, obtains diagnostic software based on the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file, deploys the diagnostic software to the electronic system of an actual vehicle, starts the diagnostic software, performs a safety check on the message, obtains safety verification information, and when a safety check error occurs when the safety check information is performed, reads the vehicle fault code, locates the fault message based on the vehicle fault code, realizes automatic generation of software function links, and ensures the efficiency and quality of software development.

[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a CAN message information security fault detection automation development device, etc. The following takes the CAN message information security fault detection automation development device as an example to illustrate this embodiment and the following embodiments.

[0062] Based on this, the embodiment of the present application provides a CAN message information security fault detection automated development method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the automated development method for CAN message information security fault detection of the present application.

[0063] In this embodiment, the CAN message information security fault detection automated development method includes steps S10 to S40:

[0064] Step S10, processing the CAN communication matrix to obtain a summary requirement table containing safety check messages, and obtaining a target requirement document according to the summary requirement table and the corresponding safety check error fault code.

[0065] It should be noted that the CAN communication matrix is ​​a key component of the vehicle, which specifies how each node in the vehicle network interacts and shares information, and is a key document. The summary requirements table summarizes the information of all CAN messages that need to be safety-verified, and the target requirements document describes the specific safety verification requirements and corresponding fault diagnostic codes for each CAN message that needs to be safety-verified.

[0066] In the specific implementation, Python scripts can be used to process the CAN communication matrix to automatically identify and filter out the summary requirement table of safety verification messages, further bind the corresponding safety verification error diagnosis fault codes to the relevant messages and form the final requirement document.

[0067] In a feasible implementation manner, the step of processing the CAN communication matrix to obtain a summary requirement table containing safety check messages, and obtaining a target requirement document according to the summary requirement table and the corresponding safety check error fault code comprises:

[0068] Filter the CAN communication matrix to obtain the message name, signal segment name, signal ID and byte bit information of CRC check;

[0069] Generate a summary requirement table of security check messages according to the message name, the signal network segment name, the signal ID and the byte bit information of the CRC check;

[0070] Determine the message counter fault code and the CRC check fault code according to the byte bit information of the CRC check;

[0071] According to the summary requirement table, the message counter fault code and the CRC check fault code, a target requirement document is obtained.

[0072] In the specific implementation, Python program is used to filter and process the information in the CAN communication matrix table, including message name, signal segment name, signal ID, and CRC check byte bit information. The CRC check byte bit information refers to the bytes and bits of the Rolling Counter and Checksum check, respectively, to generate a summary requirement table for the safety check message. Finally, according to the safety check message summary table, the corresponding safety check error diagnosis fault code is bound to the relevant message and the final requirement document is formed. Each message's CRC check error and message counter check error are each bound to a fault code. Pandas, a commonly used data processing library, is provided in Python, which provides simple data processing functions. First, use the read_excel() function of pandas to read the Excel file, and then use the concat() function to merge multiple worksheets.

[0073] Import the data processing library:

[0074] import pandas as pd;

[0075] Reading Excel files:

[0076] file_list=['file1.xlsx','file2.xlsx'];

[0077] dfs=[pd.read_excel(file)for file in file_list];

[0078] To merge multiple worksheets:

[0079] result=pd.concat(dfs,ignore_index=True);

[0080] Save to a new Excel file:

[0081] result.to_excel('merged.xlsx',index=False);

[0082] Finally, we get Figure 2 and Figure 3 The summary table of the final safety verification message and the safety verification error diagnostic fault code software requirement table are shown.

[0083] Step S20, generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file.

[0084] In the specific implementation, a signal callback function code file of the message security check error diagnostic fault code, a declaration header file of the diagnostic fault code, and a source program file are formed according to the target requirement document to play a role in transit and conversion. The CAN communication protocol stack can pass the error information to the diagnostic protocol stack, and inform the diagnostic protocol stack that the CAN signal is abnormal at this time. The CAN identifier, network segment name, diagnostic fault code-cyclic redundancy check result (diagnostic fault code associated with Checksum check error), diagnostic fault code counter (diagnostic fault code associated with Rolling Counter check error) and CAN identifier in the target requirement document requirements can be identified; the signal callback function code file of the message security check error fault diagnostic signal, the declaration header file of the diagnostic fault code and the source program file are generated according to the CAN identifier, network segment name, diagnostic fault code-cyclic redundancy check result, diagnostic fault code counter and CAN identifier; the diagnostic software is obtained according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file. Refer to Figure 4 , Figure 4 A partial Python program code diagram of the callback function function for generating diagnostic trouble codes. Use Python program scripts to identify the CAN identifier Name, network segment name, diagnostic trouble code-cyclic redundancy check result, diagnostic trouble code counter, CAN identifier and other column information in the safety check error diagnostic trouble code software requirement table, and automatically generate the callback function code for the safety check error diagnostic trouble code. Figure 5 , Figure 5 The callback function function part source code for generating CAN message safety check diagnostic fault code. The function of this callback function code is that when a safety check error occurs in the CAN message, the CAN communication protocol stack can pass the error information to the diagnostic protocol stack, informing the diagnostic protocol stack that this CAN signal is abnormal at this time, and playing the role of connecting the two layers of the protocol stack.

[0085] In a feasible implementation manner, the step of obtaining the diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file comprises:

[0086] Generate a callback function structure according to the CAN identifier, the network segment name, the diagnostic trouble code-cyclic redundancy check result, the diagnostic trouble code counter and the CAN identifier;

[0087] Determine a fault signal variable according to the CAN identifier, the network segment name, the diagnostic trouble code-cyclic redundancy check result, the diagnostic trouble code counter and the CAN identifier;

[0088] The fault signal variable is added to the callback function structure, the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file to obtain the diagnostic software.

[0089] In the specific implementation, refer to Figure 6 and Figure 7 , Figure 6 This is a schematic diagram of the source code of the header file of the callback function for generating the CAN message safety verification diagnostic fault code. Figure 7 Part of the source code for the callback function implementation of generating CAN message safety check diagnostic fault code. Use Python program script to automatically generate the declaration header file of the CAN message safety check error diagnostic fault code function body and fill in the specific fault code signal variable in the function body. The callback function structure generated in the previous step is an empty function. In this step, the script program is used to generate the corresponding function declaration and fill in the specific fault code signal variable in the function body to realize the conversion of the CAN message safety check error signal into the corresponding fault code signal variable.

[0090] Step S30, deploying the diagnostic software to the electronic system of the actual vehicle, and starting the diagnostic software, performing security verification on the message, and obtaining security verification information.

[0091] In a specific implementation, the generated software is deployed to the actual automotive electronic system for verification and debugging to ensure the stability and reliability of the software in the actual environment. The diagnostic software is deployed to the electronic system of the actual vehicle, and the diagnostic software is started to perform security verification on the message to obtain the security verification information. The steps of: compiling the diagnostic software to generate a flash package; deploying the flash package to the electronic system of the actual vehicle, and starting the diagnostic software, performing security verification on the message, and obtaining security verification information. The steps of: deploying the flash package to the electronic system of the actual vehicle, and starting the diagnostic software, performing security verification on the message, and obtaining security verification information include: deploying the flash package to the electronic system of the actual vehicle, and starting the diagnostic software, performing security verification on the message, and obtaining error information; passing the error information to the diagnostic protocol stack to obtain security verification information. Specifically, the automatically generated code and the diagnostic protocol stack code in the vehicle controller are integrated and packaged, and a flash package is generated after compilation, and deployed to the actual automotive electronic system for verification and debugging to ensure the stability and reliability of the software in the actual environment.

[0092] Step S40, when a safety check error occurs during the safety check of the safety check information, a vehicle fault code is read, and a fault message is located according to the vehicle fault code.

[0093] It should be noted that in the context of the CAN communication protocol, a fault message refers to a special CAN message that is used to convey fault information that occurs in a vehicle or device. These messages contain detailed information about problems detected in a system, subsystem, or component, and are usually generated by the vehicle's electronic control unit (ECU) and sent to the CAN network so that other system components or external diagnostic tools can read and parse them.

[0094] In a specific implementation, when a message has a safety check error during the software operation, the diagnostic instrument is used to read the vehicle fault code, and the fault code can be used to identify which message has a safety check error. Specifically, when a safety check error occurs during the safety check of the safety check information, the message is identified to obtain the vehicle fault code; the fault message is located according to the vehicle fault code and the target requirement document, that is, when the fault code signal jumps abnormally, the diagnostic protocol stack will further identify and process it and convert it into a specific fault code that can be identified by the external diagnostic instrument. According to the requirement document information generated in step one, by binding the corresponding fault code to different CAN message safety check errors, the fault code can be used to identify that a specific CAN message has a safety check error at the current moment.

[0095] The present embodiment provides an automated development method for CAN message information security fault detection, which comprises the following steps: obtaining a summary requirement table including security verification messages by processing a CAN communication matrix, obtaining a target requirement document based on the summary requirement table and the corresponding security verification error fault code, generating a signal callback function code file of a message security verification error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file based on the target requirement document, obtaining diagnostic software based on the signal callback function code file, the declaration header file of the diagnostic fault code, and the source program file, deploying the diagnostic software to an actual vehicle's electronic system, starting the diagnostic software, performing a security verification on the message, and obtaining security verification information; when a security verification error occurs when performing a security verification on the security verification information, reading the vehicle fault code, locating the fault message based on the vehicle fault code, and realizing automated generation of software function links to ensure the efficiency and quality of software development.

[0096] For example, in order to help understand the implementation process of the CAN message information security fault detection automation development method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 8 , Figure 8A brief flow chart of an automated development method for CAN message information security fault detection is provided, specifically:

[0097] First, by screening the CAN communication matrix messages, and based on the CAN communication matrix communication messages, the safety verification message summary table and the message safety verification error diagnosis fault code information table can be obtained, and according to the safety verification message summary table and the message safety verification error diagnosis fault code information table, the signal callback function code of the message safety verification error diagnosis fault code, the function body declaration header file code, the function body implementation function code are automatically generated, and the diagnostic software is obtained, and then the diagnostic software is deployed, the diagnostic instrument identifies the fault code, and identifies and locates the corresponding message according to the identified fault code. Safety verification error occurs.

[0098] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the automated development method for CAN message information security fault detection of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0099] This application also provides a CAN message information security fault detection automation development device, please refer to Fig. 9 , the CAN message information security fault detection automatic development device comprises:

[0100] The demand analysis module 10 is used to process the CAN communication matrix to obtain a summary demand table containing safety verification messages, and obtain a target demand document according to the summary demand table and the corresponding safety verification error fault code.

[0101] The function generation module 20 is used to generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file.

[0102] The software deployment module 30 is used to deploy the diagnostic software to the electronic system of the actual vehicle, start the diagnostic software, perform security verification on the message, and obtain security verification information.

[0103] The fault diagnosis module 40 is used to read the vehicle fault code and locate the fault message according to the vehicle fault code when a safety check error occurs during the safety check of the safety check information.

[0104] In one embodiment, the requirement analysis module 10 is also used to screen the CAN communication matrix to obtain the message name, signal network segment name, signal ID and byte bit information of CRC check; generate a summary requirement table of security check messages based on the message name, the signal network segment name, the signal ID and the byte bit information of CRC check; determine the message counter fault code and the CRC check fault code based on the byte bit information of CRC check; and obtain the target requirement document based on the summary requirement table, the message counter fault code and the CRC check fault code.

[0105] In one embodiment, the function generation module 20 is also used to identify the CAN identifier, network segment name, diagnostic fault code-cyclic redundancy check result, diagnostic fault code counter and CAN identifier in the target requirement document requirements; generate a signal callback function code file, a declaration header file of the diagnostic fault code and a source program file of the message security check error fault diagnosis signal according to the CAN identifier, network segment name, diagnostic fault code-cyclic redundancy check result, diagnostic fault code counter and CAN identifier; obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file.

[0106] In one embodiment, the function generation module 20 is also used to generate a callback function structure based on the CAN identifier, network segment name, diagnostic fault code-cyclic redundancy check result, diagnostic fault code counter and CAN identifier; determine the fault signal variable based on the CAN identifier, network segment name, diagnostic fault code-cyclic redundancy check result, diagnostic fault code counter and CAN identifier; add the fault signal variable to the callback function structure, the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file to obtain the diagnostic software.

[0107] In one embodiment, the software deployment module 30 is further used to compile the diagnostic software to generate a flash package; deploy the flash package to the electronic system of the actual vehicle, and start the diagnostic software to perform security verification on the message to obtain security verification information.

[0108] In one embodiment, the software deployment module 30 is also used to deploy the flash package to the electronic system of the actual vehicle, and start the diagnostic software to perform security verification on the message to obtain error information; the error information is passed to the diagnostic protocol stack to obtain security verification information.

[0109] In one embodiment, the fault diagnosis module 40 is further used to identify the message and obtain a vehicle fault code when a safety verification error occurs during the safety verification of the safety verification information; and locate the fault message according to the vehicle fault code and the target requirement document.

[0110] The CAN message information security fault detection automatic development device provided by the present application adopts the CAN message information security fault detection automatic development method in the above embodiment, which can solve the technical problems of low automation and low message detection accuracy when performing fault detection on CAN messages in the prior art. Compared with the prior art, the beneficial effects of the CAN message information security fault detection automatic development device provided by the present application are the same as the beneficial effects of the CAN message information security fault detection automatic development method provided by the above embodiment, and other technical features in the CAN message information security fault detection automatic development device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0111] The present application provides an automated development device for security fault detection of CAN message information, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the automated development method for security fault detection of CAN message information in the above-mentioned embodiment one.

[0112] Reference below Fig.10 , which shows a schematic diagram of the structure of a CAN message information security fault detection automation development device suitable for implementing the embodiment of the present application. The CAN message information security fault detection automation development device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The CAN message information security fault detection automation development device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0113] like Fig.10As shown, the CAN message information safety fault detection automation development equipment may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the CAN message information safety fault detection automation development equipment are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the CAN message information safety fault detection automation development device to communicate wirelessly or wired with other devices to exchange data. Although the CAN message information safety fault detection automation development device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0114] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0115] The CAN message information security fault detection automation development device provided by the present application adopts the CAN message information security fault detection automation development method in the above embodiment, which can solve the technical problems of low automation and low message detection accuracy when performing fault detection on CAN messages in the prior art. Compared with the prior art, the beneficial effects of the CAN message information security fault detection automation development device provided by the present application are the same as the beneficial effects of the CAN message information security fault detection automation development method provided by the above embodiment, and other technical features in the CAN message information security fault detection automation development device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0116] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0117] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present 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.

[0118] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the automated development method for CAN message information security fault detection in the above-mentioned embodiment.

[0119] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0120] The computer-readable storage medium may be included in the CAN message information security fault detection automation development device; or may exist independently without being assembled into the CAN message information security fault detection automation development device.

[0121] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the CAN message information security fault detection automation development device, the CAN message information security fault detection automation development device:

[0122] Processing the CAN communication matrix to obtain a summary requirement table containing safety check messages, and obtaining a target requirement document according to the summary requirement table and corresponding safety check error fault codes;

[0123] Generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code, and the source program file;

[0124] Deploy the diagnostic software to the electronic system of the actual vehicle, start the diagnostic software, perform security verification on the message, and obtain security verification information;

[0125] When a safety check error occurs when the safety check information is being safety checked, a vehicle fault code is read and a fault message is located according to the vehicle fault code.

[0126] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0127] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0128] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0129] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned CAN message information security fault detection automation development method, and can solve the technical problems of low automation and low message detection accuracy when performing fault detection on CAN messages in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the CAN message information security fault detection automation development method provided by the above-mentioned embodiment, and will not be repeated here.

[0130] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned CAN message information security fault detection automation development method.

[0131] The computer program product provided by the present application can solve the technical problems of low automation and low accuracy of message detection when performing fault detection on CAN messages in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the automated development method for CAN message information security fault detection provided by the above embodiment, and will not be elaborated here.

[0132] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A CAN message information security fault detection automated development method, characterized in that: The CAN message information security fault detection automated development method comprises: Processing the CAN communication matrix to obtain a summary requirement table containing safety check messages, and obtaining a target requirement document according to the summary requirement table and corresponding safety check error fault codes; Generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code, and the source program file; Deploy the diagnostic software to the electronic system of the actual vehicle, start the diagnostic software, perform security verification on the message, and obtain security verification information; When a safety check error occurs when the safety check information is being safety checked, a vehicle fault code is read and a fault message is located according to the vehicle fault code.

2. The method according to claim 1, characterized in that The step of processing the CAN communication matrix to obtain a summary requirement table containing safety check messages, and obtaining a target requirement document according to the summary requirement table and the corresponding safety check error fault code comprises: Filter the CAN communication matrix to obtain the message name, signal segment name, signal ID and byte bit information of CRC check; Generate a summary requirement table of security check messages according to the message name, the signal network segment name, the signal ID and the byte bit information of the CRC check; Determine the message counter fault code and the CRC check fault code according to the byte bit information of the CRC check; According to the summary requirement table, the message counter fault code and the CRC check fault code, a target requirement document is obtained.

3. The method according to claim 1, characterized in that The step of generating a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file according to the target requirement document, and obtaining diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file comprises: Identify the CAN identifier, network segment name, diagnostic trouble code-cyclic redundancy check result, diagnostic trouble code counter and CAN identification in the target requirement document requirements; Generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code, and a source program file according to the CAN identifier, the network segment name, the diagnostic fault code-cyclic redundancy check result, the diagnostic fault code counter, and the CAN identifier; The diagnostic software is obtained according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file.

4. The method according to claim 3, characterized in that The step of obtaining the diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file comprises: Generate a callback function structure according to the CAN identifier, the network segment name, the diagnostic trouble code-cyclic redundancy check result, the diagnostic trouble code counter and the CAN identifier; Determine a fault signal variable according to the CAN identifier, the network segment name, the diagnostic trouble code-cyclic redundancy check result, the diagnostic trouble code counter and the CAN identifier; The fault signal variable is added to the callback function structure, the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file to obtain the diagnostic software.

5. The method according to claim 1, characterized in that The steps of deploying the diagnostic software to the electronic system of the actual vehicle, starting the diagnostic software, and performing security verification on the message to obtain security verification information include: Compile the diagnostic software to generate a flash package; The flashing package is deployed to the electronic system of the actual vehicle, and the diagnostic software is started to perform security verification on the message to obtain security verification information.

6. The method according to claim 5, characterized in that The step of deploying the flashing package to the electronic system of the actual vehicle, starting the diagnostic software, and performing security verification on the message to obtain security verification information includes: Deploy the flashing package to the electronic system of the actual vehicle, start the diagnostic software, perform security check on the message, and obtain error information; The error information is transmitted to the diagnostic protocol stack to obtain safety verification information.

7. The method according to claim 1, characterized in that When a safety check error occurs during the safety check of the safety check information, the step of reading a vehicle fault code and locating a fault message according to the vehicle fault code comprises: When a safety check error occurs during the safety check of the safety check information, the message is identified to obtain a vehicle fault code; The fault message is located according to the vehicle fault code and the target requirement document.

8. A CAN message information security fault detection automatic development device, characterized in that: The device comprises: A demand analysis module, used for processing the CAN communication matrix to obtain a summary demand table containing safety check messages, and obtaining a target demand document according to the summary demand table and the corresponding safety check error fault code; A function generation module, used to generate a signal callback function code file of a message security check error fault diagnosis signal, a declaration header file of a diagnostic fault code and a source program file according to the target requirement document, and obtain diagnostic software according to the signal callback function code file, the declaration header file of the diagnostic fault code and the source program file; A software deployment module, used to deploy the diagnostic software to the electronic system of the actual vehicle, start the diagnostic software, perform security verification on the message, and obtain security verification information; The fault diagnosis module is used to read the vehicle fault code and locate the fault message according to the vehicle fault code when a safety check error occurs during the safety check of the safety check information.

9. A CAN message information security fault detection automation development equipment, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automated development method for CAN message information security fault detection according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the CAN message information security fault detection automation development method according to any one of claims 1 to 7 are implemented.