Software reconstruction method and device of embedded equipment, electronic equipment and medium
By obtaining the file name and the upgrade program refresh flag, the software file of the embedded device is automatically updated, which solves the problems of low update accuracy and efficiency in the existing technology, realizes the automated software update process, and improves the software quality of the embedded device. Update efficiency and accuracy.
Patent Information
- Application Number
- CN202410910294.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-09
AI Technical Summary
In the software update process of embedded devices, due to the linkage relationship between program files, the existing technology results in low update accuracy and low update efficiency, and requires manual replacement of files one by one, which is cumbersome and error-prone.
Automatically update target program files, compressed files, backup files, and backup compressed files by obtaining file names and upgrade program refresh flags, and update upgrade program files and upgrade compressed files based on the upgrade program refresh flags to avoid manual operations one by one.
It improves the accuracy and efficiency of software updates, automates the file update process, reduces manual errors, and improves the overall update efficiency.
Smart Images

Figure CN118733090A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of software update, and in particular to a method, device, electronic device and medium for software reconstruction of an embedded device. Background Art
[0002] Embedded systems have been widely used in many fields, such as automobiles, medical equipment, smart homes, and industrial automation. Taking the automotive industry as an example, with the development of intelligent driving technology, embedded systems are used in in-vehicle entertainment, navigation, and security monitoring. In the software development process of embedded devices, a lot of software debugging and replacement is required. However, due to the linkage between various program files, if the program files are not replaced uniformly, it may cause debugging instability and labor-intensive problems, which not only affects the development cycle, but also reduces the efficiency of software development.
[0003] However, when debugging and updating program files of embedded devices, the existing technology usually replaces the executable files into the device manually. But for large embedded systems, manual replacement is very cumbersome and requires deletion and replacement one by one, which can easily lead to replacement errors and cause low update accuracy and efficiency. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a software reconstruction method, apparatus, electronic device and medium for an embedded device, so as to solve the problem of low update accuracy and update efficiency when performing software reconstruction on an embedded device.
[0005] In a first aspect, an embodiment of the present application provides a software reconstruction method for an embedded device, comprising:
[0006] Get the file name and the upgrade program refresh flag, the upgrade program refresh flag is used to indicate whether to refresh the upgrade program file, and the file name includes the name of the program file to be updated;
[0007] Update the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated;
[0008] According to the upgrade program refresh flag, determine whether the upgrade program file needs to be refreshed;
[0009] If the upgrade program file needs to be refreshed, update the upgrade program file and the upgrade program compressed file;
[0010] If the upgrade program file does not need to be refreshed, the target program file and the target program compressed file corresponding to the program file to be updated are updated.
[0011] Optionally, updating the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated includes: obtaining the compressed file of the program to be updated corresponding to the program file to be updated; deleting the target backup program file and the target backup program compressed file corresponding to the program file to be updated; copying the program file to be updated, and renaming the copied program file to be updated according to a preset program name, so as to use the renamed file as the latest target backup program file corresponding to the program file to be updated; compressing the latest target backup program file to obtain the latest target backup program compressed file.
[0012] Optionally, after updating the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated, it also includes: using the first verification value corresponding to the program file to be updated, verifying the latest target backup program file; using the second verification value corresponding to the program compressed file to be updated, verifying the latest target backup program compressed file.
[0013] Optionally, the upgrade program file and the upgrade program compressed file are updated in the following manner: deleting the original upgrade program file and the original upgrade program compressed file; obtaining the latest upgrade program file, and compressing the latest upgrade program file to obtain the latest upgrade program compressed file.
[0014] Optionally, after obtaining the latest upgrade program compressed file, the method further includes: verifying the latest upgrade program file and the latest upgrade program compressed file.
[0015] Optionally, the target program file and the target program compressed file corresponding to the program file to be updated are updated in the following manner: deleting the original target program file and the original target program compressed file corresponding to the program file to be updated; taking the program file to be updated as the latest target program file, and compressing the latest target program file to obtain the latest target program compressed file.
[0016] Optionally, the method further includes: after updating the upgrade program file and the upgrade program compressed file, or after updating the target program file and the target program compressed file, updating the checksum value of each latest file into a configuration file corresponding to the latest file.
[0017] In a second aspect, an embodiment of the present application further provides a software reconstruction device for an embedded device, the device comprising:
[0018] An information acquisition module is used to obtain a file name and an upgrade program refresh flag, where the upgrade program refresh flag is used to indicate whether to refresh the upgrade program file, and the file name includes the name of the program file to be updated;
[0019] A backup file update module, used to update a target backup program file and a target backup program compressed file corresponding to the program file name to be updated;
[0020] An upgrade refresh judgment module is used to determine whether the upgrade program file needs to be refreshed according to the upgrade program refresh flag;
[0021] An upgrade program update module, used to update the upgrade program file and the upgrade program compressed file if the upgrade program file needs to be refreshed;
[0022] The target program update module is used to update the target program file and the target program compressed file corresponding to the program file to be updated if there is no need to refresh the upgrade program file.
[0023] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the software reconstruction method for the embedded device as described above are performed.
[0024] In a fourth aspect, an 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 software reconstruction method of the embedded device as described above are executed.
[0025] The embodiments of the present application bring the following beneficial effects:
[0026] The embodiments of the present application provide a software reconstruction method, device, electronic device and medium for an embedded device, which can automatically update the target program file, the target program compressed file, the backup program file and the backup program compressed file according to the file name, and update the upgrade program file and the upgrade program compressed file according to the upgrade program refresh flag, without the need to manually update the files one by one. Compared with the software reconstruction method for embedded devices in the prior art, the invention solves the problem of low update accuracy and update efficiency when performing software reconstruction on embedded devices.
[0027] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A flowchart of a software reconstruction method for an embedded device provided in an embodiment of the present application is shown;
[0030] Figure 2 A schematic diagram showing the structure of a software reconstruction device for an embedded device provided in an embodiment of the present application is shown;
[0031] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0033] It is worth noting that before the present application was filed, embedded systems have been widely used in many fields, such as automobiles, medical equipment, smart homes, and industrial automation. Taking the automotive industry as an example, with the development of intelligent driving technology, embedded systems are used in in-vehicle entertainment, navigation, and safety monitoring. In the software development process of embedded devices, a large amount of software debugging and replacement is required, but since the various program files have a linkage relationship, once the program files are not replaced uniformly, it may cause debugging instability and labor-intensive problems, which not only affects the development cycle, but also reduces the efficiency of software development. However, when debugging and updating the program files of embedded devices, the prior art usually replaces the executable files into the device manually, but for large embedded systems, it is very cumbersome to complete the overall replacement manually, and it is necessary to delete and replace them one by one, which is easy to cause replacement errors, resulting in low update accuracy and update efficiency.
[0034] Based on this, an embodiment of the present application provides a software reconstruction method for an embedded device to improve update accuracy and update efficiency.
[0035] In an embodiment of the present application, the software reconstruction method of the embedded device is implemented by reconstruction software, and the reconstruction software is installed in the embedded device.
[0036] See also Figure 1 , Figure 1 This is a flowchart of a software reconstruction method for an embedded device provided in an embodiment of the present application. Figure 1 As shown, the software reconstruction method of the embedded device provided in the embodiment of the present application includes:
[0037] Step S101, obtaining the file name and the upgrade program refresh flag.
[0038] In this step, the file name is used to indicate the program file to be updated and the refactoring file, and the file name includes the refactoring file name, the program file name to be updated and the refactoring range.
[0039] The program file to be updated is the target of the file reconstruction operation. Exemplarily, the program file to be updated may be the latest main program imported from the mobile storage device.
[0040] The program file to be updated is imported by a technician using the rz command, and the imported program file to be updated can be regarded as a new default program file.
[0041] For example: the file name is ". / pro_syn pro_dft_v0.0.1.3 2", where pro_syn represents the name of the reconstructed file, pro_dft represents the name of the program file to be updated, and v0.0.1.3 2 represents the reconstruction range. The version number is used here to indicate the reconstruction range.
[0042] The upgrade program refresh flag is used to indicate whether to refresh the upgrade program file. Exemplarily, the upgrade program refresh flag is 0 or 1. If the upgrade program refresh flag is 0, it indicates that the upgrade program file is not refreshed; if the upgrade program refresh flag is 1, it indicates that the upgrade program file needs to be refreshed.
[0043] In the embodiment of the present application, the program file to be updated is stored in a mobile storage device, for example, in RAM, and the mobile storage device is connected to the embedded device. At this time, the user can start the reconstruction software to start the reconstruction of the software program in the embedded device. After starting the reconstruction software, the user needs to input the file name and the upgrade program refresh flag to the reconstruction software. The reconstruction software will extract the reconstruction file name, the program file name to be updated, the reconstruction range and the upgrade program refresh flag from the input file name, and then obtain the reconstruction file from the mobile storage device according to the reconstruction file name pro_syn, obtain the program file to be updated from the mobile storage device according to the program file name pro_dft, and execute the reconstruction file to automatically update the software in the embedded device as a whole by executing the reconstruction file.
[0044] It should be noted that the operating system installed on the embedded device can be a LINUX system or a Windows system, and the software in the embedded device includes multiple types of program files, such as: daemon program files, main program files, backup program files, upgrade program files, main program configuration files, backup program configuration files, and each program file includes multiple compressed files corresponding to the program. The program file to be updated is usually the main program file.
[0045] Among them, the daemon program refers to a process program that is independent of the terminal and runs in the background, the main program refers to a program used to implement the functions of the embedded device, the backup program is a backup of the daemon program, the main program and the upgrade program, and the upgrade program is used to perform the upgrade task of the embedded device, that is, the upgrade task of the embedded device is completed by the upgrade program. For example: the upgrade program can be used to detect whether the old main program is active, and if it is active, the old main program will be closed.
[0046] Step S102, updating the target backup program file and the target backup program compressed file corresponding to the program file name to be updated.
[0047] In this step, the reconstruction software calculates the check value of the program file to be updated, which is referred to as the first check value, and the first check value can be a CRC code or an MD5 code. Then, the target backup program file and the target backup program compressed file corresponding to the program file to be updated are updated.
[0048] When updating the target backup program file and the target backup program compressed file, you can first obtain the compressed file of the program to be updated corresponding to the program file to be updated, that is, compress the program file to be updated to obtain the compressed file of the program to be updated, and calculate the check value of the compressed file of the program to be updated. Here, the check value of the compressed file of the program to be updated is called the second check value. Similarly, the second check value can be a CRC code or an MD5 code. The second check value and the first check value use the same encryption method.
[0049] Then, the target backup program file and the target backup program compressed file corresponding to the program file to be updated are queried in the embedded device. Here, since the program file to be updated is the main program file and the name of the main program file is fixed, for example, the main program name is pro_bkp, the original target backup program file and the original target backup program compressed file can be found according to the set main program file name, and the original target backup program file and the original target backup program compressed file corresponding to the program file to be updated can be deleted. Then, the program file to be updated is copied, and the copied program file to be updated is renamed according to the preset main program name, so that the renamed file is used as the latest target backup program file corresponding to the program file to be updated, and the latest target backup program file obtained is stored in the path where the original target backup program file is located, and the check value of the latest target backup program file is calculated at the same time. Finally, the latest target backup program file is compressed to obtain the latest target backup program compressed file, and the latest target backup program compressed file obtained is stored in the path where the original target backup program compressed file is located, and the check value of the latest target backup program compressed file is calculated at the same time.
[0050] After the target backup program file and the target backup program compressed file corresponding to the file name are updated using the reconstruction file, the latest target backup program file can be verified using the first verification value corresponding to the program file to be updated, and the latest target backup program compressed file can be verified using the second verification value corresponding to the program compressed file to be updated. If the first verification value is equal to the verification value of the latest target backup program file, it indicates that the latest target backup program file has passed the verification; if the second verification value is equal to the verification value of the latest target backup program compressed file, it indicates that the latest target backup program compressed file has passed the verification. If the first verification value is not equal to the verification value of the latest target backup program file, it indicates that the latest target backup program file has not passed the verification; if the second verification value is not equal to the verification value of the latest target backup program compressed file, it indicates that the latest target backup program compressed file has not passed the verification.
[0051] If the latest target backup program file fails to pass the verification, or the latest target backup program compressed file fails to pass the verification, the latest target backup program file and the latest target backup program compressed file are deleted, and the program file to be updated is re-copied to regain the latest target backup program file and the latest target backup program compressed file, and the regained latest target backup program file and the latest target backup program compressed file are verified, and this iteration is repeated until the latest target backup program file and the latest target backup program compressed file both pass the verification, and step S103 is executed.
[0052] Step S103: Determine whether the upgrade program file needs to be refreshed according to the upgrade program refresh flag.
[0053] In this step, the upgrade program refresh flag is 0 or 1. If the upgrade program refresh flag is 1, it is determined that the upgrade program file needs to be refreshed; if the upgrade program refresh flag is 0, it is determined that the upgrade program file does not need to be refreshed.
[0054] If the upgrade program file needs to be refreshed, execute step S104.
[0055] If it is not necessary to refresh the upgrade program file, execute step S105.
[0056] Step S104: if the upgrade program file needs to be refreshed, the upgrade program file and the upgrade program compressed file are updated.
[0057] In this step, when updating the upgrade program file and the upgrade program compressed file, the original upgrade program file and the original upgrade program compressed file are found in the embedded device, and the found original upgrade program file and the original upgrade program compressed file are deleted. Then, the upgrade program file to be updated and the upgrade program compressed file to be updated are copied from the mobile storage device to the embedded device to obtain the latest upgrade program file, and the check value of the latest upgrade program file is calculated. Finally, the latest upgrade program file is compressed to obtain the latest upgrade program compressed file, and the check value of the latest upgrade program compressed file is calculated.
[0058] After obtaining the latest upgrade program compressed file, the latest upgrade program file is verified using the third verification value corresponding to the upgrade program file to be updated. At the same time, the latest upgrade program compressed file includes multiple, and the verification value of each latest upgrade program compressed file is calculated, and the verification values of multiple latest upgrade program compressed files are compared to see if they are all equal. If the third verification value is equal to the verification value of the latest upgrade program file, it indicates that the latest upgrade program file has passed the verification; if the verification values of multiple latest upgrade program compressed files are all equal, it indicates that the latest upgrade program compressed file has passed the verification. If the third verification value is not equal to the verification value of the latest upgrade program file, it indicates that the latest upgrade program file has not passed the verification; if the verification values of multiple latest upgrade program compressed files have more than a preset ratio of verification values that are equal, it indicates that the latest upgrade program compressed files have not all passed the verification, then the latest upgrade program compressed files with equal verification values are selected to replace the latest upgrade program compressed files with unequal verification values, for example: there are three latest upgrade program compressed files, and the verification values of two latest upgrade program compressed files are equal, then any one of the two latest upgrade program compressed files with equal verification values is selected to replace the latest upgrade program compressed file with unequal verification values.
[0059] If the latest upgrade program file fails the verification, or the latest upgrade program compressed file fails the verification, the latest upgrade program file and the latest upgrade program compressed file are deleted, and the latest upgrade program file and the latest upgrade program compressed file are re-obtained, and the retrieved latest upgrade program file and the latest upgrade program compressed file are verified. This iterative cycle is repeated until the latest upgrade program file and the latest upgrade program compressed file pass the verification, and the update of the upgrade program file and the upgrade program compressed file is completed.
[0060] Step S105: if the program file to be updated does not need to be refreshed, then the target program file and the target program compressed file corresponding to the program file to be updated are updated.
[0061] In this step, if the program file to be updated is a main program file, the target program file is the original main program file in the embedded device, that is, the default program file.
[0062] When updating the main program file, since the main program file name is fixed, for example: pro_bkp, the original target program file and the original target program compressed file in the embedded device can be found according to the main program file name pro_bkp and the reconstruction range. Then, the original target program file and the original target program compressed file are deleted, and the program file to be updated is used as the latest target program file, and the latest target program file is renamed according to the file name pro_bkp of the main program file. Finally, the renamed latest target program file is compressed to obtain the latest target program compressed file.
[0063] After updating the upgrade program file and the upgrade program compressed file, or after updating the target program file and the target program compressed file, the checksum value of each latest file needs to be updated to the configuration file. For example, if the program file to be updated is the main program file, the determined first checksum value and second checksum value are updated to the main program configuration file, the checksum value of the latest target backup program file and the checksum value of the latest target backup program compressed file are updated to the backup program configuration file, and the checksum value of the latest upgrade program file and the checksum value of the latest upgrade program compressed file are updated to the upgrade program configuration file.
[0064] Compared with the software reconstruction method of embedded devices in the prior art, the present application can automatically update the target program file, the target program compressed file, the backup program file, and the backup program compressed file according to the file name, and update the upgrade program file and the upgrade program compressed file according to the upgrade program refresh flag. There is no need to manually update the files one by one, which solves the problem of low update accuracy and update efficiency when reconstructing the software of embedded devices.
[0065] Based on the same inventive concept, the embodiment of the present application also provides a software reconstruction device for an embedded device corresponding to the software reconstruction method for an embedded device. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the software reconstruction method for the embedded device in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0066] See also Figure 2 , Figure 2 A schematic diagram of the structure of a software reconstruction device for an embedded device provided in an embodiment of the present application. Figure 2 As shown in , the software reconstruction device 200 of the embedded device includes:
[0067] The information acquisition module 201 is used to acquire the file name and the upgrade program refresh flag, the upgrade program refresh flag is used to indicate whether to refresh the upgrade program file, and the file name includes the name of the program file to be updated;
[0068] The backup file update module 202 is used to update the target backup program file and the target backup program compressed file corresponding to the program file name to be updated;
[0069] The upgrade refresh judgment module 203 is used to determine whether the upgrade program file needs to be refreshed according to the upgrade program refresh flag;
[0070] An upgrade program update module 204, used to update the upgrade program file and the upgrade program compressed file if the upgrade program file needs to be refreshed;
[0071] The target program updating module 205 is used to update the target program file and the target program compressed file corresponding to the program file to be updated if there is no need to refresh the upgrade program file.
[0072] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown in , the electronic device 300 includes a processor 310 , a memory 320 and a bus 330 .
[0073] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 communicates with the memory 320 via the bus 330. When the machine-readable instructions are executed by the processor 310, the above-mentioned Figure 1 The steps of the software reconstruction method for an embedded device in the method embodiment shown in the figure, and the specific implementation manner can be referred to the method embodiment, which will not be described in detail here.
[0074] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of the software reconstruction method for an embedded device in the method embodiment shown in the figure, and the specific implementation manner can be referred to the method embodiment, which will not be described in detail here.
[0075] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0076] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0077] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0078] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0079] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0080] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A software reconstruction method for an embedded device, characterized in that: include: Obtain a file name and an upgrade program refresh flag, wherein the upgrade program refresh flag is used to indicate whether to refresh the upgrade program file, and the file name includes a name of a program file to be updated; Updating the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated; Determining whether it is necessary to refresh the upgrade program file according to the upgrade program refresh flag; If the upgrade program file needs to be refreshed, update the upgrade program file and the upgrade program compressed file; If the upgrade program file does not need to be refreshed, the target program file and the target program compressed file corresponding to the program file to be updated are updated.
2. The method according to claim 1, characterized in that The updating of the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated includes: Obtaining a compressed file of the program to be updated corresponding to the program file to be updated; Deleting the target backup program file and the target backup program compressed file corresponding to the program file to be updated; Copying the program file to be updated, and renaming the copied program file to be updated according to a preset program name, so that the renamed file is used as the latest target backup program file corresponding to the program file to be updated; The latest target backup program file is compressed to obtain the latest target backup program compressed file.
3. The method according to claim 2, characterized in that After the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated are updated, the method further includes: Verifying the latest target backup program file using the first verification value corresponding to the program file to be updated; The latest target backup program compressed file is verified using the second verification value corresponding to the to-be-updated program compressed file.
4. The method according to claim 1, characterized in that: Update the upgrade program file and the upgrade program compressed file in the following ways: Delete the original upgrade program file and the original upgrade program compressed file; The latest upgrade program file is obtained, and the latest upgrade program file is compressed to obtain the latest upgrade program compressed file.
5. The method according to claim 4, characterized in that After obtaining the latest upgrade program compressed file, the following steps are also included: The latest upgrade program file and the latest upgrade program compressed file are verified.
6. The method according to claim 1, characterized in that Update the target program file and the target program compressed file corresponding to the program file to be updated in the following manner: Deleting the original target program file and the original target program compressed file corresponding to the program file to be updated; The program file to be updated is used as the latest target program file, and the latest target program file is compressed to obtain the latest target program compressed file.
7. The method according to claim 1, characterized in that The method further comprises: After the upgrade program file and the upgrade program compressed file are updated, or after the target program file and the target program compressed file are updated, the checksum value of each latest file is updated to the configuration file corresponding to the latest file.
8. A software reconstruction device for an embedded device, characterized in that: include: An information acquisition module, used to acquire a file name and an upgrade program refresh flag, wherein the upgrade program refresh flag is used to indicate whether to refresh the upgrade program file, and the file name includes a name of a program file to be updated; A backup file update module, used to update the target backup program file and the target backup program compressed file corresponding to the name of the program file to be updated; An upgrade refresh judgment module is used to determine whether the upgrade program file needs to be refreshed according to the upgrade program refresh flag; An upgrade program update module, used to update the upgrade program file and the upgrade program compressed file if the upgrade program file needs to be refreshed; The target program updating module is used to update the target program file and the target program compressed file corresponding to the program file to be updated if there is no need to refresh the upgrade program file.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the software reconstruction method for an embedded device as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the software reconstruction method for an embedded device as described in any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Software product updating processing method and device and medium
CN116679973A
Method for updating main programme executed by radio communication module
CN1421109A
Automatic version-up system for client software
JP1998021061A
