Embedded device software upgrade method and upgrade device

By checking the target upgrade file of embedded devices, the problem of errors and instability during the software upgrade of embedded devices is solved, the security and reliability of upgrades are improved, and the operation and maintenance costs are reduced.

CN118838617BActive Publication Date: 2025-03-28CHINA ELECTRONICS CORP 6TH RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410908021.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-03-28
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

An error during the software upgrade of embedded devices causes the device to get stuck, and problems such as power interruption, data transmission errors or new firmware incompatibility during the upgrade process reduce the security and reliability of the software upgrade and increase operation and maintenance costs.

Method used

By verifying the target upgrade file sent by the wireless link, writing it to the storage addresses of multiple storage units, and checking the multiple hash value upgrade conditions, the target software is upgraded using upgrade data packets that meet the upgrade conditions to ensure that the equipment runs stably without touching the guarantee program.

Benefits of technology

It improves the security and reliability of embedded device software upgrades, reduces cost investment in equipment operation and maintenance, and ensures the stability of equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118838617B_ABST
    Figure CN118838617B_ABST
Patent Text Reader

Abstract

The present application provides an upgrade method and upgrade device for embedded device software, the upgrade method comprising: verifying a target upgrade file for upgrading the target software sent by a wireless upgrade terminal through a wireless link; if the verification is passed, for each upgrade data packet in the target upgrade file, writing the upgrade data packet into multiple storage addresses corresponding to multiple storage units set in the embedded device in sequence, and judging whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions; when the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, extracting the first upgrade data packet from the upgrade data packets stored in the multiple storage addresses, and using the first upgrade data packet to upgrade the target software. Through the above method, the security and reliability of the software upgrade of the embedded device are improved, thereby reducing the cost investment of equipment operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of wireless software upgrade, and in particular to an upgrade method and an upgrade device for embedded device software. Background Art

[0002] Embedded devices are widely used in many fields, for example, in automobiles (in-vehicle entertainment, navigation and security monitoring), medical equipment (real-time monitoring and data collection), smart homes and industrial automation. In addition, with the technological updates and iterations of embedded devices, the software upgrade of the device is a business that must be considered. It is necessary to ensure that the product functions and performance are in a leading position according to market dynamics in order to ensure brand influence and word-of-mouth effect.

[0003] At present, embedded devices have been "packaged layer by layer", and the security requirements and technical difficulty of on-site disassembly are relatively high. The upgrade of embedded device software is generally connected to the device through physical interfaces such as serial ports, JTAG interfaces or USB, and then dedicated software tools are used to update the firmware. When there are many devices of the same type, errors in upgrading the firmware will cause the device to get stuck and become bricked. In addition, during the upgrade process, if there is a power outage, data transmission error or incompatibility of the new firmware, the device will fail to start or malfunction, which reduces the security and reliability of software upgrades of embedded devices, thereby increasing the cost investment in equipment operation and maintenance. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide an upgrade method and upgrade device for embedded device software, by verifying the target upgrade file sent by the wireless link, and after the verification is passed, writing multiple upgrade data packets in the target upgrade file into the storage addresses of multiple storage units, performing multi-channel hash value upgrade condition verification, and using the upgrade data packets that meet the upgrade conditions to upgrade the target software, without touching the bottom line program, ensuring the stable operation of the embedded device, improving the security and reliability of the software upgrade of the embedded device, and thereby reducing the cost investment in equipment operation and maintenance.

[0005] The embodiment of the present application provides a method for upgrading software of an embedded device, wherein the embedded device has multiple software installed, and the upgrading method comprises:

[0006] In response to receiving a target upgrade file for upgrading a target software among the plurality of software sent by the wireless upgrade terminal through a wireless link, verifying the target upgrade file;

[0007] When the target upgrade file passes the verification, for each upgrade data packet in the multiple upgrade data packets in the target upgrade file, the upgrade data packet is sequentially written into multiple storage addresses corresponding to multiple storage units provided in the embedded device, and it is determined whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions;

[0008] When the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, a first upgrade data packet is extracted from the upgrade data packets stored in the multiple storage addresses, and the target software is upgraded using the first upgrade data packet.

[0009] Further, in response to receiving a target upgrade file for upgrading a target software among the multiple software sent by the wireless upgrade terminal, verifying the target upgrade file includes:

[0010] receiving a target upgrade file for upgrading a target software among the plurality of software, which is sent by the wireless upgrade terminal through a wireless link;

[0011] In response to receiving the target upgrade file, encrypting the upgrade data in the target upgrade file using a preset encryption strategy to obtain encrypted upgrade data;

[0012] Determining whether the encrypted upgrade data matches the device information corresponding to the embedded device;

[0013] If they match, a cyclic redundancy check is performed on the encrypted upgrade data;

[0014] If the encrypted upgrade data passes the cyclic redundancy check, it is determined that the target upgrade file passes the check.

[0015] Further, for each of the multiple upgrade data packets in the target upgrade file, the upgrade data packet is sequentially written into multiple storage addresses corresponding to multiple storage units provided in the embedded device, and it is determined whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, including:

[0016] For each upgrade data packet in the target upgrade file, sequentially write the upgrade data packet into a plurality of first storage addresses corresponding to a plurality of first storage units provided in the embedded device, and determine a plurality of first hash values ​​corresponding to the plurality of first storage addresses;

[0017] Determining whether the plurality of first hash values ​​meet a preset upgrade condition;

[0018] If the multiple first hash values ​​meet the preset upgrade condition, extract the second upgrade data packet with the first write order from the upgrade data packets written at the multiple first storage addresses according to the write order corresponding to the upgrade data packets written at the multiple first storage addresses, and remove the hash data in the second upgrade data packet;

[0019] Writing the second upgrade data packet after removing the hash data into a plurality of second storage addresses corresponding to a plurality of second storage units arranged in the embedded device in sequence, and determining a plurality of second hash values ​​corresponding to the plurality of second storage addresses;

[0020] Determining whether the plurality of second hash values ​​meet a preset upgrade condition;

[0021] If the plurality of second hash values ​​satisfy the preset upgrade condition, it is determined whether the plurality of hash values ​​corresponding to the plurality of storage addresses satisfy the preset upgrade condition.

[0022] Furthermore, the preset upgrade condition includes: there is at most one hash value with data anomaly among the multiple hash values ​​corresponding to the multiple storage addresses.

[0023] Further, when the multiple hash values ​​corresponding to the multiple storage addresses do not meet the preset upgrade conditions, the method further includes:

[0024] According to the storage address corresponding to the hash value of the data anomaly, the abnormal upgrade data packet corresponding to the storage address is determined by using a dynamic monitoring unit arranged in the embedded device;

[0025] The abnormal upgrade data packet is replaced by using a preset recheck mechanism.

[0026] Further, extracting a first upgrade data packet from the upgrade data packets stored in the plurality of storage addresses, and using the first upgrade data packet to upgrade the target software includes:

[0027] According to the writing order of the upgrade data packets written at the plurality of second storage addresses, extracting the first upgrade data packet with the first writing order from the upgrade data packets written at the plurality of second storage addresses, and setting the upgrade flag bit corresponding to the embedded device;

[0028] After the upgrade flag is set, controlling the embedded device to restart;

[0029] After the embedded device is restarted, an upgrade guide unit arranged in the embedded device is used to determine whether the upgrade flag bit after setting processing meets the upgrade standard;

[0030] If yes, then start the upgrade program corresponding to the first upgrade data package, and use the upgrade program to upgrade the target software.

[0031] The embodiment of the present application also provides an upgrade device for embedded device software, the upgrade device comprising:

[0032] A file verification module, configured to verify the target upgrade file for upgrading the target software among the multiple software in response to receiving the target upgrade file sent by the wireless upgrade terminal through the wireless link;

[0033] an upgrade judgment module, for, if the target upgrade file passes the verification, writing each upgrade data packet in the multiple upgrade data packets in the target upgrade file into multiple storage addresses corresponding to multiple storage units provided in the embedded device in sequence, and judging whether multiple hash values ​​corresponding to the multiple storage addresses meet preset upgrade conditions;

[0034] The software upgrade module is used to extract a first upgrade data packet from the upgrade data packets stored in the multiple storage addresses when the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, and use the first upgrade data packet to upgrade the target software.

[0035] Further, when the file verification module is used to verify the target upgrade file in response to receiving a target upgrade file sent by the wireless upgrade terminal for upgrading a target software among the multiple software, the file verification module is used to:

[0036] receiving a target upgrade file for upgrading a target software among the plurality of software, which is sent by the wireless upgrade terminal through a wireless link;

[0037] In response to receiving the target upgrade file, encrypting the upgrade data in the target upgrade file using a preset encryption strategy to obtain encrypted upgrade data;

[0038] Determining whether the encrypted upgrade data matches the device information corresponding to the embedded device;

[0039] If they match, a cyclic redundancy check is performed on the encrypted upgrade data;

[0040] If the encrypted upgrade data passes the cyclic redundancy check, it is determined that the target upgrade file passes the check.

[0041] Further, when the upgrade judgment module is used to write each upgrade data packet in the target upgrade file into a plurality of storage addresses corresponding to a plurality of storage units provided in the embedded device in sequence, and judge whether a plurality of hash values ​​corresponding to the plurality of storage addresses meet a preset upgrade condition, the upgrade judgment module is used to:

[0042] For each upgrade data packet in the target upgrade file, sequentially write the upgrade data packet into a plurality of first storage addresses corresponding to a plurality of first storage units provided in the embedded device, and determine a plurality of first hash values ​​corresponding to the plurality of first storage addresses;

[0043] Determining whether the plurality of first hash values ​​meet a preset upgrade condition;

[0044] If the multiple first hash values ​​meet the preset upgrade condition, extract the second upgrade data packet with the first write order from the upgrade data packets written at the multiple first storage addresses according to the write order corresponding to the upgrade data packets written at the multiple first storage addresses, and remove the hash data in the second upgrade data packet;

[0045] Writing the second upgrade data packet after removing the hash data into a plurality of second storage addresses corresponding to a plurality of second storage units arranged in the embedded device in sequence, and determining a plurality of second hash values ​​corresponding to the plurality of second storage addresses;

[0046] Determining whether the plurality of second hash values ​​meet a preset upgrade condition;

[0047] If the plurality of second hash values ​​satisfy the preset upgrade condition, it is determined whether the plurality of hash values ​​corresponding to the plurality of storage addresses satisfy the preset upgrade condition.

[0048] Furthermore, the upgrade device further includes a dynamic reconstruction module, and when the multiple hash values ​​corresponding to the multiple storage addresses do not meet the preset upgrade conditions, the dynamic reconstruction module is used to:

[0049] According to the storage address corresponding to the hash value of the data anomaly, the abnormal upgrade data packet corresponding to the storage address is determined by using a dynamic monitoring unit arranged in the embedded device;

[0050] The abnormal upgrade data packet is replaced by using a preset recheck mechanism.

[0051] Further, when the software upgrade module is used to extract a first upgrade data packet from the upgrade data packets stored in the multiple storage addresses and use the first upgrade data packet to upgrade the target software, the software upgrade module is used to:

[0052] According to the writing order of the upgrade data packets written at the plurality of second storage addresses, extracting the first upgrade data packet with the first writing order from the upgrade data packets written at the plurality of second storage addresses, and setting the upgrade flag bit corresponding to the embedded device;

[0053] After the upgrade flag is set, controlling the embedded device to restart;

[0054] After the embedded device is restarted, an upgrade guide unit arranged in the embedded device is used to determine whether the upgrade flag bit after setting processing meets the upgrade standard;

[0055] If yes, then start the upgrade program corresponding to the first upgrade data package, and use the upgrade program to upgrade the target software.

[0056] An embodiment of the present application also 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 method for upgrading embedded device software as described above are performed.

[0057] 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 method for upgrading the embedded device software as described above are executed.

[0058] The embedded device software upgrade method and upgrade device provided by the embodiment of the present application, in response to receiving a target upgrade file for upgrading target software among the multiple software sent by the wireless upgrade terminal through a wireless link, verifies the target upgrade file; if the target upgrade file passes the verification, for each upgrade data packet in the multiple upgrade data packets in the target upgrade file, writes the upgrade data packet in sequence to multiple storage addresses corresponding to multiple storage units set in the embedded device, and determines whether the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions; when the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, extracts a first upgrade data packet from the upgrade data packets stored in the multiple storage addresses, and uses the first upgrade data packet to upgrade the target software.

[0059] Compared with the prior art method of connecting to the device through a physical interface such as a serial port, JTAG interface or USB, and then using a dedicated software tool to upgrade, the target upgrade file sent by the wireless link is verified. After the verification is passed, multiple upgrade data packets in the target upgrade file are written into the storage addresses of multiple storage units, and multiple hash value upgrade condition checks are performed. The target software is upgraded using the upgrade data packets that meet the upgrade conditions. Without touching the bottom-line program, the stable operation of the embedded device is guaranteed, the security and reliability of the software upgrade of the embedded device is improved, and the cost investment in equipment operation and maintenance is reduced.

[0060] 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

[0061] 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.

[0062] Figure 1 One of the flowcharts of a method for upgrading embedded device software provided in an embodiment of the present application;

[0063] Figure 2 A second flowchart of a method for upgrading software of an embedded device provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram of a dynamic monitoring unit determining an abnormal upgrade data packet provided by an embodiment of the present application;

[0065] Figure 4 One of the structural schematic diagrams of an embedded device software upgrade device provided in an embodiment of the present application;

[0066] Figure 5 A second structural diagram of an embedded device software upgrade device provided in an embodiment of the present application;

[0067] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] 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.

[0069] Research has found that currently, embedded devices have been "packaged layer by layer", and the security requirements and technical difficulty of on-site disassembly are relatively high. The upgrade of embedded device software is generally connected to the device through physical interfaces such as serial ports, JTAG interfaces or USB, and then dedicated software tools are used to update the firmware. When there are many devices of the same type, errors in upgrading the firmware will cause the device to get stuck and become a brick. In addition, during the upgrade process, if there is a power outage, data transmission error or incompatibility of the new firmware, the device will fail to start or malfunction, which reduces the security and reliability of software upgrades of embedded devices, thereby increasing the cost of equipment operation and maintenance.

[0070] Based on this, an embodiment of the present application provides a method for upgrading software of an embedded device, by verifying the target upgrade file sent by a wireless link, and after the verification is passed, writing multiple upgrade data packets in the target upgrade file into the storage addresses of multiple storage units, performing multi-channel hash value upgrade condition verification, and using the upgrade data packets that meet the upgrade conditions to upgrade the target software. Without touching the bottom-line program, the stable operation of the embedded device is guaranteed, the security and reliability of the software upgrade of the embedded device is improved, and the cost investment in equipment operation and maintenance is reduced.

[0071] See also Figure 1 , Figure 1 This is one of the flowcharts of a method for upgrading embedded device software provided by an embodiment of the present application. Figure 1 As shown in the embodiment of the present application, the method for upgrading the embedded device software is provided, wherein the embedded device is installed with multiple software, and the upgrading method comprises:

[0072] S101: In response to receiving a target upgrade file for upgrading a target software among the multiple software and sent by a wireless upgrade terminal through a wireless link, verify the target upgrade file.

[0073] It should be noted that the embedded device is provided with multiple modules, including a WIFI module, a configuration database, a protocol interaction module, an upgrade guidance unit, a wireless upgrade module, a storage unit and a dynamic monitoring unit, etc.; wherein the embedded device is installed with multiple software.

[0074] In this step, during the specific implementation, in order to realize the upgrade of the target software among the multiple software installed on the embedded device, first, the wireless upgrade terminal sends the target upgrade file corresponding to the target software through the wireless link established with the embedded device; then, in response to the reception of the file, the upgrade data in the target upgrade file is encrypted using a preset encryption strategy to obtain encrypted upgrade data, and it is determined whether the encrypted upgrade data matches the device information corresponding to the embedded device; then, if there is a match, a cyclic redundancy check is performed on the encrypted upgrade data; finally, when the encrypted upgrade data passes all the above-mentioned verification judgments, it is determined that the target upgrade file has passed the verification.

[0075] In one implementation of the present application, during specific implementation, step S101 may include:

[0076] S1011: Receive a target upgrade file for upgrading a target software among the multiple software, which is sent by a wireless upgrade terminal through a wireless link.

[0077] It should be noted that before the wireless upgrade terminal and the embedded device perform file transfer, the embedded device and the wireless upgrade terminal need to establish a wireless connection to form a wireless link; wherein the wireless connection includes but is not limited to a WIFI connection and a Bluetooth connection.

[0078] In this step, during the specific implementation, first, according to the user's upgrade requirements, the target software that is expected to be upgraded is determined among the multiple software installed in the embedded device; then, the wireless upgrade terminal sends the target upgrade file corresponding to the target software to the embedded device through the established wireless link; finally, the embedded device receives the target upgrade file.

[0079] The target upgrade file corresponds to the target software, and includes file contents such as data and programs for upgrading the target software, for example, an installation package, an upgrade log, and a format file.

[0080] S1012: In response to receiving the target upgrade file, encrypt the upgrade data in the target upgrade file using a preset encryption strategy to obtain encrypted upgrade data.

[0081] In this step, in response to receiving the target upgrade file, the preset encryption algorithm program is called to perform security processing on the upgrade data in the target upgrade file by first encrypting and then decrypting it to obtain encrypted upgrade data for subsequent information matching and verification, thereby ensuring the stability and reliability of the data source.

[0082] S1013: Determine whether the encrypted upgrade data matches the device information corresponding to the embedded device.

[0083] In this step, during the specific implementation, first, determine the device information corresponding to the embedded device; then, compare the encrypted upgrade data with the device information corresponding to the embedded device, and determine the comparison result; finally, based on the data consistency corresponding to the comparison result, determine whether the encrypted upgrade data matches the device information corresponding to the embedded device.

[0084] In one possible implementation of the present application, the device information corresponding to the embedded device includes system information, system version number, target software information and target software version information, etc.; for example, when the operating system corresponding to the embedded device is version 17.5 of the Android system, and the target upgrade software is "music software", the version of the "music software" is 24.5.2 and other device information.

[0085] S1014: If there is a match, a cyclic redundancy check is performed on the encrypted upgrade data.

[0086] In this step, if the encrypted upgrade data matches the device information corresponding to the embedded device, the encrypted upgrade data is further verified. Specifically, a cyclic redundancy check is performed on the encrypted upgrade data.

[0087] Here, a cyclic redundancy check (CRC) is a channel coding technology that generates a short fixed-bit check code based on data such as a network data packet or a computer file; the CRC check is mainly used to detect or verify errors that may occur after data transmission or storage.

[0088] Furthermore, if the encrypted upgrade data does not match the device information corresponding to the embedded device, the upgrade of the target software of the embedded device is terminated, and the upgrade process is started again after the unmatched upgrade encrypted data is processed.

[0089] S1015. If the encrypted upgrade data passes the cyclic redundancy check, it is determined that the target upgrade file passes the check.

[0090] In this step, if the encrypted upgrade data passes the cyclic redundancy check, at this time, the target upgrade file has passed the information matching check and the cyclic redundancy check to determine that the target upgrade file passes the check and enters the subsequent data writing upgrade process.

[0091] Furthermore, if the encrypted upgrade data does not pass the cyclic redundancy check, the upgrade of the target software of the embedded device is terminated, and after the abnormal upgrade data in the cyclic redundancy check is processed, the upgrade process is restarted.

[0092] S102. When the target upgrade file passes verification, for each upgrade data packet in the multiple upgrade data packets in the target upgrade file, write the upgrade data packet into multiple storage addresses corresponding to multiple storage units provided in the embedded device in sequence, and determine whether multiple hash values ​​corresponding to the multiple storage addresses meet preset upgrade conditions.

[0093] It should be noted that a plurality of storage units are provided in the embedded device, wherein each storage unit is a local non-volatile storage unit, and the storage unit is used to update and upgrade the data of the target software by accepting data writes; in addition, the target upgrade file includes a plurality of upgrade data packets, and each upgrade data packet is used to upgrade and update the data of the target software by writing into the storage address corresponding to the storage unit.

[0094] In this step, the multiple storage units are divided into multiple first storage units and multiple second storage units. In the specific implementation, first, each upgrade data packet is sequentially written into the multiple first storage addresses corresponding to the multiple first storage units, and it is determined whether the multiple first hash values ​​corresponding to the multiple first storage addresses meet the preset upgrade conditions; then, in the case that the multiple first hash values ​​meet the preset upgrade conditions, according to the write order corresponding to the upgrade data packets written at the first storage addresses, a second upgrade data packet with the first write order is extracted from the upgrade data packet, and hash data is removed from the second upgrade data packet; finally, each second upgrade data packet is sequentially written into the multiple second storage addresses corresponding to the multiple second storage units, and it is determined whether the multiple second hash values ​​corresponding to the multiple second storage addresses meet the preset upgrade conditions.

[0095] Here, when the plurality of second hash values ​​satisfy the preset upgrade condition, it is determined that the plurality of hash values ​​corresponding to the plurality of storage addresses satisfy the preset upgrade condition.

[0096] In one possible implementation of the present application, the preset upgrade condition includes: there is at most one hash value with data anomaly among the multiple hash values ​​corresponding to the multiple storage addresses; wherein the hash value with data anomaly means that the hash value is inconsistent with the values ​​of other hash values.

[0097] In a specific implementation, a dynamic monitoring unit provided in an embedded device is utilized to monitor hash values ​​of data anomalies that are inconsistent with the numerical values ​​of other hash values ​​among multiple hash values ​​corresponding to multiple storage addresses; wherein the dynamic monitoring unit can feedback the upgrade status of the target software based on the judgment result of the preset upgrade condition, and dynamically draw a graph of the upgrade process to visually observe the upgrade result of the target software.

[0098] Exemplarily, when there are 4 storage addresses, these 4 storage addresses correspond to 4 hash values; if there is 1 or 0 hash values ​​among the 4 hash values ​​that are inconsistent with the other hash values, it is determined that the preset upgrade condition is met at this time; if there are 2 or more hash values ​​among the 4 hash values ​​that are inconsistent with the other hash values, it is determined that the preset upgrade condition is not met at this time.

[0099] In one implementation of the present application, during specific implementation, step S102 may include:

[0100] S1021. For each upgrade data packet in the target upgrade file, write the upgrade data packet sequentially into a plurality of first storage addresses corresponding to a plurality of first storage units provided in the embedded device, and determine a plurality of first hash values ​​corresponding to the plurality of first storage addresses.

[0101] In this step, each of the multiple upgrade data packages in the target upgrade file is written sequentially into the multiple first storage addresses corresponding to the multiple first storage units; then, according to the written data in each first storage address, the first hash value corresponding to each first storage address is calculated respectively.

[0102] Here, since software upgrades have high requirements on timeliness and the data in each upgrade data packet is large, a method of comparing the consistency of the hash values ​​corresponding to the calculated storage addresses is adopted.

[0103] Exemplarily, when there are four first storage units, the first storage units correspond to four storage addresses, namely storage address A, storage address B, storage address C and storage address D. Each upgrade data packet is written into the A, B, C and D storage addresses in sequence, and the first hash values ​​corresponding to the A, B, C and D storage addresses are calculated and determined.

[0104] S1022: Determine whether the multiple first hash values ​​meet a preset upgrade condition.

[0105] In this step, based on the obtained multiple first hash values, it is determined whether there is at most one first hash value with data anomaly that is inconsistent with the values ​​of other first hash values, that is, whether the multiple first hash values ​​meet the preset upgrade conditions.

[0106] S1023. If the multiple first hash values ​​meet the preset upgrade conditions, then according to the writing order corresponding to the upgrade data packets written at the multiple first storage addresses, extract the second upgrade data packet with the first writing order from the upgrade data packets written at the multiple first storage addresses, and remove the hash data in the second upgrade data packet.

[0107] In this step, when multiple first hash values ​​meet the preset upgrade conditions, first, the writing order corresponding to the upgrade data packets written to the multiple first storage addresses is determined; then, the upgrade data packet with the first writing order is determined as the second upgrade data packet, and the second upgrade data packet is extracted; finally, the hash data in the second upgrade data packet is removed.

[0108] In one possible implementation of the present application, the hash data includes at least one of a hash value, cyclic redundancy data and check data.

[0109] Exemplarily, when the four first storage units correspond to storage address A, storage address B, storage address C and storage address D respectively, each upgrade data packet is written in the A, B, C and D storage addresses in sequence, that is, the writing order is A for the first priority, B for the second priority, C for the third priority, and D for the fourth priority; then, the upgrade data packet corresponding to the A storage address is determined as the second upgrade data packet.

[0110] S1024, writing the second upgrade data packet after removing the hash data into a plurality of second storage addresses corresponding to a plurality of second storage units arranged in the embedded device in sequence, and determining a plurality of second hash values ​​corresponding to the plurality of second storage addresses.

[0111] In this step, the second upgrade data packet after removing the hash data is sequentially written into a plurality of second storage addresses corresponding to a plurality of second storage units; then, the second hash value corresponding to each second storage address is calculated respectively according to the written data in each second storage address.

[0112] Exemplarily, when there are four second storage units, the second storage units correspond to four storage addresses, namely E storage address, F storage address, G storage address and H storage address, and the second upgrade data packet after removing the hash data is written into the E, F, G and H storage addresses in sequence, and the second hash values ​​corresponding to the E, F, G and H storage addresses are calculated and determined.

[0113] S1025. Determine whether the multiple second hash values ​​meet a preset upgrade condition.

[0114] In this step, based on the obtained multiple second hash values, it is determined whether there is at most one second hash value with data anomaly that is inconsistent with the values ​​of other second hash values, that is, whether the multiple second hash values ​​meet the preset upgrade conditions.

[0115] S1026: If the multiple second hash values ​​meet the preset upgrade condition, determine whether the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade condition.

[0116] In this step, based on the judgment of the preset upgrade conditions for the first storage address and the second storage address, when multiple second hash values ​​meet the preset upgrade conditions, it is determined whether the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions to enter the subsequent upgrade process.

[0117] S103: When the multiple hash values ​​corresponding to the multiple storage addresses meet a preset upgrade condition, extract a first upgrade data packet from the upgrade data packets stored in the multiple storage addresses, and use the first upgrade data packet to upgrade the target software.

[0118] In this step, when multiple hash values ​​corresponding to multiple storage addresses meet preset upgrade conditions, in specific implementation, first, according to the writing order corresponding to multiple second storage addresses, the first upgrade data packet with the first writing order is extracted from the upgrade data packets written at the multiple second storage addresses; then, the upgrade flag corresponding to the embedded device is set; thereafter, the embedded device is controlled to restart, and an upgrade boot unit provided in the embedded device is used to determine whether the upgrade flag after the setting process meets the upgrade standard; finally, if it meets the upgrade standard, the upgrade program corresponding to the first upgrade data packet is started, and the target software is upgraded using the upgrade program.

[0119] In one implementation of the present application, during specific implementation, step S103 may include:

[0120] S1031. According to the writing order corresponding to the upgrade data packets written at the multiple second storage addresses, extract the first upgrade data packet with the first writing order from the upgrade data packets written at the multiple second storage addresses, and set the upgrade flag bit corresponding to the embedded device.

[0121] In this step, during the specific implementation, first, determine the writing order corresponding to the second upgrade data packets written to the multiple second storage addresses; then, determine the second upgrade data packet with the first priority in the writing order as the first upgrade data packet, and extract the first upgrade data packet, and use the first upgrade data packet as the upgrade file payload; finally, set the upgrade flag corresponding to the embedded device.

[0122] Exemplarily, when the four second storage units correspond to the E storage address, the F storage address, the G storage address and the H storage address respectively, the second upgrade data packet is written in the E, F, G and H storage addresses in sequence, that is, the writing order is E for the first priority, F for the second priority, G for the third priority, and H for the fourth priority; then, the second upgrade data packet corresponding to the E storage address is determined as the first upgrade data packet as the upgrade file payload.

[0123] S1032: After the upgrade flag is set, control the embedded device to restart.

[0124] In this step, after the upgrade flag is set, the embedded device is ready to upgrade the target software using the upgrade file payload. Before the upgrade, the embedded device is controlled to restart.

[0125] S1033: After the embedded device is restarted, use the upgrade guide unit set in the embedded device to determine whether the upgrade flag bit after setting processing meets the upgrade standard.

[0126] In this step, after the embedded device is restarted, the upgrade guide unit set in the embedded device will start spontaneously and compare the upgraded flag after setting with the preset upgrade standard; then, according to the comparison result, it is determined whether the upgraded flag meets the upgrade standard.

[0127] In one possible implementation of the present application, an upgrade guide unit is provided in the embedded device, and the upgrade guide unit is used to guide the upgrade program to upgrade the target software using the upgrade file payload while judging whether the upgrade flag meets the upgrade standard.

[0128] S1034: If it is in compliance, start the upgrade program corresponding to the first upgrade data package, and use the upgrade program to upgrade the target software.

[0129] In this step, if the upgraded flag bit after setting processing meets the upgrade standard, the upgrade program corresponding to the first upgrade data packet as the upgrade file payload is started by the upgrade boot unit; then, the target software is upgraded using the upgrade program.

[0130] Furthermore, if the upgrade flag after the setting process does not meet the upgrade standard, the upgrade of the target software will be terminated, and the preset recovery program will be started to restore the embedded device to the normal operation mode; in this way, while ensuring the stability of the embedded device, the stability of the embedded device is ensured when the upgrade process is terminated, and the upgrade flag is maintained at the first time to ensure that the embedded device will not have the problem of "deadlocking and bricking"; after the embedded device is restored to the normal operation mode, the target software can be upgraded again.

[0131] Optionally, see Figure 2 , Figure 2 This is a second flow chart of a method for upgrading embedded device software provided in an embodiment of the present application. Figure 2 As shown in, in addition to the upgrade method of the embedded device software described in steps S101 to S103, steps S104 to S105 are also included. Specifically, steps S104 to S105 are used to illustrate the upgrade method when the multiple hash values ​​corresponding to the multiple storage addresses do not meet the preset upgrade conditions, so as to ensure the upgrade stability and reliability of the embedded device software.

[0132] S104: According to the storage address corresponding to the hash value of the data anomaly, the abnormal upgrade data packet corresponding to the storage address is determined by using the dynamic monitoring unit provided in the embedded device.

[0133] In this step, when it is implemented, first determine the hash value of the data anomaly that is inconsistent with other hash value values; then determine the storage address corresponding to the hash value; finally, use the dynamic monitoring unit set in the embedded device to determine the upgrade data packet with abnormal performance corresponding to the storage address based on the storage address.

[0134] S105: Using a preset recheck mechanism, replace the abnormal upgrade data packet.

[0135] In this step, a debugging instruction is sent through the dynamic monitoring unit to start a preset re-check mechanism and a special processing channel; then, an upgrade data packet with abnormal performance is sent separately through the special processing channel.

[0136] For example, see Figure 3 , Figure 3 A schematic diagram of a dynamic monitoring unit determining an abnormal upgrade data packet provided by an embodiment of the present application. Figure 3 As shown in , "the 30th packet data" and "the 46th packet data" are abnormal upgraded data packets determined by the dynamic monitoring unit, so as to replace the "30th packet data" and "46th packet data".

[0137] Furthermore, if the preset upgrade condition still cannot be met after replacing the abnormal upgrade data packet, the upgrade of the target software is terminated, and a preset recovery program is started to restore the embedded device to a normal operation mode.

[0138] The embedded device software upgrade method provided in the embodiment of the present application verifies the target upgrade file sent by the wireless link. After the verification is passed, multiple upgrade data packets in the target upgrade file are written into the storage addresses of multiple storage units, and multiple hash value upgrade condition verifications are performed. The target software is upgraded using the upgrade data packets that meet the upgrade conditions. Without touching the bottom-line program, the stable operation of the embedded device is guaranteed, the security and reliability of the software upgrade of the embedded device is improved, and the cost investment in equipment operation and maintenance is reduced.

[0139] See also Figure 4 , Figure 5 , Figure 4 This is one of the structural schematic diagrams of an embedded device software upgrade device provided in an embodiment of the present application, Figure 5 This is a second structural diagram of an embedded device software upgrade device provided in an embodiment of the present application. Figure 4 As shown in , the upgrading device 400 includes:

[0140] The file verification module 410 is used to verify the target upgrade file for upgrading the target software among the multiple software in response to receiving the target upgrade file sent by the wireless upgrade terminal through the wireless link;

[0141] The upgrade judgment module 420 is used for, if the target upgrade file passes the verification, writing each upgrade data packet in the multiple upgrade data packets in the target upgrade file into multiple storage addresses corresponding to multiple storage units provided in the embedded device in sequence, and judging whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions;

[0142] The software upgrade module 430 is used to extract a first upgrade data packet from the upgrade data packets stored in the multiple storage addresses when the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, and use the first upgrade data packet to upgrade the target software.

[0143] Further, when the file verification module 410 is used to verify the target upgrade file in response to receiving the target upgrade file sent by the wireless upgrade terminal for upgrading the target software among the multiple software, the file verification module 410 is used to:

[0144] receiving a target upgrade file for upgrading a target software among the plurality of software, which is sent by the wireless upgrade terminal through a wireless link;

[0145] In response to receiving the target upgrade file, encrypting the upgrade data in the target upgrade file using a preset encryption strategy to obtain encrypted upgrade data;

[0146] Determining whether the encrypted upgrade data matches the device information corresponding to the embedded device;

[0147] If they match, a cyclic redundancy check is performed on the encrypted upgrade data;

[0148] If the encrypted upgrade data passes the cyclic redundancy check, it is determined that the target upgrade file passes the check.

[0149] Further, when the upgrade judgment module 420 is used to write each upgrade data packet in the multiple upgrade data packets in the target upgrade file into multiple storage addresses corresponding to multiple storage units provided in the embedded device in sequence, and judge whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, the upgrade judgment module 420 is used to:

[0150] For each upgrade data packet in the target upgrade file, sequentially write the upgrade data packet into a plurality of first storage addresses corresponding to a plurality of first storage units provided in the embedded device, and determine a plurality of first hash values ​​corresponding to the plurality of first storage addresses;

[0151] Determining whether the plurality of first hash values ​​meet a preset upgrade condition;

[0152] If the multiple first hash values ​​meet the preset upgrade condition, extract the second upgrade data packet with the first write order from the upgrade data packets written at the multiple first storage addresses according to the write order corresponding to the upgrade data packets written at the multiple first storage addresses, and remove the hash data in the second upgrade data packet;

[0153] Writing the second upgrade data packet after removing the hash data into a plurality of second storage addresses corresponding to a plurality of second storage units arranged in the embedded device in sequence, and determining a plurality of second hash values ​​corresponding to the plurality of second storage addresses;

[0154] Determining whether the plurality of second hash values ​​meet a preset upgrade condition;

[0155] If the plurality of second hash values ​​satisfy the preset upgrade condition, it is determined whether the plurality of hash values ​​corresponding to the plurality of storage addresses satisfy the preset upgrade condition.

[0156] Further, such as Figure 5 As shown in , the upgrade device 400 further includes a dynamic reconstruction module 440. When the multiple hash values ​​corresponding to the multiple storage addresses do not meet the preset upgrade conditions, the dynamic reconstruction module 440 is used to:

[0157] According to the storage address corresponding to the hash value of the data anomaly, the abnormal upgrade data packet corresponding to the storage address is determined by using a dynamic monitoring unit arranged in the embedded device;

[0158] The abnormal upgrade data packet is replaced by using a preset recheck mechanism.

[0159] Further, when the software upgrade module 430 is used to extract a first upgrade data packet from the upgrade data packets stored in the plurality of storage addresses and use the first upgrade data packet to upgrade the target software, the software upgrade module 430 is used to:

[0160] According to the writing order of the upgrade data packets written at the plurality of second storage addresses, extracting the first upgrade data packet with the first writing order from the upgrade data packets written at the plurality of second storage addresses, and setting the upgrade flag bit corresponding to the embedded device;

[0161] After the upgrade flag is set, controlling the embedded device to restart;

[0162] After the embedded device is restarted, an upgrade guide unit arranged in the embedded device is used to determine whether the upgrade flag bit after setting processing meets the upgrade standard;

[0163] If yes, then start the upgrade program corresponding to the first upgrade data package, and use the upgrade program to upgrade the target software.

[0164] The embedded device software upgrade device provided in the embodiment of the present application verifies the target upgrade file sent by the wireless link, and after the verification is passed, writes multiple upgrade data packets in the target upgrade file into the storage addresses of multiple storage units, performs multi-channel hash value upgrade condition verification, and uses the upgrade data packets that meet the upgrade conditions to upgrade the target software. On the basis of not touching the bottom-line program, the stable operation of the embedded device is guaranteed, the security and reliability of the software upgrade of the embedded device is improved, and the cost investment in equipment operation and maintenance is reduced.

[0165] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6As shown in , the electronic device 600 includes a processor 610 , a memory 620 and a bus 630 .

[0166] The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device 600 is running, the processor 610 communicates with the memory 620 via the bus 630. When the machine-readable instructions are executed by the processor 610, the above-mentioned Figure 1 as well as Figure 2 The steps of the method for upgrading the embedded device software in the method embodiment shown in the figure, and the specific implementation method can be found in the method embodiment, which will not be repeated here.

[0167] 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 as well as Figure 2 The steps of the method for upgrading the embedded device software in the method embodiment shown in the figure, and the specific implementation method can be found in the method embodiment, which will not be repeated here.

[0168] 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.

[0169] 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.

[0170] 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.

[0171] 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.

[0172] 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.

[0173] 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 method for upgrading embedded device software, characterized in that: The embedded device is installed with multiple software, and the upgrade method includes: In response to receiving a target upgrade file for upgrading a target software among the plurality of software sent by the wireless upgrade terminal through a wireless link, verifying the target upgrade file; When the target upgrade file passes the verification, for each upgrade data packet in the multiple upgrade data packets in the target upgrade file, the upgrade data packet is sequentially written into multiple storage addresses corresponding to multiple storage units provided in the embedded device, and it is determined whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions; For each of the multiple upgrade data packets in the target upgrade file, the upgrade data packet is sequentially written into multiple storage addresses corresponding to multiple storage units provided in the embedded device, and it is determined whether multiple hash values ​​corresponding to the multiple storage addresses meet preset upgrade conditions, including: For each upgrade data packet in the target upgrade file, sequentially write the upgrade data packet into a plurality of first storage addresses corresponding to a plurality of first storage units provided in the embedded device, and determine a plurality of first hash values ​​corresponding to the plurality of first storage addresses; Determine whether there is at most one first hash value among the plurality of first hash values ​​that is numerically inconsistent with other first hash values; If there is at most one first hash value among the plurality of first hash values ​​that is numerically inconsistent with other first hash values, extracting a second upgrade data packet having a first write order from the upgrade data packets written at the plurality of first storage addresses according to a write order corresponding to the upgrade data packets written at the plurality of first storage addresses, and removing hash data in the second upgrade data packet; wherein the hash data includes at least one of a hash value, cyclic redundancy data, and check data; Writing the second upgrade data packet after removing the hash data into a plurality of second storage addresses corresponding to a plurality of second storage units arranged in the embedded device in sequence, and determining a plurality of second hash values ​​corresponding to the plurality of second storage addresses; Determine whether there is at most one second hash value among the plurality of second hash values ​​that is numerically inconsistent with other second hash values; If there is at most one second hash value among the plurality of second hash values ​​that is numerically inconsistent with other second hash values, determining that the plurality of first hash values ​​corresponding to the plurality of first storage addresses and the plurality of second hash values ​​corresponding to the plurality of second storage addresses all meet a preset upgrade condition; When the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, a first upgrade data packet is extracted from the upgrade data packets stored in the multiple storage addresses, and the target software is upgraded using the first upgrade data packet.

2. The method according to claim 1, characterized in that The step of verifying the target upgrade file in response to receiving the target upgrade file sent by the wireless upgrade terminal for upgrading the target software among the multiple software includes: receiving a target upgrade file for upgrading a target software among the plurality of software, which is sent by the wireless upgrade terminal through a wireless link; In response to receiving the target upgrade file, encrypting the upgrade data in the target upgrade file using a preset encryption strategy to obtain encrypted upgrade data; Determining whether the encrypted upgrade data matches the device information corresponding to the embedded device; If they match, a cyclic redundancy check is performed on the encrypted upgrade data; If the encrypted upgrade data passes the cyclic redundancy check, it is determined that the target upgrade file passes the check.

3. The method according to claim 1, characterized in that When the multiple hash values ​​corresponding to the multiple storage addresses do not meet the preset upgrade condition, the method further includes: According to the storage address corresponding to the hash value of the data anomaly, the abnormal upgrade data packet corresponding to the storage address is determined by using a dynamic monitoring unit arranged in the embedded device; The abnormal upgrade data packet is replaced by using a preset recheck mechanism.

4. The method according to claim 1, characterized in that: The extracting a first upgrade data packet from the upgrade data packets stored in the plurality of storage addresses, and using the first upgrade data packet to upgrade the target software comprises: According to the writing order of the upgrade data packets written at the plurality of second storage addresses, extracting the first upgrade data packet with the first writing order from the upgrade data packets written at the plurality of second storage addresses, and setting the upgrade flag bit corresponding to the embedded device; After the upgrade flag is set, controlling the embedded device to restart; After the embedded device is restarted, an upgrade guide unit arranged in the embedded device is used to determine whether the upgrade flag bit after setting processing meets the upgrade standard; If yes, then start the upgrade program corresponding to the first upgrade data package, and use the upgrade program to upgrade the target software.

5. An upgrade device for embedded device software, characterized in that: The upgrading device comprises: A file verification module, configured to verify the target upgrade file in response to receiving a target upgrade file for upgrading a target software among a plurality of software installed in the embedded device and sent by the wireless upgrade terminal through a wireless link; an upgrade judgment module, for, if the target upgrade file passes the verification, writing each upgrade data packet in the multiple upgrade data packets in the target upgrade file into multiple storage addresses corresponding to multiple storage units provided in the embedded device in sequence, and judging whether multiple hash values ​​corresponding to the multiple storage addresses meet preset upgrade conditions; The upgrade judgment module is used to, when the target upgrade file passes the verification, sequentially write each upgrade data packet in the multiple upgrade data packets in the target upgrade file into multiple storage addresses corresponding to multiple storage units provided in the embedded device, and judge whether multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions. The upgrade judgment module is used to: For each upgrade data packet in the target upgrade file, sequentially write the upgrade data packet into a plurality of first storage addresses corresponding to a plurality of first storage units provided in the embedded device, and determine a plurality of first hash values ​​corresponding to the plurality of first storage addresses; Determine whether there is at most one first hash value among the plurality of first hash values ​​that is numerically inconsistent with other first hash values; If there is at most one first hash value among the plurality of first hash values ​​that is numerically inconsistent with other first hash values, extracting a second upgrade data packet having a first write order from the upgrade data packets written at the plurality of first storage addresses according to a write order corresponding to the upgrade data packets written at the plurality of first storage addresses, and removing hash data in the second upgrade data packet; wherein the hash data includes at least one of a hash value, cyclic redundancy data, and check data; Writing the second upgrade data packet after removing the hash data into a plurality of second storage addresses corresponding to a plurality of second storage units arranged in the embedded device in sequence, and determining a plurality of second hash values ​​corresponding to the plurality of second storage addresses; Determine whether there is at most one second hash value among the plurality of second hash values ​​that is numerically inconsistent with other second hash values; If there is at most one second hash value among the multiple second hash values ​​that is numerically inconsistent with the other second hash values, it is determined that the multiple first hash values ​​corresponding to the multiple first storage addresses and the multiple second hash values ​​corresponding to the multiple second storage addresses all meet the preset upgrade conditions; a software upgrade module is used to extract a first upgrade data packet from the upgrade data packets stored in the multiple storage addresses when the multiple hash values ​​corresponding to the multiple storage addresses meet the preset upgrade conditions, and use the first upgrade data packet to upgrade the target software.

6. The upgrading device according to claim 5, characterized in that: The upgrade device further includes a dynamic reconstruction module, which is used to: According to the storage address corresponding to the hash value of the data anomaly, the abnormal upgrade data packet corresponding to the storage address is determined by using a dynamic monitoring unit arranged in the embedded device; The abnormal upgrade data packet is replaced by using a preset recheck mechanism.

7. An electronic device, characterized in that: include: 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 through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the method for upgrading embedded device software as described in any one of claims 1 to 4.

8. 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 method for upgrading the embedded device software as claimed in any one of claims 1 to 4 are executed.

Citation Information

Patent Citations

  • Vehicle upgrading method, device and equipment and storage medium

    CN116743726A