A configuration change method, system, terminal device and storage medium

Through the automatic processing of the configuration management platform, the target configuration file is obtained and the configuration of the Nginx server is updated, which solves the problem of inefficient Nginx configuration change in the existing technology, and achieves efficient and accurate configuration updates.

CN115987786BActive Publication Date: 2025-06-24PING AN BANK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211650707.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-06-24
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In the prior art, Nginx server configuration changes require manual operation, which is inefficient and cannot meet the needs of efficiently and quickly implementing Nginx configuration changes.

Method used

Obtain the target configuration file through the configuration management platform, determine the target server cluster, send configuration change requests to each server, execute configuration loading instructions, and update the server configuration file.

Benefits of technology

It realizes automated configuration updates, improves the efficiency and accuracy of configuration updates, and meets the needs of efficient and rapid configuration changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987786B_ABST
    Figure CN115987786B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a configuration change method, system, terminal device, and storage medium. Among them, the method includes: the configuration management platform obtains a target configuration file and determines a target server cluster of the configuration to be changed corresponding to the target configuration file; the configuration management platform sends a configuration change request to each server included in the target server cluster based on the target configuration file; the configuration management platform obtains the servers that pass the configuration change request as target servers, sends the target configuration file to the target servers, and executes a configuration loading instruction on the target servers; the target servers execute the configuration loading instruction to update the configuration file of the servers to the target configuration file. Through the above method, the efficiency of configuration update is improved, errors caused by manual update are avoided, and the accuracy of updated configuration is higher, meeting the requirement of efficient and rapid configuration change.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a configuration change method, system, terminal device, and storage medium. Background Art

[0002] Load balancing is the core of cluster technology, which greatly improves the Web access rate and concurrency. Nginx is a current mainstream load balancing software, also known as a reverse proxy server. The Nginx server receives Http requests sent by clients, distributes and forwards the Http requests to a server cluster on the internal network based on a preset load balancing policy, and returns the results obtained from the server cluster to the clients. The load balancing policy is recorded in a configuration file.

[0003] Most existing application systems perform load balancing through Nginx servers. However, with the large-scale release and online / offline of applications, the need for Nginx changes is increasing. In the prior art, operations and maintenance personnel manually change the configuration of each Nginx server. This method is inefficient and cannot meet the need for efficient and rapid Nginx configuration changes. Summary of the Invention

[0004] Embodiments of this application provide a configuration change method, system, terminal device, and storage medium to solve the problems in the above background art.

[0005] In a first aspect, embodiments of this application provide a configuration change method, which includes:

[0006] The configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file;

[0007] Based on the target configuration file, the configuration management platform sends a configuration change request to each server included in the target server cluster;

[0008] The configuration management platform obtains the servers that pass the configuration change request as target servers, sends the target configuration file to the target servers, and executes a configuration loading instruction on the target servers;

[0009] The target servers execute the configuration loading instruction to update the configuration files of the servers to the target configuration file.

[0010] In a second aspect, embodiments of this application further provide a configuration change system, which includes:

[0011] A cluster determination module, configured to enable a configuration management platform to obtain a target configuration file and determine a target server cluster of the configuration to be changed corresponding to the target configuration file;

[0012] A request sending module, configured to enable the configuration management platform to send a configuration change request to each server included in the target server cluster based on the target configuration file;

[0013] A configuration loading module, configured to enable the configuration management platform to obtain a server that passes the configuration change request as a target server, send the target configuration file to the target server, and execute a configuration loading instruction on the target server;

[0014] A configuration update module, configured to enable the target server to execute the configuration loading instruction and update the server's configuration file to the target configuration file.

[0015] In a third aspect, an embodiment of the present application further provides a terminal device, including a memory and a processor. The memory is used to store instructions and data, and the processor is used to execute the above-mentioned configuration change method.

[0016] In a fourth aspect, an embodiment of the present application further provides a storage medium, in which multiple instructions are stored, and the instructions are suitable for being loaded by a processor to execute the above-mentioned configuration change method.

[0017] The configuration change method in the embodiment of the present application includes: the configuration management platform obtains a target configuration file and determines a target server cluster of the configuration to be changed corresponding to the target configuration file; the configuration management platform sends a configuration change request to each server included in the target server cluster based on the target configuration file; the configuration management platform obtains a server that passes the configuration change request as a target server, sends the target configuration file to the target server, and executes a configuration loading instruction on the target server; the target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file. In the configuration change method of the present application, the method of manually updating the configuration is replaced by a method of batch automatic configuration update, which solves the problem of a large amount of manpower and material resources required for manual configuration update, improves the efficiency of configuration update, improves the accuracy rate of updated configuration, and meets the requirement of efficient and rapid configuration change. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0019] Figure 1 It is a flowchart of a configuration change method provided by an embodiment of the present application.

[0020] Figure 2 It is a schematic structural diagram of a configuration change system provided by an embodiment of the present application.

[0021] Figure 3 It is another schematic structural diagram of a configuration change system provided by an embodiment of the present application.

[0022] Figure 4 It is a schematic structural diagram of a terminal device provided by an embodiment of the present application. Detailed implementation manners

[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.

[0024] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specifically defined.

[0025] In order that any person skilled in the art can implement and use the present application, the following description is given. In the following description, details are set forth for the purpose of explanation. It should be understood that those skilled in the art can realize the present application without using these specific details. In other instances, well-known processes will not be elaborated in detail to avoid unnecessary details from making the description of the embodiments of the present application obscure. Therefore, the present application is not intended to be limited to the illustrated embodiments, but is to be accorded the widest scope consistent with the principles and features disclosed in the embodiments of the present application.

[0026] The embodiments of the present application provide a configuration change method, system, terminal device and storage medium, which will be described in detail below respectively.

[0027] Please refer to Figure 1 , Figure 1 , which is a flowchart of a configuration change method provided by an embodiment of the present application, including the following content:

[0028] 101. The configuration management platform obtains a target configuration file and determines a target server cluster of the configuration to be changed corresponding to the target configuration file.

[0029] In an embodiment of the present application, the configuration management platform is a platform with a front-end interface, which can be equivalent to a background management system and has modules such as editing, user management, permission control, and controlling configuration changes. It is a platform built based on the Spring Cloud and Vue frameworks.

[0030] Spring Cloud is an ordered collection of a series of frameworks. It cleverly simplifies the development of distributed system infrastructure by leveraging the development convenience of Spring Boot, such as service discovery and registration, configuration center, message bus, load balancing, circuit breaker, data monitoring, etc. Vue is a progressive framework for building user interfaces, with simple and flexible APIs. Through the APIs, reactive data binding and composable view components can be achieved.

[0031] In an embodiment of the present application, the server is an Nginx server, and the configuration of the Nginx server is changed through the configuration management platform. Correspondingly, the servers in the target server cluster are all Nginx servers. Through the configuration management platform, the configuration of the servers in the target server cluster can be changed, or a certain target server can be configured and changed separately.

[0032] Optionally, in some embodiments, before this step, it further includes: the configuration management platform obtains the configuration files of all connected servers through an IO stream, and the configuration management platform stores the configuration files.

[0033] After building the configuration management platform, the configuration management platform automatically obtains the configuration files of associated or bound servers, and stores the obtained configuration files. Subsequently, the target configuration file can be obtained by calling and modifying the configuration files in the configuration management platform. The configuration management platform automatically obtains the configuration files of associated or bound servers by reading the configuration files of the servers through an IO stream.

[0034] Optionally, in some embodiments, before this step, it further includes: the configuration management platform receives a configuration modification request triggered by a logged-in user. Based on the configuration modification request, the configuration management platform determines that the configuration file to be modified is the first configuration file, copies the first configuration file to obtain a second configuration file identical to the first configuration file, the configuration management platform stores the second configuration file, and retrieves the first configuration file.

[0035] After the configuration management platform obtains the configuration file of the server, if the configuration file has not been modified or updated, the configuration file can be considered as the initial configuration file of the corresponding server, then the first configuration file is the initial configuration file of the corresponding server. After the configuration management platform obtains the configuration file of the server, if the configuration file has been modified or updated, the configuration file does not belong to the initial configuration file of the corresponding server and should be the configuration file that was last modified or updated on the corresponding server, then the first configuration file is also the configuration file that was last modified or updated on the corresponding server.

[0036] It can be considered that the target configuration file is obtained by modifying and updating on the basis of the configuration file that was last modified or updated. The version can be set for the configuration file, then the target configuration file can be considered as the current version, and the first configuration file is the previous version. Since the second configuration file is copied from the first configuration file, the second configuration file is also the previous version.

[0037] The second configuration file is obtained by copying the first configuration file, that is, the first configuration file is backed up. The second configuration file can be retrieved and the first configuration file can be stored. The first configuration file can also be retrieved and the second configuration file can be stored. The purpose of copying the file, retrieving one of the files, and storing the other file is to modify and update the configuration parameters based on the retrieved file and keep a copy of the file. When a problem occurs due to an incorrect modification during the update, the stored file can be used to restore the server configuration to prevent the server from running with incorrect configurations and avoid problems such as user information leakage. Since the first configuration file and the second configuration file are the same, it is not limited whether the retrieved file is the first configuration file or the second configuration file.

[0038] Optionally, in some embodiments, after the configuration management platform receives a configuration modification request triggered by a logged-in user, it further includes: determining whether the logged-in user has the change permission. If so, based on the configuration modification request, the configuration management platform determines the configuration file to be modified as the first configuration file. If not, the configuration management platform does not process the configuration modification request.

[0039] An entry for entering the configuration modification can be set on the configuration management platform. After the user logs in to the configuration management platform, the configuration management platform can determine whether the logged-in user has the change permission to modify the configuration file based on the login account and user information of the logged-in user. If so, the entry is clickable, and the logged-in user can click the entry to enter the configuration modification page, thereby performing operations to modify the configuration file. If not, the entry is not clickable.

[0040] By setting permissions, only logged-in users with change permissions can modify the configuration file to obtain the target configuration file, and the target server cluster is reconfigured using the target configuration file, preventing unauthorized personnel from accidentally changing the content of the configuration file and causing errors in the configuration file content.

[0041] Set change permissions so that only those with the ability or experience to modify the server configuration can enter the configuration modification page to perform corresponding operations, ensuring the correctness of the configuration file and the accuracy of the modification operations and content, that is, ensuring the accuracy of configuration changes.

[0042] Optionally, after the configuration management platform receives a configuration modification request triggered by a logged-in user and determines that the configuration file to be modified is the first configuration file based on the configuration modification request, it obtains the update time of the first configuration file and determines whether the update time is less than a preset time. If so, a reminder message of the most recent update is displayed on the display interface. Correspondingly, the reminder message includes information such as the update time and the updating personnel, avoiding the problem of update errors caused by someone modifying the configuration file without knowing that it has already been updated.

[0043] Optionally, in some embodiments, this step includes: obtaining the configuration cluster identifier of the target configuration file, and based on the configuration cluster identifier, determining the target server cluster to be reconfigured.

[0044] The target configuration file is a file for updating the configuration parameter settings of the target server cluster. When generating the target configuration file, a configuration cluster identifier matching the update object can be set according to the configuration update object of the target configuration file. The above configuration update object is the target server cluster. By setting the identifier, the target configuration file determines the corresponding target server cluster, and the target server cluster contains multiple Nginx servers.

[0045] In addition to setting the identifier, the name or IP of the target server cluster can also be set in the target configuration file, so that the target configuration file determines the corresponding target server cluster, and the target server cluster contains multiple Nginx servers.

[0046] 102. The configuration management platform sends a configuration change request to each server included in the target server cluster based on the target configuration file.

[0047] 103. The configuration management platform obtains the servers that pass the configuration change request as target servers, sends the target configuration file to the target servers, and executes a configuration loading instruction on the target servers.

[0048] In an embodiment of the present application, the configuration change request is in the form of an Http request. The configuration management platform sends the Http request to each server included in the target server cluster. After each server in the target server cluster receives the request, it determines the way for the request to pass according to the settings of the server. If it is set in the server to automatically receive and pass the Http request, then after the server receives the configuration change request, it automatically passes the request. If it is set in the server to automatically receive the Http request but manually pass the Http request, then after the server receives the configuration change request, it is necessary to manually click the pass button on the server side to pass the Http request.

[0049] Regarding the setting for the server to pass the request, it can be set that after the server receives the request, it judges the type and content of the request, and determines whether to pass the request according to the judgment result.

[0050] The above-mentioned way for the request to pass according to the server settings is only an example way proposed in the embodiment of the present application. Optionally, the way for the server to set the request to pass can be set otherwise.

[0051] After the configuration management platform sends the configuration change request to each server included in the target server cluster, after a preset time, it automatically obtains the servers that have passed the request as the target servers, and sends the target configuration file to the target servers. After the target servers receive the target configuration file, they change the configuration of the servers according to the target configuration file.

[0052] After the preset time, in addition to obtaining the servers that have passed the request, the configuration management platform also obtains the servers that have not passed the request, sends a configuration change reminder to the servers that have not passed the request, or sends a configuration change reminder to the user side that manages the servers that have not passed the request. And, the configuration management platform monitors the request passing status of the servers that have not passed the request. If it monitors that there are servers that have passed the request among the servers that have not passed the request, it sends the target configuration file to these servers.

[0053] The second configuration file is obtained by copying or backing up the first configuration file. If the second configuration file is retrieved, the updated second configuration file after modification is used as the target configuration file, and the updated second configuration file after modification is sent to the servers that have passed the request. If the first configuration file is retrieved, the updated first configuration file after modification is used as the target configuration file, and the updated first configuration file after modification is sent to the servers that have passed the request.

[0054] Optionally, before sending the target configuration file to the target server, the configuration management platform pre-audits whether the file name of the target configuration file conforms to the naming rules. If it conforms, the configuration management platform sends the target configuration file to the target server. If it does not conform, the configuration management platform modifies the file name of the target configuration file according to the preset naming rules and sends the obtained file name after modification to the terminal or email of the relevant personnel.

[0055] Alternatively, before sending the target configuration file to the target server, the configuration management platform pre-audits whether the file name of the target configuration file conforms to the naming rules. If it conforms, the configuration management platform sends the target configuration file to the target server. If it does not conform, the configuration management platform sends the preset naming rules and the target configuration file to the terminal or email of the relevant personnel, and the relevant personnel modify the file name of the target configuration file according to the preset naming rules in a manual modification manner. The relevant personnel upload the target configuration file with the modified file name to the configuration management platform, and the configuration management platform then sends the uploaded target configuration file to the target server.

[0056] Optionally, before sending the target configuration file to the target server, the configuration management platform pre-audits whether the file type of the target configuration file is correct. If it is correct, the configuration management platform sends the target configuration file to the target server. If it is incorrect, the configuration management platform automatically converts the target configuration file into the target format and then sends the target configuration file in the target format to the target server.

[0057] Alternatively, before sending the target configuration file to the target server, the configuration management platform pre-audits whether the file type of the target configuration file is correct. If it is correct, the configuration management platform sends the target configuration file to the target server. If it is incorrect, the configuration management platform sends a reminder message indicating incorrect format to the terminal or email of the relevant personnel, and attaches the target configuration file. The relevant personnel convert the file type of the target configuration file into the target format and upload the target configuration file in the target format to the configuration management platform, and the configuration management platform then sends the uploaded target configuration file to the target server.

[0058] After the configuration management platform sends the target configuration file to the target server that has passed the request, it runs the Reload command on the target server, that is, runs the configuration loading instruction on the target server, so that the target server loads the target configuration file to achieve configuration update.

[0059] 104. The target server executes the configuration loading instruction to update the server's configuration file to the target configuration file.

[0060] In an embodiment of the present application, the target configuration file is sent by the configuration management platform to the servers in the target server cluster, and the configuration loading instruction is executed by the configuration management platform on the target server, so that the target server runs the configuration loading instruction to load and update the configuration. The purpose of remote control and batch update of the server is achieved, making the configuration update more efficient.

[0061] Optionally, in some embodiments, after this step, it further includes: the configuration management platform collects the execution result of the configuration loading instruction, and based on the execution result, the configuration management platform sends a configuration notification to the first user terminal associated with the target server.

[0062] The configuration management platform collects the execution result of the configuration loading instruction. If the execution is completed, it sends a configuration notification of successful configuration to the first user terminal. Or, if an error occurs during the execution, it sends a configuration notification of configuration error to the first user terminal.

[0063] Optionally, in some embodiments, after this step, it further includes: the configuration management platform monitors the communication of the target server. When an error occurs in the target server, the configuration management platform records the error information and sends the error information to the second user terminal.

[0064] After the configuration of the target server is updated through the configuration management platform, a communication monitoring task for the target server is started. Within the time set by the communication monitoring task, the configuration management platform monitors the communication of the target server. If an error occurs, the configuration management platform records the error information, sends the error information to the second user terminal, and displays the error information on the display interface of the platform, so that developers can troubleshoot problems based on the monitored and recorded error information. If the configuration management platform does not detect an error in the target server within the time set by the communication monitoring task, the configuration management platform cancels the communication monitoring task for the target server based on the configuration update.

[0065] The method for determining an error is that the configuration management platform continuously requests the target server, and the target server will report an error when a failure occurs. The problems causing the error can be troubleshot based on the information returned by the request and the error content. Common errors include, for example, the 502 error.

[0066] Optionally, after the configuration management platform detects an error in the target server, it records the error information, and obtains the configuration file of the target server with the error stored in the database and sends it to the corresponding target server to restore the configuration version of the target server with the error, and sends the error information to the second user terminal.

[0067] Based on the configuration management platform, it is determined that the configuration file to be modified is the first configuration file. A copy of the first configuration file is obtained to get the second configuration file. The first configuration file is stored and the second configuration file is retrieved. Storing the first configuration file enables, after a problem occurs in the configuration update, restoring the configuration of the target server that reports an error based on the configuration version of the first configuration file, ensuring the normal operation of the server.

[0068] It should be noted that for the communication monitoring of the target server, in addition to monitoring after the configuration update, it can also start when the server is connected to the configuration management platform.

[0069] Optionally, after updating the configuration file of the server to the target configuration file, the configuration management platform sends a configuration verification request to the target server. After receiving the configuration verification request, the target server performs configuration verification. The configuration management platform collects the configuration verification results of each target server and determines whether the configuration update of the target server is successful based on the configuration verification results.

[0070] The configuration change method of the embodiments of this application includes: the configuration management platform obtains the target configuration file and determines the target server cluster of the configuration to be changed corresponding to the target configuration file; the configuration management platform, based on the target configuration file, sends a configuration change request to each server included in the target server cluster; the configuration management platform obtains the servers that pass the configuration change request as target servers, sends the target configuration file to the target servers, and executes a configuration loading instruction on the target servers; the target servers execute the configuration loading instruction to update the configuration files of the servers to the target configuration files. In this application, the method of manually updating the configuration is replaced by a method of batch automatic configuration update, solving the problem of the large consumption of manpower and material resources required for manual configuration update, improving the efficiency of configuration update, and moreover, avoiding errors caused by manual update, making the accuracy of configuration update higher and meeting the requirement of efficient and rapid configuration change.

[0071] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a configuration change system provided by the embodiments of this application. The configuration change system 200 includes the following modules:

[0072] The cluster determination module 201 is used for the configuration management platform to obtain the target configuration file and determine the target server cluster of the configuration to be changed corresponding to the target configuration file.

[0073] The request sending module 202 is used for the configuration management platform to send a configuration change request to each server included in the target server cluster based on the target configuration file.

[0074] The configuration loading module 203 is used for the configuration management platform to obtain the server that passes the configuration change request as the target server, send the target configuration file to the target server, and execute the configuration loading instruction on the target server.

[0075] The configuration update module 204 is used for the target server to execute the configuration loading instruction and update the configuration file of the server to the target configuration file.

[0076] Optionally, the configuration update system 200 further includes a file acquisition module and a file storage module. Among them, the file acquisition module is used for the configuration management platform to acquire the target configuration file. Before determining the target server cluster of the configuration to be changed corresponding to the target configuration file, the configuration management platform acquires the configuration files of all connected servers through the IO stream; the file storage module is used for the configuration management platform to store the configuration files.

[0077] Optionally, the configuration update system 200 further includes a request receiving module, a permission judgment module, a file determination module, a file copying module, and a file retrieval module. Among them, the request receiving module is used for the configuration management platform to receive the configuration modification request triggered by the logged-in user before the configuration management platform acquires the target configuration file and determines the target server cluster of the configuration to be changed corresponding to the target configuration file; the permission judgment module is used to judge whether the logged-in user has the change permission. If so, based on the configuration modification request, the configuration management platform determines the configuration file to be modified as the first configuration file. If not, the configuration management platform does not process the configuration modification request; the file determination module is used for the configuration management platform to determine the configuration file to be modified as the first configuration file based on the configuration modification request; the file copying module is used to copy the first configuration file to obtain a second configuration file identical to the first configuration file; the file retrieval module is used for the configuration management platform to store the second configuration file and retrieve the first configuration file.

[0078] Optionally, the configuration update system 200 further includes a result collection module and a notification sending module. Among them, the result collection module is used for the configuration management platform to collect the execution result of the configuration loading instruction after the target server executes the configuration loading instruction and updates the configuration file of the server to the target configuration file; the notification sending module is used for the configuration management platform to send a configuration notification to the first user terminal associated with the target server based on the execution result.

[0079] Optionally, the configuration update system 200 further includes a communication monitoring module and an information sending module. Among them, the communication monitoring module is used for the configuration management platform to perform communication monitoring on the target server after the target server executes the configuration loading instruction and updates the configuration file of the server to the target configuration file; the information sending module is used for when an error occurs in the target server, the configuration management platform records the error information and sends the error information to the second user terminal.

[0080] Optionally, the cluster determination module 201 may include the following sub-modules:

[0081] An identification acquisition sub-module, configured to acquire the configuration cluster identification of the target configuration file.

[0082] A determination sub-module, configured to determine the target server cluster for which the configuration to be changed is to be based on the configuration cluster identification.

[0083] Optionally, the configuration change system 200 of the embodiments of the present application may further include other modules and sub-modules, which will not be elaborated herein.

[0084] The configuration change system 200 of the embodiments of the present application includes: a cluster determination module 201, configured to acquire a target configuration file by a configuration management platform and determine the target server cluster for which the configuration to be changed corresponds to the target configuration file; a request sending module 202, configured to send a configuration change request to each server included in the target server cluster by the configuration management platform based on the target configuration file; a configuration loading module 203, configured to acquire the server that has passed the configuration change request by the configuration management platform as the target server, send the target configuration file to the target server, and execute a configuration loading instruction on the target server; a configuration update module 204, configured to execute the configuration loading instruction by the target server and update the configuration file of the server to the target configuration file. In the present application, the method of manually updating the configuration is replaced by a method of batch automatic configuration update, which solves the problem of a large consumption of manpower and material resources required for manual configuration update, improves the efficiency of configuration update, and moreover, avoids errors caused by manual update, making the accuracy of configuration update higher and meeting the requirement of efficient and rapid configuration change.

[0085] Please refer to Figure 3 , Figure 3 which is another structural schematic diagram of the configuration change system provided by the embodiments of the present application. The configuration change system 200 includes a memory 120, one or more processors 180, and one or more applications, where the one or more applications are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a cluster determination module 201, a request sending module 202, a configuration loading module 203, and a configuration update module 204. For example, the structures and connection relationships of the above components may be as follows:

[0086] The memory 120 can be used to store application programs and data. The application programs stored in the memory 120 contain executable codes. The application programs can form various functional modules. The processor 180 executes various functional applications and each step of the configuration change method by running the application programs stored in the memory 120. In addition, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.

[0087] The processor 180 is the control center of the system, connecting various parts of the entire terminal using various interfaces and lines. By running or executing the application programs stored in the memory 120, and calling the data stored in the memory 120, it executes various functions of the system and processes data, thereby monitoring the system as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc.

[0088] Specifically in this embodiment, the processor 180 will load the executable codes corresponding to the processes of one or more application programs into the memory 120 according to the following instructions, and the processor 180 will run the application programs stored in the memory 120 to implement various functions:

[0089] The configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file;

[0090] The configuration management platform sends a configuration change request to each server included in the target server cluster based on the target configuration file;

[0091] The configuration management platform obtains the servers that pass the configuration change request as target servers, sends the target configuration file to the target servers, and executes a configuration loading instruction on the target servers;

[0092] The target server executes the configuration loading instruction to update the server's configuration file to the target configuration file.

[0093] In some embodiments, before the configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file, the method further includes:

[0094] The configuration management platform obtains the configuration files of all connected servers through an IO stream;

[0095] The configuration management platform stores the configuration file.

[0096] In some embodiments, before the configuration management platform obtains a target configuration file and determines a target server cluster of a configuration to be changed corresponding to the target configuration file, the method further includes:

[0097] The configuration management platform receives a configuration modification request triggered by a logged-in user;

[0098] Based on the configuration modification request, the configuration management platform determines that the configuration file to be modified is a first configuration file;

[0099] Perform file copying on the first configuration file to obtain a second configuration file identical to the first configuration file;

[0100] The configuration management platform stores the second configuration file and retrieves the first configuration file.

[0101] In some embodiments, after the configuration management platform receives a configuration modification request triggered by a logged-in user, the method further includes:

[0102] Determine whether the logged-in user has the change permission;

[0103] If so, based on the configuration modification request, the configuration management platform determines that the configuration file to be modified is a first configuration file;

[0104] If not, the configuration management platform does not process the configuration modification request.

[0105] In some embodiments, after the target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file, the method further includes:

[0106] The configuration management platform collects the execution result of the configuration loading instruction;

[0107] Based on the execution result, the configuration management platform sends a configuration notification to a first user terminal associated with the target server.

[0108] In some embodiments, after the target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file, the method further includes:

[0109] The configuration management platform performs communication monitoring on the target server;

[0110] When an error occurs in the target server, the configuration management platform records the error information and sends the error information to a second user terminal.

[0111] In some embodiments, the configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file, including:

[0112] Obtain the configuration cluster identifier of the target configuration file;

[0113] Based on the configuration cluster identifier, determine the target server cluster for the configuration to be changed.

[0114] An embodiment of the present application further provides a terminal device. The terminal device may be a device such as a server, a smart phone, a computer, a tablet computer, etc.

[0115] Please refer to Figure 4 , Figure 4 , which shows a schematic structural diagram of the terminal device provided by an embodiment of the present application. The terminal device 1200 may be used to implement the configuration change method provided in the above embodiment. The terminal device 1200 may be a smart phone or a tablet computer.

[0116] As Figure 4 shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190, etc. Those skilled in the art can understand that Figure 4 the structure of the terminal device 1200 shown in

[0117] does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components. Among them:

[0118] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the configuration change method in the above embodiments. The processor 180 executes various functional applications and each step of the configuration change method by running the software programs and modules stored in the memory 120. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 120 may further include a memory remotely disposed relative to the processor 180, and these remote memories can be connected to the terminal device 1200 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.

[0119] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touchpad, can collect touch operations of a user thereon or nearby (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch-sensitive surface 131), and drive a corresponding connection device according to a preset program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 180, and can receive and execute the commands sent by the processor 180. In addition, multiple types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch-sensitive surface 131. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, etc.

[0120] The display unit 140 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the terminal device 1200. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 can cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 4 the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to achieve input and output functions, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to achieve input and output functions.

[0121] The terminal device 1200 may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 141 and / or the backlight when the terminal device 1200 is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that the terminal device 1200 can also be configured with, they will not be elaborated here.

[0122] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 1200. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, and the speaker 161 converts it into a sound signal for output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and then converted into audio data. After the audio data is output to the processor 180 for processing, it is sent to another terminal, for example, via the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earphone jack to provide communication between the peripheral earphone and the terminal device 1200.

[0123] The terminal device 1200 can help users send and receive emails, browse the web, and access streaming media through a transmission module 170 (such as a Wi-Fi module), providing users with wireless broadband Internet access. Although Figure 4 the transmission module 170 is shown, it can be understood that it does not belong to the essential components of the terminal device 1200 and can be completely omitted within the scope of not changing the essence of the invention as needed.

[0124] The processor 180 is the control center of the terminal device 1200, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 120, and by calling the data stored in the memory 120, it performs various functions of the terminal device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 180 either.

[0125] The terminal device 1200 further includes a power supply 190 that powers each component. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, thereby realizing functions such as management of discharging and power consumption management through the power management system. The power supply 190 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0126] Although not shown, the terminal device 1200 may also include a camera (such as a front camera and a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 further includes a memory 120, and one or more programs, where one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. The one or more programs include steps for performing the following operations:

[0127] The configuration management platform obtains a target configuration file and determines a target server cluster of the configuration to be changed corresponding to the target configuration file;

[0128] The configuration management platform sends a configuration change request to each server included in the target server cluster based on the target configuration file;

[0129] The configuration management platform obtains the server that passes the configuration change request as the target server, sends the target configuration file to the target server, and executes a configuration loading instruction on the target server;

[0130] The target server executes the configuration loading instruction to update the configuration file of the server to the target configuration file.

[0131] In some embodiments, before the configuration management platform obtains the target configuration file and determines the target server cluster of the configuration to be changed corresponding to the target configuration file, the method further includes:

[0132] The configuration management platform obtains the configuration files of all connected servers through an IO stream;

[0133] The configuration management platform stores the configuration files.

[0134] In some embodiments, before the configuration management platform obtains the target configuration file and determines the target server cluster of the configuration to be changed corresponding to the target configuration file, the method further includes:

[0135] The configuration management platform receives a configuration modification request triggered by a logged-in user;

[0136] Based on the configuration modification request, the configuration management platform determines the configuration file to be modified as the first configuration file;

[0137] Perform a file copy on the first configuration file to obtain a second configuration file identical to the first configuration file;

[0138] The configuration management platform stores the second configuration file and retrieves the first configuration file.

[0139] In some embodiments, after the configuration management platform receives a configuration modification request triggered by a logged-in user, the method further includes:

[0140] Determine whether the logged-in user has the permission to make changes;

[0141] If so, based on the configuration modification request, the configuration management platform determines the configuration file to be modified as the first configuration file;

[0142] If not, the configuration management platform does not process the configuration modification request.

[0143] In some embodiments, after the target server executes the configuration loading instruction to update the configuration file of the server to the target configuration file, the method further includes:

[0144] The configuration management platform collects the execution results of the configuration loading instruction;

[0145] Based on the execution results, the configuration management platform sends a configuration notification to the first user terminal associated with the target server.

[0146] In some embodiments, after the target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file, the method further includes:

[0147] The configuration management platform monitors the communication of the target server;

[0148] When an error occurs in the target server, the configuration management platform records the error information and sends the error information to the second user terminal.

[0149] In some embodiments, the configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file, including:

[0150] Obtain the configuration cluster identifier of the target configuration file;

[0151] Based on the configuration cluster identifier, determine the target server cluster for the configuration to be changed.

[0152] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the configuration change method described in any one of the above embodiments.

[0153] It should be noted that for the configuration change method described in the present application, those of ordinary skill in the art can understand that all or part of the process of implementing the configuration change method described in the embodiments of the present application can be completed by controlling related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, such as stored in the memory of a terminal device and executed by at least one processor in the terminal device. During the execution process, it can include the process of the embodiments of the configuration change method. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM, Read Only Memory), a random access memory (RAM), etc.

[0154] For the configuration change system according to the embodiments of the present application, its various functional modules may be integrated in a processing chip, or each module may exist physically alone, or two or more modules may be integrated in one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disc.

[0155] The configuration change method, system, medium, and terminal device provided by the embodiments of the present application have been introduced in detail above. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A configuration change method, characterized in that, The method includes: The configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file; Based on the target configuration file, the configuration management platform sends a configuration change request to each server included in the target server cluster; The configuration management platform obtains the servers that pass the configuration change request as target servers, sends the target configuration file to the target servers, and executes a configuration loading instruction on the target servers; The target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file; The configuration management platform sends a configuration change reminder to the servers that do not pass the configuration change request or the user terminals of the servers, and monitors the request passing status of the servers that do not pass the request. If it is monitored that there are servers that have passed the request among the servers that do not pass the request, the target configuration file is sent to the servers that have passed the request to update the server's configuration file to the target configuration file.

2. The configuration change method according to claim 1, wherein Before the configuration management platform obtains the target configuration file and determines the target server cluster for the configuration to be changed corresponding to the target configuration file, the method further includes: The configuration management platform obtains the configuration files of all connected servers through an IO stream; The configuration management platform stores the configuration files.

3. The configuration change method according to claim 2, characterized in that Before the configuration management platform obtains the target configuration file and determines the target server cluster for the configuration to be changed corresponding to the target configuration file, the method further includes: The configuration management platform receives a configuration modification request triggered by a logged-in user; Based on the configuration modification request, the configuration management platform determines the configuration file to be modified as the first configuration file; The first configuration file is copied to obtain a second configuration file identical to the first configuration file; The configuration management platform stores the second configuration file and retrieves the first configuration file.

4. The configuration change method according to claim 3, characterized in that After the configuration management platform receives the configuration modification request triggered by a logged-in user, the method further includes: Determine whether the logged-in user has the permission to make changes; If so, based on the configuration modification request, the configuration management platform determines the configuration file to be modified as the first configuration file; If not, the configuration management platform does not process the configuration modification request.

5. The configuration change method according to claim 1, characterized in that After the target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file, the method further includes: The configuration management platform collects the execution results of the configuration loading instruction; Based on the execution results, the configuration management platform sends a configuration notification to the first user terminal associated with the target server.

6. The configuration change method according to claim 1, characterized in that After the target server executes the configuration loading instruction and updates the server's configuration file to the target configuration file, the method further includes: The configuration management platform monitors the communication of the target server; When an error occurs in the target server, the configuration management platform records the error information and sends the error information to the second user terminal.

7. The configuration change method according to claim 1, characterized in that The configuration management platform obtains a target configuration file and determines a target server cluster for the configuration to be changed corresponding to the target configuration file, including: Obtaining a configuration cluster identifier of the target configuration file; Determining a target server cluster for the configuration to be changed based on the configuration cluster identifier.

8. A configuration change system, characterized in that, The system includes: A cluster determination module, configured to enable the configuration management platform to obtain a target configuration file and determine a target server cluster for the configuration to be changed corresponding to the target configuration file; A request sending module, configured to enable the configuration management platform to send a configuration change request to each server included in the target server cluster based on the target configuration file; A configuration loading module, configured to enable the configuration management platform to obtain a server that passes the configuration change request as a target server, send the target configuration file to the target server, and execute a configuration loading instruction on the target server; A configuration update module, configured to enable the target server to execute the configuration loading instruction and update the configuration file of the server to the target configuration file; The configuration management platform sends a configuration change reminder to a server that fails to pass the configuration change request or the client of the server, and monitors the request passing status of the server that fails to pass the request. If it is monitored that there is a server that has passed the request among the servers that fail to pass the request, the target configuration file is sent to the server that has passed the request to update the configuration file of the server to the target configuration file.

9. A terminal device, characterized in that, It includes a memory and a processor. The memory is used to store instructions and data, and the processor is used to execute the configuration change method according to any one of claims 1-7.

10. A storage medium, characterized in that, Multiple instructions are stored in the storage medium, and the instructions are suitable for being loaded by the processor to execute the configuration change method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Configuration parameter updating method and device for distributed cluster, apparatus and storage medium

    CN110825420A