A configuration file operation method and apparatus

By storing configuration files in separate files and managing node identifiers using a mapped dataset, the problem of data loss caused by simultaneous modification of configuration files on multiple servers in the Linux target framework is solved, achieving efficient configuration file operations.

CN116760879BActive Publication Date: 2026-05-26LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2023-07-31
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the Linux target framework, data loss can easily occur when multiple servers modify configuration files simultaneously, and concurrency leads to inefficient configuration file management.

Method used

By storing the configuration files of each user node in separate files and using a mapping dataset to store the mapping relationship between node identifiers and configuration files, multiple nodes avoid operating on the same configuration file at the same time. Queue or data lock mechanisms are used to prevent data loss and improve operational efficiency.

Benefits of technology

It effectively prevents data loss and improves the stability and efficiency of configuration file operations, especially when multiple user nodes are operating simultaneously.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116760879B_ABST
    Figure CN116760879B_ABST
Patent Text Reader

Abstract

This application discloses a configuration file operation method and apparatus. The method includes: receiving a request sent by a user node, the request containing operation instructions and a node identifier of the user node; reading a configuration file mapped to the user node based on the node identifier and a mapping dataset, the mapping dataset indicating the location of the configuration file; and performing corresponding operations on the configuration file based on the operation instructions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of data processing and cloud server technology, and in particular to a configuration file operation method and apparatus. Background Technology

[0002] Currently, when managing configuration parameters for multiple servers, the Linux target framework (Linux is an operating system) stores the server names and configuration parameters of each server in a single configuration file on a storage server. When a server needs to modify its configuration parameters, it must modify this configuration file on the storage server, and then overwrite the original configuration file with the modified one. However, when multiple servers need to modify their configurations simultaneously, concurrency can lead to the loss of data modified by one or more servers (e.g., server A modifies the original configuration file, resulting in version A, and server B modifies the original configuration file, resulting in version B. When servers A and B complete their modifications and overwrite, the final configuration file on the storage server may be overwritten with either version A or version B, resulting in the loss of data modified by either server A or server B). Furthermore, as the number of servers managed by this configuration file increases, the configuration file grows larger, leading to decreased efficiency when servers modify or perform other operations on the configuration file. Summary of the Invention

[0003] This application provides a configuration file operation method and apparatus to solve the above-mentioned technical problems.

[0004] Therefore, this application provides a configuration file operation method, the method comprising:

[0005] Receive a request sent by a user node, the request containing operation instructions and the node identifier of the user node;

[0006] Based on the node identifier and mapping dataset, read the configuration file mapped to the user node, whereby the mapping dataset indicates the location of the configuration file;

[0007] Perform corresponding operations on the configuration file based on the operation instructions.

[0008] The step of reading the configuration file mapped to the user node based on the node identifier and mapping dataset includes:

[0009] The node identifiers are matched with data in a mapping dataset, which contains at least one node identifier and an address space that matches each node identifier.

[0010] The configuration file mapped to the user node is read based on the address space that matches the node identifier.

[0011] The step of performing corresponding operations on the configuration file based on the operation instructions includes:

[0012] Based on the operation instructions, determine the operation and at least one target parameter;

[0013] The operation is performed on the configuration file based on the target parameters.

[0014] The operation described herein refers to modifying parameters, and performing the operation on the configuration file based on the target parameters includes:

[0015] The target parameters are matched with the configuration file to obtain the original parameters that match the target parameters;

[0016] Modify the original parameters to match the target parameters.

[0017] The operation described herein is the deletion of parameters, and the operation performed on the configuration file based on the target parameters includes:

[0018] The target parameters are matched with the configuration file to obtain the original parameters that match the target parameters;

[0019] Delete all original parameters that match the target parameter.

[0020] The operation is a parameter query, and the operation on the configuration file based on the target parameter includes:

[0021] The target parameters are matched with the configuration file to obtain the original parameters that match the target parameters;

[0022] Send all original parameters that match the target parameters to the user node.

[0023] The method also includes:

[0024] Receive the node identifier and the configuration file corresponding to the node identifier sent by the user node;

[0025] If the node identifier fails to match the data in the mapping dataset, the configuration file is stored and the address space of the configuration file is obtained;

[0026] A record is synchronously created in the mapping dataset, the key name of the record is the node identifier, and the key value of the record is the address space.

[0027] The method also includes:

[0028] Matching is performed based on the node identifier to obtain the configuration file mapped to the user node;

[0029] Delete the configuration file and delete the corresponding record in the mapping dataset based on the node identifier.

[0030] The method also includes:

[0031] In response to a synchronization signal periodically sent by a user node, the mapping dataset is sent to the user node so that the user node updates its local mapping dataset after receiving the mapping dataset.

[0032] Another embodiment of this application provides a configuration file operation apparatus, the apparatus comprising:

[0033] A communication module is used to receive requests sent by user nodes, the requests containing operation instructions and the node identifier of the user node;

[0034] A calculation module is used to read the configuration file mapped to the user node based on the node identifier and mapping dataset, wherein the mapping dataset is used to indicate the location of the configuration file;

[0035] The processing module is used to perform corresponding operations on the configuration file based on the operation instructions in the request. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A flowchart of a configuration file operation method according to an embodiment of this application is shown;

[0038] Figure 2 A schematic diagram of multiple user nodes and storage devices according to one embodiment of this application is shown;

[0039] Figure 3 A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0040] Figure 4 A schematic diagram of a mapping dataset according to an embodiment of this application is shown;

[0041] Figure 5A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0042] Figure 6 A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0043] Figure 7 A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0044] Figure 8 A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0045] Figure 9 A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0046] Figure 10 A flowchart of a configuration file operation method according to another embodiment of this application is shown;

[0047] Figure 11 A schematic diagram of the configuration file operation device according to an embodiment of this application is shown. Detailed Implementation

[0048] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0049] To prevent data loss when modifying configuration files on multiple servers simultaneously and to improve the efficiency of operations on configuration files, one embodiment of this application provides a configuration file operation method, such as... Figure 1 As shown, the method includes:

[0050] Step 101: Receive a request sent by a user node, the request containing operation instructions and the node identifier of the user node.

[0051] like Figure 2 As shown, the configuration files of multiple user nodes are stored in the storage device. The user node can be a virtual machine, a server, or any other electronic device. The storage device can be a single server used for storage or a cluster of servers used for storage (at least one master server in the server cluster is used to manage the server cluster).

[0052] The storage device receives requests sent by user nodes, parses the requests, and obtains the operation instructions and the node identifier of the user node contained in the requests.

[0053] Step 102: Read the configuration file mapped to the user node based on the node identifier and mapping dataset, wherein the mapping dataset is used to indicate the location of the configuration file.

[0054] The storage device stores a dataset containing a mapping between the node identifier of each user node and the location of the user node's configuration file. For example... Figure 2 As shown, the mapping dataset is stored in a fixed location on the storage device (such as a fixed location on the master server in a server cluster, while the configuration files of multiple user nodes may be stored on different servers in the server cluster). When each user node stores its configuration file on the storage device, it will be notified of the location where the mapping dataset is stored.

[0055] If the storage device is a single server, the location of the user node's configuration file is the storage address of that configuration file on the server. The storage address can be a pointer or a storage path.

[0056] For example, a storage device is a single server, and the mapped dataset is stored in a fixed storage path: "D:\Important Files". User node A sends a request to the storage device, which retrieves the mapped dataset from the storage path "D:\Important Files" as: {["User Node A", "D:\Important Files\Configuration Files\User Node A's Configuration File"], ["User Node B", "D:\Important Files\Configuration Files\User Node B's Configuration File"]}. The storage device then retrieves the node identifier "User Node A" from the request, locates the position of User Node A's configuration file based on the node identifier and the mapped dataset, and reads User Node A's configuration file from that location.

[0057] If the storage device is a server cluster, then the location of the user node's configuration file includes the server's identifier and the storage address of the configuration file on the server.

[0058] For example, consider a storage device as a server cluster. The mapping dataset is stored in a fixed storage path on the main server: "D:\Important Files". User node A sends a request to the storage device. The storage device retrieves the mapping dataset from the storage path "D:\Important Files" as: {["User Node A", "Server A", "D:\Important Files\Configuration File\User Node A's Configuration File"], ["User Node B", "Server B", "E:\Configuration File\User Node B's Configuration File"]}. The storage device then retrieves the node identifier "User Node A" from the request, locates the position of User Node A's configuration file based on the node identifier and the mapping dataset, and reads User Node A's configuration file from that location.

[0059] Step 103: Perform corresponding operations on the configuration file based on the operation instructions.

[0060] Based on the operation instructions in the request sent by the user node, perform corresponding operations on the user node's configuration file (such as modifying parameters, adding parameters, deleting parameters, or querying parameters).

[0061] In the above scheme, the configuration files of each user node are stored in separate files, rather than being stored in a single file. A mapping dataset stores the mapping relationship between the node identifier of each user node and its configuration file, thus enabling the management of multiple configuration files. When multiple user nodes need to operate on a configuration file simultaneously, the corresponding configuration file location is found in the mapping dataset based on the user node's node identifier, and the configuration file is read and operated on based on that location. This avoids operating on the same configuration file repeatedly, effectively preventing data loss caused by operating on the same configuration file. Furthermore, for different user nodes, each operation only requires reading the configuration file of that specific user node, significantly reducing the amount of data read and improving the efficiency of configuration file operations.

[0062] In one example of this application, a configuration file operation method is also provided, wherein the configuration file mapped to the user node is read based on the node identifier and mapping dataset, such as... Figure 3 As shown, it includes:

[0063] Step 201: Match the node identifier with the data in the mapping dataset, which contains at least one node identifier and an address space that matches each node identifier.

[0064] The mapping dataset contains at least one node identifier and an address space that matches each node identifier.

[0065] For example, such as Figure 4 As shown, Figure 4This diagram shows a mapping dataset in a storage device. The dataset contains node identifiers for four user nodes: User Node A, User Node B, User Node C, and User Node D. It also includes the address spaces matching User Node A: "D:\Important Files\Configuration Files\Configuration File A" on server A; "D:\Important Files\Configuration Files\Configuration File B" on server A; "E:\Configuration Files\Configuration File C" on server B; and "C:\Important Files\Configuration Files\Configuration File C" on server C.

[0066] Step 202: Read the configuration file mapped to the user node based on the address space matching the node identifier.

[0067] After matching the node identifier in the user node's request with the data in the mapping dataset, the address space of the user node's configuration file is obtained, and the configuration file mapped to the user node is read from this address space.

[0068] In one example of this application, a configuration file operation method is also provided, wherein the configuration file is operated accordingly based on the operation instructions, such as... Figure 5 As shown, it includes:

[0069] Step 301: Determine the operation and at least one target parameter based on the operation instruction.

[0070] In this embodiment, the operation includes modifying parameters, deleting parameters, querying parameters, adding parameters, or any other operation on the configuration file. The target parameter is the parameter stored in the configuration file that the operation instruction needs to operate on.

[0071] Step 302: Perform the operation on the configuration file based on the target parameters.

[0072] Perform the corresponding operations on the target parameters in the configuration file.

[0073] In one example of this application, a configuration file operation method is also provided, wherein the operation is to modify parameters, and the operation is performed on the configuration file based on the target parameters, such as... Figure 6 As shown, it includes:

[0074] Step 401: Match the target parameter with the configuration file to obtain the original parameter that matches the target parameter.

[0075] Step 402: Modify the original parameters to match the target parameters.

[0076] For example, a configuration file contains the following content: ["Number of worker processes": "4", "Port number": "80", "Enable compression": "Enabled", "Compression level": "5"]. Based on the operation command sent by the user node to which this configuration file belongs, the operation is determined to be parameter modification, where the target parameter is ["Number of worker processes": "6", "Compression level": "8"]. The target parameter is matched with the original parameters in the configuration file to obtain two matching original parameters, "Number of worker processes" and "Compression level". The values ​​of these two original parameters are then modified to match the values ​​of the target parameters. The modified configuration file is then ["Number of worker processes": "6", "Port number": "80", "Enable compression": "Enabled", "Compression level": "8"].

[0077] Currently, since the configuration files for all user nodes are in the same file, when multiple user nodes modify them simultaneously, the data modified by one or more user nodes may be lost due to concurrency.

[0078] In the above solution, when multiple user nodes modify the configuration file simultaneously, it is only necessary to find the corresponding configuration file through the mapping dataset and modify the corresponding configuration file. There is no concurrency, thus effectively preventing data loss and improving the stability of operations on the configuration file.

[0079] This application also provides a configuration file operation method in one example, wherein the operation is to delete parameters, and the operation is performed on the configuration file based on the target parameters, such as... Figure 7 As shown, it includes:

[0080] Step 501: Match the target parameter with the configuration file to obtain the original parameter that matches the target parameter.

[0081] Step 502: Delete all original parameters that match the target parameter.

[0082] For example, a configuration file contains the following content: ["Number of worker processes": "4", "Port number": "80", "Enable compression": "Enabled", "Compression level": "5"]. Based on the operation command sent by the user node to which this configuration file belongs, the operation is determined to be deleting parameters, where the target parameters are ["Enable compression", "Compression level"]. The target parameters are matched with the original parameters in the configuration file, resulting in two matching original parameters, "Enable compression" and "Compression level". These two original parameters are then deleted. The configuration file content after deletion is: ["Number of worker processes": "4", "Port number": "80"].

[0083] Currently, since the configuration files for all user nodes are in the same file, when multiple user nodes delete parameters from their configuration files simultaneously, the concurrency will cause one or more user nodes' configuration files to be missed during deletion.

[0084] In the above solution, when multiple user nodes are deleted simultaneously, it is only necessary to find the corresponding configuration file through the mapping dataset and delete the corresponding configuration file. There is no concurrency, thus effectively preventing missed deletions and further improving the stability of operations on configuration files.

[0085] This application also provides a configuration file operation method in one example, wherein the operation is a parameter query, and the operation is performed on the configuration file based on the target parameter, such as... Figure 8 As shown, it includes:

[0086] Step 601: Match the target parameter with the configuration file to obtain the original parameter that matches the target parameter.

[0087] Step 602: Send all original parameters that match the target parameters to the user node.

[0088] For example, a configuration file might contain the following content: ["Number of worker processes": "4", "Port number": "80", "Enable compression": "Enabled", "Compression level": "5"]. Based on the operation command sent by the user node to which this configuration file belongs, the operation is determined to be a query parameter, where the target parameter is ["Port number"]. The target parameter is matched with the original parameters in the configuration file to obtain the original parameter "Port number" that matches the target parameter. This original parameter ["Port number": "80"] is then sent to the corresponding user node.

[0089] Currently, since the configuration file content of all user nodes is in the same file, when a user node queries parameters, it needs to read this file containing the configuration file content of all user nodes. After reading, it still needs to traverse the file to find the configuration file content of the specific user node before matching the parameters, resulting in very low efficiency in querying parameters.

[0090] In the above solution, when a user node queries parameters, it only needs to find the corresponding configuration file through the mapping dataset and read the configuration file of the user node to match the parameters, which significantly improves the efficiency of querying parameters.

[0091] This application also provides a configuration file operation method in one example, such as Figure 9 As shown, the method also includes:

[0092] Step 701: Receive the node identifier and the configuration file corresponding to the node identifier sent by the user node.

[0093] When a new user node connects, it needs to send its node identifier and configuration file to the storage device.

[0094] Step 702: If the node identifier fails to match the data in the mapping dataset, the configuration file is stored and the address space of the configuration file is obtained.

[0095] Even for newly connected user nodes, the node identifier must first be matched against the data in the mapping dataset to prevent duplicate node identifiers. If duplicate node identifiers are found, a new node identifier must be assigned to the user node for differentiation. After assignment, the new node identifier is sent to the user node so that the user node can modify its own node identifier to the new one.

[0096] After determining the node identifier of the user node, the configuration file is stored, and the address space where the configuration file is stored is obtained.

[0097] Step 703: Synchronously create a record in the mapping dataset, wherein the key name of the record is the node identifier and the key value of the record is the address space.

[0098] like Figure 4 As shown, Figure 4 The mapping dataset shown contains 4 records, with the key name being the node identifier and the key value being the address space.

[0099] After the configuration file of the new user node is stored, a record is synchronously created in the mapping dataset using the node identifier of the user node as the key name and the address space of the configuration file storage of the user node as the key value.

[0100] It should be noted that adding a new user node requires modifying the mapping dataset. When multiple new user nodes exist simultaneously, records need to be created in the mapping dataset at the same time, which may result in data loss.

[0101] This embodiment provides two methods to prevent data loss when adding multiple user nodes simultaneously:

[0102] The first method is using queues. When a new user node is added, a task is generated based on the node identifier and configuration file, and this task is inserted into the queue. Therefore, when multiple queues are added simultaneously, multiple tasks will be generated and inserted into the queues. Queues execute tasks according to the first-in, first-out (FIFO) principle, thus preventing data loss due to multiple tasks executing concurrently.

[0103] The second method is data locking. When a new user node needs to create a record in the mapped dataset, the mapped data table is locked. Only new tasks from that user node can operate on the mapped data table. Once the new task has completed its operation on the mapped data table, it is unlocked, allowing the next new task to operate on it. Therefore, multiple tasks operating on the mapped data table simultaneously will not cause data loss, effectively preventing data loss.

[0104] In addition to effectively preventing data loss, the two methods described above also ensure that the configuration files of newly added user nodes and existing user nodes are stored separately. Therefore, even if new user nodes are added using these two methods, it will not affect the efficiency of existing user nodes in operating on the configuration files.

[0105] This application also provides a configuration file operation method in one example, such as Figure 10 As shown, the method also includes:

[0106] Step 801: Match based on the node identifier to obtain the configuration file mapped to the user node.

[0107] Step 802: Delete the configuration file and delete the corresponding record in the mapping dataset based on the node identifier.

[0108] When a user node no longer needs to access the network, the configuration file mapped to that user node is determined based on its node identifier and then deleted. Next, the record corresponding to that node identifier in the mapping dataset is deleted.

[0109] In the above solution, deleting the corresponding configuration file when the user node is no longer needed improves the utilization of storage space on the storage device and removes redundant data. Deleting the corresponding record in the mapped dataset releases the node identifier, effectively reducing the occurrence of duplicate node identifiers.

[0110] This application also provides a configuration file operation method in one example, which further includes:

[0111] In response to a synchronization signal periodically sent by a user node, the mapping dataset is sent to the user node so that the user node updates its local mapping dataset after receiving the mapping dataset.

[0112] User nodes periodically send synchronization signals to the storage device, such as once every 24 hours or 48 hours. The specific time can be set according to requirements.

[0113] In response to a synchronization signal sent by a user node, which includes a request from the user node to synchronize the mapped dataset, the storage device sends the mapped dataset to that user node. Upon receiving the mapped dataset, the user node updates its local mapped dataset.

[0114] In the above scheme, user nodes synchronize their local mapped datasets by periodically sending synchronization signals to the storage device, ensuring that the local mapped datasets are updated regularly. When the mapped datasets are frequently used, the local mapped datasets can be accessed directly, eliminating the need to frequently request them from the storage device. This improves the efficiency of user nodes.

[0115] This application also provides a configuration file operation method in one example, which further includes:

[0116] In response to the synchronization signal and node identifier sent periodically by the user node, the configuration file mapped to the user node is read based on the node identifier and the mapping dataset;

[0117] The configuration file is sent to the user node so that the user node updates its local configuration file after receiving the configuration file.

[0118] In response to a synchronization signal sent by a user node, which includes a request from the user node to synchronize its configuration file, the storage device matches the user node's node identifier with the data in the synchronization signal to obtain the address space of the user node's configuration file and reads the configuration file from that address space. After reading, the storage device sends the configuration file to the user node. Upon receiving the configuration file, the user node updates its local configuration file.

[0119] In the above scheme, user nodes synchronize their local configuration files by periodically sending synchronization signals to the storage device, ensuring that the local configuration files are updated regularly. When the configuration file needs to be used frequently, the local configuration file can be directly accessed, eliminating the need to frequently request the configuration file from the storage device. This improves the working efficiency of user nodes.

[0120] To implement the above configuration file operation method, such as Figure 11 As shown, this application provides an example of a configuration file operation apparatus, including:

[0121] The communication module 10 is used to receive a request sent by a user node, the request containing an operation instruction and the node identifier of the user node;

[0122] The calculation module 20 is used to read the configuration file mapped to the user node based on the node identifier and the mapping dataset, wherein the mapping dataset is used to indicate the location of the configuration file;

[0123] The processing module 30 is used to perform corresponding operations on the configuration file based on the operation instructions in the request.

[0124] The calculation module 20 is further configured to match the node identifier with data in the mapping dataset, wherein the mapping dataset contains at least one node identifier and an address space that matches each node identifier.

[0125] The processing module 30 is also used to read the configuration file mapped to the user node based on the address space matching the node identifier.

[0126] The processing module 30 is further configured to determine the operation and at least one target parameter based on the operation instruction;

[0127] The processing module 30 is further configured to perform the operation on the configuration file based on the target parameters.

[0128] The processing module 30 is further configured to match the target parameters with the configuration file to obtain the original parameters that match the target parameters;

[0129] The processing module 30 is further configured to modify the original parameters to match the target parameters.

[0130] The processing module 30 is further configured to match the target parameters with the configuration file to obtain the original parameters that match the target parameters;

[0131] The processing module 30 is also used to delete all original parameters that match the target parameter.

[0132] The processing module 30 is further configured to match the target parameters with the configuration file to obtain the original parameters that match the target parameters;

[0133] The processing module 30 is also used to send all the original parameters that match the target parameters to the user node.

[0134] The communication module 10 is further configured to receive a node identifier and a configuration file corresponding to the node identifier sent by the user node.

[0135] The processing module 30 is further configured to store the configuration file and obtain the address space of the configuration file if the node identifier fails to match the data in the mapping dataset.

[0136] The processing module 30 is also used to synchronously create a record in the mapping dataset, wherein the key name of the record is the node identifier and the key value of the record is the address space.

[0137] The processing module 30 is further configured to perform matching based on the node identifier to obtain a configuration file mapped to the user node;

[0138] The processing module 30 is also used to delete the configuration file and delete the corresponding record in the mapping dataset based on the node identifier.

[0139] The communication module 10 is further configured to send the mapping dataset to the user node in response to a synchronization signal sent periodically by the user node, so that the user node updates its local mapping dataset after receiving the mapping dataset.

[0140] In the above scheme, the configuration files of each user node are stored in separate files, rather than being stored in a single file. A mapping dataset stores the mapping relationship between the node identifier of each user node and its configuration file, thus enabling the management of multiple configuration files. When multiple user nodes need to operate on a configuration file simultaneously, the corresponding configuration file location is found in the mapping dataset based on the user node's node identifier, and the configuration file is read and operated on based on that location. This avoids operating on the same configuration file repeatedly, effectively preventing data loss caused by operating on the same configuration file. Furthermore, for different user nodes, each operation only requires reading the configuration file of that specific user node, significantly reducing the amount of data read and improving the efficiency of configuration file operations.

[0141] In one example, this application embodiment also provides a mobile terminal, which includes at least one memory and a processor communicatively connected to the at least one memory; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the above-mentioned... Figures 1 to 10 The configuration file operation method described in any one of the embodiments.

[0142] In addition, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, which are used to perform the above-described... Figures 1 to 10 The configuration file operation method flow described in any one of the embodiments.

[0143] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0144] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0145] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0146] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0147] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0149] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0150] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A configuration file operation method, the method comprising: Receive a request sent by a user node, the request containing operation instructions and the node identifier of the user node; Based on the node identifier and mapping dataset, read the configuration file mapped to the user node, whereby the mapping dataset indicates the location of the configuration file; Perform corresponding operations on the configuration file based on the operation instructions; The step of performing corresponding operations on the configuration file based on the operation instructions includes: Based on the operation instruction, an operation and at least one target parameter are determined. The operation includes at least modifying a parameter, deleting a parameter, querying a parameter, or adding a parameter. The target parameter is a parameter stored in a configuration file that the operation instruction needs to operate on. The operation is performed on the configuration file based on the target parameters.

2. The configuration file operation method according to claim 1, wherein reading the configuration file mapped to the user node based on the node identifier and mapping dataset includes: The node identifiers are matched with data in a mapping dataset, which contains at least one node identifier and an address space that matches each node identifier. The configuration file mapped to the user node is read based on the address space that matches the node identifier.

3. The configuration file operation method according to claim 1, wherein the operation is to modify parameters, and the operation on the configuration file based on the target parameters includes: The target parameters are matched with the configuration file to obtain the original parameters that match the target parameters; Modify the original parameters to match the target parameters.

4. The configuration file operation method according to claim 1, wherein the operation is deleting parameters, and the operation on the configuration file based on the target parameters includes: The target parameters are matched with the configuration file to obtain the original parameters that match the target parameters; Delete all original parameters that match the target parameter.

5. The configuration file operation method according to claim 1, wherein the operation is a parameter query, and the operation on the configuration file based on the target parameter includes: The target parameters are matched with the configuration file to obtain the original parameters that match the target parameters; Send all original parameters that match the target parameters to the user node.

6. The configuration file operation method according to claim 2, further comprising: Receive the node identifier and the configuration file corresponding to the node identifier sent by the user node; If the node identifier fails to match the data in the mapping dataset, the configuration file is stored and the address space of the configuration file is obtained; A record is synchronously created in the mapping dataset, the key name of the record is the node identifier, and the key value of the record is the address space.

7. The configuration file operation method according to claim 2, further comprising: Matching is performed based on the node identifier to obtain the configuration file mapped to the user node; Delete the configuration file and delete the corresponding record in the mapping dataset based on the node identifier.

8. The configuration file operation method according to claim 1, further comprising: In response to a synchronization signal periodically sent by a user node, the mapping dataset is sent to the user node so that the user node updates its local mapping dataset after receiving the mapping dataset.

9. A configuration file operation device, the device comprising: A communication module is used to receive requests sent by user nodes, the requests containing operation instructions and the node identifier of the user node; A calculation module is used to read the configuration file mapped to the user node based on the node identifier and mapping dataset, wherein the mapping dataset is used to indicate the location of the configuration file; The processing module is used to perform corresponding operations on the configuration file based on the operation instructions in the request; The processing module is further configured to determine an operation and at least one target parameter based on the operation instruction. The operation includes at least modifying a parameter, deleting a parameter, querying a parameter, or adding a parameter. The target parameter is a parameter stored in a configuration file that the operation instruction needs to operate on. The processing module is also used to perform the operation on the configuration file based on the target parameters.