Configuration file processing method, device, equipment, storage medium and system

Through the hierarchical management and batch processing mechanism of configuration files, the problem of low efficiency of configuration file management in the existing technology is solved, multi-level configuration support and automatic inspection of distributed nodes are realized, and system performance and stability are improved.

CN112416456BActive Publication Date: 2024-09-17CHINA CONSTRUCTION BANK
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011299084.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-18
Publication Date
2024-09-17
Estimated Expiration
2040-11-18

AI Technical Summary

Technical Problem

The management efficiency of configuration files in the existing technology is low, especially in multi-environment and multi-cluster scenarios, manual modification of configuration items is inefficient, and multi-level configuration and automatic inspection of distributed nodes are not supported.

Method used

Through the hierarchical management of configuration files, it is divided into five levels: environment, group, application module, deployment unit, and service instance. It provides a configuration change list upload interface, realizes batch processing of configuration files, and actively obtains configuration information on distributed nodes. Perform discrepancy detection and alerts.

Benefits of technology

It improves the processing efficiency of configuration files and system performance, simplifies user operations, enhances the management and use experience of configuration files, and ensures the stability of the distributed system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112416456B
    Figure CN112416456B
Patent Text Reader

Abstract

The embodiments of the present application provide a configuration file processing method, apparatus, device, storage medium and system, which obtain a configuration change list, wherein the configuration change list includes the level, identification and change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit and a service instance; according to the configuration change list, the first configuration file is updated; according to the level and identification of the first configuration file, the modified first configuration file is published, so as to realize batch processing of the configuration files. When a large number of configuration items need to be modified, added or deleted, only one operation needs to be performed, thereby improving the processing efficiency of the configuration files and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a configuration file processing method, apparatus, device, storage medium and system. Background Art

[0002] Configuration is a read-only file independent of the program. Configuration files are a common way to load configurations. They are used to determine program parameters and initial settings through configuration items. The same program usually requires different configurations in different environments (development, testing, production) and different clusters (application modules, deployment units). The corresponding configuration files are also different, so the management of configuration files is crucial.

[0003] In the prior art, Apollo is often used to manage the configurations of different environments and clusters. Specifically, the user modifies and publishes the configuration in the configuration center, and the configuration center notifies the Apollo client of the configuration update. The Apollo client pulls the latest configuration from the configuration center, updates the local configuration, and notifies the application.

[0004] However, the existing technology only supports manual modification of configuration items in the configuration center, which has the problem of low efficiency. Summary of the invention

[0005] Embodiments of the present application provide a configuration file processing method, apparatus, device, storage medium, and system to solve the problem of low efficiency in modifying configuration files in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a configuration file processing method, including:

[0007] Obtaining a configuration change list, wherein the configuration change list includes a level, an identifier, and a change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit, and a service instance;

[0008] According to the configuration change list, updating the first configuration file;

[0009] The modified first configuration file is published according to the level and identifier of the first configuration file.

[0010] Optionally, the change content includes a configuration item identifier and a change item, and the change item includes modification, deletion or addition; accordingly, updating the first configuration file according to the configuration change list includes:

[0011] According to the changed content, the first configuration file is updated using at least one of the following processing methods:

[0012] Modify the value of at least one configuration item in the first configuration file;

[0013] Deleting at least one configuration item in the first configuration file;

[0014] At least one configuration item is added to the first configuration file.

[0015] Optionally, the method further comprises:

[0016] Update the version number of the first configuration file.

[0017] Optionally, the publishing the modified first configuration file according to the level and identifier of the first configuration file includes:

[0018] Generate a data packet using the modified first configuration file as the file body and the updated version number as the file header;

[0019] Determining, according to the level and identifier of the first configuration file, a first distributed node on which the first configuration file takes effect;

[0020] The data packet is sent to the first distributed node.

[0021] Optionally, before updating the first configuration file according to the configuration change list, the method further includes:

[0022] It is determined that the configuration change list complies with a configuration change list specification.

[0023] Optionally, after updating the first configuration file, the method further includes:

[0024] The configuration file directory is updated, wherein the configuration file directory includes a configuration file level, a configuration file identifier, and a configuration file version number.

[0025] Optionally, the method further comprises:

[0026] Acquire configuration information of a second configuration file in a second distributed node that needs to be troubleshooted, the configuration information including an identifier, a version number, and configuration item information of the second configuration file;

[0027] Determining, according to the configuration file directory, a third configuration file that is consistent with the identifier of the second configuration file;

[0028] determining whether there is a difference between the second configuration file and the third configuration file;

[0029] If there is a difference, an alarm is issued.

[0030] Optionally, the determining whether there is a difference between the second configuration file and the third configuration file includes:

[0031] Determining, according to the configuration file directory, whether the version number of the second configuration file is consistent with the version number of the third configuration file;

[0032] If they are inconsistent, it is determined that there is a difference between the second configuration file and the third configuration file.

[0033] Optionally, the method further comprises:

[0034] If they are consistent, determining whether the configuration item information of the second configuration file is consistent with the configuration item information of the third configuration file;

[0035] If they are inconsistent, it is determined that there is a difference between the second configuration file and the third configuration file.

[0036] In a second aspect, an embodiment of the present application provides a configuration file processing device, including:

[0037] An acquisition module is used to acquire a configuration change list, wherein the configuration change list includes a level, an identifier, and a change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit, and a service instance;

[0038] The processing module is used to update the first configuration file according to the configuration change list; and publish the modified first configuration file according to the level and identifier of the first configuration file.

[0039] In a third aspect, an embodiment of the present application provides a node management platform, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the configuration file processing method as described in the first aspect above is implemented.

[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the configuration file processing method as described in the first aspect above.

[0041] In a fifth aspect, the embodiments of the present application provide a distributed system, including distributed nodes and the node management platform described in the third aspect above.

[0042] The configuration file processing method, apparatus, device, storage medium and system provided in the embodiments of the present application obtain a configuration change list, wherein the configuration change list includes the level, identification and change content of the first configuration file to be changed; wherein the level of the first configuration file is one of environment, group, application module, deployment unit and service instance; according to the configuration change list, the first configuration file is updated; according to the level and identification of the first configuration file, the modified first configuration file is published to realize batch processing of the configuration files. When a large number of configuration items need to be modified, added or deleted, only one operation needs to be performed, thereby improving the processing efficiency of the configuration files and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic diagram of the structure of a distributed system provided in Example 1 of the present application;

[0044] Figure 2 A schematic diagram of the hierarchical structure of a configuration file provided in Example 1 of the present application;

[0045] Figure 3 A flowchart of a configuration file processing method provided in Embodiment 2 of the present application;

[0046] Figure 4 A flowchart of a configuration file processing method provided in Embodiment 3 of the present application;

[0047] Figure 5 A schematic diagram of the structure of a configuration file processing device provided in Embodiment 4 of the present application;

[0048] Figure 6 A schematic diagram of the structure of the node management platform provided in Example 5 of the present application. DETAILED DESCRIPTION

[0049] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0050] The inventors of the present application have found that the existing configuration management model based on Apollo technology has the following problems during use: (1) It only supports the modification and implementation of configuration items loaded in the program, and is not suitable for systems that only support the startup and loading of static configuration files; (2) It only supports manual modification of configuration items in the configuration center. When there are many configuration files and devices, they can only be modified one by one, which has low operation efficiency; (3) It is single-layered and only involves the configuration of namespaces at the environment and cluster levels. It cannot support the multi-level deployment architecture solution of the core environment, group, application module, deployment unit, and service instance of the banking business system; (4) It does not actively check the configuration files on the distributed nodes.

[0051] The main idea of ​​the technical solution of the present application: Based on the technical problems existing in the prior art, the present application provides a technical solution for managing configuration files based on the hierarchy of configuration files, dividing the configuration files into five hierarchies that match the deployment architecture of distributed nodes, and the node management platform maintains the configuration file directory generated based on the hierarchy and the correspondence between the configuration files and the distributed nodes. On this basis, on the one hand, by providing users with a configuration change list upload interface, batch processing of configuration files is achieved according to the configuration change list uploaded by the user. On the other hand, based on the configuration file directory, the configuration information of the configuration files on the relevant distributed nodes is actively obtained, checked, and active alarms are issued when problems are found, which not only improves the processing efficiency of the configuration files, but also improves the working performance and stability of the system.

[0052] Embodiment 1

[0053] Figure 1 A schematic diagram of the structure of a distributed system provided in Example 1 of the present application is shown in FIG. Figure 1 As shown, the distributed system 10 in this embodiment includes a node management platform 11 and multiple distributed nodes 12. The node management platform 11 is used to manage the configurations in the multiple distributed nodes 12 through the configuration file processing methods in the following method embodiments. The node management platform 11 can be a server or an intelligent terminal such as a computer. The distributed nodes 12 are servers that execute distributed tasks.

[0054] In order to adapt to the characteristics of the banking business system, such as multiple business environments (development environment, test environment, production environment, etc.), multiple groups (online group, batch group, etc.), multiple application modules (microservice module, integration module, etc.), multiple deployment units (transaction management unit, event receiving and sending unit, etc.) and multiple virtual machines, for example, there are a total of 1,000 servers in a certain environment (such as development environment). According to different functions, these 1,000 servers can be divided into two groups, of which 110 mainly handle online business and constitute the online group, and the other 800 mainly handle batch business and constitute the batch group. The online group and the batch group can be further divided into different modules according to their functions. For example, among the 800 servers in the batch group, 400 are microservice modules and 400 are integration modules. Furthermore, among the 400 servers in the microservice module, 100 are running as transaction management units and the other 300 are running as event receiving and sending units. In this embodiment, according to the different effective scopes of the configuration files (i.e., the number of distributed nodes that can be managed), the configuration files are divided into five levels, including environment, group, application module, deployment unit, and service instance. Figure 2 A schematic diagram of the hierarchical structure of a configuration file provided in Example 1 of the present application, such as Figure 2 As shown in the figure, the first layer is the environment. The configuration profiles at this layer control the common configuration profiles in the environment and have the largest scope of effectiveness, such as 1,000 servers. The second layer is the group. Its scope of effectiveness is lower than the first layer, such as 800 servers. According to the number of groups, the configuration profiles at this layer can be divided into multiple types. For example, the configuration profiles applicable to online groups are different from those applicable to batch groups. The third layer is the application module. Its scope of effectiveness is lower than the second layer, such as 400 servers. The configuration items of the configuration profiles at this layer are distinguished by specific values ​​according to the dimensions of the application module. The fourth layer is the deployment unit. Its scope of effectiveness is lower than the third layer, such as 100 servers. This layer indicates that although it is under the same application module, there are different values ​​of configuration items according to different configurations of deployment units. The last layer is the service instance, which is the smallest layer. The configuration profiles at this layer are only applied on one server.

[0055] Accordingly, the node management platform 11 can manage the configuration files according to the level of the configuration files. For example, different databases can be established according to different levels to manage the corresponding configuration files respectively, and corresponding directories can be generated on the service page of the node management platform 11, so that the display of the configuration files is clear at a glance, and users can know more clearly the effective scope of the configuration files in the entire distributed system.

[0056] Embodiment 2

[0057] Figure 3This is a flow chart of the configuration file processing method provided in the second embodiment of the present application. The method of this embodiment can be executed by the configuration file processing device provided in the embodiment of the present application. The device can be implemented by software and / or hardware, and can be integrated into a server and intelligent terminal as a node management platform. Figure 3 As shown, the configuration file processing method of this embodiment includes:

[0058] S101. Obtain a configuration change list.

[0059] In this step, the action of obtaining the configuration change list can be triggered according to the operation performed by the user (such as a network administrator) on the service page of the node management platform. Specifically, the node management platform can provide the user with an upload interface for the configuration change list on the service page (user center), and obtain the configuration change list according to the user's upload operation. The node management platform can also provide the user with an input text box on the service page, and route to the corresponding location in the memory according to the memory address entered by the user in the input text box, so as to obtain the configuration change list.

[0060] The configuration change list includes the level, identification and change content of the first configuration file to be changed; the level division of the configuration file is as follows: Figure 2 As shown, it includes five layers: environment, group, application module, deployment unit, and service instance. For the sake of distinction, in this embodiment, the configuration file in the configuration change list is called the first configuration file, and the level of each first configuration file is one of the environment, group, application module, deployment unit, and service instance. The identifier of the configuration file can be the name or number of the configuration file, etc., which is used to uniquely distinguish a configuration file.

[0061] In this embodiment, the change to the first configuration file mainly refers to the change to the configuration items of the first configuration file. Accordingly, the change content in the configuration change list is used to explain which configuration items of the first configuration file are changed and the corresponding change matters. Exemplarily, the change content includes a configuration item identifier and a change matter, wherein the change matter includes modification, deletion or addition. The configuration item identifier is used to distinguish different configuration items and can be the name or number of the configuration item, etc. The configuration item corresponding to the configuration item identifier in the change content is the configuration item to be changed.

[0062] It should be noted that if there are multiple changes to the same configuration file, such as modification, deletion, and addition, the configuration item identifiers corresponding to each change item should be listed separately, or the configuration item identifiers and their corresponding changes should be listed. If it is a modification or addition, the change content should also include the change value. Specifically, if it is a modification, the change value is the modified value; if it is a addition, the change value is the value of the newly added configuration item. Exemplarily, the structure of the change content can be shown in Table 1.

[0063] Table 1

[0064] Configuration item identification Changes Changing Values ID10001 Revise —— ID10002 delete —— ID10003 Added —— … … …

[0065] In addition, in order to improve the standardization of the configuration change list and facilitate machine recognition, in this step, the configuration change list can be generated based on the template file. Exemplarily, the template file includes different data pages, each data page corresponds to a level of configuration file, namely, the environment configuration file page, the group configuration file page, the application module configuration file page, the deployment unit configuration file page, and the service instance configuration file page. Accordingly, when generating the configuration file change list, it is only necessary to list the identifier and change content of the first configuration file to be changed in the corresponding data page.

[0066] S102: Update the first configuration file according to the configuration change list.

[0067] In this step, the configuration change list obtained in S101 is identified according to natural language processing technology, and according to the configuration change list, it is routed to the storage location of the first configuration file listed in the configuration change list, and the first configuration file is updated, thereby realizing batch modification of the configuration files and improving the modification efficiency of the configuration files on the node management platform.

[0068] Optionally, in order to reduce the possibility of error in the update process and further improve the efficiency of the update process of the configuration file on the node management platform, before the first configuration file is updated, the method of this embodiment further includes:

[0069] Verify that the configuration change list complies with the configuration change list specification.

[0070] Among them, the configuration change list specification is used to limit the content or file format of the configuration change list to comply with relevant regulations, such as the file format is Excel, if the change item is a modification, the change value cannot be empty, etc. Only when the configuration change list meets the requirements of the configuration change list specification will the update operation of the first configuration file be further performed, otherwise, the user is prompted to reselect or upload the configuration change list.

[0071] In a possible implementation, at least one of the following processing methods is used to update the first configuration file according to the content of the change:

[0072] (1) modifying the value of at least one configuration item in the first configuration file;

[0073] (2) deleting at least one configuration item in the first configuration file;

[0074] (2) Add at least one configuration item to the first configuration file.

[0075] The specific processing method or methods used to update the first configuration files is determined by the changed contents of each first configuration file in the configuration change list.

[0076] Optionally, after completing the change to the first configuration file, the method of this step further includes: updating the version number of the first configuration file.

[0077] S103: Publish the modified first configuration file according to the level and identifier of the first configuration file.

[0078] In this step, according to the level and identifier of the first configuration file in the configuration change list, the modified first configuration file obtained by S102 is sent to the corresponding distributed node to publish the modified first configuration file. Accordingly, the distributed node that receives the modified first configuration file stores and loads the modified first configuration file to make the modified first configuration file effective.

[0079] It can be seen from the above-mentioned embodiment 1 that there is a corresponding relationship between the hierarchical division of the configuration file and the architectural distribution of the distributed nodes. Therefore, a first data table that maintains the corresponding relationship between the configuration file and the distributed nodes within its effective range can include the hierarchy and identification of the configuration file and the IP address of the corresponding distributed node. Therefore, after the level and identification of the configuration file are determined, it is possible to determine which distributed nodes are within its effective range.

[0080] In a possible implementation, in this step, a data packet is generated by using the modified first configuration file as the file body and the updated version number as the file header, and the first distributed node on which the first configuration file takes effect is determined according to the level and identifier of the first configuration file, and the data packet is sent to the first distributed node to publish the modified first configuration file.

[0081] It is understandable that when there are multiple first configuration files in the configuration file change list, in this step, multiple modified first configuration files can be published in parallel to improve processing efficiency.

[0082] Exemplarily, if the first configuration file is at the environment level and is identified as a development environment configuration file, then by querying the first data table, the IP addresses of the servers (i.e., the first distributed nodes) within the effective range of the first configuration file can be determined, such as 1,000 IP addresses, and the first configuration file can be sent to the servers corresponding to these 1,000 IP addresses respectively.

[0083] Optionally, after the first configuration file is updated, the method of this embodiment further includes: updating a configuration file directory, the configuration file directory including the configuration file level, configuration file identifier, configuration file version number and configuration item information. In this step, the version number in the configuration file directory is mainly updated to facilitate the user's query of the configuration file.

[0084] In this embodiment, by obtaining a configuration change list, the configuration change list includes the level, identification and change content of the first configuration file to be changed; wherein the level of the first configuration file is one of environment, group, application module, deployment unit, and service instance; according to the configuration change list, the first configuration file is updated; according to the level and identification of the first configuration file, the modified first configuration file is published, so as to realize batch modification and publication of the configuration files. When a large number of configuration items need to be modified and added, only one operation needs to be performed, thereby improving the processing efficiency of the configuration files and improving the user experience.

[0085] Embodiment 3

[0086] Figure 4 A flowchart of a configuration file processing method provided in Example 3 of the present application is shown in FIG. Figure 3 Based on the embodiment shown, in order to prevent the configuration files on the distributed nodes from being maliciously tampered with or accidentally modified, causing the distributed nodes to fail to work properly, as shown in FIG. Figure 4 As shown, the configuration file processing method provided in this embodiment includes:

[0087] S201. Obtain configuration information of a second configuration file in a second distributed node that needs to be troubleshooted.

[0088] In this step, for ease of distinction, the distributed node that needs to be troubleshooted is called the second distributed node, and the configuration file in the second distributed node is called the second configuration file. Accordingly, the configuration information obtained in this step is the configuration information of all configuration files running in the second distributed node, and the configuration information includes the identifier, version number and configuration item information of the second configuration file, wherein the configuration item information includes the configuration item identifier and the configuration item value.

[0089] In a possible implementation, in this step, the second distributed node and the timing of obtaining the configuration information of the second configuration file on the second distributed node are determined according to the connection characteristics between the node management platform and the distributed nodes.

[0090] Specifically, the node management platform and the distributed nodes are connected in a long connection manner. The distributed nodes will establish a heartbeat connection with the node management platform each time they are started, and the distributed nodes will restart the device when there is a configuration update. For this reason, in this step, the node management platform will determine the distributed node with which it re-establishes a connection relationship as the second distributed node. When the node management platform establishes a connection with a distributed node, it obtains the configuration information of the second configuration file in the distributed node.

[0091] In another possible implementation, in this step, the distributed nodes to be checked and the time for checking can be listed according to a pre-established checking schedule, and the time for determining the second distributed node and obtaining the configuration information of the second configuration file can be determined according to the checking schedule.

[0092] In another possible implementation, in this step, the configuration information of the second configuration file on each distributed node within its jurisdiction is periodically obtained according to a set period to implement the inspection of each distributed node.

[0093] It should be noted that when there are multiple second configuration files on the second distributed node, such as an environment configuration file and a group configuration file, the configuration information and the corresponding configuration files are one-to-one corresponding. Exemplarily, the structure of the configuration information is shown in Table 2.

[0094] Table 2

[0095]

[0096] S202: Determine, according to the configuration file directory, a third configuration file that is consistent with the identifier of the second configuration file.

[0097] In this step, the third configuration file corresponding to the second configuration file in the node management platform is determined by querying the configuration file directory. Specifically, the third configuration file consistent with the identification of the second configuration file is determined by keyword query or one-by-one comparison based on the identification of the second configuration file, thereby screening out the comparison object used to determine whether the second configuration file has been modified.

[0098] In this step, the third configuration file is located by means of a configuration file directory, without searching one by one in the configuration file storage database, thereby improving the convenience and efficiency of the query.

[0099] S203: Determine whether there is a difference between the second configuration file and the third configuration file.

[0100] In this step, after S202, by comparing the second configuration file with the third configuration file, it is determined whether there is a difference between the second configuration file and the third configuration file, thereby determining whether there is a problem with the second configuration file.

[0101] In a possible implementation, in this step, it is determined whether the version number of the second configuration file is consistent with the version number of the third configuration file according to the configuration file directory; if not, it is determined that there is a difference between the second configuration file and the third configuration file; if they are consistent, it is determined whether the configuration item information of the second configuration file is consistent with the configuration item information of the third configuration file; if not, it is determined that there is a difference between the second configuration file and the third configuration file.

[0102] Optionally, the configuration file directory may also include the storage location of the configuration file. Accordingly, in this step, the storage location of the third configuration file may be determined through the configuration file directory, and the configuration item information of the second configuration file may be compared with the configuration item information of the third configuration file to determine whether the configuration item information of the second configuration file is consistent with the configuration item information of the third configuration file. If they are consistent, the process ends; if not, S204 is executed.

[0103] S204: If there is a difference, an alarm is issued.

[0104] In this step, if it is determined according to S203 that there is a difference between the second configuration file and the third configuration file, it means that there is a problem with the second configuration file on the second distributed node, and it may be necessary to manually troubleshoot the relevant problem, so a corresponding alarm method is used to issue an alarm to achieve the purpose of notifying and reminding the user. The specific alarm method can be set according to the actual situation and is not limited here.

[0105] In a possible implementation, in this step, different warning methods may be used to issue warnings according to different levels of configuration files, so as to distinguish the types of problems. For example:

[0106] If the level of the configuration files with differences is the environment, the first alarm method is used for alarm, such as controlling the alarm; if the level of the configuration files with differences is the group, the second alarm method is used for alarm, such as flashing the screen; if the level of the configuration files with differences is the application module, the third alarm method is used for alarm, such as sending a text message or email reminder to the user; if the level of the configuration files with differences is the deployment unit, the fourth alarm method is used for alarm, such as reminding the user by displaying a pop-up window in the middle of the page; if the level of the configuration files with differences is the service instance, the fifth alarm method is used for alarm, such as reminding the user through a system prompt message.

[0107] In this embodiment, when a connection is established with a second distributed node, configuration information of a second configuration file in the second distributed node is obtained, the configuration information including an identifier, a version number and configuration item information of the second configuration file; a third configuration file consistent with the identifier of the second configuration file is determined according to the configuration file directory; and whether there is a difference between the second configuration file and the third configuration file; if there is a difference, an alarm is issued, thereby realizing troubleshooting of configuration files on distributed nodes based on the configuration file directory, actively discovering problems, and notifying users to handle them, which not only improves the efficiency of troubleshooting, but also helps to discover problems early and ensure the working performance of the distributed system.

[0108] Embodiment 4

[0109] Figure 5 A schematic diagram of the structure of the configuration file processing device provided in the fourth embodiment of the present application, such as Figure 5 As shown, the configuration file processing device 20 in this embodiment includes:

[0110] An acquisition module 21 and a processing module 22 .

[0111] The acquisition module 21 is used to acquire a configuration change list, wherein the configuration change list includes a level, an identifier, and a change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit, and a service instance;

[0112] The processing module 22 is used to update the first configuration file according to the configuration change list; and publish the modified first configuration file according to the level and identification of the first configuration file.

[0113] Optionally, the change content includes a configuration item identifier and a change item, and the processing module 22 is specifically used to:

[0114] According to the changed content, the first configuration file is updated using at least one of the following processing methods:

[0115] Modify the value of at least one configuration item in the first configuration file;

[0116] Deleting at least one configuration item in the first configuration file;

[0117] At least one configuration item is added to the first configuration file.

[0118] Optionally, the processing module 22 is further configured to:

[0119] Update the version number of the first configuration file.

[0120] Optionally, the processing module 22 is specifically used for:

[0121] Generate a data packet using the modified first configuration file as the file body and the updated version number as the file header;

[0122] Determining, according to the level and identifier of the first configuration file, a first distributed node on which the first configuration file takes effect;

[0123] The data packet is sent to the first distributed node.

[0124] Optionally, the processing module 22 is further configured to:

[0125] It is determined that the configuration change list complies with a configuration change list specification.

[0126] Optionally, the processing module 22 is further configured to:

[0127] The configuration file directory is updated, wherein the configuration file directory includes a configuration file level, a configuration file identifier, and a configuration file version number.

[0128] Optionally, the acquisition module 21 is further used for:

[0129] Acquire configuration information of a second configuration file in a second distributed node that needs to be troubleshooted, the configuration information including an identifier, a version number, and configuration item information of the second configuration file;

[0130] The processing module 22 is also used for:

[0131] Determining, according to the configuration file directory, a third configuration file that is consistent with the identifier of the second configuration file;

[0132] determining whether there is a difference between the second configuration file and the third configuration file;

[0133] If there is a difference, an alarm is issued.

[0134] Optionally, the processing module 22 is specifically used for:

[0135] Determining, according to the configuration file directory, whether the version number of the second configuration file is consistent with the version number of the third configuration file;

[0136] If they are inconsistent, it is determined that there is a difference between the second configuration file and the third configuration file.

[0137] Optionally, the processing module 22 is further configured to:

[0138] If they are consistent, determining whether the configuration item information of the second configuration file is consistent with the configuration item information of the third configuration file;

[0139] If they are inconsistent, it is determined that there is a difference between the second configuration file and the third configuration file.

[0140] The configuration file processing device provided in this embodiment can execute the configuration file processing method provided in the above method embodiment, and has the corresponding functional modules and beneficial effects of the execution method. The implementation principle and technical effects of this embodiment are similar to those of the above method embodiment, and will not be repeated here.

[0141] Embodiment 5

[0142] Figure 6 A schematic diagram of the structure of the node management platform provided in Example 5 of the present application, such as Figure 6 As shown, the node management platform 11 includes a memory 111, a processor 112, and a computer program stored in the memory and executable on the processor; the number of the processor 112 of the node management platform 11 may be one or more. Figure 6 A processor 112 is taken as an example; the processor 112 and the memory 111 in the node management platform 11 can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0143] The memory 111, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the acquisition module 21 and the processing module 22 in the embodiment of the present application. The processor 112 executes various functional applications and data processing of the device / terminal / server by running the software programs, instructions and modules stored in the memory 111, that is, implements the above-mentioned configuration file processing method.

[0144] The memory 111 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 111 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 111 may further include a memory remotely arranged relative to the processor 112, and these remote memories may be connected to the device / terminal / server via a grid. Examples of the above-mentioned grid include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0145] Embodiment 6

[0146] Embodiment 6 of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer processor, it is used to execute a configuration file processing method, the method comprising:

[0147] Obtaining a configuration change list, wherein the configuration change list includes a level, an identifier, and a change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit, and a service instance;

[0148] According to the configuration change list, updating the first configuration file;

[0149] The modified first configuration file is published according to the level and identifier of the first configuration file.

[0150] Of course, the computer-readable storage medium provided in the embodiment of the present application, and its computer program are not limited to the method operations described above, and can also execute related operations in the configuration file processing method provided in any embodiment of the present application.

[0151] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or grid device, etc.) to execute the methods described in each embodiment of the present application.

[0152] It is worth noting that in the embodiment of the above-mentioned configuration file processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific identification of each functional unit is only for the convenience of distinguishing each other, and is not used to limit the scope of protection of this application.

[0153] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A configuration file processing method, characterized in that: include: Obtaining a configuration change list, wherein the configuration change list includes a level, an identifier, and a change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit, and a service instance; According to the configuration change list, updating the first configuration file; Publishing the modified first configuration file according to the level and identifier of the first configuration file; After the first configuration file is updated, the method further includes: Updating a configuration file directory, wherein the configuration file directory includes a configuration file level, a configuration file identifier, and a configuration file version number; The method further comprises: Acquire configuration information of a second configuration file in a second distributed node that needs to be troubleshooted, the configuration information including an identifier, a version number, and configuration item information of the second configuration file; Determining, according to the configuration file directory, a third configuration file that is consistent with the identifier of the second configuration file; determining whether there is a difference between the second configuration file and the third configuration file; If there is a difference, an alarm is issued; The determining whether there is a difference between the second configuration file and the third configuration file includes: Determining, according to the configuration file directory, whether the version number of the second configuration file is consistent with the version number of the third configuration file; If they are inconsistent, determining that there is a difference between the second configuration file and the third configuration file; The method further comprises: If they are consistent, determining whether the configuration item information of the second configuration file is consistent with the configuration item information of the third configuration file; If they are inconsistent, determining that there is a difference between the second configuration file and the third configuration file; The step of determining, according to the configuration file directory, a third configuration file that is consistent with the identifier of the second configuration file includes: By using the identifier of the second configuration file, a keyword query or a one-by-one comparison method is used to determine the third configuration file that is consistent with the identifier of the second configuration file, thereby screening out a comparison object for determining whether the second configuration file has been modified; The step of publishing the modified first configuration file according to the level and identifier of the first configuration file includes: Generate a data packet using the modified first configuration file as the file body and the updated version number as the file header; Determining, according to the level and identifier of the first configuration file, a first distributed node on which the first configuration file takes effect; The data packet is sent to the first distributed node.

2. The method according to claim 1, characterized in that The change content includes a configuration item identifier and a change item, and the change item includes modification, deletion or addition; accordingly, updating the first configuration file according to the configuration change list includes: According to the changed content, the first configuration file is updated using at least one of the following processing methods: Modify the value of at least one configuration item in the first configuration file; Deleting at least one configuration item in the first configuration file; At least one configuration item is added to the first configuration file.

3. The method according to claim 2, characterized in that The method further comprises: Update the version number of the first configuration file.

4. The method according to any one of claims 1 to 3, characterized in that: Before updating the first configuration file according to the configuration change list, the method further includes: It is determined that the configuration change list complies with a configuration change list specification.

5. A configuration file processing device, characterized in that: include: An acquisition module is used to acquire a configuration change list, wherein the configuration change list includes a level, an identifier, and a change content of a first configuration file to be changed; wherein the level of the first configuration file is one of an environment, a group, an application module, a deployment unit, and a service instance; A processing module, configured to update the first configuration file according to the configuration change list; and publish the modified first configuration file according to the level and identifier of the first configuration file; The processing module is further used for: Updating a configuration file directory, wherein the configuration file directory includes a configuration file level, a configuration file identifier, and a configuration file version number; The acquisition module is further used for: Acquire configuration information of a second configuration file in a second distributed node that needs to be troubleshooted, the configuration information including an identifier, a version number, and configuration item information of the second configuration file; The processing module is further used for: Determining, according to the configuration file directory, a third configuration file that is consistent with the identifier of the second configuration file; determining whether there is a difference between the second configuration file and the third configuration file; If there is a difference, an alarm is issued; The processing module is specifically used for: Determining, according to the configuration file directory, whether the version number of the second configuration file is consistent with the version number of the third configuration file; If they are inconsistent, determining that there is a difference between the second configuration file and the third configuration file; The processing module is further used for: If they are consistent, determining whether the configuration item information of the second configuration file is consistent with the configuration item information of the third configuration file; If they are inconsistent, determining that there is a difference between the second configuration file and the third configuration file; The processing module is further used for: By using the identifier of the second configuration file, a keyword query or a one-by-one comparison method is used to determine the third configuration file that is consistent with the identifier of the second configuration file, thereby screening out a comparison object for determining whether the second configuration file has been modified; The processing module is further used for: Generate a data packet using the modified first configuration file as the file body and the updated version number as the file header; Determining, according to the level and identifier of the first configuration file, a first distributed node on which the first configuration file takes effect; The data packet is sent to the first distributed node.

6. A node management platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the configuration file processing method as described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the configuration file processing method as described in any one of claims 1 to 4 is implemented.

8. A distributed system, characterized in that: It comprises distributed nodes and the node management platform described in claim 6.

Citation Information

Patent Citations

  • Method and device for automatic installation and deployment of hadoop platform

    CN104317610A

  • Method and device for updating configuration list of data query engine

    CN105335472A

  • Method and system for maintaining system configuration consistency

    CN108696372A

  • File type configuration information synchronization system and method and storage medium

    CN109582381A

  • Verification method and device, server and storage medium

    CN110427735A