WO2023206926A1 - 一种恢复用户配置数据的方法、装置及介质 - Google Patents

一种恢复用户配置数据的方法、装置及介质 Download PDF

Info

Publication number
WO2023206926A1
WO2023206926A1 PCT/CN2022/119061 CN2022119061W WO2023206926A1 WO 2023206926 A1 WO2023206926 A1 WO 2023206926A1 CN 2022119061 W CN2022119061 W CN 2022119061W WO 2023206926 A1 WO2023206926 A1 WO 2023206926A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration parameters
initial configuration
storage area
parameters
firmware
Prior art date
Application number
PCT/CN2022/119061
Other languages
English (en)
French (fr)
Inventor
宋成磊
刘波
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2023206926A1 publication Critical patent/WO2023206926A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Definitions

  • the present application relates to the field of computer systems, and in particular to a method, device and medium for restoring user configuration data.
  • a method for restoring user configuration data including: before the firmware is updated, obtain the initial configuration parameters of the firmware and write the initial configuration parameters into a storage area; after the firmware is updated, call the initial configuration parameters in the storage area and determine the initial Whether the configuration parameters are valid; in response to the initial configuration parameters being invalid, use the default configuration parameters of the firmware to restore the configuration data; in response to the initial configuration parameters being valid, compare the version information of the initial configuration parameters in the storage area with the version information of the firmware; respond Because the version information of the initial configuration parameters is inconsistent with the version information of the firmware, initialize the storage area and enter the step of restoring the configuration data using the default configuration parameters of the firmware; and in response to the version information of the initial configuration parameters being consistent with the version information of the firmware, use the initial Configuration parameters restore configuration data.
  • if there are multiple storage areas, before writing the initial configuration parameters into the storage area it also includes: checking whether there is an invalid storage area in each storage area; in response to the existence of an invalid storage area, initializing the invalid storage area. the storage area, and enter the step of writing the initial configuration parameters into the storage area; and in response to the absence of an invalid storage area, enter the step of writing the initial configuration parameters into the storage area.
  • checking whether there is an invalid storage area in each storage area includes: in response to data being pre-stored in any storage area in each storage area, determining that any storage area is invalid.
  • the method further includes: in response to the data storage time of any one of the storage areas being greater than a preset time threshold, determining that any one of the storage areas is valid.
  • the preset time threshold is determined according to the update cycle of the firmware.
  • the method further includes: reading back the current configuration parameters of the firmware, and verifying whether the current configuration parameters of the firmware are consistent with the initial configuration parameters stored in each storage area; responding to The current configuration parameters of the firmware are inconsistent with the initial configuration parameters stored in each storage area, initialize each storage area, and enter the step of writing the initial configuration parameters into the storage area; and in response to the current configuration parameters of the firmware being inconsistent with the initial configuration parameters stored in each storage area. If the configuration parameters are inconsistent multiple times, it is determined that the initial configuration parameters have failed to be written, and an alarm is issued.
  • verifying whether the current configuration parameters of the firmware are consistent with the initial configuration parameters stored in each storage area includes: comparing the current configuration parameters of the firmware with the initial configuration parameters in each storage area; and responding to the firmware The current configuration parameters of the firmware are consistent in value and order with the initial configuration parameters in each storage area. Make sure that the current configuration parameters of the firmware are consistent with the initial configuration parameters in each storage area.
  • the method in response to the version information of the initial configuration parameters being consistent with the version information of the firmware, before using the initial configuration parameters to restore the configuration data, the method further includes: verifying whether the initial configuration parameters in each storage area are consistent; and in response to If the initial configuration parameters in each storage area are consistent, the initial configuration parameters in each storage area are arbitrated, and the configuration data is restored based on the arbitration results.
  • checking whether the initial configuration parameters in each storage area are consistent includes: comparing whether the values and sequences of the initial configuration parameters in each storage area are consistent; and responding to the values of the initial configuration parameters in each storage area. and sequence are consistent, make sure the initial configuration parameters in each storage area are consistent.
  • arbitrating the initial configuration parameters in each storage area and restoring the configuration data according to the arbitration results includes: identifying valid parameters from the initial configuration parameters in each storage area according to the arbitration algorithm, and using the identified valid parameters. Parameters restore configuration data.
  • arbitrating the initial configuration parameters in each storage area and restoring the configuration data according to the arbitration results includes: determining whether the initial configuration parameters are all invalid; in response to the initial configuration parameters being not all invalid, removing them from each storage area Invalid parameters, synchronize the invalid parameters to the exception area, and enter the step of obtaining the initial configuration parameters of the firmware; and in response to the initial configuration parameters being invalid, initialize each storage area, and enter the step of restoring the configuration data using the default configuration parameters of the firmware.
  • determining whether the initial configuration parameters are all invalid includes: identifying the valid parameters among the initial configuration parameters in each storage area through an arbitration algorithm, and obtaining the invalid parameters among the initial configuration parameters; and based on the invalid parameters among the initial configuration parameters. Determine whether the initial configuration parameters are invalid.
  • the method further includes: using valid parameters in each storage area to restore the configuration data.
  • using valid parameters in each storage area to restore the configuration data includes: receiving user-input parameters; and merging the user-input parameters with the valid parameters in each storage area, and using the merged parameters to restore Configuration Data.
  • a timestamp is generated; and the timestamp is saved.
  • the method further includes: updating the saved timestamp when operating on the initial configuration parameters.
  • determining whether the initial configuration parameters are valid includes: determining whether the initial configuration parameters are valid based on the data storage time and timestamp of the storage area, where a timestamp is generated each time the initial configuration parameters are operated.
  • a device for restoring user configuration data including: an acquisition module, used to obtain the initial configuration parameters of the firmware before the firmware is updated, and write the initial configuration parameters into a storage area; and a calling module, used to call the storage after the firmware is updated.
  • the initial configuration parameters in the area and determine whether the initial configuration parameters are valid; in response to the initial configuration parameters being valid, the comparison module is triggered; in response to the initial configuration parameters being invalid, the first recovery module is triggered; the first recovery module is used to use the firmware
  • the default configuration parameters restore the configuration data; the comparison module is used to compare whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; in response to the inconsistency between the version information of the initial configuration parameters and the version information of the firmware, trigger the Two recovery modules; in response to the version information of the initial configuration parameters being consistent with the version information of the firmware, triggering the initialization module; the initialization module is used to initialize the storage area and trigger the first recovery module; and the second recovery module is used to use the initial configuration
  • Embodiments of the present application also provide a device for restoring user configuration data, which includes a memory and one or more processors.
  • Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by one or more processors, such that One or more processors perform the steps of any of the methods described above for recovering user configuration data.
  • embodiments of the present application also provide one or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors follow the steps for any of the above methods to restore user configuration data.
  • Figure 1 is a flow chart of a method for restoring user configuration data in one or more embodiments provided by this application;
  • Figure 2 is a structural diagram of a device for restoring user configuration data in one or more embodiments provided by this application;
  • Figure 3 is a structural diagram of another device for restoring user configuration data in one or more embodiments provided by this application.
  • the core of this application is to provide a method, device and medium for restoring user configuration data, which is used to avoid abnormal configuration data recovery situations and improve the accuracy of configuration data.
  • the method for restoring user configuration data can be used to save and restore firmware user configuration data such as Basic Input Output System (BIOS) and Baseboard Management Controller (Baseboard Management Controller). .
  • BIOS Basic Input Output System
  • Baseboard Management Controller Baseboard Management Controller
  • Figure 1 is a flow chart of a method for restoring user configuration data provided by this application. As shown in Figure 1, the method includes:
  • the initial configuration parameters of the firmware set by the user need to be obtained first, and after obtaining the initial configuration parameters, the initial configuration parameters should be used as the configuration data of the firmware, and the initial configuration parameters should be written into the storage area for subsequent calls. It can be understood that in order to increase the security of storage, you can set up multiple storage areas and write the initial configuration parameters to all storage areas, so that when calling, you can check the consistency of the initial configuration parameters in each storage area. Determine whether the initial configuration parameters are confused to ensure the accuracy of the initial configuration parameters called.
  • the version information of the initial configuration parameters, the data storage time of the storage area itself, timestamp and other data can be written to the storage area. Improved fault tolerance of initial configuration parameters.
  • the initial configuration parameters in the storage area can be called to restore the user configuration data.
  • the storage time of the initial configuration parameters can be obtained by comparing the timestamp of writing the initial configuration parameters into the storage area and the timestamp of calling the initial configuration parameters from the storage area. Compare the storage time of the initial configuration parameters with the data storage time of the corresponding storage area. , if the storage time of the initial configuration parameters is greater than the data storage time of the storage area, it can be determined that the initial configuration parameters called from the storage area are invalid, and if the storage time of the initial configuration parameters is not greater than the data storage time of the storage area, then it can Make sure the initial configuration parameters called are valid.
  • the method of judging whether the initial configuration parameters are valid is not limited to the judgment based on the data storage time and timestamp of the storage area described in this embodiment.
  • the written data can also be stored in the storage area.
  • An identifier indicating whether the initial configuration parameters are valid. When calling, the identifier can be used to determine whether the initial configuration parameters are valid. This embodiment does not limit the method of determining whether the initial configuration parameters are valid.
  • the initial configuration parameters in the storage area are invalid, the initial configuration parameters in the storage area are not used to restore the configuration data at this time, but the default configuration parameters of the firmware are used to restore the configuration parameters to start the firmware. It should be noted that the default configuration parameters of the firmware are always stored in the firmware and are not affected by firmware updates. They are inherent properties of the firmware.
  • S4 Compare whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if they are inconsistent, go to S5; if they are consistent, go to S6.
  • step S5 is entered to initialize the storage area and use the default of the firmware.
  • the configuration parameters restore the configuration data, and re-obtain the initial configuration parameters input by the user to write to the initialized storage area; if they are consistent, it is determined that the initial configuration parameters in the storage area can be used to restore the configuration data.
  • step S6 enter step S6 and use the storage area. Restore the configuration data with the initial configuration parameters in the zone.
  • This embodiment provides a method for restoring user configuration data.
  • This method writes the initial configuration parameters into a storage area before firmware update; after the firmware update, calls the initial configuration parameters in the storage area and determines whether the initial configuration parameters are valid. ; If invalid, use the default configuration parameters of the firmware to restore the configuration data; if valid, compare the version information of the initial configuration parameters in the storage area with the version information of the firmware; if they are inconsistent, initialize the storage area and enter the use Steps to restore the configuration data using the firmware's default configuration parameters; if they are consistent, use the initial configuration parameters to restore the configuration data.
  • This step includes:
  • the storage area can be The data storage time of the storage area is compared with the preset time threshold. If the data storage time of the storage area is greater than the time threshold, it is 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 cycle of the firmware. In specific implementation, the user can set it based on experience, and this embodiment does not provide specific explanation.
  • the initial configuration parameters before writing the initial configuration parameters into each storage area, it is first checked whether there is an invalid storage area in each storage area. If there is an invalid storage area, the invalid storage area is initialized first, and then the initial configuration parameters are written into In each storage area, the reliability of the initial configuration parameters stored in each storage area is effectively guaranteed by ensuring the validity of each storage area.
  • This step includes:
  • the current configuration parameters of the firmware can be read, and the current configuration parameters of the firmware can be compared with the initial configuration parameters in each storage area. If the values and sequences of the current configuration parameters of the firmware and the initial configuration parameters in the storage area are If both are consistent, it can be determined that the current configuration parameters of the firmware are consistent with the initial configuration parameters in the storage area; otherwise, it is determined that they are inconsistent. It can be understood that only when the current configuration parameters of the firmware are consistent with the initial configuration parameters in the storage area, the saving of the initial configuration parameters can be determined to be completed.
  • This embodiment compares the current configuration parameters of the firmware with the initial configuration parameters in each storage area to check the consistency between the two, and ensures the accuracy of the written initial configuration parameters by checking the consistency between the two.
  • This step includes:
  • whether the initial configuration parameters in each storage area are consistent can be checked by comparing whether the values and sequences of the initial configuration parameters in each storage area are consistent. If the values and order of the initial configuration parameters in each storage area are consistent, it can be determined that the initial configuration parameters in each storage area are consistent; otherwise, it is determined that they are inconsistent; if they are inconsistent, the existing arbitration algorithm can be used to compare the initial configuration parameters in each storage area.
  • the initial configuration parameters are arbitrated to restore the configuration data according to the arbitration results. Specifically, valid parameters can be identified from the initial configuration parameters in each storage area according to the arbitration algorithm, and the identified valid parameters can be used to try to restore the configuration data.
  • This embodiment verifies the accuracy of the initial configuration parameters in each storage area by performing a consistency check on the initial configuration parameters in each storage area.
  • the initial configuration parameters in each storage area are inconsistent, the initial configuration parameters in each storage area are verified.
  • the initial configuration parameters are arbitrated, and the configuration data is restored based on the arbitration results, effectively improving the possibility of configuration data recovery.
  • This step includes:
  • the arbitration algorithm can be used to identify the valid parameters among the initial configuration parameters in each storage area, and then the invalid parameters among the initial configuration parameters can be obtained; if the initial configuration parameters are all invalid, then initialize each storage area and use the default configuration parameters of the firmware. Restore the configuration data; if not all the initial configuration parameters are invalid, you can remove the invalid parameters from each storage area and try to use the valid parameters in each storage area to restore the configuration data to increase the possibility of restoring the configuration data. In addition, you can Synchronize invalid parameters to the exception area to prompt the user to re-enter the corresponding parameters. When the user input is completed, the parameters entered by the user are obtained and combined with the valid parameters in each storage area to restore the configuration data.
  • the initial configuration parameters in the storage area are all invalid.
  • the default configuration parameters are used to restore the configuration data.
  • the initial configuration parameters are not all invalid, the invalid ones are eliminated.
  • Parameters use the remaining valid parameters to try to restore the configuration data, which effectively improves the possibility of restoring the configuration data.
  • synchronizing the invalid parameters to the exception area can make the user aware of the invalid parameters and remind the user to re-enter the corresponding parameters.
  • this embodiment in order to facilitate tracking, this embodiment generates a timestamp when obtaining the initial configuration parameters and writing the initial configuration parameters into the storage area.
  • the time stamp can be used Click and trace to find the cause of the data anomaly. This step includes:
  • a timestamp is generated when initial configuration parameters are obtained and initial configuration parameters are written to the storage area
  • a timestamp will be generated.
  • the timestamp will be updated every time the initial configuration parameters are operated.
  • a timestamp is generated and saved.
  • an abnormality occurs in the initial configuration parameters stored in the storage area, it can be traced by querying the timestamp to facilitate finding Reasons for data anomalies.
  • this application also provides embodiments corresponding to the device for restoring user configuration data. It should be noted that this application describes the embodiments of the device part from two perspectives, one is based on the perspective of functional modules, and the other is based on the perspective of hardware.
  • Figure 2 is a structural diagram of a device for restoring user configuration data provided by this application. As shown in Figure 2, the device includes:
  • the acquisition module 10 is used to obtain the initial configuration parameters of the firmware before the firmware is updated, and write the initial configuration parameters into the storage area;
  • the calling module 11 is used to call the initial configuration parameters in the storage area after the firmware is updated, and determine whether the initial configuration parameters are valid; if valid, trigger the comparison module 13; if invalid, trigger the first recovery module 12;
  • the first recovery module 12 is used to restore the configuration data using the default configuration parameters of the firmware
  • the comparison module 13 is used to compare whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if they are consistent, trigger the second recovery module 15; if they are inconsistent, trigger the initialization module 14;
  • Initialization module 14 is used to initialize the storage area and trigger the first recovery module 12;
  • the second recovery module 15 is used to recover configuration data using initial configuration parameters.
  • the device for restoring user configuration data uses the acquisition module to obtain the initial configuration parameters of the firmware before the firmware is updated, and writes the initial configuration parameters into the storage area; and the calling module calls the storage area after the firmware is updated.
  • Initial configuration parameters and determine whether the initial configuration parameters are valid; if valid, trigger the comparison module; if invalid, trigger the first recovery module; restore the configuration data through the first recovery module using the default configuration parameters of the firmware; through comparison
  • the module is used to compare whether the version information of the initial configuration parameters in the storage area is consistent with the version information of the firmware; if they are consistent, the second recovery module is triggered; if they are inconsistent, the initialization module is triggered; through the initialization module, it is used to initialize the storage area, and triggers the first recovery module; through the second recovery module, it is used to recover the configuration data using the initial configuration parameters.
  • Figure 3 is a structural diagram of another device for restoring user configuration data provided by this application. As shown in Figure 3, the device includes: a memory 20 for storing computer-readable instructions;
  • One or more processors 21 are configured to implement the steps of the method for restoring user configuration data as mentioned in the above embodiment when executing computer readable instructions.
  • the device for restoring user configuration data may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer, etc.
  • the processor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, etc.
  • the processor 21 can adopt at least one hardware form among a digital signal processor (Digital Signal Processor, DSP), a field-programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA). to fulfill.
  • DSP Digital Signal Processor
  • FPGA Field-Programmable Gate Array
  • PLA programmable logic array
  • the processor 21 may also include a main processor and a co-processor.
  • the main processor is a processor used to process data in the wake-up state, also called a central processing unit (Central Processing Unit, CPU); the co-processor is A low-power processor used to process data in standby mode.
  • CPU Central Processing Unit
  • the processor 21 may be integrated with a graphics processor (Graphics Processing Unit, GPU), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen.
  • the processor 21 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 20 may include one or more non-volatile computer-readable storage media, which may be non-transitory, having computer-readable instructions stored thereon.
  • the memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices.
  • the memory 20 is at least used to store the following computer-readable instructions 201. After the computer-readable instructions are loaded and executed by the processor 21, the method for restoring user configuration data disclosed in any of the foregoing embodiments can be implemented.
  • the resources stored in the memory 20 may also include the operating system 202, data 203, etc., and the storage method may be short-term storage or permanent storage.
  • the operating system 202 may include Windows, Unix, Linux, etc.
  • Data 203 may include, but is not limited to, initial configuration parameters and the like.
  • the device for restoring user configuration data may also include a display screen 22, an input and output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
  • Figure 3 does not constitute a limitation on the device for restoring user configuration data, and may include more or fewer components than shown in the figure.
  • the device for restoring user configuration data includes a memory and a processor.
  • the processor executes a program stored in the memory, it can implement the above method of restoring user configuration data, and the effect is the same as above.
  • this application also provides corresponding embodiments of one or more non-volatile computer-readable storage media storing computer-readable instructions.
  • Computer-readable instructions are stored on the computer-readable storage medium.
  • the steps of the method for restoring user configuration data as recorded in the above method embodiment are implemented.
  • the methods in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code. .
  • the computer-readable storage medium provided by this embodiment includes the above-mentioned method for restoring user configuration data, and the effect is the same as above.

Abstract

本申请公开了一种恢复用户配置数据的方法、装置及介质,主要涉及计算机系统领域。该方法在固件更新前,将初始配置参数写入存储区;在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;若无效,则使用固件的默认配置参数恢复配置数据;若有效,则比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;若不一致,则初始化存储区,并进入使用固件的默认配置参数恢复配置数据的步骤;若一致,则使用初始配置参数恢复配置数据。可见,该方法在存储区中的初始配置参数的版本信息与固件的版本信息不一致时,不使用初始配置参数,而是使用默认配置参数恢复配置数据,有效避免了因版本不一致造成数据异常的情况。

Description

一种恢复用户配置数据的方法、装置及介质
相关申请的交叉引用
本申请要求于2022年4月28日提交中国专利局,申请号为202210460944.1,申请名称为“一种恢复用户配置数据的方法、装置及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机系统领域,特别是涉及一种恢复用户配置数据的方法、装置及介质。
背景技术
在复杂计算机系统中存在多个子功能模块,随着功能需要的升级,产品生命周期存在升级固件的需求。当前在固件升级后,用户配置使用默认配置,因此,还需要更新用户配置。
当前能够实现自动恢复用户配置,但是当配置项发生变化时,容易出现恢复异常的情况。
由此可见,如何规避配置数据恢复异常的情况是本领域技术人员亟待解决的问题。
发明内容
一种恢复用户配置数据的方法,包括:在固件更新前,获取固件的初始配置参数,并将初始配置参数写入存储区;在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;响应于初始配置参数无效,使用固件的默认配置参数恢复配置数据;响应于初始配置参数有效,比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;响应于初始配置参数的版本信息与固件的版本信息不一致,初始化存储区,并进入使用固件的默认配置参数恢复配置数据的步骤;以及响应于初始配置参数的版本信息与固件的版本信息一致,使用初始配置参数恢复配置数据。
在一些实施例中,若存储区为多个,则在将初始配置参数写入存储区之前,还包括:检查各存储区中是否存在无效的存储区;响应于存在无效的存储区,初始化无效的存储区,并进入将初始配置参数写入存储区的步骤;以及响应于不存在无效的存储区,则进入将初始配置参数写入存储区的步骤。
在一些实施例中,检查各存储区中是否存在无效的存储区,包括:响应于各存储区中任 一存储区中已预先存储有数据,确定任一存储区无效。
在一些实施例中,还包括:响应于各存储区中任一存储区的数据保存时间大于预设的时间阈值,确定任一存储区有效。
在一些实施例中,预设的时间阈值根据固件的更新周期确定。
在一些实施例中,在将初始配置参数写入存储区之后,还包括:回读固件的当前配置参数,并检验固件的当前配置参数与存储于各存储区的初始配置参数是否一致;响应于固件的当前配置参数与存储于各存储区的初始配置参数不一致,初始化各存储区,进入将初始配置参数写入存储区的步骤;以及响应于固件的当前配置参数与存储于各存储区的初始配置参数多次不一致,确定初始配置参数写入失败,并进行报警。
在一些实施例中,检验固件的当前配置参数与存储于各存储区的初始配置参数是否一致,包括:将固件的当前配置参数与各存储区中的初始配置参数进行比对;以及响应于固件的当前配置参数与各存储区中的初始配置参数的数值和顺序均一致,确定固件的当前配置参数与各存储区中的初始配置参数一致。
在一些实施例中,响应于初始配置参数的版本信息与固件的版本信息一致,使用初始配置参数恢复配置数据之前,还包括:检验各存储区中的初始配置参数是否一致;以及响应于各存储区中的初始配置参数一致,对各存储区中的初始配置参数进行仲裁,并根据仲裁结果恢复配置数据。
在一些实施例中,检验各存储区中的初始配置参数是否一致,包括:比对各存储区中的初始配置参数的数值和顺序是否一致;以及响应于各存储区中的初始配置参数的数值和顺序均一致,确定各存储区中的初始配置参数一致。
在一些实施例中,对各存储区中的初始配置参数进行仲裁,并根据仲裁结果恢复配置数据,包括:根据仲裁算法从各存储区中的初始配置参数中识别有效参数,并使用识别的有效参数恢复配置数据。
在一些实施例中,对各存储区中的初始配置参数进行仲裁,并根据仲裁结果恢复配置数据包括:判断初始配置参数是否均无效;响应于初始配置参数非均无效,从各存储区中剔除无效参数,并将无效参数同步至异常区域,进入获取固件的初始配置参数的步骤;以及响应于初始配置参数均无效,初始化各存储区,并进入使用固件的默认配置参数恢复配置数据的步骤。
在一些实施例中,判断初始配置参数是否均无效,包括:通过仲裁算法识别各存储区中初始配置参数中的有效参数,得到初始配置参数中的无效参数;以及根据初始配置参数中的 无效参数判断初始配置参数是否均无效。
在一些实施例中,从各存储区中剔除无效参数之后,还包括:使用各存储区中的有效参数恢复配置数据。
在一些实施例中,使用各存储区中的有效参数恢复配置数据,包括:接收用户输入的参数;以及将用户输入的参数与各存储区中的有效参数进行合并,并采用合并后的参数恢复配置数据。
在一些实施例中,在获取初始配置参数和将初始配置参数写入存储区时,生成时间戳;以及保存时间戳。
在一些实施例中,保存时间戳之后,还包括:当对初始配置参数进行操作时,更新保存的时间戳。
在一些实施例中,判断初始配置参数是否有效,包括:根据存储区的数据保存时间和时间戳判断初始配置参数是否有效,其中每一次对初始配置参数进行操作时生成时间戳。
一种恢复用户配置数据的装置,包括:获取模块,用于在固件更新前,获取固件的初始配置参数,并将初始配置参数写入存储区;调用模块,用于在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;响应于初始配置参数有效,触发比对模块;响应于初始配置参数无效,触发第一恢复模块;第一恢复模块,用于使用固件的默认配置参数恢复配置数据;比对模块,用于比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;响应于初始配置参数的版本信息与固件的版本信息不一致,触发第二恢复模块;响应于初始配置参数的版本信息与固件的版本信息一致,触发初始化模块;初始化模块,用于初始化存储区,并触发第一恢复模块;以及第二恢复模块,用于使用初始配置参数恢复配置数据。
本申请实施例还提供了一种恢复用户配置数据的装置,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一项恢复用户配置数据的方法的步骤。
本申请实施例最后还提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一项恢复用户配置数据的方法的步骤。
附图说明
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍, 显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请提供的一个或多个实施例中一种恢复用户配置数据的方法的流程图;
图2为本申请提供的一个或多个实施例中一种恢复用户配置数据的装置的结构图;
图3为本申请提供的一个或多个实施例中另一种恢复用户配置数据的装置的结构图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。
本申请的核心是提供一种恢复用户配置数据的方法、装置及介质,用于规避配置数据恢复异常的情况,提高配置数据的准确性。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。
需要说明的是,本申请提供的恢复用户配置数据的方法可用于基本输入输出系统(Basic Input Output System,BIOS)、基板管理控制器(Baseboard Management Controller,BMC)等固件用户配置数据的保存和恢复。
图1为本申请提供的一种恢复用户配置数据的方法的流程图,如图1所示,该方法包括:
S1:在固件更新前,获取固件的初始配置参数,并将初始配置参数写入存储区。
在具体实施中,固件更新前,需要先获取用户设置的固件的初始配置参数,且在获取到初始配置参数后,应将该初始配置参数作为固件的配置数据使用,同时将该初始配置参数写入存储区,以便后续调用。可以理解的是,为增加存储的安全性,可设置存储区为多个,并将初始配置参数写入所有存储区,使得在调用时可通过检验各存储区中的初始配置参数的一致性来判断初始配置参数是否发生错乱,以保证所调用的初始配置参数的准确性。此外,在将初始配置参数写入存储区后,为便于调用时检验初始配置参数,可以将初始配置参数的版本信息、存储区自身的数据保存时间、时间戳等数据一并写入存储区,提高了初始配置参数的容错能力。
S2:在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;若 无效,则进入S3;若有效,则进入S4。
固件更新后,需要更新用户配置项,此时可调用存储区中的初始配置参数以恢复用户配置数据。在调用到初始配置参数后,为检验初始配置参数的有效性,可通过存储区的数据保存时间和时间戳判断所调用的初始配置参数是否有效。具体地,可在每一次对初始配置参数进行操作时生成时间戳,根据时间戳可以判断初始配置参数写入存储区后是否被篡改,若初始配置参数被篡改则可确定其无效;另外,根据将初始配置参数写入存储区的时间戳和从存储区中调用初始配置参数的时间戳可得到初始配置参数的存储时间,将初始配置参数的存储时间与对应的存储区的数据保存时间进行比较,若初始配置参数的存储时间大于存储区的数据保存时间,则可确定从该存储区中调用的初始配置参数无效,而若初始配置参数的存储时间不大于存储区的数据保存时间,则可确定所调用的初始配置参数有效。需要说明的是,在具体实施中,判断初始配置参数是否有效的方式不限于本实施例中所描述的根据存储区的数据保存时间和时间戳进行判断,还可以在存储区存储所写入的初始配置参数是否有效的标识,调用时可通过该标识判断其是否有效,本实施例对判断初始配置参数是否有效的方式不做限制。
S3:使用固件的默认配置参数恢复配置数据。
可以理解的是,在判断得出存储区中的初始配置参数无效后,此时不使用存储区中的初始配置参数恢复配置数据,而是使用固件的默认配置参数恢复配置参数以启动固件。需要说明的是,固件的默认配置参数始终存储于固件中,并且不受固件更新的影响,是固件的固有属性。
S4:比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;若不一致,则进入S5;若一致,则进入S6。
在判断得出存储区中的初始配置参数有效后,由于存储区中的初始配置参数可能发生增减或顺序调整等被篡改的情况,为避免固件升级后配置数据出现错乱,此时需要比对存储区中的初始配置参数的版本信息与当前固件的版本信息是否一致;若不一致,则无法使用存储区中的初始配置参数恢复配置数据,此时进入步骤S5,初始化存储区,使用固件的默认配置参数恢复配置数据,并重新获取用户输入的初始配置参数以写入初始化后的存储区;若一致,则确定存储区中的初始配置参数可用于恢复配置数据,此时进入步骤S6,使用存储区中的初始配置参数恢复配置数据。
S5:初始化存储区,并进入S3。
S6:使用初始配置参数恢复配置数据。
本实施例提供一种恢复用户配置数据的方法,该方法在固件更新前,将初始配置参数写入存储区;在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;若无效,则使用固件的默认配置参数恢复配置数据;若有效,则比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;若不一致,则初始化存储区,并进入使用固件的默认配置参数恢复配置数据的步骤;若一致,则使用初始配置参数恢复配置数据。可见,该方法在存储区中的初始配置参数的版本信息与固件的版本信息不一致时,配置数据不会恢复为初始配置参数,而是使用默认配置参数恢复配置数据,有效避免了因版本不一致造成数据异常的情况,提高了配置数据的准确性。
在上述实施例的基础上,若存储区为多个,为保证各存储区均有效,则在将初始配置参数写入存储区之前,还需要检查各存储区的有效性。该步骤包括:
检查各存储区中是否存在无效的存储区;
若存在,则初始化无效的存储区,并进入S1;
若不存在,则进入S1。
在具体实施中,若存储区中已预先存储有数据,则可确定该存储区无效,另外,若存储区的数据保存时间较短,则也可确定该存储区无效,具体地,可将存储区的数据保存时间与预设的时间阈值进行比较,若存储区的数据保存时间大于时间阈值,则可确定该存储区有效,否则确定该存储区无效。需要说明的是,时间阈值与固件的更新周期有关,在具体实施中用户可根据经验设置,本实施例对此不做特异性说明。
本实施例在将初始配置参数写入各存储区之前,先检验各存储区中是否存在无效的存储区,若存在无效的存储区,则先初始化无效的存储区,再将初始配置参数写入各存储区,通过保障各存储区的有效性使得存储于各存储区的初始配置参数的可靠性得到有效保证。
在上述实施例的基础上,在将初始配置参数写入存储区之后,为保证所写入的初始配置参数的准确性,还需要检验所写入的初始配置参数与固件的当前配置参数的一致性。该步骤包括:
回读固件的当前配置参数,并检验固件的当前配置参数与存储于各存储区的初始配置参数是否一致;
若不一致,则初始化各存储区,进入S1;
若多次不一致,则确定初始配置参数写入失败,并进行报警。
具体地,可读取固件的当前配置参数,并将固件的当前配置参数与各存储区中的初始配置参数进行比对,若固件的当前配置参数与存储区中的初始配置参数的数值和顺序均一致, 则可确定固件的当前配置参数与存储区中的初始配置参数一致,否则确定二者不一致。可以理解的是,只有满足固件的当前配置参数与存储区中的初始配置参数一致,才可确定完成保存初始配置参数。在固件的当前配置参数与存储区中的初始配置参数不一致时,需要初始化对应的存储区,重新获取初始配置参数,将重新获取到的初始配置参数写入对应的存储区并再次进行检验;若多次检验后固件的当前配置参数与存储区中的初始配置参数仍不一致,可确定初始配置参数写入失败,此时需要通过报警的方式提醒用户检查固件和各存储区,以找出写入失败的原因。
本实施例将固件的当前配置参数与各存储区中的初始配置参数进行比对以检验二者的一致性,通过检验二者的一致性来保证所写入的初始配置参数的准确性。
在上述实施例的基础上,若存储区中的初始配置参数的版本信息与固件的版本信息一致,为验证各存储区中的初始配置参数的准确性,则在使用初始配置参数恢复配置数据之前,还需要对各存储区中的初始配置参数进行一致性校验。该步骤包括:
检验各存储区中的初始配置参数是否一致;
若不一致,则对各存储区中的初始配置参数进行仲裁,并根据仲裁结果恢复配置数据。
在具体实施中,可通过比对各存储区中的初始配置参数的数值和顺序是否一致来检验各存储区中的初始配置参数是否一致。若各存储区中的初始配置参数的数值和顺序均一致,则可确定各存储区中的初始配置参数一致,否则确定其不一致;若不一致,则可通过现有的仲裁算法对各存储区中的初始配置参数进行仲裁,以根据仲裁结果恢复配置数据,具体地,根据仲裁算法可从各存储区中的初始配置参数中识别有效参数,并可使用所识别的有效参数尝试恢复配置数据。
本实施例通过对各存储区中的初始配置参数进行一致性校验来验证各存储区中的初始配置参数的准确性,在各存储区中的初始配置参数不一致时,对各存储区中的初始配置参数进行仲裁,并根据仲裁结果恢复配置数据,有效提高了配置数据恢复的可能性。
在上述实施例的基础上,当检验得到各存储区中的初始配置参数不全部一致时,则可确定存在无效参数,为便于恢复配置数据,则还需要对无效参数进行处理。该步骤包括:
判断初始配置参数是否均无效;
若非均无效,则从各存储区中剔除无效参数,并将无效参数同步至异常区域,进入S1;
若均无效,则初始化各存储区,并进入S3。
具体地,可通过仲裁算法识别各存储区中初始配置参数中的有效参数,进而可得到初始 配置参数中的无效参数;若初始配置参数均无效,则初始化各存储区,使用固件的默认配置参数恢复配置数据;而若初始配置参数非均无效,则可从各存储区中剔除无效参数,并尝试使用各存储区中的有效参数恢复配置数据,以提高恢复配置数据的可能性,另外,可将无效参数同步至异常区域以提示用户重新输入对应的参数,当用户输入完成后,则获取用户输入的参数并将其与各存储区中的有效参数进行结合,以恢复配置数据。
本实施例在确定存在无效参数后,判断存储区中的初始配置参数是否均无效,在初始配置参数均无效时,使用默认配置参数恢复配置数据,而在初始配置参数非均无效时,剔除无效参数,使用剩下的有效参数尝试恢复配置数据,有效提高了恢复配置数据的可能性,另外,将无效参数同步至异常区域可使得用户获悉无效参数,以提醒用户重新输入对应的参数。
在上述实施例的基础上,为便于追踪,本实施例在获取初始配置参数和将初始配置参数写入存储区时生成时间戳,当检验得知所存储的初始配置参数发生异常时可通过时间戳进行追踪,以找到数据异常的原因。该步骤包括:
在获取初始配置参数和将初始配置参数写入存储区时,生成时间戳;
保存时间戳。
具体地,在获取初始配置参数和将初始配置参数写入存储区时,会生成时间戳,另外,在将初始配置参数存储至存储区后,每次对初始配置参数进行操作都会更新时间戳,通过保存时间戳以便于在初始配置参数发生异常时通过查询时间戳以追踪数据异常的原因。
本实施例在获取初始配置参数和将初始配置参数写入存储区时,生成时间戳并进行保存,当存储于存储区的初始配置参数发生异常时,可通过查询时间戳进行追踪,以便于找到数据异常的原因。
在上述实施例中,对于恢复用户配置数据的方法进行了详细描述,本申请还提供恢复用户配置数据的装置对应的实施例。需要说明的是,本申请从两个角度对装置部分的实施例进行描述,一种是基于功能模块的角度,另一种是基于硬件的角度。
图2为本申请提供的一种恢复用户配置数据的装置的结构图,如图2所示,该装置包括:
获取模块10,用于在固件更新前,获取固件的初始配置参数,并将初始配置参数写入存储区;
调用模块11,用于在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;若有效,则触发比对模块13;若无效,则触发第一恢复模块12;
第一恢复模块12,用于使用固件的默认配置参数恢复配置数据;
比对模块13,用于比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;若一致,则触发第二恢复模块15;若不一致,则触发初始化模块14;
初始化模块14,用于初始化存储区,并触发第一恢复模块12;
第二恢复模块15,用于使用初始配置参数恢复配置数据。
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。
本实施例所提供的恢复用户配置数据的装置,通过获取模块在固件更新前,获取固件的初始配置参数,并将初始配置参数写入存储区;通过调用模块在固件更新后,调用存储区中的初始配置参数,并判断初始配置参数是否有效;若有效,则触发比对模块;若无效,则触发第一恢复模块;通过第一恢复模块使用固件的默认配置参数恢复配置数据;通过比对模块,用于比对存储区中的初始配置参数的版本信息与固件的版本信息是否一致;若一致,则触发第二恢复模块;若不一致,则触发初始化模块;通过初始化模块,用于初始化存储区,并触发第一恢复模块;通过第二恢复模块,用于使用初始配置参数恢复配置数据。可见,该装置在存储区中的初始配置参数的版本信息与固件的版本信息不一致时,配置数据不会恢复为初始配置参数,而是使用默认配置参数恢复配置数据,有效避免了因版本不一致造成数据异常的情况,提高了配置数据的准确性。
图3为本申请提供的另一种恢复用户配置数据的装置的结构图,如图3所示,该装置包括:存储器20,用于存储计算机可读指令;
一个或多个处理器21,用于执行计算机可读指令时实现如上述实施例中所提到的恢复用户配置数据的方法的步骤。
本实施例提供的恢复用户配置数据的装置可以包括但不限于智能手机、平板电脑、笔记本电脑或台式电脑等。
其中,处理器21可以包括一个或多个处理核心,比如四核心处理器、八核心处理器等。处理器21可以采用数字信号处理器(Digital Signal Processor,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器21也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称中央处理器(Central Processing Unit,CPU);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器21可以集成有图像处理器(Graphics Processing Unit, GPU),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器21还可以包括人工智能(Artificial Intelligence,AI)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器20可以包括一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器20还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器20至少用于存储以下计算机可读指令201,其中,该计算机可读指令被处理器21加载并执行之后,能够实现前述任一实施例公开的恢复用户配置数据的方法的相关步骤。另外,存储器20所存储的资源还可以包括操作系统202和数据203等,存储方式可以是短暂存储或者永久存储。其中,操作系统202可以包括Windows、Unix、Linux等。数据203可以包括但不限于初始配置参数等。
在一些实施例中,恢复用户配置数据的装置还可包括有显示屏22、输入输出接口23、通信接口24、电源25以及通信总线26。
本领域技术人员可以理解,图3中示出的结构并不构成对该恢复用户配置数据的装置的限定,可以包括比图示更多或更少的组件。
本实施例提供的恢复用户配置数据的装置,包括存储器和处理器,处理器在执行存储器存储的程序时,能够实现上述恢复用户配置数据的方法,效果同上。
最后,本申请还提供一个或多个存储有计算机可读指令的非易失性计算机可读存储介质对应的实施例。计算机可读存储介质上存储有计算机可读指令,计算机可读指令被处理器执行时实现如上述方法实施例中记载的恢复用户配置数据的方法的步骤。
可以理解的是,如果上述实施例中的方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本实施例所提供的计算机可读存储介质包括上述提到的恢复用户配置数据的方法,效果同上。
以上对本申请所提供的恢复用户配置数据的方法、装置及介质进行了详细介绍。说明书 中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (20)

  1. 一种恢复用户配置数据的方法,其特征在于,包括:
    在固件更新前,获取所述固件的初始配置参数,并将所述初始配置参数写入存储区;
    在所述固件更新后,调用所述存储区中的所述初始配置参数,并判断所述初始配置参数是否有效;
    响应于所述初始配置参数无效,使用所述固件的默认配置参数恢复配置数据;
    响应于所述初始配置参数有效,比对所述存储区中的所述初始配置参数的版本信息与所述固件的版本信息是否一致;
    响应于所述初始配置参数的版本信息与所述固件的版本信息不一致,初始化所述存储区,并进入所述使用所述固件的默认配置参数恢复配置数据的步骤;以及
    响应于所述初始配置参数的版本信息与所述固件的版本信息一致,使用所述初始配置参数恢复所述配置数据。
  2. 根据权利要求1所述的恢复用户配置数据的方法,其特征在于,若所述存储区为多个,则在所述将所述初始配置参数写入存储区之前,还包括:
    检查各所述存储区中是否存在无效的存储区;
    响应于存在无效的存储区,初始化所述无效的存储区,并进入所述将所述初始配置参数写入存储区的步骤;以及
    响应于不存在无效的存储区,则进入所述将所述初始配置参数写入存储区的步骤。
  3. 根据权利要求2所述的恢复用户配置数据的方法,其特征在于,所述检查各所述存储区中是否存在无效的存储区,包括:
    响应于各所述存储区中任一存储区中已预先存储有数据,确定所述任一存储区无效。
  4. 根据权利要求2所述的恢复用户配置数据的方法,其特征在于,所述方法还包括:
    响应于各所述存储区中任一存储区的数据保存时间大于预设的时间阈值,确定所述任一存储区有效。
  5. 根据权利要求4所述的恢复用户配置数据的方法,其特征在于,所述预设的时间阈值根据所述固件的更新周期确定。
  6. 根据权利要求2所述的恢复用户配置数据的方法,其特征在于,在所述将所述初始配置参数写入存储区之后,还包括:
    回读所述固件的当前配置参数,并检验所述固件的当前所述配置参数与存储于各所述存储区的所述初始配置参数是否一致;
    响应于所述固件的当前所述配置参数与存储于各所述存储区的所述初始配置参数不一致,初始化各所述存储区,进入所述将所述初始配置参数写入存储区的步骤;以及
    响应于所述固件的当前所述配置参数与存储于各所述存储区的所述初始配置参数多次不一致,确定所述初始配置参数写入失败,并进行报警。
  7. 根据权利要求6所述的恢复用户配置数据的方法,其特征在于,所述检验所述固件的当前所述配置参数与存储于各所述存储区的所述初始配置参数是否一致,包括:
    将所述固件的当前配置参数与各存储区中的初始配置参数进行比对;以及
    响应于所述固件的当前配置参数与各存储区中的初始配置参数的数值和顺序均一致,确定所述固件的当前配置参数与各存储区中的初始配置参数一致。
  8. 根据权利要求2所述的恢复用户配置数据的方法,其特征在于,响应于所述初始配置参数的版本信息与所述固件的版本信息一致,使用所述初始配置参数恢复所述配置数据之前,还包括:
    检验各所述存储区中的所述初始配置参数是否一致;以及
    响应于各所述存储区中的所述初始配置参数一致,对各所述存储区中的所述初始配置参数进行仲裁,并根据仲裁结果恢复所述配置数据。
  9. 根据权利要求8所述的恢复用户配置数据的方法,其特征在于,所述检验各所述存储区中的所述初始配置参数是否一致,包括:
    比对各存储区中的初始配置参数的数值和顺序是否一致;以及
    响应于各存储区中的初始配置参数的数值和顺序均一致,确定各存储区中的初始配置参数一致。
  10. 根据权利要求8所述的恢复用户配置数据的方法,其特征在于,所述对各所述存储区中的所述初始配置参数进行仲裁,并根据仲裁结果恢复所述配置数据,包括:
    根据仲裁算法从各存储区中的初始配置参数中识别有效参数,并使用所述识别的有效参数恢复配置数据。
  11. 根据权利要求8所述的恢复用户配置数据的方法,其特征在于,所述对各所述存储区中的所述初始配置参数进行仲裁,并根据仲裁结果恢复所述配置数据包括:
    判断所述初始配置参数是否均无效;
    响应于所述初始配置参数非均无效,从各所述存储区中剔除无效参数,并将所述无效参数同步至异常区域,进入所述获取所述固件的初始配置参数的步骤;以及
    响应于所述初始配置参数均无效,初始化各所述存储区,并进入所述使用所述固件的默认配置参数恢复配置数据的步骤。
  12. 根据权利要求11所述的恢复用户配置数据的方法,其特征在于,所述判断所述初始配置参数是否均无效,包括:
    通过仲裁算法识别各存储区中初始配置参数中的有效参数,得到所述初始配置参数中的无效参数;以及
    根据所述初始配置参数中的无效参数判断所述初始配置参数是否均无效。
  13. 根据权利要求11所述的恢复用户配置数据的方法,其特征在于,所述从各所述存储区中剔除无效参数之后,还包括:
    使用所述各存储区中的有效参数恢复配置数据。
  14. 根据权利要求13所述的恢复用户配置数据的方法,其特征在于,所述使用所述各存储区中的有效参数恢复配置数据,包括:
    接收用户输入的参数;以及
    将所述用户输入的参数与所述各存储区中的有效参数进行合并,并采用合并后的参数恢复配置数据。
  15. 根据权利要求1所述的恢复用户配置数据的方法,其特征在于,还包括:
    在获取所述初始配置参数和将所述初始配置参数写入所述存储区时,生成时间戳;以及
    保存所述时间戳。
  16. 根据权利要求15所述的恢复用户配置数据的方法,其特征在于,所述保存所述时间戳之后,还包括:
    当对初始配置参数进行操作时,更新保存的时间戳。
  17. 根据权利要求1所述的恢复用户配置数据的方法,其特征在于,所述判断初始配置参数是否有效,包括:
    根据存储区的数据保存时间和时间戳判断所述初始配置参数是否有效,其中每一次对初始配置参数进行操作时生成所述时间戳。
  18. 一种恢复用户配置数据的装置,其特征在于,包括:
    获取模块,用于在固件更新前,获取所述固件的初始配置参数,并将所述初始配置参数写入存储区;
    调用模块,用于在所述固件更新后,调用所述存储区中的所述初始配置参数,并判断所述初始配置参数是否有效;响应于所述初始配置参数有效,触发比对模块;响应于 所述初始配置参数无效,触发第一恢复模块;
    所述第一恢复模块,用于使用所述固件的默认配置参数恢复配置数据;
    所述比对模块,用于比对所述存储区中的所述初始配置参数的版本信息与所述固件的版本信息是否一致;响应于所述初始配置参数的版本信息与所述固件的版本信息不一致,触发第二恢复模块;响应于所述初始配置参数的版本信息与所述固件的版本信息一致,触发初始化模块;
    所述初始化模块,用于初始化所述存储区,并触发所述第一恢复模块;以及
    所述第二恢复模块,用于使用所述初始配置参数恢复所述配置数据。
  19. 一种恢复用户配置数据的装置,其特征在于,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-17任意一项所述的方法的步骤。
  20. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-17任意一项所述的方法的步骤。
PCT/CN2022/119061 2022-04-28 2022-09-15 一种恢复用户配置数据的方法、装置及介质 WO2023206926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210460944.1A CN114816852A (zh) 2022-04-28 2022-04-28 一种恢复用户配置数据的方法、装置及介质
CN202210460944.1 2022-04-28

Publications (1)

Publication Number Publication Date
WO2023206926A1 true WO2023206926A1 (zh) 2023-11-02

Family

ID=82509117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/119061 WO2023206926A1 (zh) 2022-04-28 2022-09-15 一种恢复用户配置数据的方法、装置及介质

Country Status (2)

Country Link
CN (1) CN114816852A (zh)
WO (1) WO2023206926A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816852A (zh) * 2022-04-28 2022-07-29 苏州浪潮智能科技有限公司 一种恢复用户配置数据的方法、装置及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667131A (zh) * 2009-10-14 2010-03-10 中兴通讯股份有限公司 移动终端及其配置信息的更新方法
CN103064712A (zh) * 2012-12-28 2013-04-24 深圳市共进电子股份有限公司 一种更新配置参数的方法、装置及终端设备
US20130262849A1 (en) * 2012-03-29 2013-10-03 Bheeshmar Redheendran Automatic reconfiguration of initialization firmware in a computer system
CN114816852A (zh) * 2022-04-28 2022-07-29 苏州浪潮智能科技有限公司 一种恢复用户配置数据的方法、装置及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667131A (zh) * 2009-10-14 2010-03-10 中兴通讯股份有限公司 移动终端及其配置信息的更新方法
US20130262849A1 (en) * 2012-03-29 2013-10-03 Bheeshmar Redheendran Automatic reconfiguration of initialization firmware in a computer system
CN103064712A (zh) * 2012-12-28 2013-04-24 深圳市共进电子股份有限公司 一种更新配置参数的方法、装置及终端设备
CN114816852A (zh) * 2022-04-28 2022-07-29 苏州浪潮智能科技有限公司 一种恢复用户配置数据的方法、装置及介质

Also Published As

Publication number Publication date
CN114816852A (zh) 2022-07-29

Similar Documents

Publication Publication Date Title
CN107122321B (zh) 硬件修复方法、硬件修复系统以及计算机可读取存储装置
US8468389B2 (en) Firmware recovery system and method of baseboard management controller of computing device
US20220391103A1 (en) Memory anomaly processing method and system, electronic device, and storage medium
US11604711B2 (en) Error recovery method and apparatus
US10540524B2 (en) Memory access protection using processor transactional memory support
WO2021072880A1 (zh) 虚拟机内部快照异步创建方法、装置、系统及存储介质
WO2023206926A1 (zh) 一种恢复用户配置数据的方法、装置及介质
CN111581154A (zh) 用于管理数据库的电子设备和方法
CN111913836B (zh) 固态硬盘低功耗模式数据恢复方法、装置、计算机设备及存储介质
CN113672306B (zh) 服务器组件自检异常恢复方法、装置、系统及介质
WO2020211233A1 (zh) 批量数据编辑方法、装置、计算机设备及存储介质
CN109324765A (zh) 一种磁盘状态检测方法、装置、设备及存储介质
US11150831B2 (en) Virtual machine synchronization and recovery
US20190004903A1 (en) Data Restoration Method and Apparatus, and Terminal
CN114461341A (zh) 一种云平台虚拟机防脑裂方法、装置及介质
CN114722927A (zh) 一种崩溃聚类方法、装置、电子设备以及存储介质
CN114884836A (zh) 一种虚拟机高可用方法、装置及介质
WO2019169615A1 (zh) 访问指令sram的方法和电子设备
US10599412B2 (en) Operating system installation on a computing device with multiple redundant drives
WO2019144555A1 (zh) 容灾数据的在线同步装置、方法及计算机可读存储介质
CN110837433A (zh) 性能优化方法、装置及电子设备
CN111258805B (zh) 一种服务器的硬盘状态监控方法、设备和计算机设备
CN117492799A (zh) 一种软件升级方法、装置、终端设备及存储介质
CN114721871A (zh) 数据备份方法、装置及电子设备
CN115061728A (zh) 信息传输方法、装置、设备、存储介质和程序产品

Legal Events

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

Ref document number: 22939750

Country of ref document: EP

Kind code of ref document: A1