A non-intelligent ECU contrast differential flashing method and system

By integrating the contrast module in the first partition of the non-intelligent ECU, and using the contrast algorithm to calculate the difference terms for flashing, the problem of low flushing efficiency of OTA in the prior art is solved, and more efficient software updates are achieved.

CN115145622BActive Publication Date: 2025-07-25BEIJING ELECTRIC VEHICLE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210767511.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-07-25
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In the prior art, automotive OTA brushing takes a certain amount of time, and the brushing efficiency is low, resulting in a long upgrade time and waste of resources.

Method used

By integrating the contrast module in the first partition of the non-intelligent ECU, the contrast algorithm is used to calculate the difference terms of the target file and the source file, perform differential operations and upgrade the second partition to realize the flashing of the target file.

Benefits of technology

It improves OTA brushing efficiency, reduces software update time, and improves the utilization rate of upgraded resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145622B_ABST
    Figure CN115145622B_ABST
Patent Text Reader

Abstract

The present application provides a non-intelligent ECU reverse differential flashing method and system, which relates to the field of vehicle-mounted intelligent processing. The method includes: obtaining the first partition, the second partition and the third partition of the vehicle-mounted electronic control module firmware storage partition; integrating the reverse differential module into the first partition according to the first integration instruction; obtaining the binary source file of the second partition according to the first reverse differential instruction; obtaining the first differential file; calling the first differential file from the third partition according to the first call instruction; inputting the first differential file and the binary source file into the first partition as input files, performing reverse differential operation according to the reverse differential module, and outputting the first target file; flashing the first target file into the second partition for upgrade replacement. The technical effect of flashing by the difference between the target file and the source file, improving the OTA flashing efficiency, and reducing the software update time is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of in-vehicle intelligent processing, and particularly to a non-intelligent ECU contrast differential flashing method and system. Background Art

[0002] With the popularization of "intelligent, connected, electric, and shared" in automobiles, "software-defined vehicles" has become a trend. While bringing a good user experience to car owners, the failures caused by software problems will also increase day by day. Against this background, the use of Over-the-Air Technology (OTA) in automobiles has become increasingly important. When a vehicle has a software failure or an automobile manufacturer conducts a function iteration, the car owner does not need to drive the car to a 4S store and can complete the upgrade only by performing simple operations in the car. This not only saves the costs of automobile manufacturers but also greatly improves the user experience.

[0003] However, in the prior art, there are technical problems that automobile OTA flashing takes a certain amount of time, the flashing efficiency is low, and the update time is long, resulting in a waste of upgrade time resources. Summary of the Invention

[0004] The technical objective to be achieved by the embodiments of this application is to provide a non-intelligent ECU contrast differential flashing method and system, so as to solve the technical problems in the prior art that automobile OTA flashing takes a certain amount of time, the flashing efficiency is low, and the update time is long, resulting in a waste of upgrade time resources, and achieve the technical effect of proposing a non-intelligent ECU contrast differential flashing method, which performs flashing only through the differential items between the target file and the source file, thereby improving the OTA flashing efficiency, reducing the software update time, and improving the utilization rate of upgrade resources.

[0005] To solve the above technical problems, the embodiments of this application provide a non-intelligent ECU contrast differential flashing method. The method is applied to a non-intelligent ECU contrast differential flashing system, and the system is embedded with a contrast differential module. The method includes:

[0006] Obtain the first partition, the second partition, and the third partition of the firmware storage partition of the in-vehicle electronic control module, where the first partition is the code loading partition, the second partition is the application function partition, and the third partition is the user data partition;

[0007] Integrate the contrast differential module into the first partition according to the first integration instruction;

[0008] Determine whether the first contrast differential instruction is triggered. If the first contrast differential instruction is triggered, obtain the binary source file of the second partition according to the first contrast differential instruction;

[0009] Obtain the first differential file, where the first differential file is stored in the third partition;

[0010] Retrieve the first differential file from the third partition according to the first call instruction;

[0011] Use the first differential file and the binary source file as input files and input them into the first partition. Perform an inverse differential operation according to the inverse differential module in the first partition to output the first target file;

[0012] Flash the first target file into the second partition for upgrade and replacement.

[0013] Specifically, for the method described above, retrieving the first differential file from the third partition according to the first call instruction includes:

[0014] Determine whether the first differential file exists in the third partition, where the first differential file is a differential upgrade package;

[0015] If the first differential file exists in the third partition, obtain the header information of the first differential file;

[0016] Determine whether the header information of the first differential file matches the preset configuration information to obtain the first matching result, where the first matching result includes a first result and a second result. The first result is a successful match, and the second result is an unsuccessful match;

[0017] If the first matching result is the first result, obtain the first call instruction.

[0018] Further, for the method described above, if the first differential file exists in the third partition, obtaining the header information of the first differential file includes:

[0019] If the first differential file exists in the third partition, obtain the first device firmware of the vehicle-mounted electronic control module;

[0020] According to the information of the first device firmware, obtain the component hardware version information and the component software version information;

[0021] Perform device firmware verification according to the component hardware version information and the component software version information to determine whether the device firmware verification is successful;

[0022] If the device firmware verification is successful, obtain the header information of the first differential file.

[0023] Optionally, for the method described above, before retrieving the first differential file from the third partition according to the first call instruction, flash the first differential file into the third partition through the upgrade main control, and then trigger the local call of the inverse differential file.

[0024] Preferably, for the method described above, the method further includes:

[0025] Obtain the first target file;

[0026] Input the first target file into the file verification module, and obtain the first verification result according to the file verification module;

[0027] When the first verification result is verification passed, obtain the first flashing instruction;

[0028] Flash the first target file to the second partition according to the first flashing instruction.

[0029] Specifically, for the method described above, the method further includes:

[0030] Obtain multi-configuration resources for executing the contrast differential flashing scheme, where the multi-configuration resources include main frequency resources, memory resources, contrast module space occupancy resources, differential space reservation resources, and encryption resources;

[0031] Input the multi-configuration resources into the resource requirement evaluation model, and perform contrast differential flashing quality evaluation according to the resource requirement evaluation model to obtain the first evaluation result, where the first evaluation result is the requirement matching degree;

[0032] Obtain the first reminder information according to the first evaluation result.

[0033] Specifically, for the method described above, the method further includes:

[0034] Obtain the first preset planning requirement of the first user;

[0035] Analyze the attribute information of the firmware storage partition of the vehicle-mounted embedded electronic control module according to the first preset planning requirement to obtain the first analysis result;

[0036] According to the first analysis result, use the partition with the highest requirement matching degree as the target partition, where the target partition is the partition introducing the contrast differential upgrade ability.

[0037] Another embodiment of the present application further provides a non-intelligent ECU contrast differential flashing system, and the system includes:

[0038] The first obtaining module is used to obtain the first partition, the second partition, and the third partition of the firmware storage partition of the vehicle-mounted electronic control module, where the first partition is the code loading partition, the second partition is the application function partition, and the third partition is the user data partition;

[0039] The first integration module is used to integrate the contrast differential module into the first partition according to the first integration instruction;

[0040] The first judgment module is used to judge whether the first contrast differential instruction is triggered. If the first contrast differential instruction is triggered, obtain the binary source file of the second partition according to the first contrast differential instruction;

[0041] The second acquisition module is used to acquire a first differential file, where the first differential file is stored in the third partition;

[0042] The first call module is used to retrieve the first differential file from the third partition according to a first call instruction;

[0043] The first output module is used to input the first differential file and a binary source file as input files into the first partition, perform an inverse differential operation according to an inverse differential module in the first partition, and output a first target file;

[0044] The first flashing module is used to flash the first target file into the second partition for upgrade and replacement.

[0045] Further, the first call module 15 includes:

[0046] The first judgment unit is used to judge whether a first differential file exists in the third partition, where the first differential file is a differential upgrade package;

[0047] The first acquisition unit is used to acquire the header information of the first differential file if the first differential file exists in the third partition;

[0048] The second judgment unit is used to judge whether the header information of the first differential file matches preset configuration information, and obtain a first matching result, where the first matching result includes a first result and a second result, the first result is successful matching, and the second result is unsuccessful matching;

[0049] The second acquisition unit is used to acquire a first call instruction if the first matching result is the first result.

[0050] Further, the first acquisition unit further includes:

[0051] The first acquisition subunit is used to acquire the first device firmware of the in-vehicle electronic control module if the first differential file exists in the third partition;

[0052] The second acquisition subunit is used to acquire the component hardware version information and the component software version information according to the information of the first device firmware;

[0053] The first judgment subunit is used to perform device firmware verification according to the component hardware version information and the component software version information, and judge whether the device firmware verification is successful;

[0054] The third acquisition subunit is used to acquire the header information of the first differential file if the device firmware verification is successful.

[0055] Furthermore, the system further includes:

[0056] A second flashing module, which is used to flash the first differential file into the third partition through the upgrade main control, and then trigger the local call of the inverse differential file;

[0057] Furthermore, the first flashing module includes:

[0058] A third obtaining unit, which is used to obtain the first target file;

[0059] A first verification unit, which is used to input the first target file into the file verification module and obtain the first verification result according to the file verification module;

[0060] A fourth obtaining unit, which is used to obtain the first flashing instruction when the first verification result is verified to pass;

[0061] A first flashing unit, which is used to flash the first target file to the second partition according to the first flashing instruction.

[0062] Furthermore, the system further includes:

[0063] A third obtaining module, which is used to obtain multi-configuration resources for executing the inverse differential flashing scheme, where the multi-configuration resources include main frequency resources, memory resources, inverse module space occupancy resources, differential space reservation resources, and encryption resources;

[0064] A fourth obtaining module, which is used to input the multi-configuration resources into the resource requirement evaluation model, perform an inverse differential flashing quality evaluation according to the resource requirement evaluation model, and obtain a first evaluation result, where the first evaluation result is the requirement matching degree;

[0065] A fifth obtaining module, which is used to obtain a first reminder message according to the first evaluation result.

[0066] Furthermore, the first obtaining module includes:

[0067] A fifth obtaining unit, which is used to obtain the first preset planning requirement of the first user;

[0068] A sixth obtaining unit, which is used to analyze the attribute information of the firmware storage partition of the vehicle-mounted embedded electronic control module according to the first preset planning requirement and obtain a first analysis result;

[0069] A first operation unit, which is used to use the partition with the highest requirement matching degree as the target partition according to the first analysis result, where the target partition is the partition introducing the inverse differential upgrade ability.

[0070] Another embodiment of the present application further provides a non-intelligent ECU contrast differential flashing system, including: a processor, the processor is coupled with a memory, and the memory is used to store a program. When the program is executed by the processor, the system is enabled to execute the steps of the method described above.

[0071] Another embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the non-intelligent ECU contrast differential flashing method described above are implemented.

[0072] Compared with the prior art, a non-intelligent ECU contrast differential flashing method and system provided by an embodiment of the present application have at least the following beneficial effects:

[0073] By analyzing the firmware storage partition in the in-vehicle electronic control module, and then determining the first partition, the second partition, and the third partition according to the functions of the storage partitions, through further understanding and analysis of the project, and in accordance with the requirements and the first integration instruction, the contrast differential module is integrated into the first partition for program code loading, etc. Thus, when it is determined that software upgrade is required, the first contrast differential instruction is triggered to enable the contrast differential module integrated in the first partition to perform the contrast differential calculation of the differential file. Further, during the calculation process, first obtain the binary source file in the second partition, retrieve the first differential file from the third partition according to the first call instruction, input the binary source file and the first differential file as input files into the first partition, perform contrast differential operation according to the contrast differential module in the first partition, output the first target file, and flash the first target file to the second partition for upgrade and replacement. In this way, the technical effect of flashing through the difference items between the target file and the source file is achieved, thereby improving the OTA flashing efficiency, reducing the software update time, and improving the utilization rate of upgrade resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 It is one of the flow diagrams of a non-intelligent ECU contrast differential flashing method according to an embodiment of the present application;

[0075] Figure 2 It is another flow diagram of a non-intelligent ECU contrast differential flashing method according to an embodiment of the present application;

[0076] Figure 3 It is one of the flow diagrams of differential file matching of a non-intelligent ECU contrast differential flashing method according to an embodiment of the present application;

[0077] Figure 4 It is another flow diagram of differential file matching of a non-intelligent ECU contrast differential flashing method according to an embodiment of the present application;

[0078] Figure 5 This is the third flowchart of a non-intelligent ECU contrast differential flashing method according to an embodiment of the present application;

[0079] Figure 6 This is the flowchart of the configuration resource requirement assessment of a non-intelligent ECU contrast differential flashing method according to an embodiment of the present application;

[0080] Figure 7 This is the structural schematic diagram of a non-intelligent ECU contrast differential flashing system according to an embodiment of the present application;

[0081] Figure 8 This is the structural schematic diagram of an exemplary electronic device according to an embodiment of the present application.

[0082]

Explanation of the reference numerals

[0083] 11. First acquisition module; 12. First integration module; 13. First judgment module; 14. Second acquisition module; 15. First call module; 16. First output module; 17. First flashing module; 300. Bus; 301. Receiver; 302. Processor; 303. Transmitter; 304. Memory; 305. Bus interface. Detailed implementation manners

[0084] To make the technical problems, technical solutions and advantages to be solved by the present application clearer, the following will be described in detail with reference to the drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help a comprehensive understanding of the embodiments of the present application. Therefore, those skilled in the art should clearly understand that various changes and modifications can be made to the embodiments described here without departing from the scope and spirit of the present application. In addition, descriptions of known functions and structures are omitted for clarity and conciseness.

[0085] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the "in one embodiment" or "in an embodiment" that appears throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0086] In various embodiments of the present application, it should be understood that the order numbers of the following processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0087] It should be understood that the term "and / or" in this text is merely a correlative relationship describing related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this text generally indicates that the related objects before and after are in an "or" relationship.

[0088] In the embodiments provided in this application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A. B can also be determined based on A and / or other information.

[0089] By providing a non-intelligent ECU contrast differential flashing method in the embodiments of this application, the technical problem in the prior art that automotive OTA flashing requires a certain amount of time, has low flashing efficiency, and long update time, resulting in waste of upgrade time resources, is solved. The technical effect of proposing a contrast differential flashing solution on a non-intelligent ECU, flashing only through the difference items between the target file and the source file, thereby improving the OTA flashing efficiency, reducing the software update time, and increasing the utilization rate of upgrade resources is achieved.

[0090] Next, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments of this application. It should be understood that this application is not limited by the exemplary embodiments described herein.

[0091] In the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.

[0092] Currently, automotive OTA upgrades support the online generation of automotive computers. By upgrading the vehicle's driving computer system, the performance of the vehicle is improved, thereby changing the response speed of the automotive driving computer and bringing a better operation experience to users. For in-vehicle embedded ECUs, the general working process is to use a differential tool on the PC side to perform contrast differential operations on the embedded ECU. Generally, there are certain requirements for contrast differential operations. How to use non-intelligent ECUs to achieve contrast differential flashing to improve the upgrade ability and solve the technical problems in the prior art that automotive OTA flashing requires a certain amount of time, has low flashing efficiency, and long update time, resulting in waste of upgrade time resources.

[0093] For the above technical problems, the general idea of the technical solution provided in this application is as follows:

[0094] Embodiment 1

[0095] As Figure 1As shown in the figure, an embodiment of the present application provides a non-intelligent ECU differential brush writing method. The method is applied to a non-intelligent ECU differential brush writing system, and the system is embedded with a differential module. The method includes:

[0096] Step S100: Obtain the first partition, the second partition, and the third partition of the firmware storage partition of the vehicle-mounted electronic control module. Among them, the first partition is the code loading partition, the second partition is the application function partition, and the third partition is the user data partition;

[0097] Further, referring to Figure 2 , step S100 of the embodiment of the present application further includes:

[0098] Step S110: Obtain the first preset planning requirement of the first user;

[0099] Step S120: Analyze the attribute information of the firmware storage partition of the vehicle-mounted embedded electronic control module according to the first preset planning requirement to obtain a first analysis result;

[0100] Step S130: According to the first analysis result, use the partition with the highest requirement matching degree as the target partition, where the target partition is the partition introducing the differential upgrade ability.

[0101] Specifically, the vehicle-mounted electronic control module (ECU), that is, the vehicle computer, is composed of a microprocessor (MCU), a memory (ROM, RAM), an input / output interface (I / O), an analog-to-digital converter (A / D), and large-scale integrated circuits such as shaping and driving, and is used to control the driving state of the vehicle and implement various functions. Therefore, during the upgrade process, it is mainly realized through the electronic accident perception module. Further, due to the low time efficiency of the current update and upgrade, it is easy to cause waste of time resources. Therefore, by proposing the embodiment of the present application to implement a non-intelligent ECU differential brush writing method, it is possible to effectively utilize the file difference of the upgrade for efficient brush writing.

[0102] Further, traditional ECUs all belong to embedded ECUs. They use nor flash and perform addressing and execution according to the address. Therefore, each partition in its firmware storage partition has a corresponding function, and each partition includes corresponding firmware, capacity, logical address of the address space, physical address of the address space, etc.

[0103] The first partition is the code loading partition, i.e., MTD1. Generally, it cannot be implemented by the reverse differential technology. These two partitions are usually the system startup and BSP partitions, and generally, the upgrade is carried out by flashing. The second partition is the application function partition, i.e., MTD2, which is the main application group. All application functions are in this partition, and it also has relatively frequent modification and upgrade requirements. The third partition is the user data partition, i.e., MTD3, which is the user data generated during the program operation. This partition is generally not used for upgrading, and the embedded device itself has the ability to clear this partition. Therefore, further understanding and planning of the firmware storage partition under the conditions of performing upgrade and differential calculation can effectively introduce the ability of reverse differential upgrade.

[0104] Step S200: Integrate the reverse differential module into the first partition according to the first integration instruction;

[0105] Specifically, the reverse differential module is a reverse differential algorithm that can effectively perform operations on files. In detail, the process of performing reverse differential operations is mainly to use mathematical methods on a computer or other devices to perform operations on the original version file and the differential file to implement the operations in the reverse differential module.

[0106] For example, based on project requirements, since the first partition, i.e., MTD1, generally cannot be implemented by the reverse differential technology, the partition to be upgraded is the second partition, i.e., MTD2. We all know that the nor flash device is executed on the chip, so the reverse differential module cannot be integrated into the second partition, i.e., the MTD2 partition. Generally, we integrate the reverse differential program into the first partition, i.e., MTD1, also called the bootloader partition; by executing the reverse differential module (algorithm) in the bootloader partition, the reading, operation, erasing, and writing of the MTD2 partition are realized.

[0107] Step S300: Determine whether the first reverse differential instruction is triggered. If the first reverse differential instruction is triggered, obtain the binary source file of the second partition according to the first reverse differential instruction;

[0108] Step S400: Obtain the first differential file, where the first differential file is stored in the third partition;

[0109] Step S500: Retrieve the first differential file from the third partition according to the first call instruction;

[0110] Specifically, the first differential instruction is an instruction used to perform file differential calculation under certain conditions, so as to start the differential module on the first partition for calculation. When the first differential instruction is triggered, a binary source file for differential operation and the first differential file are obtained. Among them, on a computer or other device, by using a mathematical algorithm, the binaries of the original and target two versions (partitions) are compared to find the same parts and different parts, and the structure is used for annotation, and the difference information is merged into a binary file, which is the first differential file. The input file is obtained according to the binary source file and the first differential file.

[0111] Preferably, when the first differential instruction is triggered, the corresponding binary source file is obtained from the second partition according to the first differential instruction. Further, according to the first call instruction, the first differential file is retrieved from the third partition, and the third partition is the user data partition. Among them, differential is to read MTD2 and the differential file for operation, and then write it to MTD2 again. Therefore, the differential file can only be placed in the user partition of MTD3;

[0112] The first differential file is manufactured and stored in the cloud, and is read from the cloud and written into the third partition according to the request. Therefore, by requesting the file, the differential file stored in the cloud database is directly retrieved, so as to further obtain the file source.

[0113] Step S600: Take the first differential file and the binary source file as input files and input them into the first partition, and perform differential operation according to the differential module in the first partition to output the first target file;

[0114] Step S700: Flash the first target file to the second partition for upgrade and replacement.

[0115] Specifically, after obtaining the first differential file and the binary source file, according to the differential (UA) module of the Boot Loader in the first partition, the binary in the second partition MTD2 is read into the memory, and the differential file in the third partition MTD3 is called to perform differential operation to calculate a new binary content, and the new binary content is used as the output first target file, and then the first target file is written back to the second partition MTD2. Among them, Boot Loader is a small program that runs before the operating system kernel. Through this small program, we can initialize the hardware device, establish a mapping diagram of the memory space, so as to bring the software and hardware environment of the system to a suitable state, so as to ensure the accuracy of the differential module operation.

[0116] For the purpose of replacing the content in the second partition MTD2, after the operation of the contrast difference module ends, the contrast difference module is exited, and the first difference file is deleted. The system is restarted, achieving the technical effect of proposing a contrast difference flashing solution on a non-intelligent ECU, performing contrast difference calculation and upgrade flashing only through the difference items between the target file and the source file, thereby improving the OTA flashing efficiency, reducing the software update time, and increasing the utilization rate of upgrade resources.

[0117] Further, as Figure 3 shown, according to the first call instruction, retrieving the first difference file from the third partition, step S500 of the embodiment of the present application further includes:

[0118] Step S510: Determine whether the first difference file exists in the third partition, where the first difference file is a differential upgrade package;

[0119] Step S520: If the first difference file exists in the third partition, obtain the header information of the first difference file;

[0120] Step S530: Determine whether the header information of the first difference file matches the preset configuration information, and obtain a first matching result, where the first matching result includes a first result and a second result, the first result is successful matching, and the second result is unsuccessful matching;

[0121] Step S540: If the first matching result is the first result, obtain the first call instruction.

[0122] Further, before step S510 of the embodiment of the present application, it further includes: before retrieving the first difference file from the third partition according to the first call instruction, the first difference file is flashed into the third partition by the upgrade main control, and then the local contrast difference file call is triggered.

[0123] Specifically, the first difference file is obtained through production and stored in the cloud. It can be retrieved according to the request instruction. The binary content of the calculated first target version and the target version used to produce the first difference file is the same. After production is completed, the first difference file is transmitted to the third partition in the vehicle electronic control module, that is, written into the flash space through the user data partition for use by the subsequent contrast difference module.

[0124] Further, before calling the differential file, the first differential file is flashed into the third partition by upgrading the main controller, and then the local reverse differential file call is triggered. Further, when the first differential file is flashed into the third partition, the written first differential file exists, indicating that the current condition for file upgrade is met. Thus, in the result of judging whether the first differential file exists in the third partition, a logical result of "yes" is obtained.

[0125] Furthermore, the header information of the first differential file is obtained, and it is determined whether the header information of the first differential file matches the preset configuration information in the device, such as whether it is a preset partition, file size, preset information, etc. After successful matching, the first differential file is called. If the matching fails, it indicates that there is an abnormality in the preset configuration information of the current first differential file, and the first differential file needs to be further fed back and corrected until the matching is successful. Thus, the technical effect of ensuring the accuracy of calling the first differential file and realizing the accuracy of differential upgrade is achieved by pre-analyzing the first differential file.

[0126] Further, referring to Figure 4 , if the first differential file exists in the third partition and the header information of the first differential file is obtained, step S520 of the embodiment of the present application further includes:

[0127] Step S521: If the first differential file exists in the third partition, obtain the first device firmware of the in-vehicle electronic control module;

[0128] Step S522: Obtain the component hardware version information and the component software version information according to the information of the first device firmware;

[0129] Step S523: Perform device firmware verification according to the component hardware version information and the component software version information, and judge whether the device firmware verification is successful;

[0130] Step S524: If the device firmware verification is successful, obtain the header information of the first differential file.

[0131] Specifically, if the first differential file exists in the third partition, it indicates that the corresponding in-vehicle software needs to be updated. Therefore, after creating the differential file based on the cloud, it is downloaded and written to the third partition by the host computer as a differential upgrade package. Furthermore, in addition to verifying the header information of the first differential file with the preset configuration information, it is also necessary to further analyze the reverse differential calculation environment to obtain the device firmware of the in-vehicle electronic control module during reverse differential calculation, including the component hardware version information and the component software version information. Based on different hardware versions and software versions, it is possible to further analyze its execution environment and further determine whether the upgrade condition corresponds to the current device firmware. If the device firmware verification is successful, that is, the corresponding environment is satisfied and the environment is executable, then the header information of the first differential file is further analyzed to determine whether the configuration in the file matches.

[0132] After the device firmware verification is successful, the header file information verification is entered. After the header file information verification is successful, the reverse differential process is started. Among them, after starting the reverse differential process, the differential file to be updated is backed up to ensure that the update traces can be queried and monitored. It achieves the unification of the internal and external environments to realize automatic self-checking and ensures the accuracy and continuity of the execution process.

[0133] Further, referring to Figure 5 , step S700 of the embodiment of the present application further includes:

[0134] Step S710: Obtain the first target file;

[0135] Step S720: Input the first target file into the file verification module, and obtain a first verification result according to the file verification module;

[0136] Step S730: When the first verification result is verification passed, obtain a first flashing instruction;

[0137] Step S740: Flash the first target file to the second partition according to the first flashing instruction.

[0138] Specifically, for in-vehicle upgrades to save and optimize space, differential files are created to upgrade the current system or software. Based on differential optimization, incremental updates can be performed, avoiding the time and process waste caused by uniformly downloading and updating the new version based on file changes. To address this problem, differential creation is performed based on the target optimization file and the source file to generate the first differential file. Then, reverse differential flashing optimization is performed according to the first differential file and the binary source file to output the first target file, where the first target file is the optimized file output after reverse differential calculation;

[0139] Further, after obtaining the first target file, input the first target file into the file verification module, and verify the first target file according to the file verification module. If the verification passes, it indicates that the file information, optimization performance, reverse difference calculation result, binary source, and other information of the current first target file are verified. After the verification passes, flash the first target file to the second partition according to the first flashing instruction, achieving the purpose of replacing the content of the binary source file in the second partition and further ensuring the quality of the replaced file.

[0140] Further, as Figure 6 shown, the steps of the embodiment of the present application further include S800:

[0141] Step S810: Obtain multi-configuration resources for executing the reverse difference flashing scheme, where the multi-configuration resources include main frequency resources, memory resources, reverse difference module space occupancy resources, differential space reservation resources, and encryption resources;

[0142] Step S820: Input the multi-configuration resources into the resource requirement evaluation model, and perform reverse difference flashing quality evaluation according to the resource requirement evaluation model to obtain a first evaluation result, where the first evaluation result is the requirement matching degree;

[0143] Step S830: Obtain a first reminder message according to the first evaluation result.

[0144] Specifically, since the reverse difference algorithm is a complex red-black tree, it requires strong computing power to support. For the main frequency resources, it has certain computing power requirements. For example, in the case of a main frequency of 312 MHz, it takes 4 minutes to restore an 800k differential file. If the computing power is not enough, there will be a long operation time, resulting in a slow reverse difference process, a long waiting time for the user, and a poor experience.

[0145] For the memory resources, the size of the memory space has requirements because the differential algorithm requires no less than 150 kB of memory space. As the erasure unit of the flash increases, a larger memory space is also required.

[0146] For the reverse difference module space occupancy resources, that is, the space occupancy resources of the reverse difference module, there are certain requirements. For example, when the module is compiled into the bootloader, it needs to occupy 64 kB of flash space, so the bootloader needs to be extended to 128 KB.

[0147] For the reverse difference module space occupancy resources, the differential file is generally 30% - 50% of the file to be upgraded. MTD2 is planned to be 2M, and the space for storing the differential file is 1M, which is the highest value, that is, the estimated maximum differential file that may appear.

[0148] For encrypted resources, it refers to resources that are not allowed to be encrypted in the ROM, that is, the partitions to be upgraded are not allowed to be encrypted. For encrypted files, they are equivalent to being obfuscated, and the effect of performing differential operations using conventional methods is poor.

[0149] In the process of executing the inverse differential flashing scheme, it is necessary to further analyze the configuration resources in the system, including the main frequency resources, memory resources, occupied resources of the inverse differential module, reserved resources for differential space, and encrypted resources. Among them, each resource has certain requirements, so as to evaluate the resource requirements based on the multiple configuration resources, and output the evaluation result according to the resource requirement evaluation model. The resource requirement evaluation model is based on the preset resource requirements of inverse differential flashing as the evaluation basis, evaluates all the configuration resources in this process input in real time, and then outputs the first evaluation result according to the demand matching degree, and generates a reminder message according to the first evaluation result, achieving precise evaluation based on multiple configuration resources and ensuring the accuracy and effectiveness of the inverse differential module operation.

[0150] Compared with the prior art, the present invention has the following beneficial effects:

[0151] 1. By analyzing the firmware storage partitions in the vehicle-mounted electronic control module, and then determining the first partition, the second partition, and the third partition according to the functions of the storage partitions. Through further understanding and analysis of the project, and in accordance with the requirements and the first integration instruction, the inverse differential module is integrated into the first partition for program code loading, etc. Thus, when it is determined that a software upgrade is required, the first inverse differential instruction is triggered, so that the inverse differential module integrated in the first partition performs the inverse differential calculation of the differential file. Further, during the calculation process, first obtain the binary source file in the second partition, and according to the first call instruction, retrieve the first differential file from the third partition, input the binary source file and the first differential file as input files into the first partition, perform inverse differential operation according to the inverse differential module in the first partition, output the first target file, and flash the first target file to the second partition for upgrade and replacement. In this way, the technical effect of flashing through the difference items between the target file and the source file is achieved, thereby improving the OTA flashing efficiency, reducing the software update time, and increasing the utilization rate of upgrade resources.

[0152] 2. After the device firmware is successfully verified, the header file information verification is entered. After the header file information verification is successful, the inverse differential process is started. Among them, after starting the calculation process of the inverse differential module, the differential files to be updated are backed up to ensure that the update traces can be queried and monitored. It achieves the automation self-check by unifying the internal and external environments, and ensures the accuracy and continuity of the execution process.

[0153] 3. Since resource demand assessment is carried out based on main frequency resources, memory resources, resource occupation of the contrast module space, reserved differential space resources, and encryption resources, accurate assessment of multiple configured resources is achieved, ensuring the accuracy and effectiveness of the contrast difference module operation.

[0154] Embodiment 2

[0155] Based on the same inventive concept as a non-intelligent ECU contrast difference flashing method in the foregoing embodiment, the present invention also provides a non-intelligent ECU contrast difference flashing system, as Figure 7 shown, the system includes:

[0156] The first acquisition module 11 is used to acquire the first partition, the second partition, and the third partition of the firmware storage partition of the vehicle-mounted electronic control module, wherein the first partition is the code loading partition, the second partition is the application function partition, and the third partition is the user data partition;

[0157] The first integration module 12 is used to integrate the contrast difference module into the first partition according to the first integration instruction;

[0158] The first judgment module 13 is used to judge whether the first contrast difference instruction is triggered. If the first contrast difference instruction is triggered, according to the first contrast difference instruction, obtain the binary source file of the second partition;

[0159] The second acquisition module 14 is used to acquire the first differential file, wherein the first differential file is stored in the third partition;

[0160] The first call module 15 is used to retrieve the first differential file from the third partition according to the first call instruction;

[0161] The first output module 16 is used to input the first differential file and the binary source file as input files into the first partition, perform contrast difference operation according to the contrast difference module in the first partition, and output the first target file;

[0162] The first flashing module 17 is used to flash the first target file into the second partition for upgrade and replacement.

[0163] Further, the first call module 15 includes:

[0164] The first judgment unit is used to judge whether the first differential file exists in the third partition, wherein the first differential file is a differential upgrade package;

[0165] A first acquisition unit, which is configured to acquire the header information of the first differential file if the first differential file exists in the third partition.

[0166] A second judgment unit, which is configured to judge whether the header information of the first differential file matches the preset configuration information, and obtain a first matching result, where the first matching result includes a first result and a second result, the first result is a successful match, and the second result is an unsuccessful match.

[0167] A second acquisition unit, which is configured to acquire the first call instruction if the first matching result is the first result.

[0168] Further, the first acquisition unit further includes:

[0169] A first acquisition subunit, which is configured to acquire the first device firmware of the vehicle-mounted electronic control module if the first differential file exists in the third partition.

[0170] A second acquisition subunit, which is configured to acquire the component hardware version information and the component software version information according to the information of the first device firmware.

[0171] A first judgment subunit, which is configured to perform device firmware verification according to the component hardware version information and the component software version information, and judge whether the device firmware verification is successful.

[0172] A third acquisition subunit, which is configured to acquire the header information of the first differential file if the device firmware verification is successful.

[0173] Further, the system further includes:

[0174] A second flashing module, which is configured to flash the first differential file into the third partition through the upgrade main control, and then trigger the local call of the reverse differential file.

[0175] Further, the first flashing module 17 includes:

[0176] A third acquisition unit, which is configured to acquire the first target file.

[0177] A first verification unit, which is configured to input the first target file into the file verification module, and obtain a first verification result according to the file verification module.

[0178] A fourth acquisition unit, configured to acquire a first flashing instruction when the first verification result is verified to pass;

[0179] A first flashing unit, configured to flash the first target file to the second partition according to the first flashing instruction.

[0180] Furthermore, the system further includes:

[0181] A third acquisition module, configured to acquire multi-configuration resources for executing a differential flashing scheme, where the multi-configuration resources include main frequency resources, memory resources, differential module space occupancy resources, differential space reservation resources, and encryption resources;

[0182] A fourth acquisition module, configured to input the multi-configuration resources into a resource requirement evaluation model, perform a differential flashing quality evaluation according to the resource requirement evaluation model, and acquire a first evaluation result, where the first evaluation result is a requirement matching degree;

[0183] A fifth acquisition module, configured to acquire a first reminder message according to the first evaluation result.

[0184] Furthermore, the first acquisition module 11 includes:

[0185] A fifth acquisition unit, configured to acquire a first preset planning requirement of a first user;

[0186] A sixth acquisition unit, configured to analyze attribute information of a firmware storage partition of an in-vehicle embedded electronic control module according to the first preset planning requirement, and acquire a first analysis result;

[0187] A first operation unit, configured to use the partition with the highest requirement matching degree as a target partition according to the first analysis result, where the target partition is a partition introducing differential upgrade capability.

[0188] The foregoing Figure 1 All the various change manners and specific examples of a differential flashing method for a non-intelligent ECU in Embodiment 1 are equally applicable to the differential flashing method for a non-intelligent ECU in this embodiment. Through the foregoing detailed description of a differential flashing method for a non-intelligent ECU, those skilled in the art can clearly know the implementation method of the differential flashing method for a non-intelligent ECU in this embodiment. Therefore, for the sake of brevity of the specification, it will not be elaborated herein.

[0189] Embodiment 3

[0190] Next, reference is made to Figure 8 to describe the electronic device of the present application.

[0191] Figure 8 The structural schematic diagram of an electronic device according to the present application is illustrated.

[0192] Based on the inventive concept of a contrast differential flashing method for a non-intelligent ECU in the foregoing embodiment, the present invention further provides a contrast differential flashing system for a non-intelligent ECU, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods of the contrast differential flashing method for a non-intelligent ECU described above are implemented.

[0193] Among them, in Figure 8 , the bus architecture (represented by bus 300), bus 300 may include any number of interconnected buses and bridges, and bus 300 links various circuits including one or more processors represented by processor 302 and a memory represented by memory 304 together. Bus 300 may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, and thus will not be further described herein. Bus interface 305 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 may be the same element, i.e., a transceiver, providing a module for communicating with various other systems on a transmission medium. Processor 302 is responsible for managing bus 300 and general processing, and memory 304 may be used to store data used by processor 302 when performing operations.

[0194] An embodiment of the present application provides a differential brush writing method for a non-intelligent ECU. The method is applied to a differential brush writing system for a non-intelligent ECU, and the system is embedded with a differential module. The method includes: obtaining a first partition, a second partition, and a third partition of the firmware storage partition of the vehicle-mounted electronic control module, where the first partition is a code loading partition, the second partition is an application function partition, and the third partition is a user data partition; integrating the differential module into the first partition according to a first integration instruction; determining whether a first differential instruction is triggered. If the first differential instruction is triggered, obtaining a binary source file of the second partition according to the first differential instruction; obtaining a first differential file, where the first differential file is stored in the third partition; retrieving the first differential file from the third partition according to a first call instruction; using the first differential file and the binary source file as input files and inputting them into the first partition, and performing differential operation according to the differential module in the first partition to output a first target file; and flashing the first target file into the second partition for upgrade and replacement. This solves the technical problem in the prior art that automotive software OTA brush writing takes a certain amount of time, has a low brush writing efficiency, and a long update time, resulting in a waste of upgrade time resources, and achieves the technical effect of proposing a differential brush writing solution on a non-intelligent ECU, which only performs brush writing through the difference items between the target file and the source file, thereby improving the OTA brush writing efficiency, reducing the software update time, and improving the utilization rate of upgrade resources.

[0195] Those of ordinary skill in the art can understand that the various numerical numbers such as the first and second involved in the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application, nor do they represent the order of precedence. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the preceding and following associated objects. "At least one" means one or more. At least two means two or more. "At least one", "any one" or their similar expressions refer to any combination of these items, including any combination of single items (pieces) or plural items (pieces). For example, at least one (piece, type) of a, b, or c can represent: a, b, c, a b, a c, b c, or a b c, where a, b, c can be single or multiple.

[0196] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0197] In the embodiments of the present application, the various illustrative logical modules and circuits described can be implemented or operate the described functions through a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic systems, discrete gate or transistor logic, discrete hardware components, or any combination of the above designs. The general-purpose processor can be a microprocessor. Optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented through a combination of computing systems, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.

[0198] Although the present application has been described in conjunction with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the present specification and the drawings are merely exemplary descriptions of the present application defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalent technologies, the present application is intended to include these changes and modifications.

Claims

1. A non-intelligent ECU contrast differential flashing method, characterized in that, The method is applied to a non-intelligent ECU differential reverse flashing system, which is embedded with a differential reverse module. The method includes: Obtain the first partition, the second partition, and the third partition of the firmware storage partition of the vehicle-mounted electronic control module. Among them, the first partition is the code loading partition, the second partition is the application function partition, and the third partition is the user data partition; Integrate the differential reverse module into the first partition according to the first integration instruction; Determine whether the first differential reverse instruction is triggered. If the first differential reverse instruction is triggered, obtain the binary source file of the second partition according to the first differential reverse instruction; Obtain a first differential file, where the first differential file is stored in the third partition; Retrieve the first differential file from the third partition according to the first call instruction; Use the first differential file and the binary source file as input files and input them into the first partition. Perform differential reverse operation according to the differential reverse module in the first partition, and output a first target file; Flash the first target file to the second partition for upgrade and replacement.

2. The method according to claim 1, wherein The step of retrieving the first differential file from the third partition according to the first call instruction includes: Determine whether the first differential file exists in the third partition, where the first differential file is a differential upgrade package; If the first differential file exists in the third partition, obtain the header information of the first differential file; Determine whether the header information of the first differential file matches the preset configuration information, and obtain a first matching result. Among them, the first matching result includes a first result and a second result. The first result is successful matching, and the second result is unsuccessful matching; If the first matching result is the first result, obtain the first call instruction.

3. The method according to claim 2, wherein The step of obtaining the header information of the first differential file if the first differential file exists in the third partition includes: If the first differential file exists in the third partition, obtain the first device firmware of the vehicle-mounted electronic control module; Obtain the component hardware version information and the component software version information according to the information of the first device firmware; Perform device firmware verification according to the component hardware version information and the component software version information, and determine whether the device firmware verification is successful; If the device firmware verification is successful, obtain the header information of the first differential file.

4. The method according to claim 2, wherein Before retrieving the first differential file from the third partition according to the first call instruction, flash the first differential file into the third partition through the upgrade main control, and then trigger the local call of the differential reverse file.

5. The method according to claim 1, characterized in that, The method further includes: Obtain the first target file; Input the first target file into the file verification module, and obtain a first verification result according to the file verification module; When the first verification result is verification passed, obtain a first flashing instruction; Flash the first target file to the second partition according to the first flashing instruction.

6. The method according to claim 1, wherein The method further includes: Obtain multi-configuration resources for executing the contrast differential flashing scheme, where the multi-configuration resources include main frequency resources, memory resources, contrast module space occupancy resources, differential space reservation resources, and encryption resources; Input the multi-configuration resources into a resource requirement evaluation model, and perform contrast differential flashing quality evaluation according to the resource requirement evaluation model to obtain a first evaluation result, where the first evaluation result is the requirement matching degree; Obtain a first reminder message according to the first evaluation result.

7. The method according to claim 1, characterized in that, The method further includes: Obtain the first preset planning requirement of the first user; Analyze the attribute information of the firmware storage partition of the vehicle-mounted embedded electronic control module according to the first preset planning requirement to obtain a first analysis result; According to the first analysis result, use the partition with the highest requirement matching degree as the target partition, where the target partition is the partition introduced with contrast differential upgrade ability.

8. A non-intelligent ECU contrast differential flashing system, characterized in that, The system includes: A first obtaining module, which is used to obtain the first partition, the second partition, and the third partition of the firmware storage partition of the vehicle-mounted electronic control module, where the first partition is the code loading partition, the second partition is the application function partition, and the third partition is the user data partition; A first integration module, which is used to integrate the contrast differential module into the first partition according to the first integration instruction; A first judgment module, which is used to judge whether the first contrast differential instruction is triggered. If the first contrast differential instruction is triggered, obtain the binary source file of the second partition according to the first contrast differential instruction; A second obtaining module, which is used to obtain a first differential file, where the first differential file is stored in the third partition; A first calling module, which is used to retrieve the first differential file from the third partition according to the first calling instruction; A first output module, which is used to input the first differential file and the binary source file as input files into the first partition, perform contrast differential operation according to the contrast differential module in the first partition, and output a first target file; A first flashing module, which is used to flash the first target file into the second partition for upgrade and replacement.

9. A non-intelligent ECU contrast differential flashing system, characterized in that, Includes: A processor, the processor is coupled with a memory, and the memory is used to store a program. When the program is executed by the processor, the system is enabled to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the non-intelligent ECU contrast differential flashing method according to any one of claims 1 to 7 are realized.

Citation Information

Patent Citations

  • Differential upgrading method, device and equipment and readable storage medium

    CN114296770A