CN114816852A - Method, device and medium for recovering user configuration data - Google Patents
Method, device and medium for recovering user configuration data Download PDFInfo
- Publication number
- CN114816852A CN114816852A CN202210460944.1A CN202210460944A CN114816852A CN 114816852 A CN114816852 A CN 114816852A CN 202210460944 A CN202210460944 A CN 202210460944A CN 114816852 A CN114816852 A CN 114816852A
- Authority
- CN
- China
- Prior art keywords
- configuration parameters
- initial configuration
- storage area
- firmware
- parameters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000011084 recovery Methods 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 12
- 230000002159 abnormal effect Effects 0.000 claims description 11
- 230000001960 triggered effect Effects 0.000 claims description 6
- 230000005856 abnormality Effects 0.000 abstract description 3
- 238000013500 data storage Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/327—Alarm or error message display
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a method, a device and a medium for recovering user configuration data, which mainly relate to the field of computer systems. Writing initial configuration parameters into a storage area before updating firmware; after the firmware is updated, calling the initial configuration parameters in the storage area, and judging whether the initial configuration parameters are valid; if the configuration data is invalid, restoring the configuration data by using default configuration parameters of the firmware; if the version information of the initial configuration parameters in the storage area is valid, comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if not, initializing the storage area, and entering a step of recovering configuration data by using default configuration parameters of the firmware; if so, restoring the configuration data by using the initial configuration parameters. Therefore, when the version information of the initial configuration parameters in the storage area is inconsistent with the version information of the firmware, the method does not use the initial configuration parameters, but uses the default configuration parameters to recover the configuration data, and effectively avoids the condition of data abnormality caused by inconsistent versions.
Description
Technical Field
The present application relates to the field of computer systems, and more particularly, to a method, apparatus, and medium for recovering user configuration data.
Background
In a complex computer system, a plurality of sub-function modules exist, and along with the upgrading of function requirements, the product life cycle has the requirement of upgrading firmware. Currently, after a firmware upgrade, the user configuration uses the default configuration, and therefore, the user configuration needs to be updated.
Automatic recovery of user configuration is currently possible, but when configuration items change, recovery exceptions are likely to occur.
Therefore, how to avoid the situation of configuration data recovery exception is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method, a device and a medium for recovering user configuration data, which are used for avoiding the abnormal recovery condition of the configuration data and improving the accuracy of the configuration data.
To solve the above technical problem, the present application provides a method for recovering user configuration data, including:
before updating the firmware, acquiring initial configuration parameters of the firmware and writing the initial configuration parameters into a storage area;
after the firmware is updated, calling the initial configuration parameters in the storage area, and judging whether the initial configuration parameters are valid or not;
if the configuration data is invalid, restoring the configuration data by using the default configuration parameters of the firmware;
if the version information of the initial configuration parameters in the storage area is valid, comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware;
if not, initializing the storage area, and entering a step of recovering configuration data by using default configuration parameters of the firmware;
and if so, restoring the configuration data by using the initial configuration parameters.
Preferably, if there are a plurality of storage areas, before writing the initial configuration parameters into the storage area, the method further includes:
checking whether an invalid storage area exists in each storage area;
if the configuration parameters exist, initializing an invalid storage area, and entering a step of writing the initial configuration parameters into the storage area;
and if the initial configuration parameters do not exist, the step of writing the initial configuration parameters into the storage area is carried out.
Preferably, after writing the initial configuration parameters into the storage area, the method further includes:
reading back the current configuration parameters of the firmware, and checking whether the current configuration parameters of the firmware are consistent with the initial configuration parameters stored in each storage area;
if not, initializing each storage area, and entering the step of writing the initial configuration parameters into the storage areas;
and if the initial configuration parameters are inconsistent for multiple times, determining that the initial configuration parameters are failed to be written in, and alarming.
Preferably, if the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware, before restoring the configuration data using the initial configuration parameters, the method further includes:
checking whether the initial configuration parameters in each storage area are consistent;
and if the initial configuration parameters are inconsistent, arbitrating the initial configuration parameters in each storage area, and recovering the configuration data according to the arbitration result.
Preferably, arbitrating the initial configuration parameters in each memory area and recovering the configuration data according to the arbitration result comprises:
judging whether the initial configuration parameters are all invalid;
if the parameters are not all invalid, removing invalid parameters from each storage area, synchronizing the invalid parameters to an abnormal area, and entering the step of acquiring initial configuration parameters of the firmware;
if the configuration data is invalid, initializing each storage area, and recovering the configuration data by using the default configuration parameters of the firmware.
Preferably, the method further comprises the following steps:
generating a time stamp when acquiring the initial configuration parameter and writing the initial configuration parameter into the storage area;
the time stamp is saved.
In order to solve the above technical problem, the present application further provides an apparatus for recovering user configuration data, including:
the acquisition module is used for acquiring the initial configuration parameters of the firmware before updating the firmware and writing the initial configuration parameters into the storage area;
the calling module is used for calling the initial configuration parameters in the storage area after the firmware is updated and judging whether the initial configuration parameters are valid or not; if the comparison result is valid, the comparison module is triggered; if the first recovery module is invalid, triggering the first recovery module;
a first recovery module for recovering the configuration data using default configuration parameters of the firmware;
the comparison module is used for comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if the two are consistent, triggering a second recovery module; if not, triggering an initialization module;
the initialization module is used for initializing the storage area and triggering the first recovery module;
and the second recovery module is used for recovering the configuration data by using the initial configuration parameters.
In order to solve the above technical problem, the present application further provides an apparatus for recovering user configuration data, including:
a memory for storing a computer program;
a processor for implementing the steps of the above method of recovering user configuration data when executing a computer program.
To solve the above technical problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for recovering user configuration data.
The application provides a method for recovering user configuration data, which writes initial configuration parameters into a storage area before updating firmware; after the firmware is updated, calling the initial configuration parameters in the storage area, and judging whether the initial configuration parameters are valid; if the configuration data is invalid, restoring the configuration data by using the default configuration parameters of the firmware; if the version information of the initial configuration parameters in the storage area is valid, comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if not, initializing the storage area, and entering a step of recovering configuration data by using default configuration parameters of the firmware; and if so, restoring the configuration data by using the initial configuration parameters. Therefore, when the version information of the initial configuration parameters in the storage area is inconsistent with the version information of the firmware, the configuration data is not restored to the initial configuration parameters, but the default configuration parameters are used for restoring the configuration data, so that the condition of data abnormity caused by inconsistent versions is effectively avoided, and the accuracy of the configuration data is improved.
In addition, the application also provides a device and a medium for recovering the user configuration data, and the device and the medium have the same beneficial effects as the method for recovering the user configuration data.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a flow chart of a method for recovering user configuration data provided herein;
FIG. 2 is a block diagram of an apparatus for retrieving user configuration data provided herein;
fig. 3 is a block diagram of another apparatus for recovering user configuration data provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a method, a device and a medium for recovering user configuration data, which are used for avoiding the abnormal recovery condition of the configuration data and improving the accuracy of the configuration data.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
It should be noted that the method for restoring user configuration data provided by the present application may be used for saving and restoring firmware user configuration data such as a Basic Input Output System (BIOS), a Baseboard Management Controller (BMC), and the like.
Fig. 1 is a flowchart of a method for recovering user configuration data provided in the present application, as shown in fig. 1, the method includes:
s1: and before updating the firmware, acquiring initial configuration parameters of the firmware and writing the initial configuration parameters into a storage area.
In a specific implementation, before updating the firmware, an initial configuration parameter of the firmware set by a user needs to be acquired first, and after the initial configuration parameter is acquired, the initial configuration parameter is used as configuration data of the firmware, and the initial configuration parameter is written into a storage area for subsequent calling. It can be understood that, in order to increase the security of storage, a plurality of storage areas may be set, and the initial configuration parameters are written into all the storage areas, so that when calling, whether the initial configuration parameters are disordered can be judged by checking the consistency of the initial configuration parameters in each storage area, so as to ensure the accuracy of the called initial configuration parameters. In addition, after the initial configuration parameters are written into the storage area, in order to facilitate the examination of the initial configuration parameters during calling, the version information of the initial configuration parameters, the data storage time of the storage area, the time stamp and other data can be written into the storage area, so that the fault tolerance of the initial configuration parameters is improved.
S2: after the firmware is updated, calling the initial configuration parameters in the storage area, and judging whether the initial configuration parameters are valid; if not, go to S3; if valid, the process proceeds to S4.
After the firmware is updated, the user configuration item needs to be updated, and the initial configuration parameters in the storage area can be called to restore the user configuration data. After the initial configuration parameters are called, in order to check the validity of the initial configuration parameters, whether the called initial configuration parameters are valid or not can be judged through the data storage time and the time stamp of the storage area. Specifically, a time stamp can be generated each time the initial configuration parameter is operated, whether the initial configuration parameter is tampered after being written into the storage area can be judged according to the time stamp, and if the initial configuration parameter is tampered, the invalidity of the initial configuration parameter can be determined; in addition, the storage time of the initial configuration parameter can be obtained according to the time stamp for writing the initial configuration parameter into the storage area and the time stamp for calling the initial configuration parameter from the storage area, the storage time of the initial configuration parameter is compared with the data storage time of the corresponding storage area, if the storage time of the initial configuration parameter is greater than the data storage time of the storage area, the initial configuration parameter called from the storage area can be determined to be invalid, and if the storage time of the initial configuration parameter is not greater than the data storage time of the storage area, the called initial configuration parameter can be determined to be valid. It should be noted that, in a specific implementation, the manner of determining whether the initial configuration parameter is valid is not limited to the determination according to the data storage time and the timestamp of the storage area described in this embodiment, and an identifier that is written in the storage area and is valid may also be stored in the storage area, and whether the initial configuration parameter is valid may be determined by the identifier during calling.
S3: the configuration data is restored using the default configuration parameters of the firmware.
It is understood that after determining that the initial configuration parameters in the storage area are invalid, the configuration data is not restored by using the initial configuration parameters in the storage area, but the configuration parameters are restored by using the default configuration parameters of the firmware to start the firmware. It should be noted that the default configuration parameters of the firmware are always stored in the firmware, are not affected by firmware update, and are inherent attributes of the firmware.
S4: comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if not, go to S5; if they match, the process proceeds to S6.
After the initial configuration parameters in the storage area are judged to be valid, because the initial configuration parameters in the storage area may be distorted, such as increased, decreased or sequential adjustment, in order to avoid confusion of configuration data after firmware upgrade, it is necessary to compare whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the current firmware; if not, the initial configuration parameters in the storage area cannot be used to restore the configuration data, and then step S5 is performed to initialize the storage area, restore the configuration data using the default configuration parameters of the firmware, and re-acquire the initial configuration parameters input by the user to write into the initialized storage area; if so, it is determined that the initial configuration parameters in the storage area are available for restoring the configuration data, and then the process proceeds to step S6, where the configuration data is restored using the initial configuration parameters in the storage area.
S5: the storage area is initialized and S3 is entered.
S6: the configuration data is restored using the initial configuration parameters.
The embodiment provides a method for recovering user configuration data, which writes initial configuration parameters into a storage area before updating firmware; after the firmware is updated, calling the initial configuration parameters in the storage area, and judging whether the initial configuration parameters are valid; if the configuration data is invalid, restoring the configuration data by using the default configuration parameters of the firmware; if the version information of the initial configuration parameters in the storage area is valid, comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if not, initializing the storage area, and entering a step of recovering configuration data by using default configuration parameters of the firmware; and if so, restoring the configuration data by using the initial configuration parameters. Therefore, when the version information of the initial configuration parameters in the storage area is inconsistent with the version information of the firmware, the configuration data is not restored to the initial configuration parameters, but the default configuration parameters are used for restoring the configuration data, so that the condition of data abnormity caused by inconsistent versions is effectively avoided, and the accuracy of the configuration data is improved.
On the basis of the above embodiment, if there are multiple storage areas, in order to ensure that each storage area is valid, before writing the initial configuration parameters into the storage areas, it is further necessary to check the validity of each storage area. The method comprises the following steps:
checking whether an invalid storage area exists in each storage area;
if so, the invalid storage area is initialized and the process proceeds to S1;
if not, the process proceeds to S1.
In a specific implementation, if the data is stored in the storage area in advance, it may be determined that the storage area is invalid, and in addition, if the data storage time of the storage area is short, it may also be determined that the storage area is invalid, specifically, the data storage time of the storage area may be compared with a preset time threshold, if the data storage time of the storage area is greater than the time threshold, it may be determined that the storage area is valid, otherwise, it is determined that the storage area is invalid. It should be noted that the time threshold is related to the update period of the firmware, and may be set by a user according to experience in a specific implementation, which is not specifically described in this embodiment.
In this embodiment, before writing the initial configuration parameters into each storage area, it is checked whether an invalid storage area exists in each storage area, if an invalid storage area exists, the invalid storage area is initialized first, and then the initial configuration parameters are written into each storage area, so that the reliability of the initial configuration parameters stored in each storage area is effectively ensured by ensuring the validity of each storage area.
On the basis of the above embodiment, after the initial configuration parameters are written into the storage area, in order to ensure the accuracy of the written initial configuration parameters, it is also necessary to check the consistency of the written initial configuration parameters and the current configuration parameters of the firmware. The method comprises the following steps:
reading back the current configuration parameters of the firmware and checking whether the current configuration parameters of the firmware are consistent with the initial configuration parameters stored in each storage area;
if not, initializing each storage area, and proceeding to S1;
and if the initial configuration parameters are inconsistent for multiple times, determining that the initial configuration parameters are failed to be written in, and alarming.
Specifically, the current configuration parameters of the firmware can be read, the current configuration parameters of the firmware are compared with the initial configuration parameters in each storage area, if the values and the sequences of the current configuration parameters of the firmware and the initial configuration parameters in the storage areas are consistent, the current configuration parameters of the firmware can be determined to be consistent with the initial configuration parameters in the storage areas, and otherwise, the current configuration parameters of the firmware and the initial configuration parameters in the storage areas are determined to be inconsistent. It will be appreciated that saving the initial configuration parameters may be determined to be complete only if the current configuration parameters of the firmware are satisfied to be consistent with the initial configuration parameters in the memory area. When the current configuration parameters of the firmware are inconsistent with the initial configuration parameters in the storage area, initializing the corresponding storage area, acquiring the initial configuration parameters again, writing the acquired initial configuration parameters into the corresponding storage area, and checking again; if the current configuration parameters of the firmware are not consistent with the initial configuration parameters in the storage area after multiple times of verification, the writing failure of the initial configuration parameters can be determined, and at the moment, a user needs to be reminded to check the firmware and each storage area in an alarm mode so as to find out the reason of the writing failure.
In the embodiment, the current configuration parameters of the firmware are compared with the initial configuration parameters in each storage area to check the consistency of the current configuration parameters and the initial configuration parameters, and the accuracy of the written initial configuration parameters is ensured by checking the consistency of the current configuration parameters and the initial configuration parameters.
On the basis of the above embodiment, if the version information of the initial configuration parameters in the storage areas is consistent with the version information of the firmware, and in order to verify the accuracy of the initial configuration parameters in each storage area, before restoring the configuration data using the initial configuration parameters, consistency check needs to be performed on the initial configuration parameters in each storage area. The method comprises the following steps:
checking whether the initial configuration parameters in each storage area are consistent;
and if the initial configuration parameters are inconsistent, arbitrating the initial configuration parameters in each storage area, and recovering the configuration data according to the arbitration result.
In a specific implementation, whether the initial configuration parameters in each storage area are consistent or not can be checked by comparing whether the numerical values and the sequence of the initial configuration parameters in each storage area are consistent or not. If the values and the sequence of the initial configuration parameters in each storage area are consistent, the initial configuration parameters in each storage area can be determined to be consistent, otherwise, the initial configuration parameters in each storage area are determined to be inconsistent; if not, the initial configuration parameters in each memory area can be arbitrated through the existing arbitration algorithm to recover the configuration data according to the arbitration result, specifically, valid parameters can be identified from the initial configuration parameters in each memory area according to the arbitration algorithm, and the identified valid parameters can be used to try to recover the configuration data.
In the embodiment, the accuracy of the initial configuration parameters in each storage area is verified by performing consistency check on the initial configuration parameters in each storage area, when the initial configuration parameters in each storage area are inconsistent, the initial configuration parameters in each storage area are arbitrated, and the configuration data is recovered according to the arbitration result, so that the possibility of recovering the configuration data is effectively improved.
On the basis of the above embodiment, when it is checked that the initial configuration parameters in the storage areas do not completely match, it is determined that there is an invalid parameter, and in order to recover the configuration data, the invalid parameter needs to be further processed. The method comprises the following steps:
judging whether the initial configuration parameters are all invalid;
if the invalid parameters are not all invalid, removing the invalid parameters from each storage area, synchronizing the invalid parameters to an abnormal area, and entering S1;
if none is valid, the storage areas are initialized and the process proceeds to S3.
Specifically, effective parameters in the initial configuration parameters in each storage area can be identified through an arbitration algorithm, and then invalid parameters in the initial configuration parameters can be obtained; if the initial configuration parameters are invalid, initializing each storage area, and recovering configuration data by using default configuration parameters of the firmware; if the initial configuration parameters are not uniformly invalid, invalid parameters can be removed from each storage area, and the valid parameters in each storage area are tried to be used for recovering the configuration data so as to improve the possibility of recovering the configuration data.
In the embodiment, after the existence of the invalid parameters is determined, whether the initial configuration parameters in the storage area are all invalid is judged, when the initial configuration parameters are all invalid, the default configuration parameters are used for recovering the configuration data, when the initial configuration parameters are not all invalid, the invalid parameters are removed, and the configuration data are tried to be recovered by using the remaining valid parameters, so that the possibility of recovering the configuration data is effectively improved, and in addition, the invalid parameters can be obtained by a user by synchronizing the invalid parameters to an abnormal area so as to remind the user to input the corresponding parameters again.
On the basis of the above embodiments, in order to facilitate tracking, in this embodiment, a timestamp is generated when the initial configuration parameters are acquired and written into the storage area, and when it is checked that the stored initial configuration parameters are abnormal, tracking can be performed through the timestamp to find out the cause of the data abnormality. The method comprises the following steps:
generating a time stamp when acquiring the initial configuration parameter and writing the initial configuration parameter into the storage area;
the time stamp is saved.
Specifically, a timestamp is generated when the initial configuration parameter is acquired and written into the storage area, and in addition, after the initial configuration parameter is stored into the storage area, the timestamp is updated every time the initial configuration parameter is operated, so that the timestamp is queried to track the reason of data abnormality when the initial configuration parameter is abnormal by storing the timestamp.
In the embodiment, when the initial configuration parameters are acquired and written into the storage area, the time stamp is generated and stored, and when the initial configuration parameters stored in the storage area are abnormal, the time stamp can be queried to track the abnormal data, so that the reason for the abnormal data can be found.
In the foregoing embodiments, a method for recovering user configuration data is described in detail, and the present application also provides embodiments corresponding to an apparatus for recovering user configuration data. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 2 is a block diagram of an apparatus for recovering user configuration data according to the present application, and as shown in fig. 2, the apparatus includes:
an obtaining module 10, configured to obtain an initial configuration parameter of a firmware before updating the firmware, and write the initial configuration parameter into a storage area;
the calling module 11 is configured to call the initial configuration parameter in the storage area after the firmware is updated, and determine whether the initial configuration parameter is valid; if the comparison result is valid, the comparison module 13 is triggered; if the first recovery module is invalid, the first recovery module 12 is triggered;
a first recovery module 12 for recovering the configuration data using default configuration parameters of the firmware;
a comparing module 13, configured to compare whether the version information of the initial configuration parameter in the storage area is consistent with the version information of the firmware; if the two are consistent, the second recovery module 15 is triggered; if not, triggering the initialization module 14;
an initialization module 14 for initializing the storage area and triggering the first recovery module 12;
a second recovery module 15 for recovering the configuration data using the initial configuration parameters.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
In the apparatus for recovering user configuration data provided in this embodiment, an obtaining module obtains an initial configuration parameter of a firmware before updating the firmware, and writes the initial configuration parameter into a storage area; after the firmware is updated, calling the initial configuration parameters in the storage area through a calling module, and judging whether the initial configuration parameters are valid; if the comparison result is valid, the comparison module is triggered; if the first recovery module is invalid, triggering the first recovery module; restoring, by a first restoration module, the configuration data using the default configuration parameters of the firmware; the comparison module is used for comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if the two are consistent, triggering a second recovery module; if not, triggering an initialization module; the initialization module is used for initializing the storage area and triggering the first recovery module; and restoring, by the second restoring module, the configuration data using the initial configuration parameters. Therefore, when the version information of the initial configuration parameters in the storage area is inconsistent with the version information of the firmware, the configuration data is not restored to the initial configuration parameters, but the default configuration parameters are used for restoring the configuration data, the condition of data abnormity caused by inconsistent versions is effectively avoided, and the accuracy of the configuration data is improved.
Fig. 3 is a block diagram of another apparatus for recovering user configuration data provided in the present application, as shown in fig. 3, the apparatus includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the method of retrieving user configuration data as mentioned in the above embodiments when executing the computer program.
The device for recovering the user configuration data provided by the embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, and so on. The Processor 21 may be implemented in hardware using at least one of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the method for recovering user configuration data disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, initial configuration parameters, and the like.
In some embodiments, the means for retrieving user configuration data may further comprise a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the architecture shown in FIG. 3 does not constitute a limitation on the means for recovering user configuration data and may include more or fewer components than those shown.
The device for recovering user configuration data provided by the embodiment comprises a memory and a processor, and the processor can realize the method for recovering user configuration data when executing the program stored in the memory, and the effect is the same as that of the method.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of restoring user configuration data as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The computer-readable storage medium provided by this embodiment includes the above-mentioned method for recovering user configuration data, and the same effects are obtained.
The method, apparatus, and medium for recovering user configuration data provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (9)
1. A method for recovering user configuration data, comprising:
before updating the firmware, acquiring initial configuration parameters of the firmware, and writing the initial configuration parameters into a storage area;
after the firmware is updated, calling the initial configuration parameters in the storage area, and judging whether the initial configuration parameters are valid;
if the firmware is invalid, restoring the configuration data by using the default configuration parameters of the firmware;
if the initial configuration parameter is valid, comparing whether the version information of the initial configuration parameter in the storage area is consistent with the version information of the firmware;
if not, initializing the storage area, and entering the step of recovering configuration data by using the default configuration parameters of the firmware;
and if so, recovering the configuration data by using the initial configuration parameters.
2. The method according to claim 1, wherein if there are a plurality of storage areas, before writing the initial configuration parameters into the storage area, further comprising:
checking whether an invalid memory area exists in each memory area;
if the initial configuration parameters exist in the memory area, initializing the invalid memory area, and entering the step of writing the initial configuration parameters into the memory area;
and if the initial configuration parameters do not exist, the step of writing the initial configuration parameters into a storage area is carried out.
3. The method for recovering user configuration data according to claim 2, further comprising, after said writing said initial configuration parameters into a storage area:
reading back the current configuration parameters of the firmware and checking whether the current configuration parameters of the firmware are consistent with the initial configuration parameters stored in each storage area;
if not, initializing each storage area, and entering the step of writing the initial configuration parameters into the storage areas;
and if the initial configuration parameters are inconsistent for multiple times, determining that the initial configuration parameters are failed to be written in, and alarming.
4. The method according to claim 2, wherein if the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware, before the restoring the configuration data using the initial configuration parameters, further comprising:
checking whether the initial configuration parameters in each storage area are consistent;
and if the initial configuration parameters are inconsistent, arbitrating the initial configuration parameters in the storage areas, and recovering the configuration data according to an arbitration result.
5. The method according to claim 4, wherein arbitrating the initial configuration parameters in each of the storage areas and recovering the configuration data according to the arbitration result comprises:
judging whether the initial configuration parameters are all invalid or not;
if the parameters are not all invalid, removing invalid parameters from each storage area, synchronizing the invalid parameters to an abnormal area, and entering the step of acquiring the initial configuration parameters of the firmware;
and if the storage areas are invalid, initializing each storage area, and entering the step of restoring the configuration data by using the default configuration parameters of the firmware.
6. The method for recovering user configuration data according to claim 1, further comprising:
generating a time stamp when the initial configuration parameters are obtained and written into the storage area;
and saving the time stamp.
7. An apparatus for recovering user configuration data, comprising:
the acquisition module is used for acquiring the initial configuration parameters of the firmware before updating the firmware and writing the initial configuration parameters into a storage area;
the calling module is used for calling the initial configuration parameters in the storage area after the firmware is updated and judging whether the initial configuration parameters are valid or not; if the comparison result is valid, the comparison module is triggered; if the first recovery module is invalid, triggering the first recovery module;
the first recovery module is used for recovering configuration data by using default configuration parameters of the firmware;
the comparison module is used for comparing whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if the two are consistent, triggering a second recovery module; if not, triggering an initialization module;
the initialization module is used for initializing the storage area and triggering the first recovery module;
the second recovery module is configured to recover the configuration data using the initial configuration parameters.
8. An apparatus for recovering user configuration data, comprising a memory for storing a computer program;
a processor for implementing the steps of the method of retrieving user configuration data according to any one of claims 1 to 6 when executing said computer program.
9. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of restoring user configuration data according to any one of claims 1 to 6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210460944.1A CN114816852A (en) | 2022-04-28 | 2022-04-28 | Method, device and medium for recovering user configuration data |
PCT/CN2022/119061 WO2023206926A1 (en) | 2022-04-28 | 2022-09-15 | User configuration data recovery method and device, and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210460944.1A CN114816852A (en) | 2022-04-28 | 2022-04-28 | Method, device and medium for recovering user configuration data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114816852A true CN114816852A (en) | 2022-07-29 |
Family
ID=82509117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210460944.1A Pending CN114816852A (en) | 2022-04-28 | 2022-04-28 | Method, device and medium for recovering user configuration data |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114816852A (en) |
WO (1) | WO2023206926A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023206926A1 (en) * | 2022-04-28 | 2023-11-02 | 苏州元脑智能科技有限公司 | User configuration data recovery method and device, and medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101667131A (en) * | 2009-10-14 | 2010-03-10 | 中兴通讯股份有限公司 | Mobile terminal and updating method of configuration information thereof |
US20130262849A1 (en) * | 2012-03-29 | 2013-10-03 | Bheeshmar Redheendran | Automatic reconfiguration of initialization firmware in a computer system |
CN103064712B (en) * | 2012-12-28 | 2016-04-06 | 深圳市共进电子股份有限公司 | A kind of method of Reconfigurations parameter, device and terminal device |
CN114816852A (en) * | 2022-04-28 | 2022-07-29 | 苏州浪潮智能科技有限公司 | Method, device and medium for recovering user configuration data |
-
2022
- 2022-04-28 CN CN202210460944.1A patent/CN114816852A/en active Pending
- 2022-09-15 WO PCT/CN2022/119061 patent/WO2023206926A1/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023206926A1 (en) * | 2022-04-28 | 2023-11-02 | 苏州元脑智能科技有限公司 | User configuration data recovery method and device, and medium |
Also Published As
Publication number | Publication date |
---|---|
WO2023206926A1 (en) | 2023-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20120110378A1 (en) | Firmware recovery system and method of baseboard management controller of computing device | |
CN105094876B (en) | The upgrade processing method of CPLD, device and system | |
CN112506745B (en) | Memory temperature reading method and device and computer readable storage medium | |
CN113050965A (en) | Embedded system upgrading method, device, equipment and medium | |
CN114816852A (en) | Method, device and medium for recovering user configuration data | |
CN111782446A (en) | Method and device for testing normal power failure of SSD, computer equipment and storage medium | |
CN111651239A (en) | Virtual machine cloning method, device, equipment and medium | |
CN113641537A (en) | Starting system, method and medium for server | |
CN113467981A (en) | Exception handling method and device | |
CN111475186A (en) | Firmware upgrading method, device, equipment and medium based on BMC | |
CN108009039B (en) | Terminal information recording method, device, storage medium and electronic equipment | |
CN114153503A (en) | BIOS control method, device and medium | |
CN114461341A (en) | Method, device and medium for preventing brain crack of cloud platform virtual machine | |
CN115168119A (en) | PCIE (peripheral component interface express) link detection method, device and medium for server | |
CN111309521B (en) | FPGA reloading method, FPGA card type equipment and host | |
CN114461286A (en) | Server starting method and device and readable storage medium | |
CN110837433A (en) | Performance optimization method and device and electronic equipment | |
KR100907550B1 (en) | Apparatus and method for recovering corrupted data of serial EPEPROM | |
CN111414590A (en) | Consistency management method, device and equipment for Web service software component | |
CN111400093B (en) | Configuration method, configuration device and configuration equipment of NVDIMM (noise, voltage and noise memory Module) | |
TW201005643A (en) | Backup system of embedded system for storing booting files in different storage sections and method thereof | |
CN111104271A (en) | Stability testing method, device and equipment for in-band firmware updating process | |
CN114153388B (en) | Hard disk system, hard disk configuration information refreshing method, device and medium | |
CN112346786B (en) | Debugging information recording method applied to startup stage and operation stage after startup | |
CN117492799A (en) | Software upgrading method and device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |