Data upgrading method, device, equipment and storage medium

By separating the storage of default NV data and effective NV data in the NV file system, and modifying and parsing them separately using NV configuration files, the problems of low efficiency and data loss in NV data upgrades are solved, achieving efficient data upgrades and improved user experience.

CN117235017BActive Publication Date: 2026-07-31FIBOCOM WIRELESS
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FIBOCOM WIRELESS
Filing Date
2023-09-07
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies for upgrading NV data are inefficient and can easily lead to the loss of original NV data, affecting user experience.

Method used

The default NV data and the effective NV data are stored separately in the NV file system. The default NV data and the effective NV data are modified and parsed separately through the NV configuration file to avoid directly changing the NV version number and maintain data consistency.

Benefits of technology

It improves data upgrade efficiency, avoids the loss of original NV data, enhances user experience, and facilitates unified data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235017B_ABST
    Figure CN117235017B_ABST
Patent Text Reader

Abstract

This invention discloses a data upgrade method, apparatus, device, and storage medium. Applied to an NV file system, the NV file system includes a first data file for storing default NV data and a second data file for storing effective NV data. The method includes: upon receiving a data update instruction, extracting an NV configuration file from the data update instruction; modifying the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and / or target effective NV data; and parsing the target effective NV data based on the target default NV data. Because this invention can update the default NV data and / or effective NV data separately during NV data updates, compared to existing methods that directly upgrade NV data during version upgrades, this invention avoids the loss of original NV data after the upgrade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data upgrade method, apparatus, device, and storage medium. Background Technology

[0002] In PC communication modules, some operator configuration files, user parameter configuration files, and the module's own application data need to be stored in flash memory to support power-off retention; this type of data is collectively referred to as NV data. When the communication module version changes, such as with the addition of new functional requirements, a version upgrade is necessary. If the upgraded version modifies the NV data structure, such as by adding new user configuration items, compatibility with the upgraded NV data needs to be considered. It is essential to ensure that the new NV data structure is effective while minimizing the loss or modification of the original NV data. Related technologies employ adding a completely new NV structure to the original NV data. However, during long-term project maintenance, there are many scenarios involving modifications to the NV structure or the addition of new customer configurations. If a new NV structure is added for each modification, numerous small NV structures will accumulate, hindering future maintenance. Furthermore, if the NV version number is modified simultaneously with the NV structure modification, the upgraded module will reinitialize the NV data based on the NV version number, causing the NV data to revert to default values ​​and modifying customer configuration parameters, thus impacting user experience. Therefore, how to retain the original NV data during data upgrades and improve upgrade efficiency has become a pressing technical problem. Summary of the Invention

[0003] The main objective of this invention is to provide a data upgrade method, apparatus, device, and storage medium, which aims to solve the technical problems of low NV data upgrade efficiency and loss of original NV data in the prior art.

[0004] To achieve the above objectives, the present invention provides a data upgrade method, which is applied to an NV file system, wherein the NV file system is provided with a first data file for storing default NV data and a second data file for storing effective NV data;

[0005] The method includes the following steps:

[0006] Upon receiving a data update instruction, the NV configuration file is extracted from the data update instruction;

[0007] The default NV data in the first data file and / or the effective NV data in the second data file are modified according to the NV configuration file to obtain the target default NV data and / or the target effective NV data.

[0008] The target effective NV data is parsed based on the target default NV data.

[0009] Optionally, the step of modifying the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and / or target effective NV data includes:

[0010] Obtain the first NV data and / or the second NV data from the NV configuration file;

[0011] Based on the first NV data, the default NV data in the first data file is modified to obtain the target default NV data;

[0012] And / or,

[0013] The effective NV data in the second data file is modified based on the second NV data to obtain the target effective NV data.

[0014] Optionally, the first NV data includes an NV data structure, and the second NV data includes key-value pairs of NV data names and values;

[0015] The step of modifying the default NV data in the first data file according to the first NV data to obtain the target default NV data includes:

[0016] Modify the default NV data in the first data file using the NV data structure;

[0017] The step of modifying the effective NV data in the second data file according to the second NV data to obtain the target effective NV data includes:

[0018] The key-value pairs are used as indexes to modify the effective NV data in the second data file.

[0019] Optionally, the step of parsing the target effective NV data based on the target default NV data includes:

[0020] The target default NV data in the first data file is parsed to obtain the default NV data structure;

[0021] The target active NV data in the second data file is parsed based on the default NV data structure.

[0022] Optionally, the step of parsing the target active NV data in the second data file based on the default NV data structure includes:

[0023] The target effective NV data in the second data file is parsed according to the default NV data structure;

[0024] If there are unresolved target parameters, read the parameter information corresponding to the target parameters from the default NV data structure;

[0025] Add the parameter information to the target effective NV data.

[0026] Optionally, the step of parsing the target default NV data in the first data file to obtain the default NV data structure includes:

[0027] The target default NV data in the first data file is parsed using a preset data exchange format to obtain a default NV data structure.

[0028] Optionally, before the step of modifying the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file, the method further includes:

[0029] Determine the file type of the NV configuration file;

[0030] The default NV data to be modified and / or the effective NV data are determined based on the file type.

[0031] Furthermore, to achieve the above objectives, the present invention also provides a data upgrade device, wherein the data upgrade device is provided with a first data file for storing default NV data and a second data file for storing effective NV data, the data upgrade device comprising:

[0032] An extraction module is used to extract the NV configuration file from a data update instruction when a data update instruction is received.

[0033] The modification module is used to modify the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file, so as to obtain the target default NV data and / or the target effective NV data;

[0034] The parsing module is used to parse the target effective NV data based on the target default NV data.

[0035] Furthermore, to achieve the above objectives, the present invention also proposes a data upgrade device, the device comprising: a memory, a processor, and a data upgrade program stored in the memory and executable on the processor, the data upgrade program being configured to implement the steps of the data upgrade method as described above.

[0036] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a data upgrade program, which, when executed by a processor, implements the steps of the data upgrade method described above.

[0037] This invention applies to an NV file system, which includes a first data file for storing default NV data and a second data file for storing effective NV data. The method includes: upon receiving a data update instruction, extracting an NV configuration file from the instruction; modifying the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and / or target effective NV data; and parsing the target effective NV data based on the target default NV data. Because this invention's NV file system includes a first data file for storing default NV data and a second data file for storing effective NV data, during NV data updates, the default NV data and / or effective NV data can be updated separately. Compared to existing methods that lose existing NV data after an upgrade, this invention avoids the loss of existing NV data after an upgrade. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the structure of the data upgrade device for the hardware operating environment involved in the embodiments of the present invention;

[0039] Figure 2 This is a flowchart illustrating the first embodiment of the data upgrade method of the present invention;

[0040] Figure 3 This is a flowchart illustrating the second embodiment of the data upgrade method of the present invention;

[0041] Figure 4 This is a flowchart illustrating the third embodiment of the data upgrade method of the present invention;

[0042] Figure 5 This is a schematic diagram of the NV data parsing process in the third embodiment of the data upgrade method of the present invention;

[0043] Figure 6 This is a structural block diagram of the first embodiment of the data upgrade device of the present invention.

[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0045] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0046] Reference Figure 1 , Figure 1 This is a schematic diagram of the data upgrade device structure of the hardware operating environment involved in the embodiments of the present invention.

[0047] like Figure 1 As shown, the data upgrade device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0048] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the data upgrade device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0049] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a data upgrade program.

[0050] exist Figure 1 In the data upgrade device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the data upgrade device of the present invention can be set in the data upgrade device, and the data upgrade device calls the data upgrade program stored in the memory 1005 through the processor 1001 and executes the data upgrade method provided in the embodiment of the present invention.

[0051] Based on the aforementioned data upgrade device, this embodiment of the invention provides a data upgrade method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the data upgrade method of the present invention.

[0052] In this embodiment, the data upgrade method is applied to an NV file system, which includes a first data file for storing default NV data and a second data file for storing effective NV data. The data upgrade method includes the following steps:

[0053] Step S10: Upon receiving a data update instruction, extract the NV configuration file from the data update instruction.

[0054] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a mobile phone, tablet computer, or personal computer, or an electronic device or NV file system capable of implementing the above functions. The following description uses the NV file system as an example to illustrate this embodiment and the subsequent embodiments.

[0055] It should be noted that the data update command may include an NV data upgrade command or a user-modified NV data NV data modification command. The NV configuration file may include the NV data to be modified. The first data file may be a file for storing default NV data. The second data file may be a file for storing effective NV data. The NV data may be stored as a file in JSON data format, which can improve data readability and maintainability. To ensure a one-to-one correspondence between the default NV data and the effective NV data, the NV configuration file may also include a third data file and / or a fourth data file. The third data file may store modified NV data that modifies the default NV data in the first data file. The fourth data file may store modified NV data that modifies the effective NV data in the second data file. When the third data file is empty, it means that the default NV data in the first data file does not need to be modified. Similarly, when the fourth data file is empty, it means that the effective NV data in the second data file does not need to be modified.

[0056] Furthermore, to improve data readability and maintainability, the default NV data and the effective NV data are stored in JSON format in the first data file and the second data file.

[0057] Step S20: Modify the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain the target default NV data and / or the target effective NV data.

[0058] It should be noted that the modification of the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain the target default NV data and / or target effective NV data can be performed by modifying the default NV data in the first data file based on the first NV data when the NV configuration file stores first NV data that modifies the default NV data in the first data file. Similarly, if the NV configuration file stores second NV data that modifies the effective NV data in the second data file, the effective NV data in the second data file is modified based on the second NV data. This process yields the target default NV data and / or target effective NV data.

[0059] Furthermore, the first NV data includes an NV data structure, and the second NV data includes key-value pairs of NV data names and values;

[0060] The step of modifying the default NV data in the first data file according to the first NV data to obtain the target default NV data includes:

[0061] Modify the default NV data in the first data file using the NV data structure;

[0062] The step of modifying the effective NV data in the second data file according to the second NV data to obtain the target effective NV data includes:

[0063] The key-value pairs are used as indexes to modify the effective NV data in the second data file.

[0064] It should be noted that the NV data structure can be a key-value pair data structure. The key-value pairs of NV data names and values ​​can include member names and corresponding member values ​​in the NV data. Modifying the default NV data in the first data file using the NV data structure can involve modifying the data structure of the default NV data to the NV data structure. Modifying the effective NV data in the second data file using the key-value pairs as indexes can involve modifying the member values ​​of the members in the effective NV data according to the member names and corresponding member values ​​in the key-value pairs. For example, the key-value pairs in the second NV data include: acsleep-20, and the effective NV data in the second data file includes: acsleep-10; dcrpt-20. Based on the member name acsleep in the key-value pairs, the effective NV data in the second data file is found: acsleep-10. The member value of the member acsleep in the effective NV data is modified to the member value -20 in the second NV data, resulting in the target effective NV data: acsleep-20; dcrpt-20.

[0065] Step S30: Parse the target effective NV data based on the target default NV data.

[0066] It should be noted that parsing the target effective NV data based on the target default NV data can be done by parsing the NV data structure in the target default NV data and parsing the target effective NV data according to the NV data structure.

[0067] Furthermore, in order to improve the user experience and enable users to modify NV data, the data update instruction includes an effective NV data modification instruction. This embodiment also includes: when the data update instruction is the effective NV data modification instruction, modifying the effective NV data in the second data file according to the NV configuration file to obtain the target effective NV data.

[0068] It should be noted that since users cannot modify the default NV data, any user-triggered command that modifies the NV data can be identified as the effective NV data modification instruction. The effective NV data modification instruction can be a user-triggered command that modifies the effective NV data in the second data file. When the data update instruction is the effective NV data modification instruction, the NV configuration file contains the modified data for modifying the effective NV data.

[0069] In implementation, an app was developed based on user needs. This app involves three functional features. To ensure code maintainability and better manage the NV data structure, an NV data structure was created for each functional feature to store user configurations. If a user later wants to add a configuration item to feature A, the NV data structure needs to be modified to meet the user's needs. In this case, the solution in this embodiment allows direct modification of the NV data structure in the NV file system corresponding to feature A, i.e., modifying the default NV data in the NV file system corresponding to feature A. After upgrading the version, the customer can still configure the newly added configuration item, i.e., modify the effective NV data in the NV file system corresponding to feature A. Meanwhile, previously modified configuration items by the user remain unaffected. For the internal design and code modifications of the program, the original design is maintained, retaining the three NV structures, facilitating management and maintenance.

[0070] Furthermore, to avoid maintaining too much NV data and hindering unified management, NV data of the same type can be placed in the same structure and / or the same file. Before step S20, the method further includes: determining the file type of the NV configuration file;

[0071] The default NV data to be modified and / or the effective NV data are determined based on the file type.

[0072] It should be noted that NV data of the same type or from the same app can be placed in the same NV data file or the same NV data structure. For example, for different apps on a terminal, the NV data of the same app can be placed in the same file or the same NV data structure. When upgrading or modifying NV data, the default NV data and / or the effective NV data to be modified are determined according to the file type of the NV data to be modified in the NV configuration file.

[0073] This embodiment applies to an NV file system, which includes a first data file for storing default NV data and a second data file for storing effective NV data. The process includes: upon receiving a data update instruction, extracting an NV configuration file from the instruction; modifying the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and / or target effective NV data; and parsing the target effective NV data based on the target default NV data. Because the NV file system of this invention includes a first data file for storing default NV data and a second data file for storing effective NV data, during NV data updates, the default NV data and / or effective NV data can be updated separately. Compared to existing methods that lose existing NV data after an upgrade, this embodiment avoids the loss of existing NV data after an upgrade.

[0074] refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the data upgrade method of the present invention.

[0075] Based on the first embodiment described above, in this embodiment, step S20 includes:

[0076] Step S201: Obtain the first NV data and / or the second NV data from the NV configuration file.

[0077] It should be noted that the first NV data can be NV data that modifies the default NV data in the first data file. The second NV data can be NV data that modifies the effective NV data in the second data file. For example, the first NV data in the NV configuration file can be: Default_PC_Client_nv:

[0078] Struct PC_Client_nv{

[0079] acrpt-10;

[0080] dcrpt-20;

[0081] acsleep-20;

[0082] }

[0083] The second NV data can be Effect_PC_Client_nv: Struct PC_Client_nv.acrpt-300.

[0084] Step S202: Modify the default NV data in the first data file according to the first NV data to obtain the target default NV data.

[0085] It should be noted that modifying the default NV data in the first data file based on the first NV data to obtain the target default NV data can be done when the NV configuration file contains the first NV data, by modifying the default NV data based on the first NV data. For example, the default NV data could be: Default_PC_Client_nv.

[0086] Struct_PC_Client_nv{

[0087] acrpt-10;

[0088] dcrpt-20;

[0089] }

[0090] When the first NV data is: Default_PC_Client_nv:

[0091] Struct PC_Client_nv{

[0092] acrpt-10;

[0093] dcrpt-20;

[0094] acsleep-20;

[0095] When the default NV data is modified based on the first NV data, the target default NV data can be: Default_PC_Client_nv.

[0096] Struct PC_Client_nv{

[0097] acrpt-10;

[0098] dcrpt-20;

[0099] acsleep-20;

[0100] }

[0101] Step S202: and / or, modify the effective NV data in the second data file according to the second NV data to obtain the target effective NV data.

[0102] It should be noted that modifying the effective NV data in the second data file based on the second NV data to obtain the target effective NV data can be done when the NV configuration file contains the second NV data, by modifying the effective NV data based on the second NV data. For example, the effective NV data is: Effect_PC_Client_nv:

[0103] Struct PC_Client_nv{

[0104] acrpt-30;

[0105] dcrpt-40;

[0106] }

[0107] The second NV data is: Effect_PC_Client_nv: Struct PC_Client_nv.acrpt-300;

[0108] The effective NV data is then modified based on the second NV data, and the resulting target effective NV data can be:

[0109] Effect_PC_Client_nv:

[0110] Struct_PC_Client_nv{

[0111] acrpt-300;

[0112] dcrpt-40;

[0113] }

[0114] This embodiment obtains first NV data and / or second NV data from the NV configuration file; modifies the default NV data in the first data file according to the first NV data to obtain target default NV data; and / or modifies the effective NV data in the second data file according to the second NV data to obtain target effective NV data. This embodiment supports separate modification of default NV data and effective NV data. After a version upgrade, the new default NV data can take effect without affecting the original effective NV data. It does not modify the user's configuration information and is imperceptible to the user, improving the user experience. It also eliminates the need to add new NV data, facilitating unified management of NV data.

[0115] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the data upgrade method of the present invention.

[0116] Based on the above embodiments, in this embodiment, step S30 includes:

[0117] Step S301: Parse the target default NV data in the first data file to obtain the default NV data structure.

[0118] It should be noted that the target default NV data in the first data file is stored in JSO format, which includes the parameter name and corresponding parameter value of each parameter. Parsing the target default NV data in the first data file to obtain the default NV data structure can be done by parsing the parameters and parameter values ​​in the target default NV data to determine each parameter and its corresponding parameter value in the target default NV data, i.e., the default NV data structure.

[0119] Furthermore, in order to improve the readability and maintainability of the NV file system, step S301 may include: parsing the target default NV data in the first data file through a preset data exchange format to obtain a default NV data structure.

[0120] It should be noted that the preset data exchange format can be a JSON data format. The step of parsing the target default NV data in the first data file using the preset data exchange format to obtain the default NV data structure can be achieved by parsing the target default NV data in the first data file using a JSON data format to obtain the default NV data structure.

[0121] Step S302: Parse the target active NV data in the second data file based on the default NV data structure.

[0122] It should be noted that if new configuration items are added during the NV data upgrade process, these new configuration items, i.e., the new parameter information, cannot be parsed when parsing the target effective NV data. In this case, it is necessary to parse the target effective NV data based on the default NV data structure. Parsing the target effective NV data in the second data file based on the default NV data structure can involve adding configuration items from the default NV data structure that cannot be successfully parsed from the target effective NV data to the target effective NV data.

[0123] In practice, assuming this upgrade adds a new NV member `acsleep` and simultaneously changes the value of `acrpt` from 10 to 300, the following steps are taken: First, an `acsleep` member is added to `Default_PC_Client_nv` (the first NV data) in the OEM pack (i.e., the NV configuration file). Additionally, a key-value pair `acrpt` (`acrpt-300`) is added to the second NV data. After the OEM pack upgrade, the default NV data in the NV file system is modified, adding the `acsleep` member and the `acrpt` value in `Effect_PC_Client_nv` (the effective NV data). Upon the device's first boot after the upgrade, `Effect_PC_Client_nv` is initialized. This initialization process involves parsing each member of the `Effect_PC_Client_nv` file in the NV file system using JSON parsing and storing them in a global structure. Because the NV data has a new acsleep configuration item after the upgrade, the json_parse process will find that acsleep cannot be successfully parsed from the original Effect_PC_Client_nv file. At this time, the acsleep configuration item information in the default NV data will be read and stored in Effect_PC_Client_nv (i.e., the effective NV data).

[0124] Furthermore, in order to accurately parse the target effective NV data, step S302 may include: parsing the target effective NV data in the second data file according to the default NV data structure;

[0125] If there are unresolved target parameters, read the parameter information corresponding to the target parameters from the default NV data structure;

[0126] Add the parameter information to the target effective NV data.

[0127] It should be noted that the target parameter can be a member of the NV data structure, such as parameters like acrpt-10 and dcrpt-20 in the NV data structure, which can be referred to... Figure 5 , Figure 5This is a schematic diagram of the NV data parsing process in the third embodiment of the data upgrade method of the present invention. After modifying the NV data, it is necessary to initialize the NV data, that is, to parse the modified NV data. The Default_xxx_nv (i.e., the default NV data) is parsed into the global variable of the NV structure through JSON to obtain the latest NV structure. Then, the Effect_xxx_nv (i.e., the effective NV data) is parsed according to the NV structure. It is determined whether the members in the NV structure have been successfully parsed. If there are members that cannot be parsed, the member information of the unparsed member in the default NV data is read and added to the effective NV data. The member information can then be parsed successfully. It is determined whether all members in the NV structure have been parsed successfully. If there are still members in the NV structure that have not been parsed successfully, the parsing is switched to the next member that has not been parsed successfully until all members in the NV structure have been parsed.

[0128] In practice, the default NV data in the initial NV file system can be:

[0129] Default_PC_Client_nv:

[0130] Struct_PC_Client_nv{

[0131] acrpt-10;

[0132] dcrpt-20;

[0133] }

[0134] The effective NV data in the initial NV file system can be:

[0135] Effect_PC_Client_nv:

[0136] Struct PC_Client_nv{

[0137] acrpt-30;

[0138] dcrpt-40;

[0139] }

[0140] The first NV data is: Default_PC_Client_nv:

[0141] Struct PC_Client_nv{

[0142] acrpt-10;

[0143] dcrpt-20;

[0144] acsleep-20;

[0145] }

[0146] The second NV data is: Effect_PC_Client_nv: Struct PC_Client_nv.acrpt-300;

[0147] Based on the first NV data, the default NV data in the first data file is modified to obtain the target default NV data, which can be:

[0148] Default_PC_Client_nv:

[0149] Struct PC_Client_nv{

[0150] acrpt-10;

[0151] dcrpt-20;

[0152] acsleep-20;

[0153] }

[0154] Modifying the effective NV data in the second data file based on the second NV data to obtain the target effective NV data can be as follows:

[0155] Effect_PC_Client_nv:

[0156] Struct_PC_Client_nv{

[0157] acrpt-300;

[0158] dcrpt-40;

[0159] }

[0160] Based on the default NV data structure, the target active NV data in the second data file is parsed, and the resulting default NV data in the parsed NV file system can be:

[0161] Default_PC_Client_nv:

[0162] Struct PC_Client_nv{

[0163] acrpt-10;

[0164] dcrpt-20;

[0165] acsleep-20;

[0166] }

[0167] The effective NV data obtained from the parsed NV file system can be:

[0168] Effect_PC_Client_nv:

[0169] Struct_PC_Client_nv{

[0170] acrpt-300;

[0171] dcrpt-40;

[0172] acsleep-20;

[0173] }

[0174] This embodiment parses the target default NV data in the first data file to obtain a default NV data structure; based on the default NV data structure, it parses the target active NV data in the second data file. This embodiment uses the default NV data structure to parse the target active NV data in the second data file. It supports direct modification of the original NV data structure, and the new NV data structure takes effect after a version upgrade without affecting the original NV data, thus avoiding the loss of the original NV data.

[0175] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the data upgrade device of the present invention.

[0176] like Figure 6 As shown, the data upgrade device proposed in this embodiment of the invention includes a first data file for storing default NV data and a second data file for storing effective NV data. The data upgrade device includes:

[0177] Extraction module 10 is used to extract the NV configuration file from the data update instruction when a data update instruction is received;

[0178] Modification module 20 is used to modify the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file, so as to obtain target default NV data and / or target effective NV data;

[0179] The parsing module 30 is used to parse the target effective NV data based on the target default NV data.

[0180] This embodiment applies to an NV file system, which includes a first data file for storing default NV data and a second data file for storing effective NV data. The process includes: upon receiving a data update instruction, extracting an NV configuration file from the instruction; modifying the default NV data in the first data file and / or the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and / or target effective NV data; and parsing the target effective NV data based on the target default NV data. Because the NV file system of this invention includes a first data file for storing default NV data and a second data file for storing effective NV data, during NV data updates, the default NV data and / or effective NV data can be updated separately. Compared to existing methods that lose existing NV data after an upgrade, this embodiment avoids the loss of existing NV data after an upgrade.

[0181] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0182] In addition, for technical details not described in detail in this embodiment, please refer to the data upgrade method provided in any embodiment of the present invention, which will not be repeated here.

[0183] Based on the first embodiment of the data upgrade device of the present invention described above, a second embodiment of the data upgrade device of the present invention is proposed.

[0184] In this embodiment, the modification module 20 is further configured to obtain the first NV data and / or the second NV data in the NV configuration file;

[0185] Based on the first NV data, the default NV data in the first data file is modified to obtain the target default NV data;

[0186] And / or,

[0187] The effective NV data in the second data file is modified based on the second NV data to obtain the target effective NV data.

[0188] Furthermore, the first NV data includes an NV data structure, and the second NV data includes key-value pairs of NV data names and values;

[0189] The modification module 20 is also used to modify the default NV data in the first data file using the NV data structure;

[0190] The modification module 20 is also used to modify the effective NV data in the second data file using the key-value pair as an index.

[0191] Furthermore, the parsing module 30 is also used to parse the target default NV data in the first data file to obtain a default NV data structure;

[0192] The target active NV data in the second data file is parsed based on the default NV data structure.

[0193] Furthermore, the parsing module 30 is also used to parse the target active NV data in the second data file according to the default NV data structure;

[0194] If there are unresolved target parameters, read the parameter information corresponding to the target parameters from the default NV data structure;

[0195] Add the parameter information to the target effective NV data.

[0196] Furthermore, the parsing module 30 is also used to parse the target default NV data in the first data file using a preset data exchange format to obtain a default NV data structure.

[0197] Furthermore, the default NV data and the effective NV data are stored in the first data file and the second data file in JSON format.

[0198] Furthermore, the modification module 20 is also used to determine the file type of the NV configuration file;

[0199] The default NV data to be modified and / or the effective NV data are determined based on the file type.

[0200] Other embodiments or specific implementations of the data upgrade device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.

[0201] Furthermore, embodiments of the present invention also propose a storage medium storing a data upgrade program, wherein the data upgrade program, when executed by a processor, implements the steps of the data upgrade method described above.

[0202] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0203] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0204] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0205] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A data upgrade method, characterized in that, The data upgrade method is applied to the NV file system, which has a first data file for storing default NV data and a second data file for storing effective NV data. The method includes the following steps: Upon receiving a data update instruction, the NV configuration file is extracted from the data update instruction; Based on the NV configuration file, the default NV data in the first data file and the effective NV data in the second data file are modified to obtain the target default NV data and the target effective NV data; The target effective NV data is parsed based on the target default NV data; The step of modifying the default NV data in the first data file and the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and target effective NV data includes: Obtain the first NV data and the second NV data from the NV configuration file. The first NV data includes an NV data structure, and the second NV data includes key-value pairs of NV data names and values. The default NV data in the first data file is modified using the NV data structure to obtain the target default NV data; Using the key-value pairs as indexes, the effective NV data in the second data file is modified to obtain the target effective NV data; The step of parsing the target effective NV data based on the target default NV data includes: The target default NV data in the first data file is parsed to obtain the default NV data structure; The target effective NV data in the second data file is parsed according to the default NV data structure; If there are unresolved target parameters, read the parameter information corresponding to the target parameters from the default NV data structure; Add the parameter information to the target effective NV data.

2. The data upgrade method according to claim 1, characterized in that, The step of parsing the target default NV data in the first data file to obtain the default NV data structure includes: The target default NV data in the first data file is parsed using a preset data exchange format to obtain a default NV data structure.

3. The data upgrade method according to any one of claims 1-2, characterized in that, Before the step of modifying the default NV data in the first data file and the effective NV data in the second data file according to the NV configuration file, the method further includes: Determine the file type of the NV configuration file; The default NV data to be modified and the effective NV data are determined based on the file type.

4. A data upgrade device, characterized in that, The data upgrade device includes a first data file for storing default NV data and a second data file for storing effective NV data. The data upgrade device comprises: An extraction module is used to extract the NV configuration file from a data update instruction when a data update instruction is received. The modification module is used to modify the default NV data in the first data file and the effective NV data in the second data file according to the NV configuration file, so as to obtain the target default NV data and the target effective NV data. The parsing module is used to parse the target effective NV data based on the target default NV data; The step of modifying the default NV data in the first data file and the effective NV data in the second data file according to the NV configuration file to obtain target default NV data and target effective NV data includes: Obtain the first NV data and the second NV data from the NV configuration file. The first NV data includes an NV data structure, and the second NV data includes key-value pairs of NV data names and values. The default NV data in the first data file is modified using the NV data structure to obtain the target default NV data; Using the key-value pairs as indexes, the effective NV data in the second data file is modified to obtain the target effective NV data; The process of parsing the target effective NV data based on the target default NV data includes: The target default NV data in the first data file is parsed to obtain the default NV data structure; The target effective NV data in the second data file is parsed according to the default NV data structure; If there are unresolved target parameters, read the parameter information corresponding to the target parameters from the default NV data structure; Add the parameter information to the target effective NV data.

5. A data upgrade device, characterized in that, The device includes: a memory, a processor, and a data upgrade program stored in the memory and executable on the processor, the data upgrade program being configured to implement the steps of the data upgrade method as described in any one of claims 1 to 3.

6. A storage medium, characterized in that, The storage medium stores a data upgrade program, which, when executed by a processor, implements the steps of the data upgrade method as described in any one of claims 1 to 3.