File updating method and device, storage medium and program product

By comparing the contents of BMC configuration files and standard file, and automatically updating the configuration files, the problem of poor real-time recovery of configuration files in the prior art is solved, and the stability and update efficiency of management functions are improved.

CN119883827AInactive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510362911.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the real-time performance of BMC configuration file error recovery is poor, resulting in abnormal management functions, affecting the normal monitoring of the server and the timely detection of hardware failures.

Method used

By comparing the configuration file content of the hardware device with the content of the standard file, determining the format difference, and automatically updating the configuration file according to the content of the standard file to ensure the normal operation of the management function.

Benefits of technology

Improves the degree of automation of file updates, reduces labor costs, improves update efficiency, and ensures the accuracy and consistency of configuration files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883827A_ABST
    Figure CN119883827A_ABST
Patent Text Reader

Abstract

The invention provides a file updating method and device, a storage medium and a program product, and can be applied to the technical field of servers. The method comprises the steps of determining file content of a configuration file of the hardware equipment in response to management function abnormity of the hardware equipment; the file content is compared with standard file content of the hardware equipment, a comparison result is determined, the comparison result comprises format differences between the file content and the standard file content, and the standard file content is obtained under the condition that it is determined that the management function of the hardware equipment is normal; and under the condition that the comparison result shows that format difference exists between the file content and the standard file content, writing multiple pieces of information read from the standard file content into the configuration file according to multiple information categories based on storage positions and information categories of the multiple pieces of information in the file content to obtain an updated configuration file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a file updating method, device, storage medium and program product. Background Art

[0002] The Baseboard Management Controller (BMC) is a management controller unique to the server. One of the main functions of the BMC is to monitor the health status of each server hardware and send fault information to the operation and maintenance personnel through logs when a problem occurs in the server, assisting the operation and maintenance personnel in locating the fault, thereby ensuring the normal and stable operation of the server. The configuration information such as the permissions required for BMC monitoring is saved in the configuration file, and the configuration file will change with the update of the BMC software and server hardware. One technology is to manually check and manually restore the configuration information in the configuration file based on the log information after discovering that the configuration information saved in the configuration file is wrong.

[0003] In the process of implementing the present invention, it is found that there are at least the following problems in the related art: the real-time performance of restoring the configuration file by manual troubleshooting and the like is poor. Therefore, during the manual troubleshooting and recovery stage, the management function of the BMC is abnormal, thereby affecting the normal monitoring of the server. In the case of a hardware error in the server, it is impossible to detect and issue a reminder in time, making it difficult to ensure the stable operation of the server. Summary of the invention

[0004] In view of the above problems, the present invention provides a file updating method, device, storage medium and program product.

[0005] According to a first aspect of the present invention, there is provided a file updating method, comprising: in response to an abnormality in the management function of a hardware device, determining the file content of a configuration file of a hardware device; comparing the file content with the standard file content of the hardware device to determine a comparison result, wherein the comparison result includes a format difference between the file content and the standard file content, and the standard file content is obtained when it is determined that the management function of the hardware device is normal; and when it is determined that the comparison result indicates that there is a format difference between the file content and the standard file content, based on the storage location and information category of the multiple information in the file content, writing the multiple information read from the standard file content into the configuration file according to the multiple information categories to obtain an updated configuration file.

[0006] The second aspect of the present invention provides a file updating device, comprising: a content determination module, for determining the file content of a configuration file of a hardware device in response to an abnormality in the management function of the hardware device; a content comparison module, for comparing the file content with the standard file content of the hardware device to determine a comparison result, wherein the comparison result includes a format difference between the file content and the standard file content, and the standard file content is obtained when it is determined that the management function of the hardware device is normal; and an information writing module, for, when it is determined that the comparison result indicates that there is a format difference between the file content and the standard file content, based on the storage location and information category of the multiple information in the file content, writing multiple information read from the standard file content to the configuration file according to multiple information categories to obtain an updated configuration file.

[0007] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0008] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0009] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0010] According to the embodiment of the present invention, after determining that the management function of the hardware system is abnormal, the file content of the configuration file can be compared with the standard file content, and the file content of the configuration file can be automatically updated and maintained according to the standard file content, so that the hardware system can use its management function normally using the updated configuration file, thereby improving the automation of file updates, reducing labor costs and improving update efficiency. Since the file update is based on information such as the information category of the file content and the information storage location, it can ensure that the information read from the standard file information can be accurately written to the correct location, thereby improving the accuracy of file updates based on heterogeneous standard file content. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0012] Figure 1 An application scenario diagram of a file updating method, device, storage medium, and program product according to an embodiment of the present invention is shown.

[0013] Figure 2 A flow chart of a file updating method according to an embodiment of the present invention is shown.

[0014] Figure 3 A schematic diagram showing structural features according to an embodiment of the present invention.

[0015] Figure 4 A flow chart of sensitive command detection and file update according to an embodiment of the present invention is shown.

[0016] Figure 5 A structural block diagram of a file updating device according to an embodiment of the present invention is shown.

[0017] Figure 6 A block diagram of an electronic device suitable for implementing a file updating method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0018] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0019] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0020] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0021] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0022] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, invention and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0023] An embodiment of the present invention provides a file updating method, comprising: in response to an abnormality in the management function of a hardware device, determining the file content of a configuration file of a hardware device; comparing the file content with the standard file content of the hardware device to determine a comparison result, wherein the comparison result includes a format difference between the file content and the standard file content, and the standard file content is obtained when it is determined that the management function of the hardware device is normal; and when it is determined that the comparison result indicates that there is a format difference between the file content and the standard file content, based on the storage location and information category of multiple information in the file content, writing multiple information read from the standard file content into the configuration file according to multiple information categories to obtain an updated configuration file.

[0024] Figure 1 An application scenario diagram of a file updating method, device, storage medium, and program product according to an embodiment of the present invention is shown.

[0025] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a hardware device 110 and a server 120. The server 120 may include hardware such as a keyboard 121 and a central processing unit 122. The hardware device 110 may be disposed inside the server 120, or may be disposed outside the server 120 and communicated with the server 120.

[0026] The user can use the hardware device 110 to monitor the health status of the hardware in the server 120, and when the hardware in the server 120 fails or is in a poor health state, such as due to overload, the hardware device 110 can promptly identify the failed or poorly healthy hardware so that the user can locate and repair the fault.

[0027] It should be noted that the file update method provided in the embodiment of the present invention can generally be executed by the hardware device 110. Accordingly, the file update apparatus provided in the embodiment of the present invention can generally be set in the hardware device 110. The file update method provided in the embodiment of the present invention can also be executed by a hardware device or a server or a server cluster that is different from the hardware device 110 and can communicate with the hardware device 110 and / or the server 120.

[0028] It should be understood that Figure 1 The number of hardware devices and servers in the embodiment is only for illustration. Any number of hardware devices and servers may be provided according to implementation requirements.

[0029] The following will be based on Figure 1 The scene described by Figure 2~Figure 4 The file updating method of the embodiment of the invention is described in detail.

[0030] Figure 2 A flow chart of a file updating method according to an embodiment of the present invention is shown.

[0031] like Figure 2 As shown, the file update of this embodiment includes operations S210 to S230.

[0032] In operation S210 , in response to a management function of the hardware device being abnormal, a file content of a configuration file of the hardware device is determined.

[0033] According to an embodiment of the present invention, the hardware device may include a BMC, and the management function may include the monitoring and management function of the BMC on the health status of each hardware of the server. In the case where the health status of each hardware of the server cannot be obtained using the hardware device, it can be determined that the management function of the hardware device is abnormal. Specifically, the management function may include the validity of the BMC login account, the out-of-band Intelligent Platform Management Interface (IPMI) function, the Serial over LAN (SOL) function, the remote keyboard, video and mouse control (KVM) function, etc.

[0034] When it is determined that the management function of the hardware device is abnormal, it is necessary to determine the monitoring and management permissions of the hardware device on each hardware in the server. The configuration information such as the BMC permissions is saved in the configuration file. Therefore, the file content of the configuration file of the hardware device can be read and analyzed.

[0035] In operation S220, the file content is compared with the standard file content of the hardware device to determine a comparison result.

[0036] According to an embodiment of the present invention, the comparison result may include the format difference between the file content and the standard file content, and the standard file content is obtained by backing up the current configuration file content when it is determined that the management function of the hardware device is normal. The format difference may include the difference in constituent elements between the file content and the standard file content, wherein the constituent elements include information stored in the form of key-value pairs constituting the configuration file, and the difference in constituent elements may include the difference in the number of constituent elements, the difference in the category of constituent elements, etc.

[0037] The file content and the standard file content may be traversed respectively to determine the constituent elements of the file content and the standard file content, and further determine whether there are format differences between the constituent elements of the file content and the constituent elements of the standard file content.

[0038] In operation S230, when it is determined that the comparison result indicates that there are format differences between the file content and the standard file content, based on the storage locations and information categories of the multiple information in the file content, the multiple information read from the standard file content is written into the configuration file according to the multiple information categories to obtain an updated configuration file.

[0039] In the case where it is determined that there is a format difference between the file content and the standard file content, it can be determined that the reason for the abnormal management function of the hardware device is that the format of the configuration file of the hardware device has changed, resulting in missing information in the file content compared with the standard file content, affecting the management function of the hardware device. Therefore, the file content can be configured according to the standard file content, so that the file content includes the information in the standard file content, so that the hardware device can obtain the correct permissions based on the file content and perform the management function of the hardware device normally.

[0040] During the writing process, the information that needs to be written from the standard file content to the configuration file can be determined, and the location where the information should be written can be determined based on the storage location of information with the same information category as the information in the file content, where the information category can include the meanings represented by multiple information in the file content. When the information in the file is stored in a key-value pair, the key (Key) in the key-value pair can also be used to represent the information category of the information.

[0041] After at least one information in the standard file content is written into the storage location corresponding to each information in the configuration file, an updated configuration file can be obtained.

[0042] According to the embodiment of the present invention, after determining that the management function of the hardware system is abnormal, the file content of the configuration file can be compared with the standard file content, and the file content of the configuration file can be automatically updated and maintained according to the standard file content, so that the hardware system can use its management function normally using the updated configuration file, thereby improving the automation of file updates, reducing labor costs and improving update efficiency. Since the file update is based on information such as the information category of the file content and the information storage location, it can ensure that the information read from the standard file information can be accurately written to the correct location, thereby improving the accuracy of file updates based on heterogeneous standard file content.

[0043] In one embodiment, when it is determined that there is a difference in the category of constituent elements between the file content and the standard file content, the constituent elements that exist in the standard file content but not in the file content can be determined based on the file content and the standard file content, and the keys of the constituent elements are added to the file content, and the location where the keys of the constituent elements are located is determined as the storage location. During the writing process, the information to be written may include the key values ​​(Value) of the above constituent elements, and each key value is written to the corresponding storage location in the configuration file according to the corresponding relationship of the key-value pair, so that the updated configuration file can be obtained.

[0044] Through the above operations, the file content after the newly added key can include all the keys of the standard file content. Therefore, all key-value pairs in the standard file content can be accurately written into the file content using the file update method. The updated configuration file includes all the information of the standard file content, ensuring that the hardware device can obtain normal management functions using the updated configuration file.

[0045] When it is determined through comparison that the file content includes all the keys in the standard file content, and the file content includes keys that do not exist in the standard file content, it can be determined that the keys that do not exist in the standard file content are keys that are newly added due to software and hardware version updates or manual configuration. When the standard file content does not include the above newly added keys, the hardware device can still obtain normal management functions. Therefore, there is no need to add the newly added keys to the standard file content.

[0046] According to an embodiment of the present invention, file content is compared with standard file content of a hardware device to determine a comparison result, including: determining storage locations of multiple information in the file content; when the number of storage locations is determined to be the same as the number of standard storage locations for multiple information in the standard file content, and the multiple information categories are the same as the standard information categories, determining that the comparison result indicates that there is no format difference between the file content and the standard file content, wherein the standard information category includes the information category of each of the multiple information read from the standard file content.

[0047] According to the file content, the storage locations of the multiple information in the file content can be determined. By comparing the number of information storage locations with the number of standard storage locations, if it is determined that the number of storage locations is the same as the number of standard storage locations for the multiple information in the standard file content, the information categories of the multiple information in the file content are compared with the standard information categories, if it is determined that the multiple information categories are the same as the standard information categories, it can be determined that there is no format difference between the file content and the standard file content.

[0048] When it is determined that the number of storage locations is different from the standard number of storage locations for multiple information in the standard file content or that multiple information categories have different items from the standard information categories, it can be determined that there are format differences between the file content and the standard file content.

[0049] According to an embodiment of the present invention, the storage positions of multiple information in the file content and the information categories of the multiple information are determined, and compared with the standard storage positions and standard information categories of the standard file content. It is possible to accurately judge whether there are format differences between the file content and the standard file content based on the above key information without traversing the entire file, thereby improving the efficiency of comparing the file content with the standard file content.

[0050] According to an embodiment of the present invention, determining the storage location of multiple information in file content includes: parsing the file content to obtain structural characteristics of the file content, wherein the structural characteristics include a hierarchical relationship of at least one key-value pair in the file content; determining a first storage location of at least one key-value pair in the file content based on the structural characteristics; and determining a location for storing a key value in the first storage location of at least one key-value pair as the storage location.

[0051] In one embodiment, the file content is parsed to obtain a representation such as an Abstract Syntax Tree (AST) for representing the file structure characteristics, and the hierarchical relationship of at least one key-value pair in the file content can be determined based on the structure characteristics.

[0052] Figure 3 A schematic diagram showing structural features according to an embodiment of the present invention.

[0053] like Figure 3 As shown, the file content is parsed to obtain an abstract syntax tree representing the file content, where the root node is the file content, the child nodes of the root node can represent various hardware of the server, and the next-level child nodes of each hardware, i.e., leaf nodes, can represent the acquisition cycle of the health status of each hardware, the password of the access right of the hardware, etc. Figure 3The file content corresponding to the abstract syntax tree shown indicates that the BMC needs to be used to monitor three hardware in the server, including a keyboard, a central processing unit (CPU), and a graphics processing unit (GPU).

[0054] According to the structural features, for example, the leaf nodes of the abstract syntax tree can determine at least one key-value pair in the file content. Figure 3 The file content corresponding to the abstract syntax tree shown includes six key-value pairs, where the keys of the six key-value pairs are the keyboard health status acquisition cycle, the keyboard access password, the CPU health status acquisition cycle, the CPU access password, the GPU health status acquisition cycle, and the GPU access password, wherein the hardware access password represents the password for obtaining access rights to the hardware.

[0055] After determining at least one key-value pair included in the file content, the file content can be traversed, and the first storage position of the at least one key-value pair can be determined according to the key of the at least one key-value pair, wherein the first storage position includes the position of the key of the key-value pair and the position of the key value corresponding to the key. Since the key does not need to be updated during the information writing process, only the key value needs to be updated and written, the position in the first storage position for storing the key value can be determined as the storage position.

[0056] According to an embodiment of the present invention, since the structural characteristics of the file content include the hierarchical relationship of the key-value pairs, the key-value pairs in the file content can be accurately determined by the structural characteristics of the file content. By traversing the file according to the key-value pairs, the first storage position of each of the multiple key-value pairs can be determined, thereby determining the storage position of the key value in the key-value pair.

[0057] Since new hardware and system upgrades may occur during server operation, the configuration file can be manually modified to ensure that the management function of the server modified by the BMC takes effect. For example, when new hardware is added to the server, authorization information for obtaining the status of the new hardware can be added to the configuration file.

[0058] In this case, if the standard file content is maintained unchanged, then when the management function of the hardware device is abnormal, the updated configuration file obtained after updating the configuration file of the hardware device using the file update method will not include the above-mentioned newly added authorization information, resulting in the hardware device being unable to manage and monitor the newly added hardware, affecting the operation of the hardware device and the server.

[0059] Therefore, the standard file content can be checked and updated regularly, and the method for determining the standard file content is as follows: in response to the scheduled task being triggered, check the management function of the hardware device; and when it is determined that the management function of the hardware device is normal, determine the standard file content based on the configuration file of the hardware device.

[0060] The execution period of the scheduled task can be determined based on the empirical value of the period of manually modifying the configuration file. For example, based on the historical modification of the configuration file, it is determined that the configuration file is usually modified or maintained once every 24 hours. The execution period of the scheduled task can be determined as 24 hours, that is, the management function of the hardware device is checked once every 24 hours.

[0061] When it is determined that the management function of the hardware device is normal, after the standard file content is determined based on the configuration file of the current hardware device, the stored standard file content can be overwritten with the newly determined standard file content.

[0062] When it is determined that the management function of the hardware device is abnormal, the configuration file of the hardware device can be updated using the above file updating method according to the stored standard file content.

[0063] When the configuration file is not updated, the scheduled task is triggered to determine that the management function of the hardware device is normal, and the stored standard file content is overwritten based on the standard file content determined by the configuration file, and the updated standard file content does not change.

[0064] When the configuration file is updated, the scheduled task is triggered to determine that the management function of the hardware device is normal, and the stored standard file content is overwritten based on the standard file content determined by the configuration file. The updated standard file content is the same as the updated configuration file. Therefore, when the configuration file is updated using the standard file content, it can be ensured that the content of the updated configuration file includes the above-mentioned newly added or modified content, ensuring the correctness and validity of the configuration file.

[0065] According to the embodiment of the present invention, the standard file content is periodically updated through the scheduled task, which can ensure that the standard file content remains a relatively new version, ensuring the accuracy of file processing. In addition, there is no need to manually update the standard file content, reducing labor costs.

[0066] Since the standard file content is determined periodically using a scheduled task when it is determined that the management function of the hardware device is normal, within one cycle, it is only necessary to determine the standard storage location of the standard file content after determining the standard file content, and directly use the standard storage location each time the file is updated. The method for determining the standard storage location is the same as the method for determining the storage location: the standard file content is parsed to obtain the standard structural features of the standard file content, wherein the standard structural features include the hierarchical relationship of at least one key-value pair in the standard file content; based on the standard structural features, the first storage location of at least one key-value pair in the standard file content is determined; and the location where the key value is located in the first storage location of at least one key-value pair is determined as the standard storage location.

[0067] According to an embodiment of the present invention, after the standard file content is determined each time, the standard storage location of the standard file content is determined. When updating the file, the standard storage location can be directly used to compare with the storage location, etc., without having to determine the standard storage location each time the file is updated, thereby improving the efficiency of file updating.

[0068] According to an embodiment of the present invention, based on the storage locations and information categories of multiple information in the file content, multiple information read from the standard file content is written into the configuration file according to the multiple information categories to obtain an updated configuration file, including: according to the standard information category and the standard storage location, respectively determining the target information corresponding to the respective information categories of the multiple information from the standard file content; and respectively writing the multiple target information into the storage locations corresponding to the target information to obtain an updated configuration file.

[0069] For each storage location, the information category of the information stored in the storage location in the file content can be determined, and the information with the same information category among multiple information in the standard file content can be determined as target information, and the target information can be written to the storage location to complete the write update of the storage location.

[0070] After multiple information in the standard file content is written into the configuration file, an updated configuration file can be obtained.

[0071] According to the embodiment of the present invention, according to the information category of the information stored in each location, the target information of the storage location can be accurately determined from the standard file content, and the target information is written into the storage location, thereby improving the efficiency and accuracy of file updating.

[0072] In addition to the above-mentioned situation where there are format differences between the file content and the standard file content, there are also situations where there are no format differences between the file content and the standard file content, but the file content has different values ​​compared to the standard file, resulting in the hardware device being unable to obtain complete and correct management functions based on the configuration file.

[0073] According to an embodiment of the present invention, the file update method also includes: when it is determined that the comparison result indicates that there is no format difference between the file content and the standard file content, determining at least one abnormal data in the file content based on the file content and the standard file content; and using the standard file content to correct the at least one abnormal data in the file content to obtain an updated configuration file.

[0074] The at least one abnormal data in the file content may include a key value in which the file content is different from the standard file content. The key value in the standard file content may be used to correct the erroneous key value in which the file content is different, thereby obtaining an updated configuration file.

[0075] According to an embodiment of the present invention, when it is determined that there is no format difference between the file content and the standard file content, there is no need to determine information such as the storage location in the file content. The standard file content can be used to correct abnormal data in the file content to obtain an updated configuration file, thereby improving the efficiency of file updating.

[0076] According to an embodiment of the present invention, based on the file content and the standard file content, at least one abnormal data in the file content is determined, including: determining at least one key-value pair in the file content and at least one key-value pair in the standard file content; determining the key-value pairs with the same key and different key values ​​in the at least one key-value pair in the file content and at least one key-value pair in the standard file content as abnormal key-value pairs; and determining the key value of the at least one abnormal key-value pair in the file content as abnormal data.

[0077] Since there is no format difference between the file content and the standard file content, it can be determined that at least one key included in the file content and the standard file content is the same, but there is at least one different key value in the key values ​​corresponding to the above keys. Therefore, the key-value pairs with the same key but different key values ​​in the file content and the standard file content can be determined as abnormal key-value pairs, and the key values ​​in the abnormal key-value pairs are determined to be abnormal data in the file content.

[0078] According to an embodiment of the present invention, at least one abnormal data in the file content is corrected using the standard file content to obtain an updated configuration file, including: determining a standard value of at least one abnormal key-value pair based on the standard file content; and correcting at least one abnormal data using the at least one standard value.

[0079] According to an embodiment of the present invention, based on the key of the abnormal key-value pair, the key value corresponding to the key in the standard file content can be determined. The key value is the standard value of the abnormal key-value pair. The standard value can be used to update and correct the abnormal data in the file content, so that the corrected file content has the same key value as the standard file content, so that the hardware device can obtain normal management functions based on the file content.

[0080] According to an embodiment of the present invention, when it is determined that abnormal data in the file content needs to be corrected, the abnormal key-value pair is first determined, and then the file content is corrected using the standard value of the abnormal key-value pair in the standard file content. This reduces the amount of data that needs to be modified for correction and improves the efficiency of file content correction.

[0081] According to an embodiment of the present invention, the file update method also includes: determining at least one key-value pair included in the file content; determining a target command type for configuring the file format based on the file format of the configuration file; in response to detecting a sensitive command for the configuration file, backing up the configuration file to a cache area of ​​the hardware device; executing the sensitive command on the configuration file to obtain a modified configuration file; and in a case where it is determined that the use of the modified configuration file by the hardware device causes management function abnormalities, restoring the modified configuration file using the configuration file backed up in the cache area.

[0082] Configuration files may include multiple file formats, such as configuration files (.ini) commonly used in Windows systems that store data in the form of sections and key-value pairs, general configuration file formats (.cfg) used in various applications, and extensible markup language (.xml). The types of commands used to configure configuration files in different file formats are usually different. Therefore, the target command type used to configure the configuration file in that file format may be determined based on the file format of the configuration file.

[0083] After determining the target command type, all commands included in the target command type can be determined, and sensitive commands for the configuration file can be determined from all commands included in the target command type based on the key-value pairs included in the file content. For example, if the configuration file includes a key-value pair with the key "user name" but does not include a key-value pair with the key "password", then the command used to modify the key value of "user name" in the command set is a sensitive command, and the command used to modify the key value of "password" is not a sensitive command.

[0084] Since when sensitive commands for configuration files are detected, it is usually the hardware device administrator who is modifying or upgrading the configuration files, there will be a large number of sensitive commands at the same time. If one of the large number of sensitive commands is edited incorrectly, causing the hardware device to use the configuration file after executing the command, resulting in abnormal management functions, if the file is updated directly using the standard file content, a large number of normal modifications will be restored, affecting the upgrade of the configuration files and the normal use of the hardware devices.

[0085] Therefore, before executing a sensitive command each time, the current configuration file can be backed up to the cache area of ​​the hardware device, and then the sensitive command can be executed on the configuration file to obtain the modified configuration file.

[0086] When it is determined that the management function of the hardware device is normally effective when using the modified configuration file, the standard file content can be overwritten with the current configuration file, and the configuration file backed up in the cache area can be deleted.

[0087] When it is determined that the use of a modified configuration file by a hardware device causes management function abnormalities, the modified configuration file can be restored using the configuration file backed up in the cache area, thereby ensuring that the restoration is only for sensitive commands that cause management function abnormalities of the hardware device and will not affect other commands that have been executed normally and have not affected the management function of the hardware device.

[0088] When it is determined that the management function of the hardware device is abnormal, the abnormal cause causing the management function of the hardware device to be abnormal can be determined first, and then a processing method for the configuration file can be further determined.

[0089] Among them, when the management function of the hardware device is normal, and the management function of the hardware device is abnormal after the configuration file of the hardware device is operated by a sensitive command, the abnormality can be determined to be the modification of the configuration file. When the management function of the hardware device is normal, and the management function of the hardware device is abnormal after the software system upgrade and the hardware upgrade in the server managed by the hardware device, the abnormality can be determined to be the modification of non-configuration files.

[0090] If the abnormality is determined to be caused by configuration file modification, the use of the modified configuration file by the hardware device will cause management function abnormality, and the modified configuration file can be restored using the configuration file backed up in the cache area. If the abnormality is determined to be caused by non-configuration file modification, the configuration file can be updated using standard file content.

[0091] According to an embodiment of the present invention, based on the file format of the configuration file and the key-value pairs included in the file content, sensitive commands for the configuration file can be accurately determined, and after sensitive commands for the configuration file are detected, the configuration file can be backed up in time, so that when the hardware device uses the modified configuration file and causes management function abnormalities, the backed-up configuration file can be used for accurate and rapid restoration, thereby ensuring stable use of the hardware device.

[0092] According to an embodiment of the present invention, the file update method further includes: sending an alarm message to the initiator of the sensitive command; and recording the target key-value pairs that need to be modified when the sensitive command operates the configuration file.

[0093] According to the sensitive command, the target key-value pair that needs to be modified when the sensitive command operates the configuration file is determined, and an alarm message is sent to the initiator of the sensitive command, wherein the alarm message may include the target key-value pair, which is used to inform the initiator that the sensitive command will change the key value in the target key-value pair, and that the operation may cause abnormal management function of the hardware device.

[0094] After receiving the warning information, the initiator of the sensitive command can choose to cancel the sensitive command or determine to execute the sensitive command. In response to the initiator of the sensitive command canceling the sensitive command, the file content of the configuration file is maintained unchanged, and the file content cached in the buffer area is cleared.

[0095] According to an embodiment of the present invention, by recording the target key-value pairs modified by sensitive commands and sending an alarm message to the initiator of the sensitive commands, the initiator of the sensitive commands can be prompted with the operation results of the sensitive operations, thereby reducing additional operations such as configuration file restoration caused by erroneous operations.

[0096] According to an embodiment of the present invention, the modified configuration file is restored using the configuration file backed up in the cache area, including: using the key value of the target key-value pair in the configuration file backed up in the cache area to restore the key value of the target key-value pair in the modified configuration file, wherein the target key-value pair represents the key-value pair that needs to be modified when the sensitive command operates the configuration file.

[0097] The configuration file backed up in the cache area is read, and the key value of the target key-value pair is determined. The key value of the target key-value pair in the modified configuration file is restored using the key-value pair, so that the configuration file before the sensitive command is executed can be obtained.

[0098] According to an embodiment of the present invention, by recording the target key-value pair, and only reading the key value of the target key-value pair in the backed-up configuration file during the restoration process, and restoring the key value of the target key-value pair in the configuration file modified by the key-value pair, the configuration file can be restored by only restoring the changed key value. Therefore, the amount of data that needs to be operated during the configuration file restoration process is reduced, and the efficiency of restoration is improved.

[0099] Figure 4 A flow chart of sensitive command detection and file update according to an embodiment of the present invention is shown.

[0100] like Figure 4 As shown, the process includes operations S401 to S412.

[0101] In operation S401, a file format of a configuration file is determined.

[0102] In operation S402, a target command type for modifying a file format is determined.

[0103] In operation S403, sensitive commands for the configuration file are determined according to the key-value pairs and the target command type included in the file content.

[0104] In operation S404 , sensitive commands for the configuration file are continuously monitored.

[0105] In operation S405, it is determined whether a sensitive command is detected. If so, operation S406 is performed; if not, operation S404 is performed.

[0106] In operation S406 , an alarm is issued to the initiator of the sensitive command.

[0107] In operation S407, it is determined whether the initiator of the sensitive command cancels the sensitive command. If yes, operation S404 is executed; if no, operation S408 is executed.

[0108] In operation S408, the current configuration file is backed up, and the target key-value pairs modified by the sensitive commands are recorded.

[0109] In operation S409, a sensitive command is executed on the configuration file.

[0110] In operation S410, it is determined whether the management function of the hardware device when using the modified configuration file is abnormal. If yes, operation S412 is executed; if no, operation S411 is executed.

[0111] In operation S411, the standard file content is updated using the modified configuration file, and operation S404 is performed.

[0112] In operation S412, the modified configuration file is restored using the backed-up configuration file.

[0113] Based on the above file update method, the present invention also provides a file update device. Figure 5 The device is described in detail.

[0114] Figure 5 A structural block diagram of a file updating device according to an embodiment of the present invention is shown.

[0115] like Figure 5 As shown, the file updating device 500 of this embodiment includes a content determination module 510 , a content comparison module 520 and an information writing module 530 .

[0116] The content determination module 510 is used to determine the file content of the configuration file of the hardware device in response to the abnormality of the management function of the hardware device. In one embodiment, the content determination module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0117] The content comparison module 520 is used to compare the file content with the standard file content of the hardware device to determine the comparison result, wherein the comparison result includes the format difference between the file content and the standard file content, and the standard file content is obtained when it is determined that the management function of the hardware device is normal. In one embodiment, the content comparison module 520 can be used to perform the operation S220 described above, which will not be repeated here.

[0118] The information writing module 530 is used to write the multiple information read from the standard file content into the configuration file according to the multiple information categories based on the storage location and information categories of the multiple information in the file content when it is determined that the comparison result indicates that there is a format difference between the file content and the standard file content, so as to obtain an updated configuration file. In one embodiment, the information writing module 530 can be used to perform the operation S230 described above, which will not be described in detail here.

[0119] According to an embodiment of the present invention, the content comparison module 520 includes a position determination submodule and a result determination submodule.

[0120] The location determination submodule is used to determine the storage location of multiple information in the file content.

[0121] A result determination submodule is used to determine that a comparison result indicates that there is no format difference between the file content and the standard file content when the number of storage locations is determined to be the same as the number of standard storage locations for multiple information in the standard file content and the multiple information categories are the same as the standard information categories, wherein the standard information category includes the respective information categories of the multiple information read from the standard file content.

[0122] According to an embodiment of the present invention, the position determination submodule includes a file parsing unit, a first position determination unit and a second position determination unit.

[0123] The file parsing unit is used to parse the file content to obtain the structural characteristics of the file content, wherein the structural characteristics include the hierarchical relationship of at least one key-value pair in the file content.

[0124] The first position determination unit is used to determine a first storage position of at least one key-value pair in the file content according to the structural feature.

[0125] The second position determining unit is used to determine a position for storing a key value in a first storage position of at least one key-value pair as a storage position.

[0126] According to the embodiment of the present invention, the file updating apparatus 500 further includes a file parsing module, a first position determining module and a second position determining module.

[0127] The file parsing module is used to parse the standard file content to obtain the standard structural features of the standard file content, wherein the standard structural features include the hierarchical relationship of at least one key-value pair in the standard file content.

[0128] The first position determination module is used to determine a first storage position of at least one key-value pair in the standard file content according to the standard structure feature.

[0129] The second position determination module is used to determine the position where the key value is located in the first storage position of at least one key-value pair as a standard storage position.

[0130] According to an embodiment of the present invention, the information writing module 530 includes a target information determination submodule and an information writing submodule.

[0131] The target information determination submodule is used to determine the target information corresponding to the respective information categories of the plurality of information from the standard file content according to the standard information category and the standard storage location.

[0132] The information writing submodule is used to write multiple target information into storage locations corresponding to the target information respectively to obtain an updated configuration file.

[0133] According to an embodiment of the present invention, the file updating apparatus 500 further includes an abnormality determination module and an abnormality correction module.

[0134] The abnormality determination module is used to determine at least one abnormal data in the file content based on the file content and the standard file content when it is determined that the comparison result indicates that there is no format difference between the file content and the standard file content.

[0135] The abnormality correction module is used to correct at least one abnormal data in the file content by using the standard file content to obtain an updated configuration file.

[0136] According to an embodiment of the present invention, the abnormality determination module includes a key-value pair determination submodule, an abnormal key-value pair determination submodule and an abnormality determination submodule.

[0137] The key-value pair determination submodule is used to determine at least one key-value pair in the file content and at least one key-value pair in the standard file content.

[0138] The abnormal key-value pair determination submodule is used to determine a key-value pair having the same key but different key values ​​in at least one key-value pair in the file content and at least one key-value pair in the standard file content as an abnormal key-value pair.

[0139] The abnormality determination submodule is used to determine the key value of at least one abnormal key-value pair in the file content as abnormal data.

[0140] According to an embodiment of the present invention, the anomaly correction module includes a standard value determination submodule and an anomaly correction submodule.

[0141] The standard value determination submodule is used to determine the standard value of at least one abnormal key-value pair according to the content of the standard file.

[0142] The abnormality correction submodule is used to correct at least one abnormal data using at least one standard value.

[0143] According to the embodiment of the present invention, the file updating apparatus 500 further includes a function checking module and a first file backup module.

[0144] The function checking module is used to check the management function of the hardware device in response to the timing task being triggered.

[0145] The first file backup module is used to determine the content of the standard file based on the configuration file of the hardware device when it is determined that the management function of the hardware device is normal.

[0146] According to an embodiment of the present invention, the file updating apparatus 500 further includes a key-value pair determination module, a command determination module, a second file backup module, a file modification module and a file restoration module.

[0147] The key-value pair determination module is used to determine at least one key-value pair included in the file content.

[0148] The command determination module is used to determine a target command type for configuring the file format based on the file format of the configuration file.

[0149] The second file backup module is used to back up the configuration file to the cache area of ​​the hardware device in response to detecting a sensitive command for the configuration file.

[0150] The file modification module is used to execute sensitive commands on the configuration file to obtain the modified configuration file.

[0151] The file restoration module is used to restore the modified configuration file by using the configuration file backed up in the cache area when it is determined that the management function of the hardware device is abnormal due to the use of the modified configuration file.

[0152] According to an embodiment of the present invention, the file restoration module includes a value restoration submodule.

[0153] The value restoration submodule is used to restore the key value of the target key-value pair in the modified configuration file by using the key value of the target key-value pair in the configuration file backed up in the cache area, wherein the target key-value pair represents the key-value pair that needs to be modified when the sensitive command operates the configuration file.

[0154] According to the embodiment of the present invention, the file updating device 500 further includes an alarm module and an information recording module.

[0155] The alarm module is used to send alarm information to the initiator of sensitive commands.

[0156] The information recording module is used to record the target key-value pairs that need to be modified when sensitive commands operate configuration files.

[0157] According to an embodiment of the present invention, any multiple modules of the content determination module 510, the content comparison module 520 and the information writing module 530 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the content determination module 510, the content comparison module 520 and the information writing module 530 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the content determination module 510, the content comparison module 520 and the information writing module 530 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0158] Figure 6A block diagram of an electronic device suitable for implementing a file updating method according to an embodiment of the present invention is shown.

[0159] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0160] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.

[0161] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.

[0162] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0163] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0164] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present invention.

[0165] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 601. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0166] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0167] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0168] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0169] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0170] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.

[0171] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A file updating method, characterized in that: The method comprises: In response to an abnormality in a management function of the hardware device, determining a file content of a configuration file of the hardware device; Comparing the file content with standard file content of the hardware device to determine a comparison result, wherein the comparison result includes a format difference between the file content and the standard file content, and the standard file content is obtained when it is determined that the management function of the hardware device is normal; and When it is determined that the comparison result indicates that there is a format difference between the file content and the standard file content, based on the storage location and information category of multiple information in the file content, the multiple information read from the standard file content is written into the configuration file according to the multiple information categories to obtain an updated configuration file.

2. The method according to claim 1, characterized in that The comparing the file content with the standard file content of the hardware device to determine the comparison result includes: Determining storage locations of multiple information in the file content; When it is determined that the number of storage locations is the same as the number of standard storage locations for multiple information in the standard file content, and the multiple information categories are the same as the standard information categories, it is determined that the comparison result indicates that there is no format difference between the file content and the standard file content, wherein the standard information category includes the information category of each of the multiple information read from the standard file content.

3. The method according to claim 2, characterized in that Determining the storage location of the plurality of information in the file content includes: Parsing the file content to obtain a structural feature of the file content, wherein the structural feature includes a hierarchical relationship of at least one key-value pair in the file content; Determining a first storage location of at least one key-value pair in the file content according to the structural feature; and A position in a first storage position of the at least one key-value pair that is used to store a key value is determined as the storage position.

4. The method according to claim 2, characterized in that: The standard storage location is determined in the following way: Parsing the standard file content to obtain a standard structural feature of the standard file content, wherein the standard structural feature includes a hierarchical relationship of at least one key-value pair in the standard file content; Determining a first storage location of at least one key-value pair in the standard file content according to the standard structural feature; and The position where the key value is located in the first storage position of the at least one key-value pair is determined as the standard storage position.

5. The method according to claim 2, characterized in that: Based on the storage locations and information categories of the multiple information in the file content, the multiple information read from the standard file content is written into the configuration file according to multiple information categories to obtain an updated configuration file, including: Determining, from the standard file content, target information corresponding to the information category of each of the plurality of information, respectively, according to the standard information category and the standard storage location; and The plurality of target information are respectively written into the storage locations corresponding to the target information to obtain the update configuration file.

6. The method according to claim 1, characterized in that The method further comprises: In a case where it is determined that the comparison result indicates that there is no format difference between the file content and the standard file content, determining at least one abnormal data in the file content based on the file content and the standard file content; and At least one abnormal data in the file content is corrected using the standard file content to obtain the updated configuration file.

7. The method according to claim 6, characterized in that The determining, based on the file content and the standard file content, at least one abnormal data in the file content comprises: Determining at least one key-value pair in the file content and at least one key-value pair in the standard file content; Determine, as an abnormal key-value pair, a key-value pair having the same key but different key values ​​in at least one key-value pair in the file content and at least one key-value pair in the standard file content; and A key value of at least one of the abnormal key-value pairs in the file content is determined as the abnormal data.

8. The method according to claim 7, characterized in that The step of correcting at least one abnormal data in the file content by using the standard file content to obtain the updated configuration file includes: Determining a standard value of the at least one abnormal key-value pair according to the standard file content; and At least one of the abnormal data is corrected using at least one of the standard values.

9. The method according to claim 1, characterized in that: The method further comprises: In response to the scheduled task being triggered, checking the management function of the hardware device; and When it is determined that the management function of the hardware device is normal, the standard file content is determined based on the configuration file of the hardware device.

10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: Determining the at least one key-value pair included in the file content; Based on the file format of the configuration file, determining a target command type for configuring the file format; In response to detecting a sensitive command for the configuration file, backing up the configuration file to a cache area of ​​the hardware device; executing the sensitive command on the configuration file to obtain a modified configuration file; and In the case where it is determined that the management function is abnormal due to the use of the modified configuration file by the hardware device, the modified configuration file is restored using the configuration file backed up in the cache area.

11. The method according to claim 10, characterized in that The step of restoring the modified configuration file by using the configuration file backed up in the cache area includes: The key value of the target key-value pair in the configuration file backed up in the cache area is used to restore the key value of the target key-value pair in the modified configuration file, wherein the target key-value pair represents the key-value pair that needs to be modified when the sensitive command operates the configuration file.

12. The method according to claim 10, characterized in that The method further comprises: Sending a warning message to the initiator of the sensitive command; The target key-value pair that needs to be modified when the sensitive command operates the configuration file is recorded.

13. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 12.

14. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Backup method and backup device of BMC

    CN115525479A

  • Automatic testing method and system for application program

    CN116627848A

  • Data recovery method and system for baseboard management controller

    CN116795600A