Verification method and system of vehicle embedded software version, electronic equipment and storage medium
By reading the original data of random addresses and data lengths in the car for SHA256 hash fingerprint calculation, comparing the first hash fingerprint and the second hash fingerprint, the problem of car software version management and illegal tampering is solved, and the legality and management security of the software version are realized.
Patent Information
- Application Number
- CN202510030845.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-02
AI Technical Summary
With the development of OTA technology, automotive software can be easily upgraded through the network, resulting in different production batches of vehicles that may have different software versions, and even different software versions between vehicle controllers produced in the same batch, which brings management challenges to vehicle software control. In addition, after illegally writing third-party embedded software, the software manager cannot identify it, resulting in great risks in fault management and program management.
By reading the embedded program file management module to generate the random address and data length raw data for verification based on the file content, perform SHA256 hash fingerprint calculation, obtain the first hash fingerprint and the second hash fingerprint, and compare the two to determine the legitimacy of the software version.
It effectively solves management problems caused by different software versions, and prevents illegal tampering of third-party embedded software, ensuring the legality and management security of vehicle software.
Smart Images

Figure CN119917160A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle-mounted embedded software version verification, and in particular relates to a vehicle embedded software version verification method, system, electronic equipment and storage medium. Background Art
[0002] When developing a car controller, the assembly number is used to manage the one-to-one correspondence between the hardware number and the software number. For example, the hardware part number A of a controller is version 01, and the software part number B is version 02, which together constitute the assembly part number C version 01. Whether it is a hardware or software version upgrade, the version of the assembly part number will be upgraded synchronously to control the development status of the controller. In the past, there were only a small number of controllers on a car model, and once the controller was developed, it would not be easily changed, so only the vehicle identification number (VIN code) was needed to trace the production batch of the vehicle.
[0003] However, in recent years, with the development of OTA, the software of cars that have been sold can be easily upgraded through the Internet. Vehicles from different production batches may have different software, and even vehicles produced in the same batch may have different software versions between controllers, which brings management challenges to the control of vehicle software. Even after the vehicle is illegally flashed with third-party on-board embedded software by non-original manufacturers, as long as the fixed software version number identification content remains unchanged, the software management party (original after-sales) cannot recognize that the controller has been illegally flashed with a new software program. When a fault occurs, it is impossible to locate the cause based on the original program, which brings great risks and problems to vehicle fault management and program management. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a vehicle embedded software version verification method, system, electronic device and storage medium, which are used to fully or at least partially solve the management problems caused by different software versions and the technical problems of vehicle failure caused by illegal tampering of third-party vehicle-mounted embedded software in the above-mentioned prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for verifying a vehicle embedded software version, comprising: Read the embedded program file management module to generate random address and data length raw data for inspection based on the file content; Perform SHA256 hash fingerprint calculation based on the random address and data length original data to obtain a first hash fingerprint; Obtain a second hash fingerprint obtained by performing SHA256 hash fingerprint calculation based on the random address and data length original data by the vehicle-mounted embedded software hash fingerprint calculation module; The first hash fingerprint and the second hash fingerprint are compared to obtain a comparison result, and the comparison result is sent to the embedded software version verification notification module so that it selects different execution schemes according to the comparison result.
[0006] Optionally, before reading the random address and data length raw data generated by the embedded program file management module according to the file content, the vehicle embedded software version verification method further includes: The embedded program file management module manages the vehicle information, the program files of each on-board controller and the relationship between the two; Among them, the vehicle information includes but is not limited to the vehicle VIN code, the vehicle T-BOX device identification number, and the software version number of each on-board controller of the vehicle; the program files of each on-board controller contain the original data, data address and data length information stored in the on-board controller memory.
[0007] Optionally, the embedded program file management module is read to generate random address and data length raw data for verification based on the file content, including: Based on OTA and network communication processing functions, it communicates with the embedded program file management module, obtains the original file stored in the embedded program file management module according to the software version number, and obtains the corresponding starting address and data length original data through the local program reading function.
[0008] Optionally, the process of obtaining the second hash fingerprint by performing SHA256 hash fingerprint calculation based on the random address and data length original data by the vehicle-mounted embedded software hash fingerprint calculation module includes: The embedded program file management module communicates with the vehicle-mounted embedded software hash fingerprint calculation module through OTA and network communication processing functions, and sends the random storage address hash fingerprint calculation instruction to the vehicle using the UDS protocol based on the UDS diagnostic instruction processing function, where the instruction contains the software version number, starting address and data length determined by the embedded program file management module; The vehicle-mounted embedded software hash fingerprint calculation module obtains the original data from each controller memory through the original data reading function of each controller memory according to the software version number, starting address and data length contained in the instruction; The vehicle-mounted embedded software hash fingerprint calculation module performs SHA256 hash fingerprint calculation on the acquired original data to obtain a second hash fingerprint.
[0009] Optionally, the embedded software version verification notification module archives the vehicle information, software version number, operation time, random address, random length, first hash fingerprint, second hash fingerprint, comparison result and execution plan through the log function.
[0010] Optionally, the first hash fingerprint and the second hash fingerprint are compared to obtain a comparison result, and the comparison result is sent to the embedded software version verification notification module so that it selects different execution schemes according to the comparison result, including but not limited to: If the comparison results of the first hash fingerprint and the second hash fingerprint are consistent, saving the log information; If the comparison results of the first hash fingerprint and the second hash fingerprint are inconsistent, various notification methods are used to notify the technician that the current vehicle software version has been tampered with by a third party and to take timely processing measures.
[0011] In a second aspect, an embodiment of the present application further provides a vehicle embedded software version verification system, comprising: Embedded program file management module, vehicle-mounted embedded software hash fingerprint calculation module, embedded software version verification comparison module and embedded software version verification notification module; The embedded software version verification and comparison module is used to read the random address and data length original data generated by the embedded program file management module according to the file content, and perform SHA256 hash fingerprint calculation based on the random address and data length original data to obtain a first hash fingerprint; The vehicle-side embedded software hash fingerprint calculation module is used to obtain a second hash fingerprint obtained by the vehicle-side embedded software hash fingerprint calculation module performing SHA256 hash fingerprint calculation based on the random address and data length original data; The embedded software version verification comparison module compares the first hash fingerprint and the second hash fingerprint to obtain a comparison result, and sends the comparison result to the embedded software version verification notification module so that it selects different execution plans according to the comparison result.
[0012] Optionally, the embedded program file management module, the vehicle-mounted embedded software hash fingerprint calculation module and the embedded software version verification and comparison module communicate through OTA.
[0013] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned vehicle embedded software version verification method when executing the program.
[0014] In a fourth aspect, an embodiment of the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned vehicle embedded software version verification method are implemented.
[0015] It can be seen from the above technical solutions that the present invention has the following advantages: In the verification method, system, electronic device and storage medium of the vehicle embedded software version provided by this application, the hash fingerprint is calculated based on the random storage address, which ensures that after abnormal flashing / changing of the embedded software of the vehicle controller, the illegally written software cannot deceive the vehicle embedded software management system by imitating the fixed software version number identification. The software has not been changed. Each verification process is to randomly confirm the verification position and length, and calculate the hash fingerprint through SHA256, which compresses the verification data length of the platform end and the vehicle end, taking into account both high performance and effectiveness. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0017] Figure 1 A flowchart of a method for verifying a vehicle embedded software version provided by an embodiment of the present invention; Figure 2 A flow chart of obtaining a second hash fingerprint provided by an embodiment of the present invention; Figure 3 A detailed flow chart of a method for verifying a vehicle embedded software version provided by an embodiment of the present invention; Figure 4 A structural diagram of a vehicle embedded software version verification system provided by an embodiment of the present invention; Figure 5 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to better understand the technical solution of this application, the technical terms involved in this application are now explained: Vehicle VIN code: The vehicle identification code is the ID number of the car. It is determined according to vehicle management standards and contains information such as the vehicle's manufacturer, year, model, body type and code, engine code, and assembly location. The new driving license usually prints the VIN code in the "Vehicle Frame Number" column. In order to identify a vehicle, a set of codes is assigned to the vehicle by the vehicle manufacturer.
[0019] T-BOX refers to: Telematics BOX is referred to as T-BOX, also known as Telematics Control Unit (TCU), which is an intelligent terminal device composed of a processor, GPS module, 4G / 5G module (with SIM card function), and supports multiple interfaces (such as CAN bus, USB, RS-232, Bluetooth, etc.). It is an important part of the Internet of Vehicles system. By connecting the on-board CAN bus and the external cloud platform, it realizes communication and data exchange between vehicles (V2V), vehicles and infrastructure (V2I), and vehicles and the Internet (V2N).
[0020] In-vehicle embedded software: An embedded system generally consists of four parts: an embedded microprocessor, peripheral hardware devices, an embedded operating system, and user applications. It is used to control, monitor, or manage other devices. Embedded software is software designed based on embedded systems. It is also a type of computer software, which is also composed of programs and their documents. It is an important part of embedded systems. The automotive electronic control system is divided into multiple subsystems, each of which contains one or more electronic control units (ECUs). In the era of software-defined cars, the number of ECUs in a modern car can be as high as hundreds. The software running on these ECUs is the in-vehicle embedded software. SHA256 algorithm: A cryptographic hash function algorithm standard. Hash function, also known as hash algorithm, is a method of creating a small digital "fingerprint" from any kind of data. Hash function compresses the message or data into a summary, making the data smaller and fixing the format of the data. The function shuffles and mixes the data to recreate a fingerprint called a hash value (or hash fingerprint). The hash value is usually represented by a short string of random letters and numbers. For any length of message, SHA256 will generate a 256-bit hash value, called a message digest, also known as a hash fingerprint.
[0021] In the detailed description below, various embodiments of the present disclosure will be described more fully. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.
[0022] Hereinafter, the terms "include" or "may include" that may be used in various embodiments of the present disclosure indicate the presence of the disclosed functions or operations, and do not limit the addition of one or more functions or operations. In addition, as used in various embodiments of the present disclosure, the terms "include", "have" and their cognates are intended only to indicate specific features, numbers, steps, operations, or combinations of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, or combinations of the foregoing items.
[0023] In various embodiments of the present disclosure, the expression "or" or "at least one of A or / and B" includes any combination or all combinations of the words listed at the same time. For example, the expression "A or B" or "at least one of A or / and B" may include A, may include B, or may include both A and B.
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] See also Figure 1 The flowchart of a method for verifying a vehicle embedded software version in a specific embodiment is shown, and includes the following execution steps: Step 100: Read the embedded program file management module to generate the random address and data length original data for verification according to the file content.
[0026] In some embodiments, before executing step 100, the steps are also executed: managing the whole vehicle information, the program files of each on-board controller and the relationship between the two through an embedded program file management module; wherein the whole vehicle information includes but is not limited to the vehicle VIN code, the vehicle T-BOX device identification number, and the software version number of each on-board controller of the vehicle; the program files of each on-board controller contain the original data, data address and data length information stored in the on-board controller memory.
[0027] It should be noted that each vehicle VIN code should uniquely correspond to a real new energy commercial vehicle, and each vehicle T-BOX identification number should uniquely correspond to the T-BOX entity on the vehicle. Each vehicle information may contain multiple software version numbers, but each software version number should uniquely correspond to a program file stored in the system. After determining a vehicle VIN code, the embedded program file management module can determine the information of a vehicle. According to the software version number information of the vehicle, the embedded program file management module can find the corresponding software program file. The embedded program file management module randomly determines the verification start address and data length within the allowable range of the data address and data length in the file.
[0028] Specifically, when executing step 100, the following steps can be specifically executed: communicating with the embedded program file management module based on OTA and network communication processing functions, obtaining the original file stored in the embedded program file management module according to the software version number, and obtaining the corresponding starting address and data length original data through the local program reading function.
[0029] Step 101: Perform SHA256 hash fingerprint calculation based on the random address and data length original data to obtain a first hash fingerprint.
[0030] Exemplarily, the first hash fingerprint is a hash fingerprint of 32 bytes.
[0031] Step 102: Obtain a second hash fingerprint obtained by performing SHA256 hash fingerprint calculation on the vehicle-mounted embedded software hash fingerprint calculation module based on the random address and data length original data.
[0032] Step 103: Compare the first hash fingerprint and the second hash fingerprint to obtain a comparison result, and send the comparison result to the embedded software version verification notification module so that it selects different execution plans according to the comparison result.
[0033] Specifically, the first hash fingerprint and the second hash fingerprint are compared to obtain a comparison result, and the comparison result is sent to the embedded software version verification notification module so that it selects different execution plans according to the comparison result, including but not limited to: if the comparison results of the first hash fingerprint and the second hash fingerprint are consistent, the log information is saved; if the comparison results of the first hash fingerprint and the second hash fingerprint are inconsistent, various notification methods are used to notify the technician that the current vehicle software version has been tampered with by a third party and to take timely processing measures.
[0034] Exemplarily, various notification methods include but are not limited to text messages, APP message notifications, etc.
[0035] In some embodiments, the embedded software version verification notification module archives the vehicle information, software version number, operation time, random address, random length, first hash fingerprint, second hash fingerprint, comparison result and execution plan through the log function.
[0036] In this embodiment, the hash fingerprint is calculated based on the random storage address, which ensures that after abnormal flashing / changing of the embedded software of the vehicle controller, the illegally written software cannot deceive the vehicle embedded software management system by imitating the fixed software version number identification. The software has not been changed. Each verification process is to randomly confirm the verification position and length, and calculate the hash fingerprint through SHA256, which compresses the verification data length of the platform and vehicle interaction, taking into account both high performance and effectiveness.
[0037] In one embodiment of the present invention, based on step 102, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner. Figure 2 shown.
[0038] S1020: The embedded program file management module communicates with the vehicle-mounted embedded software hash fingerprint calculation module through the OTA and network communication processing functions, and based on the UDS diagnostic instruction processing function, the random storage address calculation hash fingerprint instruction is sent to the vehicle via the UDS protocol, wherein the instruction includes the software version number, starting address and data length determined by the embedded program file management module.
[0039] S1021: The vehicle-mounted embedded software hash fingerprint calculation module obtains original data from each controller memory through the original data reading function of each controller memory according to the software version number, starting address and data length contained in the instruction.
[0040] S1022: The vehicle-mounted embedded software hash fingerprint calculation module performs SHA256 hash fingerprint calculation on the acquired original data to obtain a second hash fingerprint.
[0041] In one embodiment, Figure 3 This is a detailed flow chart of a method for verifying a vehicle embedded software version according to an embodiment of the present invention. This embodiment is further optimized and expanded on the basis of the above embodiments.
[0042] The embedded program file management module has the functions of program file storage management, software version number management of each controller of the vehicle, random address and random address generation, UDS diagnostic instruction processing, OTA and network communication processing, and other software functions as well as storage media, running hardware, network communication hardware and other physical hardware objects; the vehicle-mounted embedded software hash fingerprint calculation module has the functions of reading the original data of each controller memory, SHA256 hash fingerprint calculation, UDS diagnostic instruction processing, OTA and network communication processing, and other software functions as well as storage media, running hardware, T-BOX hardware and other physical hardware objects. The embedded software version verification comparison module has the functions of reading local program files, SHA256 hash fingerprint calculation, UDS diagnostic instruction processing, hash fingerprint processing module, OTA and network communication processing, and other software functions as well as storage media, running hardware, network communication hardware and other physical hardware objects; the embedded software version verification notification module has the functions of system log recording, execution module selection, notification mode execution module, network communication processing, and other software functions as well as storage media, running hardware, network communication hardware and other physical hardware objects. The embedded program file management module manages the vehicle information, the program files of each on-board controller, and the relationship between the two. The vehicle information package is not limited to the vehicle VIN code, the vehicle T-BOX identification number, and the software version number of each on-board controller of the vehicle. Each vehicle VIN code should uniquely correspond to a real new energy commercial vehicle, and each vehicle T-BOX identification number should uniquely correspond to the T-BOX entity on the vehicle. Each vehicle information may contain multiple software version numbers, but each software version number should uniquely correspond to a program file stored in the system. The program file contains the original data, data address and data length information stored in the on-board controller memory. After determining a vehicle VIN code, the embedded program file management module can determine the information of a vehicle. According to the software version number information of the vehicle, the embedded program file management module can find the corresponding software program file. The embedded program file management module randomly determines the verification start address and data length within the allowable range of the data address and data length in the file. The embedded program file management module communicates with a new energy commercial vehicle on-board embedded software hash fingerprint calculation module through OTA and network communication processing functions, and sends the random storage address hash fingerprint calculation instruction to the vehicle using the UDS protocol based on the UDS diagnostic instruction processing function. The instruction should include the software version number, starting address, and data length determined by the embedded program file management module. The vehicle-side embedded software hash fingerprint calculation module obtains the original data content from each controller memory through the original data reading function of each controller memory based on the software version number, starting address, data length and other information in the instruction.The vehicle-mounted embedded software hash fingerprint calculation module performs SHA256 hash fingerprint calculation on the acquired original data to obtain a 32-byte hash fingerprint of the data segment. The vehicle-mounted embedded software hash fingerprint calculation module completes communication with the embedded software version verification and comparison module through OTA and network communication processing functions, and sends the software version number, starting address, data length, and hash fingerprint data to the embedded software version verification and comparison module based on the UDS diagnostic instruction processing function using the UDS protocol. The embedded software version verification and comparison module communicates with the embedded program file management module based on the OTA and network communication processing functions, and obtains the original file stored in the embedded program file management module according to the software version number, and obtains the original data corresponding to the starting address and data length through the local program reading function. The embedded software version verification and comparison module performs SHA256 hash fingerprint calculation on the acquired original data to obtain a 32-byte hash fingerprint of the data segment. The embedded software version verification and comparison module compares the SHA256 hash fingerprint calculated by this module through the local file with the SHA256 hash fingerprint provided by the vehicle-mounted embedded software hash fingerprint calculation module communication. The embedded software version verification comparison module sends the comparison results to the embedded software version verification notification module through the network communication processing function. The embedded software version verification notification module will archive the system operation process and results through the log recording function, including vehicle information, software version number, operation time, random address, random length, hash fingerprint calculated by the vehicle end, hash fingerprint information calculated locally, comparison results, execution plan information, etc. The embedded software version verification notification module selects different execution plans based on the comparison results. Including but not limited to, if the comparison is consistent, only the log information is saved; if it is inconsistent, a different plan is selected, and the notification execution function is notified in various ways such as SMS and APP message notification, so that relevant engineering and technical personnel can more quickly and conveniently clarify that the software version of the current vehicle has been tampered with by a third party, and execute the relevant recommended processing measures given by the system according to the analysis results of the system.
[0043] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0044] like Figure 4 As shown, the following is an embodiment of the vehicle embedded software version verification system provided by the embodiment of the present disclosure, which belongs to the same inventive concept as the vehicle embedded software version verification method of the above-mentioned embodiments. For details not described in detail in the embodiment of the vehicle embedded software version verification system, please refer to the embodiment of the above-mentioned vehicle embedded software version verification method.
[0045] Embedded program file management module, vehicle-mounted embedded software hash fingerprint calculation module, embedded software version verification comparison module and embedded software version verification notification module; The embedded software version verification and comparison module is used to read the random address and data length original data generated by the embedded program file management module according to the file content, and perform SHA256 hash fingerprint calculation based on the random address and data length original data to obtain a first hash fingerprint; The vehicle-side embedded software hash fingerprint calculation module is used to obtain a second hash fingerprint obtained by the vehicle-side embedded software hash fingerprint calculation module performing SHA256 hash fingerprint calculation based on the random address and data length original data; The embedded software version verification comparison module compares the first hash fingerprint and the second hash fingerprint to obtain a comparison result, and sends the comparison result to the embedded software version verification notification module so that it selects different execution plans according to the comparison result.
[0046] Among them, the embedded program file management module, the vehicle-mounted embedded software hash fingerprint calculation module and the embedded software version verification and comparison module communicate through OTA.
[0047] Figure 4 In the embodiment, the embedded program file management module includes program file storage management, vehicle information and controller software version number management, random address and random address generation function, UDS diagnostic instruction processing, and OTA and network communication processing function sub-modules; the embedded software version verification and comparison module includes local program file reading, SHA256 calculation, hash fingerprint processing, OTA and network communication processing, and UDS diagnostic instruction processing function sub-modules; the vehicle-mounted embedded software hash fingerprint calculation module includes memory raw data reading, SHA256 calculation, UDS diagnostic instruction processing, and OTA and network communication processing function sub-modules; the embedded software version verification notification module includes log recording, execution mode selection, notification mode execution, and network communication processing function sub-modules; wherein, the embedded program file management module interacts with the vehicle-mounted embedded software hash fingerprint calculation module remotely through OTA, the embedded program file management module interacts with the embedded software version verification and comparison module through the HTTP protocol, and the embedded software version verification and comparison module interacts with the embedded software version verification notification module through the HTTP protocol; the embedded software version verification and comparison module interacts with the vehicle-mounted embedded software hash fingerprint calculation module remotely through OTA.
[0048] Figure 5 It is a schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0049] The verification method of the vehicle embedded software version provided in the embodiment of the present application can be applied to electronic devices. It will be appreciated by those skilled in the art that the electronic device structure involved in the embodiment of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or less components than shown, or combine certain components, or arrange different components. In an embodiment of the present invention, the electronic device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.
[0050] The electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, buttons, a camera, a display, and a SIM card interface, etc.
[0051] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0052] The processor may include one or more processing units, for example, the processor may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors.
[0053] The processor can be the nerve center and command center of the electronic device. The controller can generate an operation control signal according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0054] A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. The memory may store instructions or data that the processor has just used or is cyclically used. If the processor needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor, and thus improves system efficiency.
[0055] The external memory interface can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor through the external memory interface to implement data storage functions. For example, files such as music and videos can be saved in the external memory card.
[0056] The internal memory can be used to store computer executable program codes, which include instructions. The processor executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory. The internal memory may include a program storage area and a data storage area. The internal memory may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0057] The wireless communication function of an electronic device can be realized through an antenna, a wireless communication module, a modem processor, and a baseband processor.
[0058] The wireless communication module can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
[0059] Electronic devices can implement audio functions, etc. through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0060] Electronic devices can achieve shooting functions through ISP, camera, video codec, GPU, display and application processor.
[0061] Electronic devices can achieve display functions through GPU, display screen and application processor.
[0062] The GPU is a microprocessor for image processing that connects the display screen and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor may include one or more GPUs that execute program instructions to generate or change display information.
[0063] The display screen is used to display images, videos, etc. The display screen includes a display panel.
[0064] The storage medium provided in the present application stores a program product that can implement a verification method for a vehicle embedded software version.
[0065] In some possible implementations, the subject matter of the present disclosure, namely, the method and system for verifying vehicle embedded software versions, can be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above “Exemplary Method” section of this specification according to various exemplary implementations of the present disclosure.
[0066] The storage medium of the present disclosure can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.
[0067] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for verifying a vehicle embedded software version, characterized in that: include: Read the embedded program file management module to generate random address and data length raw data for inspection based on the file content; Perform SHA256 hash fingerprint calculation based on the random address and data length original data to obtain a first hash fingerprint; Obtain a second hash fingerprint obtained by performing SHA256 hash fingerprint calculation based on the random address and data length original data by the vehicle-mounted embedded software hash fingerprint calculation module; The first hash fingerprint and the second hash fingerprint are compared to obtain a comparison result, and the comparison result is sent to the embedded software version verification notification module so that it selects different execution schemes according to the comparison result.
2. The method for verifying the vehicle embedded software version according to claim 1, characterized in that: Before reading the random address and data length raw data generated by the embedded program file management module according to the file content, the vehicle embedded software version verification method further includes: The embedded program file management module manages the vehicle information, the program files of each on-board controller and the relationship between the two; Among them, the vehicle information includes but is not limited to the vehicle VIN code, the vehicle T-BOX device identification number, and the software version number of each on-board controller of the vehicle; the program files of each on-board controller contain the original data, data address and data length information stored in the on-board controller memory.
3. The method for verifying the vehicle embedded software version according to claim 1, characterized in that: Read the embedded program file management module to generate random address and data length raw data for inspection based on the file content, including: Based on OTA and network communication processing functions, it communicates with the embedded program file management module, obtains the original file stored in the embedded program file management module according to the software version number, and obtains the corresponding starting address and data length original data through the local program reading function.
4. The method for verifying the vehicle embedded software version according to claim 1, characterized in that: The process of obtaining the second hash fingerprint by the vehicle-mounted embedded software hash fingerprint calculation module performing SHA256 hash fingerprint calculation based on the random address and data length original data includes: The embedded program file management module communicates with the vehicle-mounted embedded software hash fingerprint calculation module through OTA and network communication processing functions, and sends the random storage address hash fingerprint calculation instruction to the vehicle using the UDS protocol based on the UDS diagnostic instruction processing function, where the instruction contains the software version number, starting address and data length determined by the embedded program file management module; The vehicle-mounted embedded software hash fingerprint calculation module obtains the original data from each controller memory through the original data reading function of each controller memory according to the software version number, starting address and data length contained in the instruction; The vehicle-mounted embedded software hash fingerprint calculation module performs SHA256 hash fingerprint calculation on the acquired original data to obtain a second hash fingerprint.
5. The method for verifying the vehicle embedded software version according to claim 1, characterized in that: The embedded software version verification notification module archives the vehicle information, software version number, operation time, random address, random length, first hash fingerprint, second hash fingerprint, comparison result and execution plan through the log function.
6. The method for verifying the vehicle embedded software version according to claim 5, characterized in that: Compare the first hash fingerprint and the second hash fingerprint to obtain a comparison result, and send the comparison result to the embedded software version verification notification module so that it selects different execution schemes according to the comparison result, including but not limited to: If the comparison results of the first hash fingerprint and the second hash fingerprint are consistent, saving the log information; If the comparison results of the first hash fingerprint and the second hash fingerprint are inconsistent, various notification methods are used to notify the technician that the current vehicle software version has been tampered with by a third party and to take timely processing measures.
7. A vehicle embedded software version verification system, characterized in that: include: Embedded program file management module, vehicle-mounted embedded software hash fingerprint calculation module, embedded software version verification comparison module and embedded software version verification notification module; The embedded software version verification and comparison module is used to read the random address and data length original data generated by the embedded program file management module according to the file content, and perform SHA256 hash fingerprint calculation based on the random address and data length original data to obtain a first hash fingerprint; The vehicle-side embedded software hash fingerprint calculation module is used to obtain a second hash fingerprint obtained by the vehicle-side embedded software hash fingerprint calculation module performing SHA256 hash fingerprint calculation based on the random address and data length original data; The embedded software version verification comparison module compares the first hash fingerprint and the second hash fingerprint to obtain a comparison result, and sends the comparison result to the embedded software version verification notification module so that it selects different execution plans according to the comparison result.
8. The vehicle embedded software version verification system according to claim 7, characterized in that: The embedded program file management module, the vehicle-mounted embedded software hash fingerprint calculation module and the embedded software version verification and comparison module communicate via OTA.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the vehicle embedded software version verification method as described in any one of claims 1 to 6 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the vehicle embedded software version verification method as claimed in any one of claims 1 to 6 are implemented.