Configuration parameter resetting method, device, equipment, medium and product
By using markers to recover the configuration parameters of the system by using markers to recover the first configuration file and incremental configuration files obtained from the configuration file library during parameter reset, the problem of data loss and user wishes in the prior art is solved, and parameter incremental reset and data retention are realized.
Patent Information
- Application Number
- CN202411868484.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-25
AI Technical Summary
When the parameters are reset, the prior art will restore all the parameters to the factory default value or the default value set for the first time, resulting in the loss of accumulated data and against user wishes.
By performing corresponding configuration parameter recovery operations on the reset system based on the marker, the parameter incremental reset is realized and the subsequent parameter configuration configuration configuration for the system is retained.
It realizes that the subsequent parameter configuration of the system is retained during parameter reset to avoid accumulated data loss and meet different reset needs of users.
Smart Images

Figure CN119690751A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of parameter resetting, and in particular to a configuration parameter resetting method, device, equipment, medium and product. Background Art
[0002] In the embedded field, configuring system functions by loading parameters has become the mainstream of system applications, aiming to improve the versatility of software. With the emergence of this model, more and more application scenarios have put forward higher requirements for the stability and reliability of the system. During the operation of embedded systems, due to various reasons (such as software errors, hardware failures, etc.), system parameters may deviate from the normal range, resulting in system performance degradation or even failure. There are also requirements for users to trigger the restoration of specified parameters under certain specified conditions. The existing parameter reset method usually performs a comprehensive reset of the system to restore all system parameters to the factory default values or the default values set for the first time. Although this method can solve most problems, it also brings about the problem of accumulated data loss during system operation and violation of user wishes.
[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: when resetting parameters, all parameters will be restored to the factory default values or the default values set for the first time, resulting in the problem of accumulated data loss and violation of user wishes. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a configuration parameter reset method, device, equipment, medium and product, which can use the first configuration file and incremental configuration file obtained from the configuration file library based on the tag to perform corresponding configuration parameter recovery operations on the reset system, thereby retaining the subsequent parameter configurations made to the system based on the parameter incremental reset, and meeting the different reset requirements of users. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a configuration parameter resetting method, comprising:
[0006] Acquire a reset request initiated for a first configuration file in a preset configuration file library; the reset request includes a target tag corresponding to the first configuration file;
[0007] Based on the target mark, the first configuration file and each second configuration file are obtained from the preset configuration file library; each configuration file in the preset configuration file library is provided with a corresponding mark, and the second configuration file is an incremental configuration file whose mark setting time is later than the target mark;
[0008] Based on the first configuration file and each of the second configuration files, a corresponding configuration parameter recovery operation is performed on the target system to be reset.
[0009] Optionally, the obtaining a reset request initiated for a first configuration file in a preset configuration file library includes:
[0010] Based on the current running state of the target system, determining a first configuration file required for resetting the configuration parameters from a preset configuration file library, and obtaining a reset request initiated for the first configuration file;
[0011] Or, a reset request initiated for the first configuration file in the preset configuration file library is obtained through a preset external reset interface.
[0012] Optionally, the configuration parameter resetting method further includes:
[0013] When storing any configuration file into the preset configuration file library, obtaining a tag corresponding to the any configuration file;
[0014] Using the acquired mark of any of the configuration files, setting a mark for any of the configuration files in the preset configuration file library;
[0015] Wherein, any one of the configuration files is an initial complete configuration file of the target system or an incremental configuration file corresponding to the initial complete configuration file.
[0016] Optionally, the first configuration file is the initial complete configuration file or any incremental configuration file corresponding to the initial complete configuration file.
[0017] Optionally, performing corresponding configuration parameter recovery operations on the target system to be reset based on the first configuration file and each of the second configuration files includes:
[0018] According to the order of the mark setting time from the latest to the earliest, the first configuration file and each of the second configuration files are used in sequence to perform corresponding configuration parameter recovery operations on the target system to be reset.
[0019] Optionally, the configuration parameter resetting method further includes:
[0020] Acquire incremental configuration information corresponding to the parameter incremental configuration event of the target system;
[0021] The preset configuration file library is updated based on the remaining storage space of the target system and the incremental configuration information.
[0022] Optionally, the updating the preset configuration file library based on the remaining storage space of the target system and the incremental configuration information includes:
[0023] If the remaining storage space is insufficient, determining a target incremental configuration file from each incremental configuration file in the current preset configuration file library, and updating the target incremental configuration file based on the incremental configuration information;
[0024] If the remaining storage space is sufficient, a new incremental configuration file is generated based on the incremental configuration information, and the new incremental configuration file is stored in the preset configuration file library.
[0025] Optionally, determining the target incremental configuration file from the incremental configuration files in the current preset configuration file library includes:
[0026] The incremental configuration file whose mark setting time is closest to the current time among the incremental configuration files is determined as the target incremental configuration file.
[0027] In a second aspect, the present application provides a configuration parameter resetting device, comprising:
[0028] A reset request acquisition module, used to acquire a reset request initiated for a first configuration file in a preset configuration file library; the reset request includes a target tag corresponding to the first configuration file;
[0029] a configuration file acquisition module, configured to acquire the first configuration file and each second configuration file from the preset configuration file library based on the target mark; each configuration file in the preset configuration file library is provided with a corresponding mark, and the second configuration file is an incremental configuration file whose mark setting time is later than the target mark;
[0030] The configuration parameter recovery module is used to perform corresponding configuration parameter recovery operations on the target system to be reset based on the first configuration file and each of the second configuration files.
[0031] In a third aspect, the present application provides an electronic device, including:
[0032] Memory, used to store computer programs;
[0033] A processor is used to execute the computer program to implement the aforementioned configuration parameter resetting method.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned configuration parameter resetting method when executed by a processor.
[0035] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the aforementioned configuration parameter resetting method when executed by a processor.
[0036] In the present application, a reset request initiated for a first configuration file in a preset configuration file library is obtained; the reset request includes a target tag corresponding to the first configuration file; the first configuration file and each second configuration file are obtained from the preset configuration file library based on the target tag; each configuration file in the preset configuration file library is provided with a corresponding tag, and the second configuration file is an incremental configuration file with a tag setting time later than the target tag; based on the first configuration file and each second configuration file, a corresponding configuration parameter recovery operation is performed on the target system to be reset.
[0037] It can be seen that when the present application obtains a reset request, it obtains the first configuration file corresponding to the target tag included in the reset request from the preset configuration file library, and obtains the incremental configuration file whose tag setting time is later than the target tag from the preset configuration file library, and uses the first configuration file and the incremental configuration file to perform corresponding configuration parameter recovery operations on the system to be reset, thereby realizing incremental reset of the parameters of the system to be reset. Compared with directly restoring the parameters of the system to be reset to the factory default values or the default values set for the first time, the present application can retain the subsequent parameter configurations made to the system by using the incremental configuration file whose tag setting time is later than the target tag, thereby avoiding the loss of accumulated data and meeting the different reset requirements of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 A flow chart of a configuration parameter resetting method disclosed in this application;
[0040] Figure 2 A specific configuration parameter reset flow chart disclosed in this application;
[0041] Figure 3 This is a schematic diagram of the structure of a configuration parameter resetting device disclosed in this application;
[0042] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: when resetting parameters, all parameters will be restored to the default values at the factory or the default values set for the first time, which will lead to the problem of accumulated data loss and violation of user's wishes. To this end, the present application provides a configuration parameter reset method, which performs corresponding configuration parameter recovery operations on the reset system by using the first configuration file and the incremental configuration file obtained from the configuration file library based on the tag, thereby retaining the subsequent parameter configurations made to the system based on the incremental parameter reset, and meeting the different reset requirements of users.
[0045] See also Figure 1 As shown, an embodiment of the present invention discloses a configuration parameter resetting method, including:
[0046] Step S11: obtaining a reset request initiated for a first configuration file in a preset configuration file library; the reset request includes a target tag corresponding to the first configuration file.
[0047] In this embodiment, during the operation of the target system, a reset request initiated for the first configuration file in the preset configuration file library is obtained by the target system. Since each configuration file in the preset configuration file library is set with a corresponding tag, the reset request may include a target tag corresponding to the first configuration file.
[0048] It should be noted that the application subject of the configuration parameter reset method proposed in this embodiment is the target system, and the target system can be a computer system, such as an embedded system; and a parameter management system can also be pre-configured in the target system to respond to the reset request through the parameter management system to complete the configuration parameter reset of the target system.
[0049] For the reset request, in a specific implementation, based on the current running state of the target system, a first configuration file required for resetting the configuration parameters is determined from a preset configuration file library, and a reset request initiated for the first configuration file is obtained.
[0050] Specifically, when the target system meets the preset reset conditions, the parameters to be reset are determined based on the current operating state of the target system, and the first configuration file whose mark setting time is closest to the current time and contains the parameters to be reset is determined from the preset configuration file library, and then a reset request initiated for the first configuration file is obtained.
[0051] The preset reset condition may be that the current operating state of the target system is abnormal, or that the current operating state of the target system is normal but some parameters are offset. That is, when the current operating state of the target system is abnormal, the parameters to be reset are determined based on the parameters that cause the abnormality of the target system; and when the current operating state of the target system is normal but some parameters are offset, the parameters to be reset are determined based on the offset parameters.
[0052] For example, the preset configuration file library includes three configuration files, the first configuration file configures the A parameter to 10, the second configuration file configures the B parameter to 10, and the third configuration file configures the A parameter to 20, and the mark setting time corresponding to the first configuration file is earlier than the mark setting time corresponding to the second configuration file, and the mark setting time corresponding to the second configuration file is earlier than the mark setting time corresponding to the third configuration file. At this time, if the parameter to be reset determined based on the current running state of the target system is the A parameter, then the first configuration file determined from the preset configuration file library, whose mark setting time is closest to the current time and contains the A parameter, is the third configuration file.
[0053] For the reset request, in another specific implementation, a reset request initiated for the first configuration file in the preset configuration file library is obtained through a preset external reset interface. It can be understood that the target system provides a reset interface externally so as to obtain the reset request initiated for the first configuration file in the preset configuration file library submitted by the user through the external reset interface. In this way, this embodiment obtains the reset request submitted by the user through the external reset interface. The reset request is initiated for the configuration file that the user wants to reset, and the reset request contains the target tag corresponding to the configuration file that the user wants to reset. Therefore, the different reset requirements of the user can be met through the external reset interface.
[0054] Step S12: acquiring the first configuration file and each second configuration file from the preset configuration file library based on the target mark; each configuration file in the preset configuration file library is provided with a corresponding mark, and the second configuration file is an incremental configuration file whose mark setting time is later than the target mark.
[0055] In this embodiment, since each configuration file in the preset configuration file library is set with a corresponding tag, after obtaining the reset request initiated for the first configuration file in the preset configuration file library, the reset request is parsed to obtain the target tag corresponding to the first configuration file, and then the first configuration file corresponding to the target tag is obtained from the preset configuration file library, and the incremental configuration file whose tag setting time is later than the target tag is obtained from the preset configuration file library as the second configuration file. It should be noted that the number of the second configuration files may be zero, one, or more than one.
[0056] For example, the preset configuration file library includes three configuration files, and the mark setting time corresponding to the first configuration file is earlier than the mark setting time corresponding to the second configuration file, and the mark setting time corresponding to the second configuration file is earlier than the mark setting time corresponding to the third configuration file. At this time, if the target mark is the mark corresponding to the second configuration file, the first configuration file is the second configuration file, and the second configuration file is the third configuration file whose mark setting time is later than the target mark. If the target mark is the mark corresponding to the third configuration file, the first configuration file is the third configuration file, and the second configuration file does not exist at this time.
[0057] As for the setting of the mark of each configuration file in the preset configuration file library, specifically, when storing any configuration file in the preset configuration file library, the mark corresponding to any configuration file is obtained, and the mark of any configuration file stored in the preset configuration file library is used to set the mark.
[0058] Among them, any configuration file is the initial complete configuration file of the target system or the incremental configuration file corresponding to the initial complete configuration file. The initial complete configuration file is the configuration file that supports the initial startup of the target system, that is, the parameters in the initial complete configuration file can be used as the most basic configuration of the target system; and the incremental configuration file is a file determined based on the initial complete configuration file based on secondary development or defined parameter incremental configuration information. In this way, through secondary development or defined parameter incremental configuration information, not only can the target system be applied to more application scenarios and expand the application surface of the target system, but also the configuration parameters can be expanded to enhance the extensibility of the target system.
[0059] It should be noted that the first configuration file corresponding to the target mark in the preset configuration file library can be either the initial complete configuration file or any incremental configuration file corresponding to the initial complete configuration file; but the second configuration file can only be an incremental configuration file in the preset configuration file library whose mark setting time is later than the target mark.
[0060] Furthermore, the mark mentioned in this embodiment is used to identify each configuration file in the preset configuration file library, that is, different configuration files in the preset configuration file library correspond to different marks. However, the form of the mark includes but is not limited to first-level, second-level, third-level..., or first-class, second-class, third-class..., or 1, 2, 3..., or I, II, III..., etc., as long as each configuration file in the preset configuration file library can be identified.
[0061] Furthermore, when any configuration file is stored in the preset configuration file library, for obtaining a tag corresponding to any configuration file, in a specific implementation, the tag corresponding to any configuration file can be obtained based on the time sequence in which any configuration file is stored in the preset configuration file library.
[0062] For example, two configuration files are stored in the preset configuration file library. When any configuration file is stored in the preset configuration file library, it is determined that the time sequence of storing any configuration file in the preset configuration file library is the third one, and then based on the time sequence (the third one) of storing any configuration file in the preset configuration file library, the tag corresponding to any configuration file is obtained.
[0063] When storing any configuration file in the preset configuration file library, for obtaining a tag corresponding to any configuration file, in another specific implementation, the tag corresponding to any configuration file can be obtained based on the total number of configuration files stored in the preset configuration file library.
[0064] For example, two configuration files are stored in the preset configuration file library. When any configuration file is stored in the preset configuration file library, it is determined that the total number of configuration files stored in the preset configuration file library is two, and then based on the total number of configuration files stored in the preset configuration file library (two), a tag corresponding to any configuration file is obtained.
[0065] Step S13: Based on the first configuration file and each of the second configuration files, a corresponding configuration parameter recovery operation is performed on the target system to be reset.
[0066] In this embodiment, after obtaining a first configuration file corresponding to the target mark and a second configuration file whose mark setting time is later than the target mark from a preset configuration file library, the first configuration file and each second configuration file are used to perform corresponding configuration parameter recovery operations on the target system to be reset, thereby resetting the configuration parameters of the target system.
[0067] Specifically, the first configuration file and each second configuration file are used to perform corresponding configuration parameter recovery operations on the target system to be reset one by one, until each configuration file in the first configuration file and each second configuration file has performed the configuration parameter recovery operation on the target system, thereby realizing the incremental reset of the parameters of the target system. In this way, not only can the subsequent parameter configurations made to the target system be retained to avoid the loss of accumulated data, but also the reset requirements of the user can be better met.
[0068] In a first specific implementation manner, the first configuration file and each second configuration file are used in sequence according to the mark setting time from the latest to the earliest to perform the corresponding configuration parameter recovery operation on the target system to be reset.
[0069] Specifically, the current configuration file is determined from the first configuration file and each second configuration file in order of the mark setting time from the latest to the earliest, so as to perform the corresponding configuration parameter recovery operation on the target system to be reset using the current configuration file.
[0070] For example, there are two second configuration files, recorded as configuration file A and configuration file B, and the mark setting time corresponding to the first configuration file is earlier than the mark setting time corresponding to configuration file A, and the mark setting time corresponding to configuration file A is earlier than the mark setting time corresponding to configuration file B. At this time, the configuration file B is first used to perform the corresponding configuration parameter recovery operation on the target system to be reset, and then the configuration file A is used to perform the corresponding configuration parameter recovery operation on the target system to be reset, and finally the configuration parameter recovery operation is performed on the target system to be reset using the first configuration file.
[0071] It should be noted that the first specific implementation method does not limit whether there is configuration information for repeated parameters in the first configuration file and each second configuration file; that is, regardless of whether there is configuration information for repeated parameters in the first configuration file and each second configuration file, or whether there is no configuration information for repeated parameters, the first specific implementation method can be used to implement incremental reset of parameters of the target system to be reset.
[0072] For example, there are two second configuration files, recorded as configuration file A and configuration file B. If the first configuration file configures parameter A to 10, configuration file A configures parameter B to 10, and configuration file B configures both parameter A and parameter C to 20, since both the first configuration file and configuration file B contain configuration information for parameter A, configuration information for duplicate parameters exists in the first configuration file and each second configuration file.
[0073] For example, there are two second configuration files, recorded as configuration file A and configuration file B. If the first configuration file configures parameter A to 10, configuration file A configures parameter B to 10, and configuration file B configures parameter C to 20, since the configuration information contained in the first configuration file, configuration file A and configuration file B are for different parameters, there is no configuration information for repeated parameters in the first configuration file and each second configuration file.
[0074] In a second specific implementation, if there is no configuration information for repeated parameters in the first configuration file and each second configuration file, corresponding configuration parameter recovery operations may be performed on the target system to be reset based on the first configuration file and each second configuration file in any order.
[0075] For any sequence, in one case, the first configuration file and each second configuration file can be used in turn in the order of the mark setting time from the earliest to the latest to perform the corresponding configuration parameter recovery operation on the target system to be reset. In another case, the corresponding configuration parameter recovery operation can be performed randomly and non-repetitively on the target system to be reset based on the first configuration file and each second configuration file. Of course, there are other ways, as long as the first configuration file and each second configuration file have performed the configuration parameter recovery operation on the target system.
[0076] In a third specific implementation, if the first configuration file and a part of the second configuration files have configuration information for repeated parameters, and the other part of the configuration files do not have configuration information for repeated parameters, the first specific implementation can be adopted for a part of the configuration files, and the second specific implementation can be adopted for the other part of the configuration files, thereby realizing the configuration parameter recovery operation of the target system to be reset based on the first configuration file and the second configuration files.
[0077] For example, there are three second configuration files, denoted as configuration file A, configuration file B and configuration file C. If the first configuration file configures parameter A to 10, configuration file A configures parameter B to 10, configuration file B configures both parameter A and parameter C to 20, and configuration file C configures parameter D to 30; since both the first configuration file and configuration file B contain configuration information for parameter A, the first configuration file and configuration file B are used in sequence according to the mark setting time from late to early to perform corresponding configuration parameter recovery operations on the target system to be reset; and for configuration files A and C, the corresponding configuration parameter recovery operations can be performed on the target system to be reset in any order.
[0078] In this embodiment, during the operation of the target system, the preset configuration file library is not fixed and may be updated. Specifically, the incremental configuration information corresponding to the parameter incremental configuration event of the target system is obtained, and then the preset configuration file library is updated based on the remaining storage space and incremental configuration information of the target system. Among them, the parameter incremental configuration event may include obtaining the incremental configuration information input by the user through the preset parameter configuration interface, and may also include monitoring the occurrence of parameter incremental configuration of the target system, etc.
[0079] Specifically, after obtaining the incremental configuration information corresponding to the parameter incremental configuration event of the target system, if the remaining storage space of the target system is insufficient, the target incremental configuration file is determined from the incremental configuration files of the current preset configuration file library, and the target incremental configuration file is updated based on the incremental configuration information. If the remaining storage space of the target system is sufficient, a new incremental configuration file is generated based on the incremental configuration information, and the new incremental configuration file is stored in the preset configuration file library.
[0080] Among them, as to whether the remaining storage space of the target system is sufficient, it can be determined by judging whether the remaining storage space of the target system is less than the preset storage space. If the remaining storage space of the target system is less than the preset storage space, it is determined that the remaining storage space of the target system is insufficient; if the remaining storage space of the target system is greater than or equal to the preset storage space, it is determined that the remaining storage space of the target system is sufficient.
[0081] As for the target incremental profile, the incremental profile whose mark setting time is closest to the current time among the incremental profiles in the current preset profile library can be determined as the target incremental profile. It can be understood that the incremental profile whose mark setting time is closest to the current time is searched from the incremental profiles in the current preset profile library, and the found incremental profile is determined as the target incremental profile.
[0082] It should be noted that the storage space required to store the new incremental configuration file generated based on the incremental configuration information in the preset configuration file library is larger than the storage space required to update the target incremental configuration file in the preset configuration file library based on the incremental configuration information. Therefore, when the remaining storage space of the target system is insufficient, in order to save storage space, it is more suitable to update the target incremental configuration file in the preset configuration file library based on the incremental configuration information, that is, to add attribute definitions to the target incremental configuration file based on the incremental configuration information. When the remaining storage space of the target system is sufficient, in order to independently save the incremental configuration information each time and facilitate flexible application and recovery according to reset requirements, it is more suitable to generate a new incremental configuration file based on the incremental configuration information and store the new incremental configuration file in the preset configuration file library.
[0083] Furthermore, after acquiring the incremental configuration information corresponding to the incremental configuration event of the target system, this embodiment also needs to apply the incremental configuration information. Specifically, the incremental configuration information is loaded by the target system and the application logic corresponding to the incremental configuration information is executed, thereby realizing the application of the incremental configuration information.
[0084] It can be seen that when the present application obtains a reset request, it obtains the first configuration file corresponding to the target tag included in the reset request from the preset configuration file library, and obtains the incremental configuration file whose tag setting time is later than the target tag from the preset configuration file library, and uses the first configuration file and the incremental configuration file to perform corresponding configuration parameter recovery operations on the system to be reset, thereby realizing incremental reset of the parameters of the system to be reset. Compared with directly restoring the parameters of the system to be reset to the factory default values or the default values set for the first time, the present application can retain the subsequent parameter configurations made to the system by using the incremental configuration file whose tag setting time is later than the target tag, thereby avoiding the loss of accumulated data and meeting the different reset requirements of users.
[0085] See also Figure 2 As shown, taking the target system as an embedded system, and the embedded system including a parameter management system and application software as an example, the configuration parameter reset method of the present application is described in detail, and the specific scheme is as follows:
[0086] During the operation of the target system, a reset request initiated for the first configuration file in the preset configuration file library is obtained through the application software, and the reset request is sent to the parameter management system. After receiving the reset request, the parameter management system parses the reset request to obtain the target tag corresponding to the first configuration file; since each configuration file in the preset configuration file library is set with a corresponding tag, the first configuration file corresponding to the target tag can be obtained from the preset configuration file library, and the second configuration file whose tag setting time is later than the target tag can be obtained.
[0087] The first configuration file is an initial complete configuration file of the target system or any incremental configuration file corresponding to the initial complete configuration file; the second configuration file is an incremental configuration file corresponding to the initial complete configuration file.
[0088] After obtaining the first configuration file and each second configuration file, the parameter incremental management subsystem is called by the parameter management system to perform parameter incremental reset. Specifically, the first configuration file and each second configuration file are used in sequence according to the order of the mark setting time from late to early, and the corresponding configuration parameter recovery operations are performed on the target system to be reset, thereby realizing the parameter incremental reset of the target system.
[0089] Furthermore, if incremental configuration information corresponding to the incremental parameter configuration event of the target system is obtained during the operation of the target system, the incremental parameter management subsystem is called through the parameter management system to execute the incremental parameter application, specifically, the preset configuration file library is updated based on the remaining storage space of the target system and the incremental configuration information, and the application logic corresponding to the incremental configuration information is executed through the application software, thereby realizing the incremental application of parameters to the target system.
[0090] It can be seen that when the present application obtains a reset request, it obtains the first configuration file corresponding to the target tag included in the reset request from the preset configuration file library, and obtains the incremental configuration file whose tag setting time is later than the target tag from the preset configuration file library, and uses the first configuration file and the incremental configuration file to perform corresponding configuration parameter recovery operations on the system to be reset, thereby realizing incremental reset of the parameters of the system to be reset. Compared with directly restoring the parameters of the system to be reset to the factory default values or the default values set for the first time, the present application can retain the subsequent parameter configurations made to the system by using the incremental configuration file whose tag setting time is later than the target tag, thereby avoiding the loss of accumulated data and meeting the different reset requirements of users.
[0091] See also Figure 3 As shown, an embodiment of the present invention discloses a configuration parameter resetting device, comprising:
[0092] A reset request acquisition module 11 is used to acquire a reset request initiated for a first configuration file in a preset configuration file library; the reset request includes a target tag corresponding to the first configuration file;
[0093] A configuration file acquisition module 12 is used to acquire the first configuration file and each second configuration file from the preset configuration file library based on the target mark; each configuration file in the preset configuration file library is provided with a corresponding mark, and the second configuration file is an incremental configuration file whose mark setting time is later than the target mark;
[0094] The configuration parameter recovery module 13 is used to perform corresponding configuration parameter recovery operations on the target system to be reset based on the first configuration file and each of the second configuration files.
[0095] It can be seen that when the present application obtains a reset request, it obtains the first configuration file corresponding to the target tag included in the reset request from the preset configuration file library, and obtains the incremental configuration file whose tag setting time is later than the target tag from the preset configuration file library, and uses the first configuration file and the incremental configuration file to perform corresponding configuration parameter recovery operations on the system to be reset, thereby realizing incremental reset of the parameters of the system to be reset. Compared with directly restoring the parameters of the system to be reset to the factory default values or the default values set for the first time, the present application can retain the subsequent parameter configurations made to the system by using the incremental configuration file whose tag setting time is later than the target tag, thereby avoiding the loss of accumulated data and meeting the different reset requirements of users.
[0096] In some specific embodiments, the reset request acquisition module 11 includes:
[0097] A first request acquisition unit, configured to determine, based on the current running state of the target system, a first configuration file required for resetting the configuration parameters from a preset configuration file library, and acquire a reset request initiated for the first configuration file;
[0098] The second request obtaining unit is configured to obtain a reset request initiated for a first configuration file in a preset configuration file library through a preset external reset interface.
[0099] In some specific embodiments, the configuration parameter resetting device further includes:
[0100] a tag acquisition unit, configured to acquire a tag corresponding to any configuration file when storing any configuration file in the preset configuration file library;
[0101] a tag setting unit, configured to set a tag for any of the configuration files in the preset configuration file library by using the tag of the any of the configuration files obtained;
[0102] Wherein, any one of the configuration files is an initial complete configuration file of the target system or an incremental configuration file corresponding to the initial complete configuration file.
[0103] In some specific embodiments, the first configuration file is the initial complete configuration file or any incremental configuration file corresponding to the initial complete configuration file.
[0104] In some specific embodiments, the configuration parameter recovery module 13 includes:
[0105] The configuration parameter recovery unit is used to perform corresponding configuration parameter recovery operations on the target system to be reset by using the first configuration file and each of the second configuration files in sequence according to the mark setting time from the latest to the earliest.
[0106] In some specific embodiments, the configuration parameter resetting device further includes:
[0107] An incremental information acquisition unit, used to acquire incremental configuration information corresponding to the parameter incremental configuration event of the target system;
[0108] The updating submodule is used to update the preset configuration file library based on the remaining storage space of the target system and the incremental configuration information.
[0109] In some specific embodiments, the updating submodule includes:
[0110] a configuration file updating unit, configured to determine a target incremental configuration file from each incremental configuration file in the current preset configuration file library if the remaining storage space is insufficient, and update the target incremental configuration file based on the incremental configuration information;
[0111] The configuration file generating unit is configured to generate a new incremental configuration file based on the incremental configuration information if the remaining storage space is sufficient, and store the new incremental configuration file in the preset configuration file library.
[0112] In some specific embodiments, the configuration file updating unit includes:
[0113] The target file determining unit is configured to determine the incremental configuration file whose mark setting time is closest to the current time among the incremental configuration files as the target incremental configuration file.
[0114] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0115] Figure 4 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the configuration parameter reset method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0116] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0117] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0118] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the configuration parameter reset method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0119] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the configuration parameter reset method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0120] Furthermore, the present application also discloses a computer program product, including a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the configuration parameter reset method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0121] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0122] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0123] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0124] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0125] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A configuration parameter reset method, characterized in that: include: Obtaining a reset request initiated for a first configuration file in a preset configuration file library; The reset request includes a target tag corresponding to the first configuration file; Based on the target mark, the first configuration file and each second configuration file are obtained from the preset configuration file library; each configuration file in the preset configuration file library is provided with a corresponding mark, and the second configuration file is an incremental configuration file whose mark setting time is later than the target mark; Based on the first configuration file and each of the second configuration files, a corresponding configuration parameter recovery operation is performed on the target system to be reset.
2. The configuration parameter resetting method according to claim 1, characterized in that: The obtaining of a reset request initiated for a first configuration file in a preset configuration file library includes: Based on the current running state of the target system, determining a first configuration file required for resetting the configuration parameters from a preset configuration file library, and obtaining a reset request initiated for the first configuration file; Or, a reset request initiated for the first configuration file in the preset configuration file library is obtained through a preset external reset interface.
3. The configuration parameter resetting method according to claim 1, characterized in that: Also includes: When storing any configuration file into the preset configuration file library, obtaining a tag corresponding to the any configuration file; Using the acquired mark of any of the configuration files, setting a mark for any of the configuration files in the preset configuration file library; Wherein, any one of the configuration files is an initial complete configuration file of the target system or an incremental configuration file corresponding to the initial complete configuration file.
4. The configuration parameter resetting method according to claim 3, characterized in that: The first configuration file is the initial complete configuration file or any incremental configuration file corresponding to the initial complete configuration file.
5. The configuration parameter resetting method according to claim 1, characterized in that: The performing corresponding configuration parameter recovery operations on the target system to be reset based on the first configuration file and each of the second configuration files includes: According to the order of the mark setting time from the latest to the earliest, the first configuration file and each of the second configuration files are used in sequence to perform corresponding configuration parameter recovery operations on the target system to be reset.
6. The configuration parameter resetting method according to any one of claims 1 to 5, characterized in that: Also includes: Acquire incremental configuration information corresponding to the parameter incremental configuration event of the target system; The preset configuration file library is updated based on the remaining storage space of the target system and the incremental configuration information.
7. The configuration parameter resetting method according to claim 6, characterized in that: The updating of the preset configuration file library based on the remaining storage space of the target system and the incremental configuration information includes: If the remaining storage space is insufficient, determining a target incremental configuration file from each incremental configuration file in the current preset configuration file library, and updating the target incremental configuration file based on the incremental configuration information; If the remaining storage space is sufficient, a new incremental configuration file is generated based on the incremental configuration information, and the new incremental configuration file is stored in the preset configuration file library.
8. The configuration parameter resetting method according to claim 7, characterized in that: The step of determining a target incremental configuration file from the incremental configuration files in the current preset configuration file library includes: The incremental configuration file whose mark setting time is closest to the current time among the incremental configuration files is determined as the target incremental configuration file.
9. A configuration parameter resetting device, characterized in that: include: A reset request acquisition module, used to acquire a reset request initiated for a first configuration file in a preset configuration file library; the reset request includes a target tag corresponding to the first configuration file; a configuration file acquisition module, configured to acquire the first configuration file and each second configuration file from the preset configuration file library based on the target mark; each configuration file in the preset configuration file library is provided with a corresponding mark, and the second configuration file is an incremental configuration file whose mark setting time is later than the target mark; The configuration parameter recovery module is used to perform corresponding configuration parameter recovery operations on the target system to be reset based on the first configuration file and each of the second configuration files.
10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the configuration parameter resetting method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the configuration parameter resetting method according to any one of claims 1 to 8.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the configuration parameter resetting method according to any one of claims 1 to 8 is implemented.