Automobile networking diagnosis method and device and computer equipment
By communicating with the server, downloading relevant files and performing security verification, the problem of large resource utilization and insufficient security of traditional automotive diagnostic equipment software is solved, and a more efficient and safe diagnosis process is achieved.
Patent Information
- Application Number
- CN202510036391.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-02
AI Technical Summary
The software resources of traditional automotive diagnostic equipment occupy a large amount of resources and is insufficient in security, which is easy to be decrypted and cracked by professionals.
Ensure the security of the diagnostic process by communicating with the server, downloading database files and independent dynamic library files, and using security policy seed information for security verification.
It reduces the use of equipment resource space by diagnostic software, improves the security of the software, prevents the software from being cracked, and reduces maintenance costs.
Smart Images

Figure CN119916777A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile diagnosis, and in particular to an automobile networking diagnosis method, device and computer equipment. Background Art
[0002] Automobile diagnosis is to determine the technical condition of the automobile and find out the fault location and cause without disassembling it (or only removing individual parts). It includes the inspection and diagnosis of automobile engines, chassis, body and accessories, exhaust pollutants and noise, and new energy automobile battery pack information.
[0003] The traditional diagnostic method is to connect the OBD male connector of the diagnostic device to the female connector on the car, power on the vehicle, and use the built-in program and configuration of the diagnostic device to perform communication diagnosis on the vehicle. In this case, the resource space required for the diagnostic program will continue to increase as demand increases, reducing the diversity of software that can be adapted to the device. In addition, although the program and configuration files are encrypted and placed in a hidden space, they are still stored locally, so there is a greater risk of being decrypted and cracked by professionals, and the diagnostic program software security is insufficient.
[0004] The automotive industry is currently experiencing a period of strong development, and the demand for car maintenance is also increasing. A diagnostic device will be equipped with a variety of vehicle model software, so reducing the software's occupation of device resource space and improving software security are the top market demands. Summary of the invention
[0005] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, the purpose of the present invention is to provide a vehicle networking diagnosis method, device and computer equipment for new energy vehicle equipment.
[0006] To achieve the above objectives, in a first aspect, a vehicle networking diagnosis method for a new energy vehicle device according to an embodiment of the present invention includes:
[0007] S101, communicating with a server and requesting the server to download a database file and an independent dynamic library file;
[0008] S102, communicating with the diagnosed vehicle, receiving response information from the diagnosed vehicle, and obtaining security policy seed information seed according to the response information;
[0009] S103, using the security policy seed information seed as a query parameter, and transmitting it to the server for security policy information query;
[0010] S104, receiving the security verification key key returned by the server, and sending the security verification key key to the diagnosed vehicle for verification;
[0011] S105, receiving the verification result of the diagnosed vehicle, if the verification is successful, proceed to the next step, otherwise end the diagnosis;
[0012] S106: Read the data stream of the diagnosed vehicle, and perform fault diagnosis according to the data stream.
[0013] Further, according to an embodiment of the present invention, after step S106, the method further includes the following steps:
[0014] S107, saving the response data packet of each data item of the diagnosed vehicle control unit ECU;
[0015] S108, judging whether there is abnormality and / or illegal operation according to the response data packet of the diagnosed vehicle control unit ECU;
[0016] S109: If it is determined to be an abnormal and / or illegal operation, the operation information is reported to the backend server for security review;
[0017] S110, receiving the security audit result, and determining whether to lock the diagnostic device according to the security audit result.
[0018] Further, according to an embodiment of the present invention, after step S110, the method further includes the following steps:
[0019] S111, writing important process data during the execution of each step into a log file;
[0020] S112: The generated log is then stored in the log database.
[0021] Further, according to an embodiment of the present invention, in step S101, requesting the server to download the database file includes the following steps:
[0022] S1011, parsing the successfully downloaded database file;
[0023] S1012, loading the parsed file into memory;
[0024] S1013, deleting the downloaded file from the memory;
[0025] Wherein, in step S1011, parsing the successfully downloaded database file includes the following steps:
[0026] S10111, read the downloaded file content into the string class;
[0027] S10112. Decrypt the string in the string class using the AES algorithm. The format of the decrypted string is XML or JSON.
[0028] S10113. Perform class parsing on the XML format string through the tinyxml2 library, and / or perform class parsing on the JSON format string through the rapidjson library.
[0029] Further, according to an embodiment of the present invention, in step S108, the method for determining whether an abnormal operation occurs includes the steps of:
[0030] S1081, storing the current data item ID and the response data packet of the diagnosed vehicle control unit ECU into a map set;
[0031] S1082, judging whether the data has been reported for warning by the data item ID in the map, if it has been reported, then stop and end, otherwise proceed to the next step;
[0032] S1083, obtaining valid data bytes through the ECU response data packet of the data item, and then calculating them into unsigned integer values;
[0033] S1084. Check whether the data item ID has been stored in the map set. If not, store the calculated value in the set ordered set. If it has been stored, compare it with the historical value to determine whether it is an abnormal operation.
[0034] Further, according to an embodiment of the present invention, in step S1084, the method of comparing with the historical value if it has been stored to determine whether it is an abnormal operation includes the steps of:
[0035] S10841. First, get the first and last two items of the set. The first item is the minimum value, and the last item is the maximum value.
[0036] S10842. If the maximum value obtained is greater than the minimum value, determine whether the difference between the two is greater than or equal to half of the limit value. If the condition is met, the data item is abnormal.
[0037] Further, according to an embodiment of the present invention, in step S109, the step of reporting the operation information to the background server for security review includes:
[0038] S1091. Obtain any one or more of the serial number, software package ID, software version, data item name, location, current device system time, and warning type of operation information of the current device;
[0039] S1092, uploading the acquired operation information to the backend server database;
[0040] S1093, searching the diagnostic log on the diagnostic data management platform according to the data item ID information stored in the backend server;
[0041] S1094, searching for diagnostic data of the data item ID according to the log, analyzing and confirming whether the data is abnormal, and whether there are traces of being cracked by brute force algorithm;
[0042] S1095, locking the device according to the serial number of the device.
[0043] Further, according to an embodiment of the present invention, before step S101, the method further includes the following steps:
[0044] S201, obtaining a configuration library file, and encrypting and compiling the configuration library into a database file;
[0045] S202, compiling the program files associated with the security verification into an independent dynamic library;
[0046] S203, storing the database file and the independent dynamic library in the server so as to be downloaded or queried by the diagnostic device.
[0047] In a second aspect, an embodiment of the present invention further provides a vehicle networking diagnostic device, comprising:
[0048] A library file download module, wherein the library file download module is used to communicate with the server and request the server to download the database file and the independent dynamic library file;
[0049] A security seed acquisition module, the security seed acquisition module is used to communicate with the diagnosed vehicle, receive response information from the diagnosed vehicle, and acquire security policy seed information seed according to the response information;
[0050] A security policy query module, wherein the security policy query module is used to transmit the security policy seed information seed as a query parameter to a server for security policy information query;
[0051] A security policy verification module, the security policy verification module is used to receive the security verification key key returned by the server, and send the security verification key key to the diagnosed vehicle for verification;
[0052] A verification result receiving module, the verification result receiving module is used to receive the verification result of the diagnosed vehicle, if the verification is successful, then proceed to the next step, otherwise the diagnosis is terminated;
[0053] A vehicle fault diagnosis module is used to read the data stream of the diagnosed vehicle and perform fault diagnosis based on the data stream.
[0054] In a third aspect, a computer device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned vehicle networking diagnosis method when executing the computer program;
[0055] The embodiment of the present invention provides a vehicle networking diagnosis method, device and computer equipment for new energy vehicle equipment. The method includes steps S101, communicating with a server and requesting the server to download a database file and an independent dynamic library file; S102, communicating with a diagnosed vehicle and receiving a response message from the diagnosed vehicle, and obtaining a security policy seed information seed according to the response message; S103, using the security policy seed information seed as a query parameter, transmitting the security policy information seed to the server for security policy information query; S104, receiving a security verification key key returned by the server, and sending the security verification key key to the diagnosed vehicle for verification; S105, receiving the verification result of the diagnosed vehicle, if the verification is successful, proceeding to the next step, otherwise ending the diagnosis; S106, reading the data stream of the diagnosed vehicle, and performing fault diagnosis according to the data stream. In this way, the occupation of the diagnostic software on the diagnostic equipment resource space is reduced through the network diagnosis method, and the security of the software is greatly improved to prevent the software from being cracked. Improve the efficiency of software compilation and subsequent maintenance, increase the number of server file downloads and data item abnormality monitoring and other control measures, increase software controllability and reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0057] Figure 1 is a flow chart of a vehicle networking diagnostic method provided by an embodiment of the present invention;
[0058] Figure 2 is a flow chart of another automobile networking diagnosis method provided by an embodiment of the present invention;
[0059] Figure 3 is a flow chart of another automobile networking diagnosis method provided by an embodiment of the present invention;
[0060] Figure 4 It is a flow chart of a method for searching and downloading diagnosis-related files from a server provided by an embodiment of the present invention;
[0061] Figure 5is a flow chart of a security verification method provided by an embodiment of the present invention;
[0062] Figure 6 is a flow chart of a method for monitoring and processing abnormal and illegal operations during a diagnosis process provided by an embodiment of the present invention;
[0063] Figure 7 is a structural block diagram of a vehicle networking diagnostic device provided by an embodiment of the present invention;
[0064] Figure 8 It is a structural block diagram of a computer device provided by an embodiment of the present invention.
[0065] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0066] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0067] On the one hand, see Figure 1 , an embodiment of the present invention provides a vehicle networking diagnosis method, comprising the steps of:
[0068] S101, communicating with a server and requesting the server to download a database file and an independent dynamic library file;
[0069] S102, communicating with the diagnosed vehicle, receiving response information from the diagnosed vehicle, and obtaining security policy seed information seed according to the response information;
[0070] S103, using the security policy seed information seed as a query parameter, and transmitting it to the server for security policy information query;
[0071] S104, receiving the security verification key key returned by the server, and sending the security verification key key to the diagnosed vehicle for verification;
[0072] S105, receiving the verification result of the diagnosed vehicle, if the verification is successful, proceed to the next step, otherwise end the diagnosis;
[0073] S106: Read the data stream of the diagnosed vehicle, and perform fault diagnosis according to the data stream.
[0074] Specifically, in step S101, during the diagnosis process, the diagnostic device may establish a network connection with the server and download files related to the diagnosis by requesting the server. The files related to the diagnosis may include database files and independent dynamic library files. The download process of the files related to the diagnosis is as follows: Figure 4 As shown in , in this process, when the software running on the diagnostic device performs such as reading version information, reading data stream, action test or special function, it is transmitted to the background server according to the name of the diagnostic package and the index, and the server is queried through the index network to check the relevant files. If the corresponding file is found, it is downloaded to the diagnostic device. Requesting the server to download the database file includes the steps of: S1011, parsing the successfully downloaded database file; for example, decrypting and decoding the downloaded file, parsing it into instructions that can be executed or recognizable data by the software running on the diagnostic device. Among them, in step S1011, the parsing of the successfully downloaded database file and the independent dynamic library file includes the steps of: S10111, reading the content of the downloaded file into the string string class; S10112, decrypting the string in the string string class by the AES algorithm, and the format of the decrypted string is xml or JSON; S10113, class parsing the xml format string through the tinyxml2 library, and / or class parsing the JSON format string through the rapidjson library.
[0075] Then, in step S1012, the parsed file is loaded into the memory. After being stored in the memory, the software running the diagnostic device can quickly read the instructions or data of the parsed related file. After the downloaded file is parsed and stored in the memory, the downloaded file is deleted from the memory through step S1013. Since the memory already stores the file data that can be read, for the security of the file, the file downloaded and stored in the external memory can be deleted to ensure that the related file will not be leaked to the outside.
[0076] After the corresponding database file and independent dynamic library file are downloaded from the server to the diagnostic device for storage, the diagnostic device can perform relevant configuration according to the downloaded file, communicate with the diagnosed vehicle, and continue to perform the next diagnostic operation. In step S102, communicate with the diagnosed vehicle, receive the response information of the diagnosed vehicle, and obtain the security policy seed information seed according to the response information; when the software running the diagnostic device performs vehicle diagnosis, it is necessary to perform security verification with the vehicle, and the diagnosis process of the advanced function can only be performed after the verification is passed. First, the software diagnostic software running the diagnostic device sends a command to the vehicle, and obtains the security policy seed information seed according to the value of the vehicle response. Then in step S103, the security policy seed information seed is used as a query parameter and transmitted to the server for security policy information query; the process is to combine the security policy seed information seed and other necessary information such as the dynamic library ID into a JSON string as a query parameter, and pass it to the background server to perform the corresponding security verification key key query. After the query is successful, the dynamic library program is executed according to the passed parameters. After the execution of the dynamic library program is completed, the security verification key key is returned to the diagnostic device. The returned key is used to determine whether the diagnostic software program continues to execute. The diagnostic device receives the security verification key key returned by the server through step S104, and determines whether the security verification key key is empty. If it is empty, it indicates that the returned security verification key key is abnormal and the process ends. Otherwise, it indicates that the returned security verification key key is normal. The security verification key key is sent to the diagnosed vehicle for verification; after the security verification key key value is obtained normally, the security verification key key is sent to the vehicle for verification after combination, and the verification result of the diagnosed vehicle is received in step S105. If the verification is successful, proceed to the next step, otherwise the diagnosis ends;
[0077] If the verification is successful, the next step of the function will be continued, otherwise the function cannot be executed. The security verification process is as follows Figure 5 As shown in . Since the safety verification algorithm process is completely separated from the diagnostic software, it is an independently implemented algorithm and compiled into a Rel ease version dynamic library and then stored in the background server. When the diagnostic software is used, the relevant parameters are passed in to access the server online for calling, and the algorithm in the request library is executed to return the result. Therefore, it can effectively prevent professional technicians from cracking the algorithm, greatly improve the security and controllability of the software algorithm, and achieve the role of protecting the software results. After completing the safety verification, the corresponding advanced functions can be executed. In step S106, the data stream of the diagnosed vehicle is read, and corresponding fault diagnosis and other operations are performed according to the data stream.
[0078] This method of diagnosing vehicles through networking reduces the space occupied by diagnostic software in diagnostic equipment resources, greatly improves software security, prevents software from being cracked, improves software compilation and subsequent maintenance efficiency, increases server file download times and data item abnormality monitoring and other control measures, increases software controllability and reduces maintenance costs. Currently, this type of method has covered models such as Gaohe, Lantu, and Tianji.
[0079] See also Figure 2 In another embodiment of the present invention, after step S106, the method further includes the following steps:
[0080] S107, saving the response data packet of each data item of the diagnosed vehicle control unit ECU;
[0081] S108, judging whether there is abnormality and / or illegal operation according to the response data packet of the diagnosed vehicle control unit ECU;
[0082] S109: If it is determined to be an abnormal and / or illegal operation, the operation information is reported to the backend server for security review;
[0083] S110, receiving the security audit result, and determining whether to lock the diagnostic device according to the security audit result.
[0084] Specifically, in the process of diagnosing vehicle faults through the diagnostic equipment, the abnormal jump of the data stream value can also be monitored through the above steps to ensure the compliance and safety of the diagnostic equipment during use. In order to monitor the compliance and safety of the diagnostic equipment during use. In step S107, the response data packet of the diagnosed vehicle control unit ECU of each data item is saved; in this process, when the user uses the data stream reading function, the software of the diagnostic equipment will automatically save the ECU response data packet of each data item in real time.
[0085] During the data stream refresh process, the data item information displayed on the current page is recorded in the map collection in real time. The map declaration uses the data item ID as the key and the structure containing the current data item response data packet and whether to report the warning as the value. The map information is illustrated in a table as shown in Table 1:
[0086] Table 1:
[0087]
[0088] And in step S108, according to the response data packet of the diagnosed vehicle control unit ECU, determine whether there is abnormal and / or illegal operation; the method for determining whether there is abnormal operation includes the steps: S1081, store the current data item ID and the response data packet of the diagnosed vehicle control unit ECU into the map set; after the user enters the data stream reading function, the software of the diagnostic device stores the data item ID and the ECU response data packet on the current device display interface into the map set. Then in step S1082, determine whether the data has been reported for warning through the data item ID in the map. If it has been reported, do not continue and end, otherwise execute the next step. If it has been reported, there is no need to continue reporting, avoid repeated reporting, and thus reduce the number of reported warning items. If it has not been reported, then in step S1083, obtain the valid data bytes through the ECU response data packet of the data item, and then calculate it into an unsigned integer value;
[0089] During the data stream refresh process, the data values within 4 bytes of valid data are converted into unsigned integer data in real time, and then the data values are saved to the set collection. According to the characteristics of the set collection, the stored values will be automatically sorted. Then, the data item ID is used as the key and the set collection is used as the value to store it in the map. An example in table form is shown in Table 2:
[0090] Table 2:
[0091]
[0092]
[0093] And in step S1084, the data item ID is used to find out whether it has been stored in the map set. If not, the calculated value is stored in the set ordered set; if it has been stored, it is compared with the historical value to determine whether it is an abnormal operation. The method for determining whether it is an abnormal operation includes the steps of: S10841, first obtain the first and last two items of the set set, the first item is the minimum value, and the last item is the maximum value; S10842, if the maximum value obtained is greater than the minimum value, then determine whether the difference between the two is greater than or equal to half of the limit value, if the condition is met, the data item is abnormal. Specifically, the data item ID is used to find out whether it has been stored in the map set. If not, the calculated value is stored in the set ordered set. If it has been stored, it is compared with the historical value. First, the first and last two items of the set set are obtained. According to the characteristics of the set ordered set, the first item is the minimum value and the last item is the maximum value. If the maximum value obtained is greater than the minimum value, then determine whether the difference between the two is greater than or equal to half of the limit value. If the condition is met, the data item is abnormal.
[0094] In step S109, if it is judged to be an abnormal and / or illegal operation, the operation information is reported to the background server for security audit; the steps for reporting the warning are: S1091, obtain any one or more of the serial number, software package ID, software version, data item name, location, current device system time, and warning type of the current device operation information; and combine the above information into a JSON statement, and convert the statement text string into UTF-8 encoding format. Then in step S1092, the operation information is uploaded to the background server database. And call the API interface of the access server to upload the combined JSON statement to the background server database. And in step S1093, according to the data item ID information stored in the background server, go to the diagnostic data management platform to find the diagnostic log log; because the log log records past operations. Through the diagnostic log log, it can be judged whether there is abnormal operation of the diagnostic device. And in step S1094, according to the log log, find the diagnostic data of the data item ID, analyze and confirm whether the data is abnormal, and whether there are traces of brute force cracking algorithm; S1095, the device is locked according to the serial number of the device. The diagnostic log can be used to determine whether there are any abnormal operations on the diagnostic device. If a cracking operation is detected, the diagnostic device needs to be locked to achieve security protection. After review and confirmation, it is determined whether to lock the device.
[0095] In step S110, if the audit finds any violation or security problem, a lock control instruction can be sent to the diagnostic device through the background server. The diagnostic device receives the security audit result and determines whether to lock the diagnostic device according to the security audit result. The specific process is as follows: Figure 6 In this process, the algorithm determines whether it is an abnormal or illegal operation, and then automatically reports it to the company's backend for review. This function is mainly used to prevent the software from being forcibly cracked by the user's data flow algorithm and improve the security of software data.
[0096] See also Figure 2 In another embodiment of the present invention, after step S110, the method further includes the following steps:
[0097] S111, writing important process data during the execution of each step into a log file;
[0098] S112: The generated log is then stored in the log database.
[0099] Specifically, the log data is recorded and stored through the process of step S111 and step S112. Steps S111 and S112 are closely related to each step in the software operation process of the diagnostic device, and the implementation method is to write important process data in the process into the log file, and then store the generated log in the log database for function management, maintenance, and troubleshooting.
[0100] See also Figure 3 In another embodiment of the present invention, before step S101 (S204), the method further includes the following steps:
[0101] S201, obtaining a configuration library file, and encrypting and compiling the configuration library into a database file;
[0102] S202, compiling the program files associated with the security verification into an independent dynamic library;
[0103] S203, storing the database file and the independent dynamic library in the server so as to be downloaded or queried by the diagnostic device.
[0104] Specifically, it is necessary to first design each function configuration library, and design the diagnostic function reading version information, reading data flow, action test and special functions into ini format files according to certain rules, so as to facilitate storage encryption and reading, and to load and call in the diagnostic program. And through step S201, obtain the configuration library file, and encrypt and compile the configuration library into a database file. In this process, the completed configuration library obtained is encrypted, compiled and packaged into a database file, and the library file finally generated can be called by multiple platforms. And in step S202, compile the program files associated with security verification into an independent dynamic library; in this process, the important module codes such as security verification are processed independently and compiled into dynamic library files to distinguish them from the diagnostic software modules. Since most of the advanced diagnostic functions require security verification, the software security will be further enhanced after the separation process. Afterwards, in step S203, the database file and the independent dynamic library are stored in the server for download or query call by the diagnosed device. In this process, the database file completed in step S202 and the dynamic library file completed in step S203 are placed in the background server respectively, and the data packet, index, menu and file information are transmitted. The server background can provide services for the diagnostic equipment to query and download data online through the website.
[0105] This method of online vehicle diagnosis reduces the space occupied by software resources and greatly improves the security of the software, preventing it from being cracked. Currently, this method has covered models such as Gaohe, Lantu, and Tianji.
[0106] In addition, since the functional algorithms and configuration files are all on the background server, when there is a bug in the module, it can be modified and recompiled and uploaded to the background server without updating the release version. This reduces the time of the software development process, improves development efficiency and maintenance efficiency, and maintenance personnel can use it more conveniently and quickly to repair vehicles, reducing maintenance costs.
[0107] On the other hand, see Figure 7 , an embodiment of the present invention further provides a vehicle networking diagnostic device, comprising: a library file download module, a security seed acquisition module, a security policy query module, a security policy verification module, a verification result receiving module and a vehicle fault diagnosis module, wherein the library file download module is used to communicate with a server and request the server to download a database file and an independent dynamic library file;
[0108] The security seed acquisition module is used to communicate with the diagnosed vehicle, receive response information from the diagnosed vehicle, and acquire security policy seed information seed according to the response information;
[0109] The security policy query module is used to transmit the security policy seed information seed as a query parameter to the server for security policy information query;
[0110] The security policy verification module is used to receive the security verification key key returned by the server, and send the security verification key key to the diagnosed vehicle for verification;
[0111] The verification result receiving module is used to receive the verification result of the diagnosed vehicle, and if the verification is successful, proceed to the next step, otherwise the diagnosis is terminated;
[0112] The vehicle fault diagnosis module is used to read the data stream of the diagnosed vehicle and perform fault diagnosis according to the data stream.
[0113] This networked vehicle diagnostic device reduces the space occupied by diagnostic software on diagnostic equipment resources, greatly improves software security, prevents software from being cracked, improves software compilation and subsequent maintenance efficiency, increases server file download times and data item abnormality monitoring and other control measures, increases software controllability and reduces maintenance costs. Currently, this type of method has covered models such as Gaohe, Lantu, and Tianji.
[0114] Thirdly, see Figure 8 An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned vehicle networking diagnostic method when executing the computer program.
[0115] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer device.
[0116] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the figure is only an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the figure, or may combine certain components, or different components. For example, the computer device may also include an input / output device, a network access device, a bus, etc.
[0117] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete preset hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0118] The memory may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The memory may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Furthermore, the memory may include both an internal storage unit and an external storage device of the computer device. The memory is used to store the computer program and other programs and data required by the computer device. The memory may also be used to temporarily store data that has been output or is to be output.
[0119] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the vehicle networking diagnosis method for new energy vehicle equipment as described above is implemented.
[0120] The computer program may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above method embodiments may be implemented. The computer program includes computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0121] It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] The steps in the method of the embodiment of the present invention can be adjusted in order, combined or deleted according to actual needs.
[0124] The modules or units in the system of the embodiment of the present invention may be combined, divided or deleted according to actual needs.
[0125] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic preset hardware, or in a combination of computer software and electronic preset hardware. Whether these functions are performed in preset hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0126] In the embodiments provided by the present invention, it should be understood that the disclosed device / computer equipment 600 and method can be implemented in other ways. For example, the device / computer equipment 600 embodiment described above is only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0127] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A vehicle networking diagnosis method, characterized in that: include: S101, communicating with a server and requesting the server to download a database file and an independent dynamic library file; S102, communicating with the diagnosed vehicle, receiving response information from the diagnosed vehicle, and obtaining security policy seed information seed according to the response information; S103, using the security policy seed information seed as a query parameter, and transmitting it to the server for security policy information query; S104, receiving the security verification key key returned by the server, and sending the security verification key key to the diagnosed vehicle for verification; S105, receiving the verification result of the diagnosed vehicle, if the verification is successful, proceed to the next step, otherwise end the diagnosis; S106: Read the data stream of the diagnosed vehicle, and perform fault diagnosis according to the data stream.
2. The vehicle networking diagnosis method according to claim 1, characterized in that: After step S106, the method further includes the following steps: S107, saving the response data packet of each data item of the diagnosed vehicle control unit ECU; S108, judging whether there is abnormality and / or illegal operation according to the response data packet of the diagnosed vehicle control unit ECU; S109: If it is determined to be an abnormal and / or illegal operation, the operation information is reported to the backend server for security review; S110, receiving the security audit result, and determining whether to lock the diagnostic device according to the security audit result.
3. The vehicle networking diagnosis method according to claim 2, characterized in that: After step S110, the method further includes the following steps: S111, writing important process data during the execution of each step into a log file; S112: The generated log is then stored in the log database.
4. The vehicle networking diagnostic method according to claim 1, characterized in that: In step S101, requesting the server to download the database file includes the following steps: S1011, parsing the successfully downloaded database file; S1012, loading the parsed file into memory; S1013, deleting the downloaded file from the memory; Wherein, in step S1011, parsing the successfully downloaded database file includes the following steps: S10111, read the downloaded file content into the string class; S10112. Decrypt the string in the string class using the AES algorithm. The format of the decrypted string is XML or JSON. S10113. Perform class parsing on the XML format string through the tinyxml2 library, and / or perform class parsing on the JSON format string through the rapidjson library.
5. The vehicle networking diagnosis method according to claim 2, characterized in that: In step S108, the method for determining whether an abnormal operation occurs includes the following steps: S1081, storing the current data item ID and the response data packet of the diagnosed vehicle control unit ECU into a map set; S1082, judging whether the data has been reported for warning by the data item ID in the map, if it has been reported, then stop and end, otherwise proceed to the next step; S1083, obtaining valid data bytes through the ECU response data packet of the data item, and then calculating them into unsigned integer values; S1084. Check whether the data item ID has been stored in the map set. If not, store the calculated value in the set ordered set. If it has been stored, compare it with the historical value to determine whether it is an abnormal operation.
6. The vehicle networking diagnosis method according to claim 5, characterized in that: In step S1084, if the stored value is compared with the historical value, the method for determining whether it is an abnormal operation includes the following steps: S10841. First, get the first and last two items of the set. The first item is the minimum value, and the last item is the maximum value. S10842. If the maximum value obtained is greater than the minimum value, determine whether the difference between the two is greater than or equal to half of the limit value. If the condition is met, the data item is abnormal.
7. The vehicle networking diagnosis method according to claim 2, characterized in that: In step S109, the step of reporting the operation information to the backend server for security review includes: S1091. Obtain any one or more of the serial number, software package ID, software version, data item name, location, current device system time, and warning type of operation information of the current device; S1092, uploading the acquired operation information to the backend server database; S1093, searching the diagnostic log on the diagnostic data management platform according to the data item ID information stored in the backend server; S1094, searching for diagnostic data of the data item ID according to the log, analyzing and confirming whether the data is abnormal, and whether there are traces of being cracked by brute force algorithm; S1095, locking the device according to the serial number of the device.
8. The vehicle networking diagnosis method according to claim 1 or 4, characterized in that: Before step S101, the method further includes the following steps: S201, obtaining a configuration library file, and encrypting and compiling the configuration library into a database file; S202, compiling the program files associated with the security verification into an independent dynamic library; S203, storing the database file and the independent dynamic library in the server so as to be downloaded or queried by the diagnostic device.
9. A vehicle networking diagnostic device, characterized in that: include: A library file download module, wherein the library file download module is used to communicate with the server and request the server to download the database file and the independent dynamic library file; A safety seed acquisition module, the safety seed acquisition module is used to communicate with the diagnosed vehicle, receive response information from the diagnosed vehicle, and acquire safety policy seed information seed according to the response information; A security policy query module, wherein the security policy query module is used to transmit the security policy seed information seed as a query parameter to a server for security policy information query; A security policy verification module, the security policy verification module is used to receive the security verification key key returned by the server, and send the security verification key key to the diagnosed vehicle for verification; A verification result receiving module, the verification result receiving module is used to receive the verification result of the diagnosed vehicle, if the verification is successful, then proceed to the next step, otherwise the diagnosis is terminated; A vehicle fault diagnosis module is used to read the data stream of the diagnosed vehicle and perform fault diagnosis based on the data stream.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the vehicle networking diagnosis method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
JSON-based vehicle diagnosis method and related device
CN120686773A
