Differential upgrading method, electronic equipment and computer readable medium

By mounting a predetermined partition in the uboot environment and reading the target differential packet data into the uboot memory, the problem of large flash memory space occupies during the upgrade of mobile Internet devices is solved, and the efficiency of the upgrade process and the optimization of storage space are achieved.

CN119248332APending Publication Date: 2025-01-03ZTE TERMINAL CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310808799.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing mobile Internet devices occupy a large amount of flash memory storage space during the upgrade process, and how to further reduce the use of flash memory space has become a technical problem that needs to be solved urgently.

Method used

Mount a predetermined partition in the uboot environment, read the target differential packet data into the uboot memory, and upgrade according to the differential packet and the partition data block to be upgraded, avoiding the space for the target differential packet data in the flash memory and reducing the upgrade Use of flash memory space during the process.

Benefits of technology

It realizes the use of flash memory space during the upgrade process, ensuring the efficiency of the upgrade process and the optimization of storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248332A_ABST
    Figure CN119248332A_ABST
Patent Text Reader

Abstract

The invention provides a differential upgrading method which comprises the steps that under the condition that current electronic equipment is restarted to enter a uboot installation stage, a preset partition is mounted, and target differential package data is stored in the preset partition; reading the target differential packet data from the predetermined partition to a uboot memory; the target differential data packet is read from the uboot memory; and upgrading according to the target differential data packet and the partition data block to be upgraded. The invention further provides electronic equipment and a computer readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of Internet of Things, and in particular, to a differential upgrade method, an electronic device and a computer-readable medium. Background Art

[0002] With the development of the concept of the Internet of Everything, smart homes and smart cities are an inevitable trend of development, and the types of mobile Internet (MBB, Mobile Broad Band) devices (for example, home mobile Internet devices, car-mounted mobile Internet devices) are also increasing.

[0003] In order to meet the needs of users, it is often necessary to upgrade and improve the software and firmware on the MBB device. In order to reduce the flash storage space occupied during the upgrade process, the firmware over-the-air (FOTA) differential upgrade method is often used to upgrade the MBB device.

[0004] How to further reduce the flash storage space occupied by MBB devices during the upgrade process has become a technical problem to be solved urgently in this field. Summary of the invention

[0005] Embodiments of the present disclosure provide a differential upgrade method, an electronic device, and a computer-readable medium.

[0006] As a first aspect of the present disclosure, a differential upgrade method is provided, comprising: when the current electronic device restarts to enter the uboot installation phase, mounting a predetermined partition, wherein the predetermined partition stores target differential package data; reading the target differential package data from the predetermined partition into the uboot memory; reading the target differential data packet from the uboot memory; and performing an upgrade according to the target differential data packet and the partition data block to be upgraded.

[0007] As a second aspect of the present disclosure, an electronic device is provided, including:

[0008] one or more processors;

[0009] A memory having one or more programs stored therein, when the one or more programs are executed by the one or more processors, the one or more processors implement the differential upgrade method.

[0010] As a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the differential upgrade method is implemented.

[0011] In the differential upgrade method provided in the embodiment of the present disclosure, when the target differential package data is used for upgrading, the predetermined partition is mounted in the uboot environment, and the target differential package data is read into the uboot memory. No space for storing the target differential package data needs to be reserved in the flash memory, thereby reducing the use of flash memory space during the upgrade process. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of an implementation method of the differential upgrade method provided by the present disclosure;

[0013] Figure 2 is a flowchart of an implementation method of step S150;

[0014] Figure 3 It is a flowchart of another implementation of the differential upgrade method provided by the present disclosure;

[0015] Figure 4 It is a flowchart of another implementation method of the differential upgrade method provided by the present disclosure;

[0016] Figure 5 is a flowchart of an implementation method of step S200;

[0017] Figure 6 It is a schematic diagram of the IoT architecture;

[0018] Figure 7 is a module schematic diagram of an implementation mode of an electronic device provided by the present disclosure;

[0019] Figure 8 It is a module diagram of an implementation of the computer-readable medium provided by the present disclosure. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the differential upgrade method, electronic device and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.

[0021] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.

[0022] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0023] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0024] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.

[0025] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0026] As a first aspect of the present disclosure, a differential upgrade method is provided, such as Figure 1 As shown, the differential upgrade may include the following operations.

[0027] In step S110, when the current electronic device is restarted and enters the uboot installation phase, a predetermined partition is mounted, wherein the predetermined partition stores target differential package data;

[0028] In step S120, the target differential packet data is read from the predetermined partition into the uboot memory;

[0029] In step S130, the target differential data packet is read from the uboot memory;

[0030] In step S140, the upgrade is performed according to the target differential data packet and the partition data block to be upgraded.

[0031] The uboot environment does not support the file system. In the differential upgrade method provided in the embodiment of the present disclosure, the predetermined partition is a partition of the file system. When the target differential package data is used for upgrading, the predetermined partition is mounted in the uboot environment, and the target differential package data is read into the uboot memory. No space is required in the flash memory to store the target differential package data, which reduces the use of flash memory space during the upgrade process.

[0032] As an optional implementation, the target differential package data may be stored in the predetermined partition in advance. After the target differential package data is stored in the predetermined partition, the electronic device executing the differential upgrade method needs to be restarted before entering the uboot environment.

[0033] Since dynamic memory allocation (malloc, memory allocation) cannot be used to apply for memory in the uboot environment, in the present disclosure, it is necessary to reserve a memory first address for storing target differential packet data and performing upgrades. Accordingly, the target differential packet data is read from the predetermined partition into the uboot memory specifically including: reading the target differential packet data into a continuous memory corresponding to a first preset uboot memory first address.

[0034] Accordingly, if Figure 2 As shown, the upgrade is performed according to the target differential data packet and the partition data block to be upgraded, specifically including:

[0035] In step S141, the partition data block to be upgraded is read into the continuous memory corresponding to the second preset uboot memory first address of the uboot memory;

[0036] In step S142, according to the target differential data packet and the partition data block to be upgraded, the restored data is calculated in the second preset uboot memory first address;

[0037] In step S143, the partition data block to be upgraded is overwritten with the restored data.

[0038] That is to say, the uboot memory includes a part for storing target differential packet data and a part for performing data restoration calculation. For ease of description, the part for storing target differential packet data is referred to as ram_fota_data, and the part for performing data restoration calculation is referred to as ram_compute.

[0039] In this disclosure, target differential package data refers to data that can be differentially upgraded and can be obtained by downloading. Figure 3 As shown, before step S110, the differential upgrade method may further include:

[0040] In step S100a, the initial differential packet data is downloaded to the predetermined partition;

[0041] In step S102a, the initial differential packet data is verified;

[0042] In step S104a, the verified initial differential packet data is stored in the predetermined partition as the target differential packet data.

[0043] If the initial differential packet data fails to pass the verification, it needs to be fed back to the server. That is, the differential upgrade method may also include:

[0044] If the initial differential packet data fails to pass the verification, generating a reminder message;

[0045] The reminder information is sent to the server.

[0046] As an optional implementation, in step S104a, the initial differential package data is downloaded to a partition storing differential packages in the file system through a download manager (DM) module.

[0047] In the above implementation, as long as the initial differential packet data passes the verification, it can be used as the target differential packet data, and step S110 to step S140 are continued to be executed.

[0048] As an optional implementation, the differential upgrade method may further include:

[0049] In step S210, the power-off resume backup data corresponding to the target differential data packet is stored in a reserved flash memory space;

[0050] In step S220, when the current electronic device is powered off and then restarted, the upgrade is performed according to the power-off upgrade backup data.

[0051] Here, "power-off resume backup data corresponding to the target differential data packet" may refer to the "restore data" mentioned above. Reserving the reserved flash memory space in the flash memory can ensure that after abnormal power failure and restart, the upgrade can be performed according to the power-off resume backup data.

[0052] As another implementation, the size of the target differential packet data can be limited. For a larger target differential packet, the target differential packet can be written into the uboot memory. Figure 4 As shown, before step S110, the differential upgrade method further includes:

[0053] In step S100b, the initial differential packet data is downloaded to the predetermined partition;

[0054] In step S102b, the initial differential packet data is verified;

[0055] In step S104b, the initial differential package data that has passed verification and has a size larger than the size of the reserved flash memory space is stored in the predetermined partition as the target differential package data.

[0056] In the present disclosure, for a smaller target differential packet, the space occupied is smaller, and optionally, as Figure 4 As shown, the differential upgrade method may further include:

[0057] In step S150, if the initial differential packet data passes verification and the size does not exceed the size of the reserved flash memory space, the initial differential packet data that passes verification is written into the flash memory.

[0058] Accordingly, if Figure 4 As shown, the differential upgrade method also includes:

[0059] In step S160, the partition data block to be upgraded and the differential packet data in the flash memory are read into the uboot memory;

[0060] In step S170, the restoration data is calculated in the uboot memory;

[0061] In step S180, the partition data block to be upgraded is overwritten with the restored data.

[0062] In order to ensure that the power-off resume backup data is correctly stored, optionally, as Figure 5 As shown, step S200 may include:

[0063] In step S230, it is determined whether there is a bad block in the reserved flash memory space;

[0064] In step S240, the power-off resume backup data corresponding to the standard differential data packet is stored in a non-bad block in the reserved flash memory space.

[0065] That is to say, when storing the power-off resume backup data, once a bad block is found in the reserved flash memory space, the bad block is skipped and the power-off resume backup data is stored in a non-bad block.

[0066] Figure 6 The diagram in Figure 1 shows the IoT architecture. The left side is the server side, and the right side is the terminal side.

[0067] As shown in the figure, the server is arranged through a public cloud or a private cloud. The backend capabilities of the service side include a self-service portal, backend integration, data applications, differential tools, etc. The DM service core of the service side includes an acquisition module 610 (for collecting parameters, information, status, etc.), a configuration module 620 (for configuring parameters, information, etc.), a management module 630 (for customization, security performance, etc.), and an update module 640 (for updating firmware, software, data, etc.). The DM service core is configured with a protocol engine. The differential tool is used to generate a differential package for terminal upgrade (i.e., the initial differential package data described above).

[0068] The network terminal has a device user interface (UI), a DM client 650, and an upgrade agent module 660 (for implementing a differential restoration algorithm). The DM client is configured with a protocol engine and is provided with management modules 1, ..., and management modules N. The upgrade agent module 660 can implement the above differential upgrade method provided in the embodiment of the present disclosure.

[0069] As an optional implementation, the server side communicates with the networked terminal through Open Mobile Alliance Device Management (OMADM).

[0070] The following describes the process of the networked terminal executing the above differential upgrade method under the above IoT architecture.

[0071] First, the DM client downloads the differential package to the partition storing the differential package in the file system, and verifies the differential package.

[0072] After the differential packet data verification passes, the network terminal restarts and enters the uboot installation phase, and the upgrade agent module 660 performs the following steps:

[0073] Mount the file system partition. It should be noted that malloc cannot be used to apply for memory in the uboot environment. Memory can only be used through the reserved continuous memory first address. In this disclosure, two continuous memory first addresses are reserved, namely ram_fota_data and ram_compute;

[0074] Read the differential packet data from the file system partition to the continuous memory address ram_fota_data prepared in advance in the uboot environment. ram_compute is used for differential upgrade calculation and restoration data;

[0075] According to the differential upgrade scheme "old data + differential package = new data", read the differential package data from the memory address ram_fota_data to the memory ram_compute; read the old data block of the partition to be upgraded of the device to the memory ram_compute; and restore the new data block of the partition in the memory ram_compute to ensure that after an abnormal power outage, the upgrade can continue according to the backup data;

[0076] Determine whether there is a bad block in the flash address flash_backup. If there is a bad block, skip the address block; restore the partition new data block in ram_compute and back it up in the address block of the non-bad block in the flash address flash_backup.

[0077] The new partition data block restored in ram_compute is overwritten on the partition data block being upgraded. Then the process returns to the step of upgrading according to the differential upgrade plan "old data + differential package = new data" and restores the next data block until all the partition data blocks to be upgraded are restored.

[0078] As a second aspect of the present disclosure, an electronic device is provided, such as Figure 5 As shown, the electronic device includes:

[0079] One or more processors 101;

[0080] The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the differential upgrade method provided in the first aspect of the present disclosure.

[0081] Optionally, the electronic device may further include one or more I / O interfaces 103 connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

[0082] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU) and the like; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.

[0083] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0084] In the present disclosure, there is no particular limitation on the specific type of the electronic device. The electronic device may be a smart home device or a vehicle-mounted device.

[0085] As a third aspect of the present disclosure, Figure 6 As shown, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the differential upgrade method provided by the first aspect of the present disclosure is implemented.

[0086] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0087] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A differential upgrade method, comprising: When the current electronic device is restarted and enters the uboot installation phase, a predetermined partition is mounted, wherein the predetermined partition stores target differential package data; Reading the target differential packet data from the predetermined partition into the uboot memory; Read the target differential data packet from the uboot memory; The upgrade is performed according to the target differential data packet and the partition data block to be upgraded.

2. The differential upgrade method according to claim 1, wherein: The step of reading the target differential packet data from the predetermined partition into the uboot memory comprises: reading the target differential packet data into a continuous memory corresponding to a first preset uboot memory first address; And, the upgrading according to the target differential data packet and the partition data block to be upgraded includes: Read the partition data block to be upgraded into the continuous memory corresponding to the second preset uboot memory first address of the uboot memory; Calculate and restore data in the second preset uboot memory first address according to the target differential data packet and the partition data block to be upgraded; The partition data block to be upgraded is overwritten by the restored data.

3. The differential upgrade method according to claim 1, wherein: The differential upgrade method further includes: Storing the power-off resume backup data corresponding to the target differential data packet in the reserved flash memory space; When the current electronic device is powered off and then restarted, the upgrade is performed according to the power-off upgrade backup data.

4. The differential upgrade method according to claim 1, wherein: In the case where the current electronic device is restarted to enter the uboot installation phase, before mounting the predetermined partition, the differential upgrade method further includes: Downloading the initial differential packet data into the predetermined partition; Verifying the initial differential packet data; The verified initial differential packet data is stored in the predetermined partition as the target differential packet data.

5. The differential upgrade method according to claim 1, wherein: In the case where the current electronic device is restarted to enter the uboot installation phase, before mounting the predetermined partition, the differential upgrade method further includes: Downloading the initial differential packet data into the predetermined partition; Verifying the initial differential packet data; The initial differential package data that has passed the verification and has a size larger than the size of the reserved flash memory space is stored in the predetermined partition as the target differential package data.

6. The differential upgrade method according to claim 5, wherein: If the initial differential packet data passes verification and the size does not exceed the size of the reserved flash memory space, writing the initial differential packet data that passes verification into the flash memory space; The differential upgrade method further includes: Read the partition data block to be upgraded and the differential packet data in the flash memory space into the uboot memory; Calculate and restore data in the uboot memory; The partition data block to be upgraded is overwritten by the restored data.

7. The differential upgrade method according to any one of claims 4 to 6, wherein: The differential upgrade method further includes: If the initial differential packet data fails to pass the verification, generating a reminder message; The reminder information is sent to the server.

8. The differential upgrade method according to claim 3, wherein: The step of storing the power-off resume backup data corresponding to the target differential data packet in a reserved flash memory space includes: Determine whether there is a bad block in the reserved flash memory space; The power-off resume backup data corresponding to the target differential data packet is stored in a non-bad block in the reserved flash memory space.

9. An electronic device, comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the differential upgrade method described in any one of claims 1 to 8.

10. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the differential upgrade method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Program data upgrading processing method of chip, chip and vehicle

    CN121833005A