Module upgrading method and device, equipment and medium

By determining the image file upgrade during the module upgrade process and storing it in the first partition, the problem of dynamic NV data loss is solved and the data integrity and performance stability of the device after the upgrade are ensured.

CN118626313APending Publication Date: 2024-09-10FIBOCOM WIRELESS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410930935.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

During the module upgrade process, the loss of dynamic NV data causes the device to lose its previous calibration and personalized settings, especially in wireless communication devices, which may cause device performance to degrade or fail to work properly. How to protect the integrity of module data is A technical challenge.

Method used

By determining whether the image file of the target version has been upgraded and storing it in the first partition, the data of the first partition and the second partition are restored to the target memory space respectively to form static NV data and dynamic NV data to ensure that during the upgrade process No loss of dynamic NV data.

Benefits of technology

During the module upgrade process, static NV data and dynamic NV data are backed up in different partitions to ensure that dynamic NV data will not be lost due to the impact of static NV data, maintaining the data integrity and performance stability of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626313A
    Figure CN118626313A
Patent Text Reader

Abstract

The invention discloses a module upgrading method and device, equipment and a medium, and relates to the technical field of computers. The method comprises the steps that whether a mirror image file of a target version is upgraded or not is judged; if yes, storing the mirror image file of the target version to a first partition; and respectively restoring the data of the first partition and the data of the second partition to a target memory space to form static NV data and dynamic NV data, so that a module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete upgrading. By means of the scheme, the integrity of module data can be protected in the module upgrading process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a module upgrading method, device, equipment and medium. Background Art

[0002] The module based on Qualcomm EMMC (Embedded Multi Media Card) platform contains FSG partition (partition for storing crystal machine parameters). FSG partition stores EFS (Encrypting File System) data. EFS data contains some non-volatile parameters, which are divided into dynamic NV (Native Value, non-volatile) data and static NV data.

[0003] During the manufacturing process of the module, the EFS data of the software is usually flashed into the module. During the module upgrade process, the EFS data needs to be upgraded as a whole and the dynamic NV data needs to be erased, resulting in incomplete module data. The loss of dynamic NV data may cause the device to lose previous calibration and personalized settings after the upgrade. In some special usage scenarios, the loss of dynamic NV data is unacceptable, especially for devices that rely on dynamic NV data. For example, in wireless communication devices, dynamic NV data may include frequency calibration, signal compensation and other key parameters. The loss of dynamic NV data may cause the device performance to degrade or even fail to work properly.

[0004] From the above, it can be seen that how to protect the integrity of module data during the module upgrade process is a problem to be solved in the art. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a module upgrade method, device, equipment and medium to protect the integrity of module data during the module upgrade process. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a module upgrade method, comprising:

[0007] Determine whether the image file of the target version has been upgraded;

[0008] If yes, the image file of the target version is stored in the first partition;

[0009] The data of the first partition and the data of the second partition are respectively restored to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

[0010] Optionally, the module upgrade method further includes:

[0011] Determining whether parameters exist in the target memory space of the module;

[0012] If not, the image file stored in the first partition is sent to the target memory space to form the static NV data.

[0013] Optionally, before restoring the data of the second partition to the target memory space to form dynamic NV data, the process includes:

[0014] Acquire the calibration data of the module and send the calibration data to the target memory space to form dynamic NV data;

[0015] The dynamic NV data is stored in the second partition for backup.

[0016] Optionally, the first partition is an FSG partition, and the second partition is a partition different from the first partition.

[0017] Optionally, determining whether the image file of the target version has been upgraded includes:

[0018] Determine whether the version number corresponding to the target version of the image file has changed;

[0019] If so, it is determined that there is an upgrade in the image file of the target version.

[0020] Optionally, after storing the image file of the target version in the first partition, the method further includes:

[0021] Setting a device partition table of the module, and recording the data respectively stored in the first partition and the second partition in the device partition table;

[0022] Correspondingly, after restoring the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data respectively, the method further includes:

[0023] The data respectively stored in the first partition and the second partition recorded in the device partition table are updated so as to access the first partition and the second partition based on the updated device partition table.

[0024] In a second aspect, the present application discloses a module upgrading device, comprising:

[0025] A judgment module is used to judge whether the image file of the target version has been upgraded;

[0026] A storage module, configured to store the image file of the target version to the first partition if yes;

[0027] The upgrade module is used to restore the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

[0028] In a third aspect, the present application discloses an electronic device, including:

[0029] Memory, used to store computer programs;

[0030] The processor is used to execute the computer program to implement the steps of the module upgrade method disclosed above.

[0031] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the module upgrade method disclosed above are implemented.

[0032] The beneficial effects of the present application are as follows: the present application determines whether there is an upgrade to the image file of the target version; if so, the image file of the target version is stored in the first partition; the data of the first partition and the data of the second partition are respectively restored to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade. It can be seen that when the image file of the target version is upgraded, the present application stores the image file of the target version in the first partition, and restores the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, that is, the static NV data and the dynamic NV data are backed up in different partitions, so the dynamic NV data will not be lost due to the influence of the static NV data during the module upgrade process. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0034] Figure 1 A flow chart of a module upgrade method disclosed in this application;

[0035] Figure 2 A specific backup partition schematic diagram disclosed in this application;

[0036] Figure 3 A specific data restoration schematic diagram disclosed in this application;

[0037] Figure 4 This is a schematic diagram of the structure of a module upgrading device disclosed in this application;

[0038] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0040] The module based on Qualcomm EMMC platform contains FSG partition, which stores EFS data. EFS data contains some non-volatile parameters, which are divided into dynamic NV data and static NV data.

[0041] During the manufacturing process of the module, the EFS data of the software is usually flashed into the module. During the process of upgrading the module, the EFS data needs to be upgraded as a whole and the dynamic NV data needs to be erased, resulting in incomplete module data. The loss of dynamic NV data may cause the device to lose previous calibration and personalized settings after the upgrade. In some special usage scenarios, the loss of dynamic NV data is unacceptable, especially for devices that rely on dynamic NV data. For example, in wireless communication devices, dynamic NV data may include frequency calibration, signal compensation and other key parameters. The loss of dynamic NV data may cause the device performance to degrade or even fail to work properly.

[0042] To this end, the present application provides a module upgrade solution to protect the integrity of module data during the module upgrade process.

[0043] See also Figure 1 As shown, the embodiment of the present application discloses a module upgrade method, including:

[0044] Step S11: Determine whether the image file of the target version has been upgraded.

[0045] In this embodiment, the determination of whether the target version of the image file has been upgraded includes: determining whether the version number corresponding to the target version of the image file has changed; if so, determining that the target version of the image file has been upgraded. If the version number of the downloaded target version of the image file (Study.img) has changed, the backup mechanism is triggered. Specifically, a marker file is first obtained, which is used to record the various version numbers of the image files stored in the first partition. Then, the marker file is used to determine whether the version number corresponding to the target version of the image file has changed. For example, if the marker file currently has a new version number v1.2.1, it means that the version number of Study.img has changed, that is, the target version of the image file has been upgraded.

[0046] Step S12: If yes, the image file of the target version is stored in the first partition.

[0047] The static NV data of the module is determined based on the image file stored in the first partition, specifically, the static NV data of the module is determined based on the Study.img file stored in the first partition.

[0048] In this embodiment, after storing the image file of the target version in the first partition, the method further includes: setting a device partition table of the module, and recording the data stored in the first partition and the second partition in the device partition table. A device partition table is set to record the data stored in each partition of the module, so that the partition where the data is located is determined according to the device partition table, which facilitates subsequent data access.

[0049] Step S13: Restore the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, respectively, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

[0050] In this embodiment, before restoring the data of the second partition to the target memory space to form dynamic NV data, it includes: obtaining the calibration data of the module and sending the calibration data to the target memory space to form dynamic NV data; storing the dynamic NV data in the second partition for backup. When the production line calibrates the module, dynamic parameters are generated, that is, calibration data is generated, and the calibration data is sent to the target memory space to form the dynamic NV data of the module, and the dynamic NV data is stored in the second partition for backup. By storing the calibration data independently as part of the dynamic NV data, it is ensured that these key data can still be restored safely after the equipment is upgraded, which increases the stability of the equipment to maintain performance and configuration after the upgrade.

[0051] In this embodiment, it also includes: judging whether there are parameters in the target memory space of the module; if not, sending the image file stored in the first partition to the target memory space to form the static NV data. When the module is turned on, it is detected that there are no parameters in the target memory space (ST1 and ST2), then the backup mechanism is triggered, that is, backing up the static NV data and dynamic NV data respectively; wherein, the target memory space of the module is the memory space corresponding to the running of static NV data and dynamic NV data.

[0052] In this embodiment, the first partition is an FSG partition, and the second partition is a partition different from the first partition. Figure 2 A specific backup partition diagram is shown, which divides the backup area of ​​the module into a first partition A and a second partition B. The first partition A is an FSG partition, and the second partition is a partition in the backup area that is different from the first partition. When downloading the target software, the image file (Study.img) of the target software is stored in the first partition A. It can be understood that the first partition A is used to store static NV data, and the second partition B is used to store dynamic NV data. In other words, the EFS data in the module is decoupled from static and dynamic.

[0053] For example Figure 3 A specific data restoration diagram is shown, in which the data of the first partition and the data of the second partition are restored to the target memory space respectively to form static NV data and dynamic NV data, so that the module reads the static NV data and dynamic NV data in the target memory space to maintain operation and complete the upgrade. The process of upgrading the FSG partition is modified to make it more intelligent when backing up and restoring static NV data. The adjusted upgrade process ensures that even if the FSG partition is formatted and rewritten, the static NV data can be retained, and after the module upgrade is completed, the dynamic NV data will not be lost. Through static and dynamic decoupling storage, the integrity of the device data is maintained. Whenever the FSG partition is upgraded, the static NV data and dynamic NV data of the device can be ensured to be intact.

[0054] In this embodiment, after the data of the first partition and the data of the second partition are restored to the target memory space to form static NV data and dynamic NV data, the method further includes: updating the data respectively stored in the first partition and the second partition recorded in the device partition table, so as to access the first partition and the second partition based on the updated device partition table. An update mechanism for the device partition table is introduced to adapt to the new data storage layout, which enables the device to accurately identify and access the separately stored static NV data and dynamic NV data, thereby increasing the flexibility of the system.

[0055] The beneficial effects of the present application are as follows: the present application determines whether there is an upgrade to the image file of the target version; if so, the image file of the target version is stored in the first partition; the data of the first partition and the data of the second partition are respectively restored to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade. It can be seen that when the image file of the target version is upgraded, the present application stores the image file of the target version in the first partition, and restores the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, that is, the static NV data and the dynamic NV data are backed up in different partitions, so the dynamic NV data will not be lost due to the influence of the static NV data during the module upgrade process.

[0056] See also Figure 4 As shown, the embodiment of the present application discloses a module upgrading device, comprising:

[0057] A judging module 11 is used to judge whether there is an upgrade for the image file of the target version;

[0058] The storage module 12 is used for storing the image file of the target version to the first partition if yes;

[0059] The upgrade module 13 is used to restore the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

[0060] The beneficial effects of the present application are as follows: the present application determines whether there is an upgrade to the image file of the target version; if so, the image file of the target version is stored in the first partition; the data of the first partition and the data of the second partition are respectively restored to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade. It can be seen that when the image file of the target version is upgraded, the present application stores the image file of the target version in the first partition, and restores the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, that is, the static NV data and the dynamic NV data are backed up in different partitions, so the dynamic NV data will not be lost due to the influence of the static NV data during the module upgrade process.

[0061] Furthermore, an embodiment of the present application also provides an electronic device. Figure 5This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be considered as any limitation on the scope of use of the present application.

[0062] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the following steps:

[0063] Determine whether the image file of the target version has been upgraded;

[0064] If yes, the image file of the target version is stored in the first partition;

[0065] The data of the first partition and the data of the second partition are respectively restored to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

[0066] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0067] Determining whether parameters exist in the target memory space of the module;

[0068] If not, the image file stored in the first partition is sent to the target memory space to form the static NV data.

[0069] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0070] Acquire the calibration data of the module and send the calibration data to the target memory space to form dynamic NV data;

[0071] The dynamic NV data is stored in the second partition for backup.

[0072] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0073] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0074] Determine whether the version number corresponding to the target version of the image file has changed;

[0075] If so, it is determined that there is an upgrade in the image file of the target version.

[0076] In some specific implementations, the processor may further include the following steps by executing the computer program stored in the memory:

[0077] Setting a device partition table of the module, and recording the data respectively stored in the first partition and the second partition in the device partition table;

[0078] Correspondingly, after restoring the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data respectively, the method further includes:

[0079] The data respectively stored in the first partition and the second partition recorded in the device partition table are updated so as to access the first partition and the second partition based on the updated device partition table.

[0080] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0081] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0082] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0083] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the module upgrade method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data received by the electronic device and transmitted from an external device, the data 223 can also include data collected by its own input and output interface 25, etc.

[0084] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the module upgrade method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.

[0085] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0086] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable EPROM (Erasable Programmable Read Only Memory), electrically erasable programmable EEPROM (Electrically Erasable Programmable read only memory), register, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0087] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0088] The above is a detailed introduction to a module upgrade method, device, equipment and medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A module upgrade method, characterized in that: include: Determine whether the image file of the target version has been upgraded; If yes, the image file of the target version is stored in the first partition; The data of the first partition and the data of the second partition are respectively restored to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

2. The module upgrade method according to claim 1, characterized in that: Also includes: Determining whether parameters exist in the target memory space of the module; If not, the image file stored in the first partition is sent to the target memory space to form the static NV data.

3. The module upgrade method according to claim 1, characterized in that: Before restoring the data of the second partition to the target memory space to form dynamic NV data, the following steps are included: Acquire the calibration data of the module and send the calibration data to the target memory space to form dynamic NV data; The dynamic NV data is stored in the second partition for backup.

4. The module upgrade method according to claim 1, characterized in that: The first partition is a FSG partition, and the second partition is a partition different from the first partition.

5. The module upgrade method according to claim 1, characterized in that: The step of determining whether the image file of the target version has been upgraded includes: Determine whether the version number corresponding to the target version of the image file has changed; If so, it is determined that there is an upgrade in the image file of the target version.

6. The module upgrade method according to claim 1, characterized in that: After storing the image file of the target version in the first partition, the method further includes: Setting a device partition table of the module, and recording the data respectively stored in the first partition and the second partition in the device partition table; Correspondingly, after restoring the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data respectively, the method further includes: The data respectively stored in the first partition and the second partition recorded in the device partition table are updated so as to access the first partition and the second partition based on the updated device partition table.

7. A module upgrade device, characterized in that: include: A judgment module is used to judge whether the image file of the target version has been upgraded; A storage module, configured to store the image file of the target version to the first partition if yes; The upgrade module is used to restore the data of the first partition and the data of the second partition to the target memory space to form static NV data and dynamic NV data, so that the module reads the static NV data and the dynamic NV data in the target memory space to maintain operation and complete the upgrade.

8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the module upgrade method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the module upgrade method as described in any one of claims 1 to 6 are implemented.