WO2023092994A1 - 嵌入式软件的加密式差分升级方法、装置、设备及介质 - Google Patents

嵌入式软件的加密式差分升级方法、装置、设备及介质 Download PDF

Info

Publication number
WO2023092994A1
WO2023092994A1 PCT/CN2022/097958 CN2022097958W WO2023092994A1 WO 2023092994 A1 WO2023092994 A1 WO 2023092994A1 CN 2022097958 W CN2022097958 W CN 2022097958W WO 2023092994 A1 WO2023092994 A1 WO 2023092994A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
encrypted
embedded software
differential upgrade
differential
Prior art date
Application number
PCT/CN2022/097958
Other languages
English (en)
French (fr)
Inventor
汤晋琪
Original Assignee
青岛海尔科技有限公司
海尔智家股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 青岛海尔科技有限公司, 海尔智家股份有限公司 filed Critical 青岛海尔科技有限公司
Publication of WO2023092994A1 publication Critical patent/WO2023092994A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Definitions

  • the present application relates to the field of communication technology, and in particular to an encrypted differential upgrade method, device, equipment and medium for embedded software.
  • Embedded software refers to system software running on embedded devices, usually consisting of a real-time operating system (Real Time Operating System, RTOS), driver software, protocols and corresponding applications. Embedded software will be continuously upgraded during the actual application process, so as to repair the loopholes (English: bug) in the software, improve and strengthen the functions of the software, and provide users with better services.
  • RTOS Real Time Operating System
  • Embedded software will be continuously upgraded during the actual application process, so as to repair the loopholes (English: bug) in the software, improve and strengthen the functions of the software, and provide users with better services.
  • embedded software is usually upgraded by way of encrypted differential upgrade.
  • the embedded device downloads the encrypted differential upgrade package used for differential upgrade to the memory space (English: FLASH), and after verifying that the encrypted differential upgrade package is complete in the system startup (English: Bootloader) area, the differential upgrade package in the FLASH
  • the workspace upgrades the existing version of the embedded software according to the encrypted differential upgrade package and the existing version of the embedded software.
  • the embodiment of the present application provides an encrypted differential upgrade method, device, equipment and medium of embedded software.
  • the embodiment of the present application provides an encrypted differential upgrade method for embedded software, which is applied to embedded devices, and the method includes:
  • the encrypted differential upgrade data includes a differential upgrade package and an independently compiled firmware over-the-air upgrade FOTA application program.
  • the FOTA application program is used for performing an encrypted differential upgrade on the embedded software according to the differential upgrade package, the storage partition including the first space and the second space;
  • An encrypted differential upgrade is performed on the embedded software according to the differential upgrade package through the FOTA application program.
  • the embodiment of the present application provides an encrypted differential upgrade method for embedded software, which is used for a server, and the method includes:
  • the embodiment of the present application provides an encrypted differential upgrade device for embedded software, which is applied to embedded devices, and the device includes:
  • the burning module is used to receive the encrypted differential upgrade data sent by the server and burn to the second space of the storage partition.
  • the encrypted differential upgrade data includes a differential upgrade package and an independently compiled firmware over-the-air upgrade FOTA application program.
  • the FOTA application program is used to perform an encrypted differential upgrade on the embedded software according to the differential upgrade package, and the storage partition includes the first space and the second space;
  • a processing module configured to perform an encrypted differential upgrade on the embedded software according to the differential upgrade package through the FOTA application program, and when an upgrade interruption occurs, an interruption occurs in obtaining the encrypted differential upgrade through the FOTA application program the interrupt position;
  • the processing module is configured to continue performing encrypted differential upgrade on the embedded software according to the interrupt location and the differential upgrade package through the FOTA application program.
  • the embodiment of the present application provides an encrypted differential upgrade device for embedded software, which is applied to a server, and the device includes:
  • the obtaining module is used to obtain the current version of the embedded software to be upgraded in the embedded device
  • a processing module configured to generate a differential upgrade package according to the current version of the embedded software and the first version of the embedded software stored in the server, the first version being higher than the current version;
  • the processing module is also used to independently compile the firmware over-the-air upgrade FOTA application program, and splice and encrypt the differential upgrade package and the FOTA application program to generate encrypted differential upgrade data, and the FOTA application program uses performing an encrypted differential upgrade on the embedded software according to the differential upgrade package;
  • a sending module configured to send the encrypted differential upgrade data to the embedded device.
  • the embodiment of the present application provides an embedded device, including: a processor, a memory, and computer program instructions stored on the memory and operable on the processor, and the processor executes the computer program instructions It is used to realize the first aspect and the methods provided by each possible design.
  • an embodiment of the present application provides a server, including: a processor, a memory, and computer program instructions stored on the memory and operable on the processor, and the processor executes the computer program instructions with In order to realize the second aspect and the methods provided by each possible design.
  • the embodiments of the present application may provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to implement the first aspect and the second aspect when executed by a processor.
  • the embodiment of the present application provides a computer program product, including a computer program, which is used to implement the first aspect, the second aspect, and each possible aspect in the first aspect and the second aspect when the computer program is executed by a processor.
  • the method provided by the design is used to implement the first aspect, the second aspect, and each possible aspect in the first aspect and the second aspect when the computer program is executed by a processor.
  • the embodiment of the present application provides a chip, the chip includes a memory and a processor, codes and data are stored in the memory, the memory is coupled to the processor, and the processor runs the The program is used to realize the first aspect, the second aspect and the methods provided by each possible design in the first aspect and the second aspect.
  • the embodiment of the present application provides a computer program, which is used to implement the first aspect, the second aspect, and the possible designs provided in the first aspect and the second aspect when the computer program is executed by a processor. method.
  • the encrypted differential upgrade method, device, device and medium of embedded software provided in the embodiment of the present application, the method includes: the server acquires the current version of the embedded software to be upgraded in the embedded device , according to the current version of the embedded software and the first version of the embedded software stored in the server, a differential upgrade package is generated, the FOTA application is compiled independently, and the differential upgrade package and the FOTA application are spliced and encrypted to generate The encrypted differential upgrade data is sent to the embedded device. After the embedded device receives the encrypted differential upgrade data, it is burned into the second space of the storage partition, and the embedded software is encrypted and differentially upgraded according to the differential upgrade package through the FOTA application program.
  • the server independently compiles the FOTA application program, and the embedded device performs an encrypted differential upgrade on the embedded software through the FOTA application program according to the differential upgrade package, thereby ensuring the smooth upgrade of the embedded software.
  • FIG. 1A is a schematic structural diagram of Embodiment 1 of an encrypted full upgrade storage partition provided by the prior art
  • FIG. 1B is a schematic structural diagram of Embodiment 2 of an encrypted full upgrade storage partition provided by the prior art
  • FIG. 2 is a schematic structural diagram of Embodiment 1 of a storage partition for encrypted differential upgrade provided by the prior art
  • FIG. 3 is a schematic flowchart of Embodiment 1 of an encrypted differential upgrade method for embedded software provided by the embodiment of the present application;
  • FIG. 4 is a schematic flow diagram of Embodiment 2 of the encrypted differential upgrade method for embedded software provided by the embodiment of the present application;
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of the storage partition provided by the embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of Embodiment 2 of the storage partition provided by the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a system judgment bit provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of Embodiment 1 of an encrypted differential upgrade device for embedded software provided by the embodiment of the present application;
  • FIG. 9 is a schematic structural diagram of Embodiment 2 of an encrypted differential upgrade device for embedded software provided by the embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an embedded device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • connection and “connected” should be interpreted in a broad sense, for example, it can be a fixed connection or a flexible connection. Detachable connection, or integral connection; it can be mechanical connection or electrical connection; it can be direct connection or indirect connection through an intermediary, and it can be the internal communication of two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application according to specific situations.
  • embedded devices such as air conditioners, refrigerators, and washing machines are usually equipped with embedded software, so that users can control embedded devices through embedded software, thereby realizing hardware initialization and connecting to the cloud. and other functions.
  • Embedded software can generally run directly on the storage partition, and a small part cannot run directly on the storage partition. After the system starts, the embedded software can be copied from FLASH to Random Access Memory (Random Access Memory, RAM) to run.
  • RAM Random Access Memory
  • Embedded software needs to be continuously upgraded in the actual application process, so as to repair the bugs in the software, improve and strengthen various functions of the software, and provide users with better services.
  • some embedded software currently adopts two methods of encrypted full upgrade or encrypted differential upgrade, so as to prevent the embedded software from being illegally tampered with by malicious attackers during the upgrade process.
  • FIG. 1A is a schematic structural diagram of Embodiment 1 of an encrypted full upgrade storage partition provided by the prior art.
  • the storage partition is divided into a first space of the storage partition and a second space of the storage partition, wherein the embedded software whose encryption version is A is stored in the first space of the storage partition, and the second space of the storage partition
  • the upgrade version area is reserved for storing the new encrypted version of the embedded software when the embedded software needs to be upgraded.
  • the size of the first space and the second space of the storage partition is the same.
  • the first space of the storage partition where the embedded software of encrypted version A is located is 900KB
  • the size of the second space of the storage partition is also 900KB. .
  • FIG. 1B is a schematic structural diagram of Embodiment 2 of an encrypted full upgrade storage partition provided by the prior art.
  • the embedded software of encrypted version B is an upgraded version of the embedded software of encrypted version A.
  • the system of the embedded device will restart, and the Bootloader area will select the latest version of the embedded software whose integrity has not been damaged to start.
  • the system will enter the partition where the encrypted version B is located (that is, the second space of the storage partition) to start the embedded software of the encrypted version B.
  • the system of the embedded device will have an independent system boot area (English: Bootloader area) when leaving the factory, and the program code of the system boot area is usually used for Do some necessary hardware initialization, decrypt the new encrypted version of the embedded software, verify whether the embedded software on the storage partition is valid and intact, and further check whether the version information of the embedded software is valid. If the embedded software is complete and the version information is valid, it will jump to the space where the new encrypted version of the embedded software is located, start normal system initialization, enter the normal task cycle, and run the normal business function code of the embedded software.
  • system boot area English: Bootloader area
  • the embedded software when the embedded software performs an encrypted full upgrade, it does not need to know the content of the old version of the embedded software, and the new encrypted version can be downloaded directly.
  • the embedded software of the old encrypted version is still kept in the storage partition, and the system startup code Decide which encrypted version to boot from.
  • FIG. 2 is a schematic structural diagram of Embodiment 1 of an encrypted differentially upgraded storage partition provided by the prior art.
  • the FLASH partition is divided into the first space of FLASH and the second space of FLASH, wherein the embedded software with encrypted version A is stored in the first space of FLASH, and the second space of FLASH includes differential upgrade work area and differential upgrade package area.
  • the size of the differential upgrade package is usually 5% of the size of the existing version of the embedded software
  • the size of the differential upgrade package area is only 5% of the first space of the FLASH.
  • the size of the differential upgrade package area is 60KB.
  • the differential upgrade workspace has nothing to do with the size of the embedded software.
  • each FLASH block It can be 3 FLASH blocks, and the size of each FLASH block It is 4KB, that is to say, the size of the differential upgrade workspace is 12KB, and the embedded software can be upgraded to the new version (that is, the encrypted version B) only by reserving a second space of 72KB, compared with the 900KB that needs to be reserved for the full upgrade The second space, the usable space has been greatly improved.
  • the inventive idea of the present application is as follows: At present, when an upgrade interruption occurs in the encrypted differential upgrade process, because the embedded software of the new encrypted version is incomplete, it cannot pass the verification of the Bootloader, which will cause the embedded software upgrade to fail. Based on this, the inventors found that if the encrypted differential upgrade data can be used to carry out encrypted differential upgrade to the embedded software, the differential upgrade data includes an independently compiled Firmware Over-The-Air (FOTA) application program, the system After starting, the FOTA application program will be started at first, which can solve the problem of failure in upgrading the embedded software in the prior art.
  • FOTA Firmware Over-The-Air
  • FIG. 3 is a schematic flowchart of Embodiment 1 of an encrypted differential upgrade method for embedded software provided by the embodiment of the present application.
  • the encrypted differential upgrade method of the embedded software may include the following steps:
  • the server may receive an encrypted differential upgrade request sent by the embedded device, where the encrypted differential upgrade request carries the current version of the embedded software to be upgraded.
  • the server sends encrypted differential upgrade data to the embedded device to enable the embedded device to upgrade, and when the upgrade result sent by the embedded device is received as an upgrade success, the encrypted differential upgrade is performed.
  • the version of the data is determined as the current version of the embedded software.
  • the first version is higher than the current version.
  • the server performs differential calculation on the current version of the embedded software and the first version to obtain a differential upgrade package of the embedded software.
  • the first version may be the latest version of the embedded software stored in the server, or other versions higher than the first version, which may be determined according to actual needs, and this embodiment of the present application does not specifically limit this .
  • the FOTA application program is used for performing encrypted differential upgrade on the embedded software according to the differential upgrade package.
  • the FOTA application program may exist in the prior art, and has an encrypted differential upgrade for embedded software according to the differential upgrade package, or it may be an application program compiled and generated by the user for the program code. Make specific restrictions.
  • the differential upgrade package can be spliced with the FOTA application through the existing splicing tool.
  • the encrypted differential upgrade data may also include version information of the differential upgrade package.
  • the storage partition includes a first space and a second space.
  • the second space of the storage partition also includes a system judgment bit, and the system judgment bit includes a preset first byte and a preset second byte, and the embedded device obtains the preset second byte through the FOTA application program.
  • the state of a byte which includes set and unset, when the state of the first byte is set, and the state of the second byte is preset as unset, the FOTA application is updated according to the difference
  • the package performs an encrypted differential upgrade on the embedded software, and after the embedded software is successfully upgraded, the second byte is preset to be set.
  • the embedded device obtains the interrupt position where the encrypted differential upgrade is interrupted through the FOTA application program, and according to the interrupt position and the differential upgrade package, Continue to perform encrypted differential upgrades on embedded software.
  • the server acquires the current version of the embedded software to be upgraded in the embedded device, and according to the current version of the embedded software and the first version of the embedded software stored in the server
  • the first version generates a differential upgrade package, compiles the FOTA application program independently, splices and encrypts the differential upgrade package and the FOTA application program, generates encrypted differential update data, and sends it to the embedded device.
  • the embedded device receives the encrypted differential upgrade data, it is burned into the second space of the storage partition, and the embedded software is encrypted and differentially upgraded according to the differential upgrade package through the FOTA application program.
  • the embedded device burns the encrypted differential upgrade data to the second space of the storage partition after receiving the encrypted differential upgrade data, and performs encrypted differential upgrade on the embedded software through the FOTA application program according to the differential upgrade package, which ensures the smooth upgrade of the embedded software.
  • the embedded device sets the preset first byte.
  • FIG. 4 is a schematic flowchart of Embodiment 2 of the encrypted differential upgrade method for embedded software provided by the embodiment of the present application.
  • the encrypted differential upgrade method of the embedded software may include the following steps:
  • the second version is higher than the current version, and the second version is lower than the first version.
  • the difference processing program is used to obtain the upgrade result.
  • the difference processing program may be an application program existing in the prior art and capable of sending an upgrade result, or an application program compiled and generated by a user, which is not specifically limited in this embodiment of the present application.
  • the encrypted full upgrade data sent by the server is received.
  • the storage partition includes the current version partition and the partition to be burned.
  • the embedded software has not been upgraded and outdated before, assuming that the partition to be burned is located in the second space of the storage partition, and the current version partition is located in the first space of the storage partition, after the embedded device receives the encrypted full upgrade data , burn the encrypted full upgrade data to the second storage space.
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of a storage partition provided by an embodiment of the present application.
  • the embedded software whose encryption version is A is stored in the first space of the storage partition, which is the current version partition, and the second space of the storage partition is the partition to be burned.
  • the second space of the storage partition stores the embedded software and differential processing of the new encrypted version (encrypted version B in Figure 5) program.
  • the embedded software has been encrypted and fully upgraded. At this time, two encrypted versions of the embedded software are burned in the storage partition, and the encrypted version is stored in the partition to be burned. The embedded software of the current version is stored in the partition of the current version with a newer encrypted version of the embedded software.
  • the partition to be burned may exist in the first space of the storage partition, or in the second space of the storage partition.
  • the embedded software with the older encrypted version among the two encrypted versions is stored in the partition to be burned, and the embedded software with the newer encrypted version among the two encrypted versions is stored in the current version partition.
  • the partition where the encrypted version A is located is the partition to be burned, and the partition where the encrypted version B is located is the current version partition.
  • the embedded device burns the encrypted full upgrade data into the partition to be burned.
  • first space may be a front space of the storage partition
  • second space may be a rear space of the storage partition
  • the server acquires the current version of the embedded software to be upgraded in the embedded device, and according to the current version of the embedded software and the first version of the embedded software stored in the server
  • the second version generates a full upgrade package, encrypts the full upgrade package and the differential processing program, generates encrypted full upgrade data, and sends it to the embedded device.
  • the embedded device receives the encrypted full upgrade data, and burns the encrypted full upgrade data to the to-be-burned partition of the storage partition, so that the upgrade method of the embedded software is switched from the current encrypted full upgrade to the encrypted differential upgrade.
  • the embedded software burns the encrypted full upgrade data including the full upgrade package and differential processing program to the partition to be burned in the storage partition, so that the embedded software can be upgraded without increasing the storage partition space or returning to the factory
  • the method is switched from encrypted full upgrade to encrypted differential upgrade, which provides more available storage partition space for embedded devices and ensures the smooth upgrade of embedded software.
  • the differential processing program moves the encrypted full upgrade data from the second space to the first space, overwrites the data in the first space, and deletes the data in the second space.
  • the embedded device obtains the version information of the embedded software in the storage partition through the Boatloader area, and starts a new encrypted version of the embedded software and a differential processing program (that is to say, starts the program in the partition to be burned). programmed embedded software and differential processing program). Afterwards, the embedded device judges whether the differential processing program is in the first storage space through the differential processing program. When the partition to be burned is located in the second space of the storage partition and the current version partition is located in the first space of the storage partition, the newly encrypted version of the embedded software and the differential processing program are moved to the first space of the storage partition through the differential processing program, Overwrite the content in the first space of the storage partition, realize the data coverage of the current version partition, and delete the data in the partition to be burned. After the embedded device processes the new encrypted version of the embedded software and the differential processing program, restart the new encrypted version of the embedded software and enter the normal task cycle. At this time, the FLASH has the function of differentially upgrading the embedded software.
  • FIG. 6 is a schematic structural diagram of Embodiment 2 of the storage partition provided by the embodiment of the present application.
  • the embedded software with encrypted version B is burned in the first space of the storage partition, and the difference processing program is also stored; the FOTA application program, the difference upgrade package and the system judgment bit are burned in the second space .
  • the second space may also include an expansion space.
  • the system judgment bit also includes a preset third byte
  • the encrypted differential upgrade method of the embedded software further includes: The processing program obtains the preset state of the third byte, and when the preset state of the third byte is set, sends the upgrade result to the server through the difference processing program, and the upgrade result is upgrade success.
  • FIG. 7 is a schematic structural diagram of a system judgment bit provided by an embodiment of the present application.
  • the system judgment bit includes a preset first byte, a preset second byte, a preset third byte, and a preset fourth byte, wherein the preset first byte is a system judgment bit
  • the first bit (that is, Bit0) of can be SYS_NEEDUPDATE, which is used to indicate whether the download of the differential upgrade package is completed.
  • the preset second byte is the second bit (that is, Bit1) of the system judgment bit, which can be SYS_FOTADONE, which is used to indicate whether the embedded software is upgraded successfully.
  • the FOTA application program sets the second bit of the system judgment bit.
  • the third byte is preset as the third bit of the system judgment bit (that is, Bit2), which can be SYS_NEEDREPORT, which is used to indicate whether the upgrade result needs to be reported to the server.
  • the difference processing program sends an upgrade result to the server, which means the upgrade is successful.
  • the third byte is preset as the fourth bit of the system judgment bit (that is, Bit3), which is a reserved bit and can be expanded and used in later practical applications.
  • the upgrade result sent by the embedded device is received.
  • the encrypted differential upgrade method for embedded software may further include the following step: using a differential processing program to send an encrypted differential upgrade request to the server.
  • an encrypted differential upgrade request can be sent to the server, so that the server can generate a differential upgrade package according to the encrypted differential upgrade request.
  • the encrypted differential upgrade request includes the current version of the embedded software.
  • the embedded device may communicate with the server, and when the embedded software releases a new version, the server sends the new version information of the embedded software to the embedded device.
  • the embedded device receives the new version information of the embedded software, it can display the new version information of the embedded device on the touch screen of the embedded device.
  • the user needs to upgrade the embedded software, he clicks on the corresponding control in the touch screen.
  • the embedded device generates an encrypted differential upgrade request in response to the user's click operation on the touch screen, and sends the differential upgrade request to the server.
  • the user's terminal device can communicate with the embedded device and the server respectively, the terminal device can control the embedded device through the corresponding application program, and can also obtain the corresponding embedded device through the application program. version information of the embedded software in the embedded device.
  • the server sends the new version information of the embedded software to the user's terminal device, and the terminal device displays the new version information of the embedded software through the application program.
  • the user needs to upgrade the embedded software, he can click the corresponding control in the application program.
  • the terminal device generates an encrypted differential upgrade request in response to the user's click operation on the touch screen, and sends the encrypted differential upgrade request to the embedded device.
  • the embedded device receives the encrypted differential upgrade request sent by the user's terminal device, and sends the encrypted differential upgrade request to the server.
  • the server when a new version of the embedded software is released, the server sends the new version information of the embedded software to the embedded device.
  • the embedded device receives the new version information of the embedded software, it is compared with the current version information.
  • an encrypted differential upgrade request is generated, and the encrypted differential upgrade request is sent to the server.
  • the encrypted differential upgrade request sent by the embedded device is received.
  • FIG. 8 is a schematic structural diagram of Embodiment 1 of an encrypted differential upgrade device for embedded software provided by an embodiment of the present application. As shown in Figure 8, the encrypted differential upgrade device of the embedded software is applied to the embedded device, and the device includes:
  • the burning module 81 is used to receive the encrypted differential upgrade data sent by the server and burn it into the second space of the storage partition.
  • the encrypted differential upgrade data includes a differential upgrade package and an independently compiled firmware upgrade over the air FOTA application program, FOTA application
  • the program is used to perform an encrypted differential upgrade on the embedded software according to the differential upgrade package, and the storage partition includes the first space and the second space;
  • the processing module 82 is used to carry out encrypted differential upgrade to the embedded software according to the differential upgrade package through the FOTA application program, and when an upgrade interruption occurs, obtain the interrupt position where the encrypted differential upgrade is interrupted by the FOTA application program;
  • the processing module 82 is configured to continue performing encrypted differential upgrade on the embedded software according to the interruption location and the differential upgrade package through the FOTA application program.
  • the processing module 82 is also used to:
  • the embedded software continues to perform encrypted differential upgrades.
  • the second space of the storage partition also includes a system judgment bit, and the system judgment bit includes a preset first byte, receives the encrypted differential upgrade data sent by the server, and burns it into After storing the second space of the partition, the processing module 82 is also used for:
  • processing module 82 is specifically used for:
  • the state of the preset first byte through the FOTA application program includes set and unset
  • the embedded software is encrypted and differentially upgraded according to the differential upgrade package through the FOTA application program;
  • the second byte is preset to be set.
  • the device before receiving the encrypted differential upgrade data sent by the server, the device further includes:
  • the receiving device is used to receive the encrypted full upgrade data sent by the server, the encrypted full upgrade data includes a full upgrade package and a differential processing program, and the differential processing program is used to send an encrypted differential upgrade upgrade result to the server;
  • the burning module 81 is also used to burn the encrypted full upgrade data to the storage partition to be burned, so that the upgrade method of the embedded software is switched from the current encrypted full upgrade to the encrypted differential upgrade, and the storage partition Including the current version partition and the partition to be burned.
  • the system judgment bit also includes a preset third byte, and after setting the preset second byte, the processing module 82 is also used to:
  • the upgrade result is sent to the server through the difference processing program, and the upgrade result is upgrade success.
  • processing module 82 is also used for:
  • the encrypted full upgrade data is moved from the second space through the differential processing program Go to the first space, overwrite the data in the first space, and delete the data in the second space.
  • the encrypted differential upgrade device for embedded software provided in the embodiment of the present application can be used to execute the encrypted differential upgrade device for embedded software on the embedded device side in any of the above embodiments. Its implementation principle and technical effect are similar, and here No longer.
  • FIG. 9 is a schematic structural diagram of Embodiment 2 of an encrypted differential upgrade device for embedded software provided by the embodiment of the present application. As shown in Figure 9, the encrypted differential upgrade device of the embedded software is applied to the server, and the device includes:
  • Obtaining module 91 for obtaining the current version of the embedded software to be upgraded in the embedded device
  • the processing module 92 is used to generate a differential upgrade package according to the current version of the embedded software and the first version of the embedded software stored in the server, and the first version is higher than the current version;
  • the processing module 92 is also used to independently compile the FOTA application program for firmware over-the-air upgrade, and splicing and encrypting the differential upgrade package and the FOTA application program to generate encrypted differential update data. Encrypted differential upgrade via software;
  • the sending module is used to send the encrypted differential upgrade data to the embedded device.
  • the obtaining module 91 is also used to obtain the current version of the embedded software to be upgraded in the embedded device;
  • the processing module 92 is further configured to generate a full upgrade package according to the current version of the embedded software and the second version of the embedded software stored in the server, the second version is higher than the current version, and the second version is lower than the first Version;
  • the processing module 92 is also used to encrypt the full upgrade package and the differential processing program, generate encrypted full upgrade data, and send the encrypted full upgrade data to the embedded device, and the differential processing program is used to obtain the upgrade result.
  • the device also includes:
  • the receiving module is configured to receive the upgrade result sent by the embedded device, and the upgrade result indicates that the upgrade is successful.
  • the encrypted differential upgrade device for embedded software provided in the embodiment of the present application can be used to execute the encrypted differential upgrade device for embedded software on the server side in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be repeated here repeat.
  • each module of the above device is only a division of logical functions, and may be fully or partially integrated into one physical entity or physically separated during actual implementation.
  • these modules can all be implemented in the form of calling software through processing elements; they can also be implemented in the form of hardware; some modules can also be implemented in the form of calling software through processing elements, and some modules can be implemented in the form of hardware.
  • all or part of these modules can be integrated together, or implemented independently.
  • the processing element here may be an integrated circuit, which has a signal processing capability.
  • each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • FIG. 10 is a schematic structural diagram of an embedded device provided by an embodiment of the present application.
  • the embedded device may include: a processor 101, a memory 102, and computer program instructions stored on the memory 102 and operable on the processor 101, and the processor 101 executes the computer program
  • the instruction implements the encrypted differential upgrade method of the embedded software on the embedded device side provided by any of the foregoing embodiments.
  • the embedded device may also include an interface for interacting with other devices.
  • the above components of the embedded device may be connected through a system bus.
  • the embedded device provided by the embodiment of the present application can be used to execute the encrypted differential upgrade method of the embedded software on the embedded device side provided by any of the above method embodiments.
  • the implementation principle and technical effect are similar, and will not be repeated here.
  • FIG. 11 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server may include: a processor 111, a memory 112, and computer program instructions stored on the memory 112 and operable on the processor 111, when the processor 111 executes the computer program instructions.
  • the encrypted differential upgrade method of the server-side embedded software provided by any one of the foregoing embodiments is realized.
  • the server may also include an interface for interacting with other devices.
  • the above components of the server may be connected through a system bus.
  • the server provided by the embodiment of the present application can be used to execute the encrypted differential upgrade method of the server-side embedded software provided by any of the above method embodiments.
  • the implementation principle and technical effect are similar, and will not be repeated here.
  • the memory can be an independent storage unit, or a storage unit integrated in the processor.
  • the number of processors is one or more.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), etc. .
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the system bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus or the like.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the system bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the memory may include a random access memory (random access memory, RAM), and may also include a non-volatile memory (non-volatile memory, such as at least one disk memory.
  • RAM random access memory
  • NVM non-volatile memory
  • the aforementioned program can be stored in a readable memory.
  • the program executes the steps comprising the above-mentioned method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (read-only memory, ROM), RAM, flash memory, hard disk, solid-state hard disk, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.
  • the electronic device provided by the embodiments of the present application can be used to implement the encrypted differential upgrade method for embedded software provided by any of the above method embodiments.
  • the implementation principles and technical effects are similar and will not be repeated here.
  • An embodiment of the present application provides a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions are run on a computer, the computer is made to execute the encrypted differential upgrade method for embedded software.
  • the above-mentioned computer-readable storage medium can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read only memory, programmable read only memory, read only memory, magnetic memory, flash memory, magnetic disk or optical disk.
  • Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
  • a readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium.
  • the readable storage medium can also be a component of the processor.
  • the processor and the readable storage medium may be located in application specific integrated circuits (Application Specific Integrated Circuits, ASIC).
  • ASIC Application Specific Integrated Circuits
  • the processor and the readable storage medium can also exist in the device as discrete components.
  • the embodiment of the present application also provides a computer program product, the computer program product includes a computer program, the computer program is stored in a computer-readable storage medium, and at least one processor can read the computer program from the computer-readable storage medium , when the at least one processor executes the computer program, the above-mentioned encrypted differential upgrade method for embedded software can be realized.
  • This embodiment also provides a chip, the chip includes a memory, a processor, codes and data are stored in the memory, the memory is coupled to the processor, and the processor runs the program in the memory so that the The chip is used to execute the encrypted differential upgrade method of the embedded software provided in the above various embodiments.
  • This embodiment also provides a computer program, which is used to execute the encrypted differential upgrade method for embedded software provided in the foregoing various embodiments when the computer program is executed by a processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

本申请属于通信技术领域,具体涉及一种嵌入式软件的加密式差分升级方法、装置、设备及介质。本申请旨在解决现有技术中无法保证嵌入式软件的顺利升级的问题。该方法包括:服务器获取嵌入式设备中待升级的嵌入式软件的当前版本,根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第一版本,生成差分升级包,对FOTA应用程序进行独立编译,并将差分升级包与FOTA应用程序进行拼接和加密,生成加密的差分升级数据,并发送至嵌入式设备。

Description

嵌入式软件的加密式差分升级方法、装置、设备及介质
本申请要求于2021年11月24日提交中国专利局、申请号为202111408693.4、申请名称为“嵌入式软件的加密式差分升级方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种嵌入式软件的加密式差分升级方法、装置、设备及介质。
背景技术
嵌入式软件指的是运行在嵌入式设备上的系统软件,通常由实时操作系统(Real Time Operating System,RTOS),驱动软件,协议和相应应用组成。嵌入式软件在实际应用过程中会不断的进行升级,从而对软件中的漏洞(英文:bug)进行修复,完善并加强软件的功能,为用户提供更好的服务。
目前,随着嵌入式软件的安全要求不断提高,嵌入式软件通常采用加密式差分升级的方式进行升级。具体的,嵌入式设备下载用于差分升级的加密的差分升级包至内存空间(英文:FLASH)中,在系统启动(英文:Bootloader)区验证该加密的差分升级包完整后,FLASH中的差分工作区根据该加密的差分升级包以及现有版本的嵌入式软件,对现有版本的嵌入式软件进行升级。
然而,现有技术在加密式差分升级过程中发生升级中断时,会破坏加密的差分升级包的完整性,导致嵌入式软件升级失败,无法保证嵌入式软件的顺利升级。
发明内容
为了解决现有技术中的上述问题,即为了解决现有技术中在加密式差分升级过程中发生升级中断时,会破坏加密的差分升级包的完整性,导致嵌入式软件升级失败,无法保证嵌入式软件的顺利升级的问题,本申请实施例提供了一种嵌入式软件的加密式差分升级方法、装置、设备及介质。
第一方面,本申请实施例提供一种嵌入式软件的加密式差分升级方法,应用于嵌入式设备,所述方法包括:
接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间,所述加密的差分升级数据包括差分升级包和独立编译的固件空中升级FOTA应用程序,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级,所述存储分区包括第一空间和所述第二空间;
通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级。
第二方面,本申请实施例提供一种嵌入式软件的加密式差分升级方法,用于服务器,所述方法包括:
获取嵌入式设备中待升级的嵌入式软件的当前版本;
根据所述嵌入式软件的当前版本和存储在所述服务器中的所述嵌入式软件的第一版本,生成差分升级包,所述第一版本高于所述当前版本;
对固件空中升级FOTA应用程序进行独立编译,并将所述差分升级包与所述FOTA应用程序进行拼接和加密,生成加密的差分升级数据,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级;
将所述加密的差分升级数据发送至所述嵌入式设备。
第三方面,本申请实施例提供一种嵌入式软件的加密式差分升级装置,应用于嵌入式设备,该装置包括:
烧录模块,用于接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间,所述加密的差分升级数据包括差分升级包和独立编译的固件空中升级FOTA应用程序,所述FOTA应用程序用于根 据所述差分升级包对所述嵌入式软件进行加密式差分升级,所述存储分区包括第一空间和所述第二空间;
处理模块,用于通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级,在发生升级中断时,通过所述FOTA应用程序获取所述加密式差分升级发生中断的中断位置;
所述处理模块,用于通过所述FOTA应用程序,根据所述中断位置和所述差分升级包,对所述嵌入式软件继续进行加密式差分升级。
第四方面,本申请实施例提供一种嵌入式软件的加密式差分升级装置,应用于服务器,所述装置包括:
获取模块,用于获取嵌入式设备中待升级的嵌入式软件的当前版本;
处理模块,用于根据所述嵌入式软件的当前版本和存储在所述服务器中的所述嵌入式软件的第一版本,生成差分升级包,所述第一版本高于所述当前版本;
所述处理模块,还用于对固件空中升级FOTA应用程序进行独立编译,并将所述差分升级包与所述FOTA应用程序进行拼接和加密,生成加密的差分升级数据,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级;
发送模块,用于将所述加密的差分升级数据发送至所述嵌入式设备。
第五方面,本申请实施例提供一种嵌入式设备,包括:处理器、存储器及存储在所述存储器上并可在处理器上运行的计算机程序指令,所述处理器执行所述计算机程序指令时用于实现第一方面以及各可能设计提供的方法。
第六方面,本申请实施例提供一种服务器,包括:处理器、存储器及存储在所述存储器上并可在处理器上运行的计算机程序指令,所述处理器执行所述计算机程序指令时用于实现第二方面以及各可能设计提供的方法。
第七方面,本申请实施例可提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令 被处理器执行时用于实现第一方面、第二方面以及在第一方面和第二方面中各可能设计提供的方法。
第八方面,本申请实施例提供一种计算机程序货品,包括计算机程序,所述计算机程序被处理器执行时用于实现第一方面、第二方面以及在第一方面和第二方面中各可能设计提供的方法。
第九方面,本申请实施例提供一种芯片,所述芯片包括存储器、处理器,所述存储器中存储代码和数据,所述存储器与所述处理器耦合,所述处理器运行所述存储器中的程序时用于实现第一方面、第二方面以及在第一方面和第二方面中各可能设计提供的方法。
第十方面,本申请实施例提供一种计算机程序,当所述计算机程序被处理器执行时,用于实现第一方面、第二方面以及在第一方面和第二方面中各可能设计提供的方法。
本领域技术人员能够理解的是,本申请实施例提供的嵌入式软件的加密式差分升级方法、装置、设备及介质,该方法包括:服务器获取嵌入式设备中待升级的嵌入式软件的当前版本,根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第一版本,生成差分升级包,对FOTA应用程序进行独立编译,并将差分升级包与FOTA应用程序进行拼接和加密,生成加密的差分升级数据,并发送至嵌入式设备。嵌入式设备接收到加密的差分升级数据后将其烧录至存储分区的第二空间,通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级。该技术方案中,服务器通过将FOTA应用程序进行独立编译,嵌入式设备通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级,保证了嵌入式软件的顺利升级。
附图说明
下面参照附图来描述本申请的嵌入式软件的加密式差分升级方法、装置、设备及介质,附图为:
图1A为现有技术提供的加密式全量升级的存储分区实施例一的结构示意图;
图1B为现有技术提供的加密式全量升级的存储分区实施例二的结构示意图;
图2为现有技术提供的加密式差分升级的存储分区实施例一的结构示意图;
图3为本申请实施例提供的嵌入式软件的加密式差分升级方法实施例一的流程示意图;
图4为本申请实施例提供的嵌入式软件的加密式差分升级方法实施例二的流程示意图;
图5为本申请实施例提供的存储分区实施例一的结构示意图;
图6为本申请实施例提供的存储分区实施例二的结构示意图;
图7为本申请实施例提供的系统判断位的结构示意图;
图8为本申请实施例提供的嵌入式软件的加密式差分升级装置实施例一的结构示意图;
图9为本申请实施例提供的嵌入式软件的加密式差分升级装置实施例二的结构示意图;
图10为本申请实施例提供的嵌入式设备的结构示意图;
图11为本申请实施例提供的服务器的结构示意图。
具体实施方式
首先,本领域技术人员应当理解的是,这些实施方式仅仅用于解释本申请的技术原理,并非旨在限制本申请的保护范围。本领域技术人员可以根据需要对其作出调整,以便适应具体的应用场合。
其次,需要说明的是,在本申请实施例的描述中,术语“内”、“外”等指示的方向或位置关系的术语是基于附图所示的方向或位置关系,这仅仅是为了便于描述,而不是指示或暗示所述装置或构件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。
此外,还需要说明的是,在本申请实施例的描述中,除非另有明确的规定和限定,术语“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以 是两个构件内部的连通。对于本领域技术人员而言,可根据具体情况理解上述术语在本申请实施例中的具体含义。
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在介绍本申请的实施例之前,首先对本申请实施例的应用背景进行解释:
随着家电智能化程度的逐渐增高,空调,冰箱,洗衣机等嵌入式设备中通常安装有嵌入式软件,以便于用户可以通过嵌入式软件对嵌入式设备进行控制,从而实现硬件初始化,联网上云等功能。嵌入式软件一般可以在存储分区上直接运行,小部分不能在存储分区上直接运行的,可以在系统启动后将嵌入式软件从FLASH拷贝到随机存取存储器(Random Access Memory,RAM)中运行。
嵌入式软件在实际应用过程中需要不断的进行升级,从而对软件中的bug进行修复,完善并加强软件的各项功能,为用户提供更好的服务。随着嵌入式软件安全要求的提高,目前部分嵌入式软件采用加密式全量升级或加密式差分升级两种方式,从而防止嵌入式软件在升级途中被恶意攻击者非法篡改的情况。
下面将对上述两种方式进行具体展开说明。
1),图1A为现有技术提供的加密式全量升级的存储分区实施例一的结构示意图。如图1A所示,该存储分区分为存储分区的第一空间和存储分区的第二空间,其中存储分区的第一空间中存储有加密版本为A的嵌入式软件,存储分区的第二空间为预留升级版本区,用于在需要对嵌入式软件升级时,存放新加密版本的嵌入式软件。其中,存储分区的第一空间和第二空间的大小一致,举例来说,加密版本A的嵌入式软件所在的存储分区的第一空间为900KB,则存储分区的第二空间的大小也为900KB。
进一步的,嵌入式设备出厂后,嵌入式软件如果需要升级,嵌入式设备会启动空中下载技术(Over-the-Air Technology,OTA)流 程,分批下载全量代码,然后将全量代码烧录在预留的存储分区中。图1B为现有技术提供的加密式全量升级的存储分区实施例二的结构示意图。如图1B所示,加密版本B的嵌入式软件是加密版本A的嵌入式软件的升级版本。在烧录完成后,嵌入式设备的系统会重新启动,Bootloader区选出最新版本且完整性未被破坏的嵌入式软件进行启动。如图1B所示,在加密版本B的嵌入式软件完整未被破坏时,系统就会进入加密版本B所在的分区(也就是存储分区的第二空间)启动加密版本B的嵌入式软件。
在图1A和在图1B中,针对于加密式全量升级来说,嵌入式设备的系统在出厂的时候会有独立的系统启动区(英文:Bootloader区),系统启动区的程序代码通常用于做一些必要的硬件初始化,对新加密版本的嵌入式软件进行解密,校验存储分区上的嵌入式软件是否有效且完整未被破坏,并进一步查阅嵌入式软件的版本信息是否有效,若该嵌入式软件完整且版本信息有效则跳转到新加密版本的嵌入式软件所在的空间,开始正常的系统初始化,进入正常任务循环,运行嵌入式软件的正常业务功能代码。
在图1B中,在加密式全量升级过程中,如果发生如断电等意外情况,系统仍然会从完好无损的加密版本A启动,启动后会通过重新或者断点续传的方式继续进行升级,直到将嵌入式软件升级加密版本B。
也就是说,嵌入式软件进行加密式全量升级时不需要知道嵌入式软件旧的版本内容,可以直接下载新的加密版本,旧加密版本的嵌入式软件仍然保留在存储分区中,由系统启动代码决定从哪个加密版本启动。
然而,由于存储分区中接近一半的空间需要预留下来为烧录新加密版本的嵌入式软件做准备,且随着嵌入式软件中功能的日益复杂,代码尺寸也相应增加,预留一半空间给升级软件的方式已经无法满足软件OTA升级的需要。进一步的,在下载新加密版本的嵌入式软件需要的时间较长,容易出现错误,有可能存在升级错误的问题。
2),图2为现有技术提供的加密式差分升级的存储分区实施例一的结构示意图。如图2所示,该FLASH分区分为FLASH的第 一空间和FLASH的第二空间,其中FLASH的第一空间中存储有加密版本为A的嵌入式软件,FLASH的第二空间包括差分升级工作区和差分升级包区。其中,由于差分升级包的大小通常为现有版本的嵌入式软件大小的5%,因此差分升级包区的大小仅为FLASH的第一空间的5%。以FLASH的第一空间的大小为900KB为例进行说明,则差分升级包区的大小为60KB,差分升级工作区跟嵌入式软件的大小无关,可以为3个FLASH块,每个FLASH块的大小为4KB,也就是说差分升级工作区的大小为12KB,只需要预留72KB大小的第二空间就可以将嵌入式软件升级到新版本(也就是加密版本B),对比全量升级需要保留的900KB的第二空间,可用空间得到大幅度提高。
然而,现有技术在加密式差分升级过程中发生升级中断时,会破坏加密的差分升级包的完整性,导致嵌入式软件升级失败,无法保证嵌入式软件的顺利升级。
针对上述问题,本申请的发明构思如下:目前在加密式差分升级过程发生升级中断时,由于新加密版本的嵌入式软件不完整,无法通过Bootloader的校验,会导致嵌入式软件升级失败。基于此,发明人发现,若能使用加密的差分升级数据对嵌入式软件进行加密式差分升级,该差分升级数据包括独立编译的固件空中升级(Firmware Over-The-Air,FOTA)应用程序,系统启动后会首先启动该FOTA应用程序,就能解决现有技术中嵌入式软件升级失败的问题。
下面,通过具体实施例对本申请的技术方案进行详细说明。
需要说明的是,下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
图3为本申请实施例提供的嵌入式软件的加密式差分升级方法实施例一的流程示意图。如图3所示,该嵌入式软件的加密式差分升级方法可以包括如下步骤:
S31、获取嵌入式设备中待升级的嵌入式软件的当前版本。
在一种可实现的方式中,服务器可以接收嵌入式设备发送的加密式差分升级请求,该加密式差分升级请求中携带有该待升级的嵌入式软件的当前版本。
在另一种可实现的方式中,服务器向嵌入式设备发送加密的差分升级数据以使嵌入式设备进行升级,在接收到嵌入式设备发送的升级结果为升级成功时,将该加密的差分升级数据的版本确定为嵌入式软件的当前版本。
S32、根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第一版本,生成差分升级包。
其中,第一版本高于当前版本。
在一种具体的实现方式中,服务器对嵌入式软件的当前版本和第一版本进行差分计算,得到嵌入式软件的差分升级包。
可选的,第一版本可以为存储在服务器中的嵌入式软件的最新版本,也可以是其他高于第一版本的版本,可以根据实际需求进行确定,本申请实施例对此不进行具体限制。
S33、对FOTA应用程序进行独立编译,并将差分升级包与FOTA应用程序进行拼接和加密,生成加密的差分升级数据。
其中,FOTA应用程序用于根据差分升级包对嵌入式软件进行加密式差分升级。
应理解,FOTA应用程序可以为现有技术中存在的,具有根据差分升级包对嵌入式软件进行加密式差分升级,也可以是用户对程序代码编译生成的应用程序,本申请实施例对此不进行具体限制。
其中,可以通过现有的拼接工具将差分升级包与FOTA应用程序进行拼接。
可选的,加密的差分升级数据中还可以包括差分升级包的版本信息。
S34、将加密的差分升级数据发送至嵌入式设备。
S35、接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间。
其中,存储分区包括第一空间和第二空间。
应理解,存储分区的第一空间中存储有当前版本的嵌入式软件。
S36、通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级。
在一种具体的实现方式中,存储分区的第二空间还包括系统判断位,系统判断位包括预设第一字节和预设第二字节,嵌入式设备通过FOTA应用程序获取预设第一字节的状态,该状态包括置位和未置位,在第一字节的状态为置位时,且预设第二字节的状态为未置位时,通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级,在嵌入式软件升级成功后,将预设第二字节进行置位。
其中,在通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级发生中断时,嵌入式设备通过FOTA应用程序获取加密式差分升级发生中断的中断位置,根据中断位置和差分升级包,对嵌入式软件继续进行加密式差分升级。
本申请实施例提供的嵌入式软件的加密式差分升级方法,服务器获取嵌入式设备中待升级的嵌入式软件的当前版本,根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第一版本,生成差分升级包,对FOTA应用程序进行独立编译,并将差分升级包与FOTA应用程序进行拼接和加密,生成加密的差分升级数据,并发送至嵌入式设备。嵌入式设备接收到加密的差分升级数据后将其烧录至存储分区的第二空间,通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级。嵌入式设备接收到加密的差分升级数据后将其烧录至存储分区的第二空间,通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级,保证了嵌入式软件的顺利升级。
可选的,在一些实施例中,在S35之后,嵌入式设备将预设第一字节进行置位。
图4为本申请实施例提供的嵌入式软件的加密式差分升级方法实施例二的流程示意图。在上述任一实施例的基础上,如图4所示,在S31之前,该嵌入式软件的加密式差分升级方法可以包括如下步骤:
S41、获取嵌入式设备中待升级的嵌入式软件的当前版本。
在本步骤中,关于该步骤的具体实现原理可以参见S31实施例的记载,此处不再赘述。
S42、根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第二版本,生成全量升级包。
其中,第二版本高于当前版本,且,第二版本低于第一版本。
S43、对全量升级包和差分处理程序进行加密处理,生成加密的全量升级数据,并将加密的全量升级数据发送至嵌入式设备。
其中,差分处理程序用于获取升级结果。
其中,差分处理程序可以为现有技术中存在的,具有发送升级结果功能的应用程序,也可以是用户对程序代码编译生成的应用程序,本申请实施例对此不进行具体限制。
相应的,对于嵌入式软件来说,则接收服务器发送的加密的全量升级数据。
S44、将加密的全量升级数据烧录至存储分区的待烧录分区,以使将嵌入式软件的升级方式由当前的加密式全量升级切换至加密式差分升级。
其中,存储分区包括当前版本分区和待烧录分区。
在一种具体的实现方式中,在该嵌入式软件从未进行过升级时,此时存储分区中只烧录有一个加密版本的嵌入式软件,该嵌入式软件所在的分区为当前版本分区,待烧录分区中没有存储数据,为空。
示例性的,在该嵌入式软件之前没有升级过时,假设待烧录分区位于存储分区的第二空间,当前版本分区位于存储分区的第一空间,嵌入式设备在接收到加密的全量升级数据后,将加密的全量升级数据烧录至存储的第二空间。
图5为本申请实施例提供的存储分区实施例一的结构示意图。如图5所示,存储分区的第一空间中存储有加密版本为A的嵌入式软件,为当前版本分区,存储分区的第二空间为待烧录分区。嵌入式设备在将加密的全量升级数据烧录至待烧录分区后时,此时存储分区的第二空间存储有新加密版本(如图5中的加密版本B)的嵌入式软件和差分处理程序。
在另一种具体的实现方式中,该嵌入式软件曾经加密式全量升级过时,此时存储分区中分别烧录有两个加密版本的嵌入式软件,待烧录分区中存储有加密版本较旧的嵌入式软件,当前版本分区中存储有加密版本较新的嵌入式软件。
应理解,在该实现方式下,待烧录分区可以存在于存储分区的第一空间,也可以存在于存储分区的第二空间。
示例性的,在该嵌入式软件之前升级过时,待烧录分区中存储有两个加密版本中加密版本较旧的嵌入式软件,当前版本分区中存储有两个加密版本中加密版本较新的嵌入式软件,假设加密版本A为旧版本,加密版本B为新版本,则加密版本A所在的分区为待烧录分区,加密版本B所在的分区为当前版本分区。
在该示例性下,嵌入式设备将加密的全量升级数据烧录至待烧录分区中。
应理解,第一空间可以为存储分区的前部空间,第二空间可以为存储分区的后部空间。
本申请实施例提供的嵌入式软件的加密式差分升级方法,服务器获取嵌入式设备中待升级的嵌入式软件的当前版本,根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第二版本,生成全量升级包,对全量升级包和差分处理程序进行加密处理,生成加密的全量升级数据,并发送至嵌入式设备。嵌入式设备接收加密的全量升级数据,将加密的全量升级数据烧录至存储分区的待烧录分区,以使将嵌入式软件的升级方式由当前的加密式全量升级切换至加密式差分升级。嵌入式软件通过将包含全量升级包和差分处理程序的加密的全量升级数据烧录至存储分区的待烧录分区,在不增加存储分区空间,不返厂的情况下实现了将嵌入式软件升级方式由加密式全量升级切换至加密式差分升级,为嵌入式设备提供了更多的可用存储分区空间,保证了嵌入式软件的顺利升级。
可选的,在一些实施例中,在S45之后,在待烧录分区位于存储分区的第二空间,当前版本分区位于存储分区的第一空间时,在加密的全量升级数据下载完成后,通过差分处理程序将加密的全量升级数据从第二空间移动至第一空间,对第一空间的数据进行覆盖,并删除第二空间中的数据。
在一种具体的实现方式中,嵌入式设备通过Boatloader区获取存储分区中的嵌入式软件的版本信息,并启动新加密版本的嵌入式软件和差分处理程序(也就是说启动待烧录分区中烧录的嵌入式软件和差分处理程序)。之后,嵌入式设备通过该差分处理程序判断差分处 理程序是否在存储的第一空间。在待烧录分区位于存储分区的第二空间,当前版本分区位于存储分区的第一空间时,通过差分处理程序将新加密版本的嵌入式软件以及差分处理程序移动到存储分区的第一空间,覆盖掉存储分区的第一空间中的内容,实现对当前版本分区的数据覆盖,并删除待烧录分区中的数据。嵌入式设备对新加密版本的嵌入式软件以及差分处理程序处理完成后,重新启动新加密版本的嵌入式软件,进入正常任务循环,此时FLASH已经具有对嵌入式软件进行差分升级的功能。
图6为本申请实施例提供的存储分区实施例二的结构示意图。如图6所示,存储分区的第一空间中烧录有加密版本为B的嵌入式软件,还存储有差分处理程序;第二空间中烧录有FOTA应用程序、差分升级包以及系统判断位。可选的,还可以第二空间中还可以包括扩展空间。
可选的,在一些实施例中,系统判断位还包括预设第三字节,在对预设第二字节进行置位后,该嵌入式软件的加密式差分升级方法还包括:通过差分处理程序,获取预设第三字节的状态,在预设第三字节的状态为置位时,通过差分处理程序向服务器发送升级结果,升级结果为升级成功。
图7为本申请实施例提供的系统判断位的结构示意图。如图7所示,系统判断位包含预设第一字节、预设第二字节、预设第三字节、预设第四字节,其中,预设第一字节为系统判断位的第一位(也就是Bit0),可以为SYS_NEEDUPDATE,用于表示差分升级包是否下载完成,在第一位被置位时,表明差分升级包已经就绪可以对嵌入式软件进行升级。其中,预设第二字节为系统判断位的第二位(也就是Bit1),可以为SYS_FOTADONE,用于表示嵌入式软件是否升级成功,在根据差分升级包对嵌入式软件差分升级成功后,FOTA应用程序将系统判断位的第二位进行置位。预设第三字节为系统判断位的第三位(也就是Bit2),可以为SYS_NEEDREPORT,用于表示是否需要向服务器上报升级结果。在系统判断位的第三位被置位时,差分处理程序则向服务器发送升级结果,该升级结果为升级成功。预设第三字节 为系统判断位的第四位(也就是Bit3),为保留位,可以在之后实际应用中进行扩展使用。
相应的,对于服务器来说,则接收嵌入式设备发送的升级结果。
可选的,在一些实施例中,在S41之前,该嵌入式软件的加密式差分升级方法还可以包括以下步骤:利用差分处理程序向服务器发送加密式差分升级请求。
应理解,由于此时存储分区已经具有差分升级能力,因此可以向服务器发送加密式差分升级请求,以便于服务器根据加密式差分升级请求生成差分升级包。
其中,加密式差分升级请求包括嵌入式软件的当前版本。
在一种可能的实现方式中,嵌入式设备可以与服务器进行通信连接,在嵌入式软件发行新版本时,服务器将嵌入式软件的新版本信息发送给嵌入式设备。嵌入式设备接收到该嵌入式软件的新版本信息时,可以将该嵌入式设备的新版本信息在嵌入式设备的触控屏上进行显示。在用户需要对嵌入式软件进行升级时,对触控屏中相应的控件进行点击。嵌入式设备响应于用户对于触控屏的点击操作,生成加密式差分升级请求,并将该差分升级请求发送至服务器。
在另一种可能的实现方式中,用户的终端设备可以分别与嵌入式设备和服务器进行通信连接,该终端设备可以通过相应的应用程序对嵌入式设备进行控制,还可以通过应用程序获取对应嵌入式设备中的嵌入式软件的版本信息。在嵌入式软件发行新版本时,服务器将嵌入式软件的新版本信息发送给用户的终端设备,该终端设备通过该应用程序对嵌入式软件的新版本信息进行显示。在用户需要对嵌入式软件进行升级时,可以对应用程序中相应的控件进行点击。终端设备响应于用户对于触控屏的点击操作,生成加密式差分升级请求,并将该加密式差分升级请求发送至嵌入式设备。嵌入式设备接收到用户的终端设备发送的加密式差分升级请求,并将该加密式差分升级请求发送给服务器。
在再一种可能的实现方式中,在嵌入式软件发行新版本时,服务器将嵌入式软件的新版本信息发送给嵌入式设备。嵌入式设备接 收到该嵌入式软件的新版本信息时与当前版本信息进行对比。在新版本信息与当前版本信息不一致时,生成加密式差分升级请求,并将该加密式差分升级请求发送给服务器。
相应的,对于服务器来说,则接收嵌入式设备发送的加密式差分升级请求。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
图8为本申请实施例提供的嵌入式软件的加密式差分升级装置实施例一的结构示意图。如图8所示,该嵌入式软件的加密式差分升级装置应用于嵌入式设备,该装置包括:
烧录模块81,用于接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间,加密的差分升级数据包括差分升级包和独立编译的固件空中升级FOTA应用程序,FOTA应用程序用于根据差分升级包对嵌入式软件进行加密式差分升级,存储分区包括第一空间和第二空间;
处理模块82,用于通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级,在发生升级中断时,通过FOTA应用程序获取加密式差分升级发生中断的中断位置;
处理模块82,用于通过FOTA应用程序,根据中断位置和差分升级包,对嵌入式软件继续进行加密式差分升级。
在本申请实施例的一种可能设计中,在通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级发生中断时,处理模块82,还用于:
通过FOTA应用程序获取加密式差分升级发生中断的中断位置;
通过FOTA应用程序,根据中断位置和差分升级包,对嵌入式软件继续进行加密式差分升级。
在本申请实施例的另一种可能设计中,存储分区的第二空间还包括系统判断位,系统判断位包括预设第一字节,接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间之后,处理模块82,还用于:
将预设第一字节进行置位。
可选的,处理模块82,具体用于:
通过FOTA应用程序获取预设第一字节的状态,状态包括置位和未置位;
在第一字节的状态为置位时,且预设第二字节的状态为未置位时,通过FOTA应用程序根据差分升级包对嵌入式软件进行加密式差分升级;
在嵌入式软件升级成功后,将预设第二字节进行置位。
可选的,接收服务器发送的加密的差分升级数据之前,装置还包括:
接收装置,用于接收服务器发送的加密的全量升级数据,加密的全量升级数据包括全量升级包和差分处理程序,差分处理程序用于向服务器发送加密式差分升级的升级结果;
烧录模块81,还用于将加密的全量升级数据烧录至存储分区的待烧录分区,以使将嵌入式软件的升级方式由当前的加密式全量升级切换至加密式差分升级,存储分区包括当前版本分区和待烧录分区。
可选的,系统判断位还包括预设第三字节,在对预设第二字节进行置位后,处理模块82,还用于:
通过差分处理程序,获取预设第三字节的状态;
在预设第三字节的状态为置位时,通过差分处理程序向服务器发送升级结果,升级结果为升级成功。
可选的,处理模块82,还用于:
在待烧录分区位于存储分区的第二空间,当前版本分区位于存储分区的第一空间时,在加密的全量升级数据下载完成后,通过差分处理程序将加密的全量升级数据从第二空间移动至第一空间,对第一空间的数据进行覆盖,并删除第二空间中的数据。
本申请实施例提供的嵌入式软件的加密式差分升级装置,可用于执行上述任一实施例中嵌入式设备侧的嵌入式软件的加密式差分升级装置,其实现原理和技术效果类似,在此不再赘述。
图9为本申请实施例提供的嵌入式软件的加密式差分升级装置实施例二的结构示意图。如图9所示,该嵌入式软件的加密式差分升级装置应用于服务器,该装置包括:
获取模块91,用于获取嵌入式设备中待升级的嵌入式软件的当前版本;
处理模块92,用于根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第一版本,生成差分升级包,第一版本高于当前版本;
处理模块92,还用于对固件空中升级FOTA应用程序进行独立编译,并将差分升级包与FOTA应用程序进行拼接和加密,生成加密的差分升级数据,FOTA应用程序用于根据差分升级包对嵌入式软件进行加密式差分升级;
发送模块,用于将加密的差分升级数据发送至嵌入式设备。
在本申请实施例的一种可能设计中,获取嵌入式设备中待升级的嵌入式软件的当前版本之前,获取模块91,还用于获取嵌入式设备中待升级的嵌入式软件的当前版本;
处理模块92,还用于根据嵌入式软件的当前版本和存储在服务器中的嵌入式软件的第二版本,生成全量升级包,第二版本高于当前版本,且,第二版本低于第一版本;
处理模块92,还用于对全量升级包和差分处理程序进行加密处理,生成加密的全量升级数据,并将加密的全量升级数据发送至嵌入式设备,差分处理程序用于获取升级结果。
可选的,装置还包括:
接收模块,用于接收嵌入式设备发送的升级结果,升级结果为升级成功。
本申请实施例提供的嵌入式软件的加密式差分升级装置,可用于执行上述任一实施例中服务器侧的嵌入式软件的加密式差分升级装置,其实现原理和技术效果类似,在此不再赘述。
需要说明的是,应理解以上装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用 软件的形式实现,部分模块通过硬件的形式实现。此外,这些模块全部或部分可以集成在一起,也可以独立实现。这里的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
图10为本申请实施例提供的嵌入式设备的结构示意图。如图10所示,该嵌入式设备可以包括:处理器101、存储器102及存储在所述存储器102上并可在处理器101上运行的计算机程序指令,所述处理器101执行所述计算机程序指令时实现前述任一实施例提供的嵌入式设备侧嵌入式软件的加密式差分升级方法。
可选的,嵌入式设备还可以包括与其他设备进行交互的接口。
可选的,该嵌入式设备的上述各个器件之间可以通过系统总线连接。
本申请实施例提供的嵌入式设备,可用于执行上述任一方法实施例提供的嵌入式设备侧嵌入式软件的加密式差分升级方法,其实现原理和技术效果类似,在此不再赘述。
图11为本申请实施例提供的服务器的结构示意图。如图11所示,该服务器可以包括:处理器111、存储器112及存储在所述存储器112上并可在处理器111上运行的计算机程序指令,所述处理器111执行所述计算机程序指令时实现前述任一实施例提供的服务器侧嵌入式软件的加密式差分升级方法。
可选的,服务器还可以包括与其他设备进行交互的接口。
可选的,该服务器的上述各个器件之间可以通过系统总线连接。
本申请实施例提供的服务器,可用于执行上述任一方法实施例提供的服务器侧嵌入式软件的加密式差分升级方法,其实现原理和技术效果类似,在此不再赘述。
存储器可以是单独的存储单元,也可以是集成在处理器中的存储单元。处理器的数量为一个或者多个。
应理解,处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor, DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
系统总线可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。系统总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。存储器可能包括随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器。
实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一可读取存储器中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储器(存储介质)包括:只读存储器(read-only memory,ROM)、RAM、快闪存储器、硬盘、固态硬盘、磁带(英文:magnetic tape)、软盘(英文:floppy disk)、光盘(英文:optical disc)及其任意组合。
本申请实施例提供的电子设备,可用于执行上述任一方法实施例提供的嵌入式软件的加密式差分升级方法,其实现原理和技术效果类似,在此不再赘述。
本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在计算机上运行时,使得计算机执行上述嵌入式软件的加密式差分升级方法。
上述的计算机可读存储介质,上述可读存储介质可以是由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器,电可擦除可编程只读存储器,可擦除可编程只读存储器,可编程只读存储器,只读存储器,磁存储器,快闪存储器,磁盘或光盘。可读存储介质可以是通用或专用计算机能够存取的任何可用介质。
可选的,将可读存储介质耦合至处理器,从而使处理器能够从该可读存储介质读取信息,且可向该可读存储介质写入信息。当然,可读存储介质也可以是处理器的组成部分。处理器和可读存储介质可以位于 专用集成电路(Application Specific Integrated Circuits,ASIC)中。当然,处理器和可读存储介质也可以作为分立组件存在于设备中。
本申请实施例还提供一种计算机程序货品,该计算机程序货品包括计算机程序,该计算机程序存储在计算机可读存储介质中,至少一个处理器可以从该计算机可读存储介质中读取该计算机程序,所述至少一个处理器执行所述计算机程序时可实现上述嵌入式软件的加密式差分升级方法。
本实施例还提供一种芯片,所述芯片包括存储器、处理器,所述存储器中存储代码和数据,所述存储器与所述处理器耦合,所述处理器运行所述存储器中的程序使得所述芯片用于执行上述各种实施方式提供的嵌入式软件的加密式差分升级方法。
本实施例还提供一种计算机程序,当所述计算机程序被处理器执行时,用于执行前述各种实施方式提供的嵌入式软件的加密式差分升级方法。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (18)

  1. 一种嵌入式软件的加密式差分升级方法,应用于嵌入式设备,所述方法包括:
    接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间,所述加密的差分升级数据包括差分升级包和独立编译的固件空中升级FOTA应用程序,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级,所述存储分区包括第一空间和所述第二空间;
    通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级。
  2. 根据权利要求1所述的方法,其中,在通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级发生中断时,所述方法还包括:
    通过所述FOTA应用程序获取所述加密式差分升级发生中断的中断位置;
    通过所述FOTA应用程序,根据所述中断位置和所述差分升级包,对所述嵌入式软件继续进行加密式差分升级。
  3. 根据权利要求1或2所述的方法,其中,所述存储分区的第二空间还包括系统判断位,所述系统判断位包括预设第一字节,所述接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间之后,所述方法还包括:
    将所述预设第一字节进行置位。
  4. 根据权利要求3所述的方法,其中,所述系统判断位还包括预设第二字节,所述通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级,包括:
    通过所述FOTA应用程序获取所述预设第一字节的状态,所述状态包括置位和未置位;
    在所述第一字节的状态为置位时,且所述预设第二字节的状态为未置 位时,通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级;
    在所述嵌入式软件升级成功后,将所述预设第二字节进行置位。
  5. 根据权利要求1-4任一项所述的方法,其中,所述接收服务器发送的加密的差分升级数据之前,所述方法还包括:
    接收所述服务器发送的加密的全量升级数据,所述加密的全量升级数据包括全量升级包和差分处理程序,所述差分处理程序用于向所述服务器发送加密式差分升级的升级结果;
    将所述加密的全量升级数据烧录至所述存储分区的待烧录分区,以使将所述嵌入式软件的升级方式由当前的加密式全量升级切换至所述加密式差分升级,所述存储分区包括当前版本分区和所述待烧录分区。
  6. 根据权利要求3或4所述的方法,其中,所述系统判断位还包括预设第三字节,在对所述预设第二字节进行置位后,所述方法还包括:
    通过所述差分处理程序,获取所述预设第三字节的状态;
    在所述预设第三字节的状态为置位时,通过所述差分处理程序向所述服务器发送升级结果,所述升级结果为升级成功。
  7. 根据权利要求5所述的方法,其中,所述方法还包括:
    在所述待烧录分区位于所述存储分区的第二空间,所述当前版本分区位于所述存储分区的第一空间时,在所述加密的全量升级数据下载完成后,通过所述差分处理程序将所述加密的全量升级数据从所述第二空间移动至所述第一空间,对所述第一空间的数据进行覆盖,并删除所述第二空间中的数据。
  8. 一种嵌入式软件的加密式差分升级方法,其中,应用于服务器,所述方法包括:
    获取嵌入式设备中待升级的嵌入式软件的当前版本;
    根据所述嵌入式软件的当前版本和存储在所述服务器中的所述嵌入式软件的第一版本,生成差分升级包,所述第一版本高于所述当前版本;
    对固件空中升级FOTA应用程序进行独立编译,并将所述差分升级包 与所述FOTA应用程序进行拼接和加密,生成加密的差分升级数据,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级;
    将所述加密的差分升级数据发送至所述嵌入式设备。
  9. 根据权利要求8所述的方法,其中,所述获取嵌入式设备中待升级的嵌入式软件的当前版本之前,所述方法还包括:
    获取所述嵌入式设备中所述待升级的嵌入式软件的当前版本;
    根据所述嵌入式软件的当前版本和存储在所述服务器中的所述嵌入式软件的第二版本,生成全量升级包,所述第二版本高于所述当前版本,且,所述第二版本低于所述第一版本;
    对所述全量升级包和差分处理程序进行加密处理,生成加密的全量升级数据,并将所述加密的全量升级数据发送至所述嵌入式设备,所述差分处理程序用于获取升级结果。
  10. 根据权利要求8或9所述的方法,其中,所述方法还包括:
    接收所述嵌入式设备发送的升级结果,所述升级结果为升级成功。
  11. 一种嵌入式软件的加密式差分升级装置,其中,应用于嵌入式设备,所述装置包括:
    烧录模块,2接收服务器发送的加密的差分升级数据,并烧录至存储分区的第二空间,所述加密的差分升级数据包括差分升级包和独立编译的固件空中升级FOTA应用程序,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级,所述存储分区包括第一空间和所述第二空间;
    处理模块,用于通过所述FOTA应用程序根据所述差分升级包对所述嵌入式软件进行加密式差分升级,在发生升级中断时,通过所述FOTA应用程序获取所述加密式差分升级发生中断的中断位置;
    所述处理模块,用于通过所述FOTA应用程序,根据所述中断位置和所述差分升级包,对所述嵌入式软件继续进行加密式差分升级。
  12. 一种嵌入式软件的加密式差分升级装置,其中,应用于服务器, 所述装置包括:
    获取模块,用于获取嵌入式设备中待升级的嵌入式软件的当前版本;
    处理模块,用于根据所述嵌入式软件的当前版本和存储在所述服务器中的所述嵌入式软件的第一版本,生成差分升级包,所述第一版本高于所述当前版本;
    所述处理模块,还用于对固件空中升级FOTA应用程序进行独立编译,并将所述差分升级包与所述FOTA应用程序进行拼接和加密,生成加密的差分升级数据,所述FOTA应用程序用于根据所述差分升级包对所述嵌入式软件进行加密式差分升级;
    发送模块,用于将所述加密的差分升级数据发送至所述嵌入式设备。
  13. 一种嵌入式设备,包括:处理器、存储器及存储在所述存储器上并可在处理器上运行的计算机程序指令,其中,所述处理器执行所述计算机程序指令时用于实现如权利要求1至7任一项所述的嵌入式软件的加密式差分升级方法。
  14. 一种服务器,包括:处理器、存储器及存储在所述存储器上并可在处理器上运行的计算机程序指令,其中,所述处理器执行所述计算机程序指令时用于实现如权利要求8至10任一项所述的嵌入式软件的加密式差分升级方法。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现如权利要求1至10任一项所述的嵌入式软件的加密式差分升级方法。
  16. 一种计算机程序货品,包括计算机程序,其中,所述计算机程序被处理器执行时用于实现如权利要求1至10任一项所述的嵌入式软件的加密式差分升级方法。
  17. 一种芯片,其中,所述芯片包括存储器、处理器,所述存储器中存储代码和数据,所述存储器与所述处理器耦合,所述处理器运行所述存储器中的程序使得所述芯片用于实现如权利要求1至10任一项所 述的嵌入式软件的加密式差分升级方法。
  18. 一种计算机程序,其中,当所述计算机程序被处理器执行时,用于实现如权利要求1至10任一项所述的嵌入式软件的加密式差分升级方法。
PCT/CN2022/097958 2021-11-24 2022-06-09 嵌入式软件的加密式差分升级方法、装置、设备及介质 WO2023092994A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111408693.4A CN114253590A (zh) 2021-11-24 2021-11-24 嵌入式软件的加密式差分升级方法、装置、设备及介质
CN202111408693.4 2021-11-24

Publications (1)

Publication Number Publication Date
WO2023092994A1 true WO2023092994A1 (zh) 2023-06-01

Family

ID=80791108

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/097958 WO2023092994A1 (zh) 2021-11-24 2022-06-09 嵌入式软件的加密式差分升级方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN114253590A (zh)
WO (1) WO2023092994A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253590A (zh) * 2021-11-24 2022-03-29 青岛海尔科技有限公司 嵌入式软件的加密式差分升级方法、装置、设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015131603A1 (zh) * 2014-07-24 2015-09-11 中兴通讯股份有限公司 一种差分升级方法、服务端及终端
CN105094875A (zh) * 2014-05-19 2015-11-25 中兴通讯股份有限公司 一种软件升级方法及装置
CN109558160A (zh) * 2017-09-26 2019-04-02 阿里巴巴集团控股有限公司 升级方法、嵌入式系统
CN110377308A (zh) * 2019-07-18 2019-10-25 上海擎感智能科技有限公司 数据升级方法、系统
CN114253590A (zh) * 2021-11-24 2022-03-29 青岛海尔科技有限公司 嵌入式软件的加密式差分升级方法、装置、设备及介质
CN114253574A (zh) * 2021-11-24 2022-03-29 青岛海尔科技有限公司 嵌入式软件升级方式的切换方法、装置、设备及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094875A (zh) * 2014-05-19 2015-11-25 中兴通讯股份有限公司 一种软件升级方法及装置
WO2015131603A1 (zh) * 2014-07-24 2015-09-11 中兴通讯股份有限公司 一种差分升级方法、服务端及终端
CN109558160A (zh) * 2017-09-26 2019-04-02 阿里巴巴集团控股有限公司 升级方法、嵌入式系统
CN110377308A (zh) * 2019-07-18 2019-10-25 上海擎感智能科技有限公司 数据升级方法、系统
CN114253590A (zh) * 2021-11-24 2022-03-29 青岛海尔科技有限公司 嵌入式软件的加密式差分升级方法、装置、设备及介质
CN114253574A (zh) * 2021-11-24 2022-03-29 青岛海尔科技有限公司 嵌入式软件升级方式的切换方法、装置、设备及介质

Also Published As

Publication number Publication date
CN114253590A (zh) 2022-03-29

Similar Documents

Publication Publication Date Title
US8539471B2 (en) Updating firmware of an electronic device
CN110032405B (zh) 系统开机码存储器管理方法、存储器装置与应用其的电子系统
US8904518B2 (en) Information processing device, information processing method, and program distribution system
JP5437550B2 (ja) ファームウェアの必要なメモリ容量を減らすシステム及び方法
WO2019062703A1 (zh) 升级方法、嵌入式系统
US20220405392A1 (en) Secure and flexible boot firmware update for devices with a primary platform
US20190079746A1 (en) Software updating methods and systems
CN111201553B (zh) 一种安全元件及相关设备
TWI793053B (zh) 一種電子設備、可信應用調用方法、裝置、設備及介質
WO2023092994A1 (zh) 嵌入式软件的加密式差分升级方法、装置、设备及介质
TW201621647A (zh) 作業系統更新方法
WO2023071424A1 (zh) 一种电子设备
CN110874467A (zh) 信息处理方法、装置、系统以及处理器、存储介质
TW201428613A (zh) 無盤工作站啟動系統及方法
KR20160100391A (ko) 업데이트가능한 집적 회로 무선장치
US20230198775A1 (en) Memory device with secure boot updates and self-recovery
CN110955442B (zh) 一种适用于PCI-E密码卡的Bootloader
US20230359741A1 (en) Trusted boot method and apparatus, electronic device, and readable storage medium
WO2023198056A1 (zh) 嵌入式设备固件更新方法以及嵌入式设备
US11137995B2 (en) Updating firmware of a microcontroller
CN114253574A (zh) 嵌入式软件升级方式的切换方法、装置、设备及介质
CN113626792B (zh) PCIe Switch固件安全执行方法、装置、终端及存储介质
KR20130040636A (ko) 빠른 부팅을 위한 부트 이미지를 생성하는 방법 및 이를 수행하는 화상형성장치, 부트 이미지를 이용하여 빠른 부팅을 수행하는 방법 및 이를 수행하는 화상형성장치
CN109428936B (zh) App的升级方法、装置、系统、电子设备及存储介质
TWI815607B (zh) 基本輸入輸出系統更新方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897092

Country of ref document: EP

Kind code of ref document: A1