CN109783136B - Configuration updating method, device, equipment and storage medium - Google Patents

Configuration updating method, device, equipment and storage medium Download PDF

Info

Publication number
CN109783136B
CN109783136B CN201910118372.7A CN201910118372A CN109783136B CN 109783136 B CN109783136 B CN 109783136B CN 201910118372 A CN201910118372 A CN 201910118372A CN 109783136 B CN109783136 B CN 109783136B
Authority
CN
China
Prior art keywords
configuration information
application
service
configuration
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910118372.7A
Other languages
Chinese (zh)
Other versions
CN109783136A (en
Inventor
蔡旭森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huya Information Technology Co Ltd
Original Assignee
Guangzhou Huya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huya Information Technology Co Ltd filed Critical Guangzhou Huya Information Technology Co Ltd
Priority to CN201910118372.7A priority Critical patent/CN109783136B/en
Publication of CN109783136A publication Critical patent/CN109783136A/en
Application granted granted Critical
Publication of CN109783136B publication Critical patent/CN109783136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a configuration updating method, a configuration updating device, equipment and a storage medium. The method comprises the following steps: the management service sends configuration editing operation of configuration information acting on the application in the application server to the service registration center; the service registry edits the configuration information according to the configuration editing operation, and marks the configuration information as unconsumed; the configuration service checks unconsumed configuration information from the service registry as target configuration information; the configuration service determines an application server and an application corresponding to the target configuration information; the configuration service sends the target configuration information to the application server to update the application according to the target configuration information. By the method, the problem that the management server cannot perform configuration updating on part of applications in part of application servers can be solved.

Description

Configuration updating method, device, equipment and storage medium
Technical Field
The embodiments of the present invention relate to information transfer and application update technologies, and in particular, to a configuration update method, apparatus, device, and storage medium.
Background
Java has the characteristics of simplicity, object-oriented, distributed, robustness, security, platform independence and portability, multithreading, dynamicity, and the like, and is therefore widely used in various development occasions.
With the increasing complexity of the program functions, the configuration of the program is increasing, such as the switch of various functions, the configuration of parameters, and the address of a server. At the same time, the expected value of program configuration is also higher and higher, such as: the configuration is required to be effective in real time after being modified, or the configuration is required to be effective in sub-environment management, diversity group management and the like after being modified. Under such a large environment, the traditional method of configuration files, databases and the like cannot meet the requirements of developers on configuration management.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the management server cannot perform configuration updates for a portion of the applications in the application server.
Disclosure of Invention
The invention provides a configuration updating method, a configuration updating device, equipment and a storage medium, which are used for solving the problem that a management server cannot perform configuration updating aiming at part of applications in part of application servers.
In a first aspect, an embodiment of the present invention provides a configuration updating method, which is applied in a management server, where the management server includes a configuration service, a management service, and a service registration center, and the method includes:
the management service sends configuration editing operation of configuration information acting on the application in the application server to the service registration center;
the service registry edits the configuration information according to the configuration editing operation and marks the configuration information as unconsumed;
the configuration service checking unconsumed configuration information from the service registry as target configuration information;
the configuration service determines an application server and an application corresponding to the target configuration information;
and the configuration service sends the target configuration information to the application server so as to update the application according to the target configuration information.
On this basis, the configuration service determines the application server and the application corresponding to the target configuration information, and includes:
determining a server cluster in which the unconsumed configuration information takes effect, wherein the server cluster comprises an application server;
determining an application to which the unconsumed configuration information belongs.
On this basis, the service registration center is a message queue,
the message queue is used for storing application messages, and the application messages comprise application identification numbers of the applications, cluster identification numbers of the server clusters and configuration information of the applications.
On this basis, said marking said configuration information as not consumed comprises:
searching consumption information corresponding to the configuration information;
the message information is set to a first value indicating unconsumed.
On this basis, the configuration service checks unconsumed configuration information from the service registry as target configuration information, including:
reading consumption information corresponding to the configuration information in the service registration center;
if the consumption information is a first value representing non-consumption, determining that the configuration information is the non-consumption configuration information and taking the configuration information as target configuration information;
and if the consumption information is a second value representing consumed, determining that the configuration information is consumed configuration information.
On this basis, the service registry marks that the target configuration information has been consumed according to the configuration editing operation.
In a second aspect, an embodiment of the present invention further provides a configuration updating method, applied in a management server, where the management server has a configuration service, a management service, and a service registration center, and the method includes:
checking unconsumed configuration information from the service registry as target configuration information;
determining an application server and an application corresponding to the target configuration information;
and sending the target configuration information to the application server so as to update the application according to the target configuration information.
In a third aspect, an embodiment of the present invention further provides a configuration updating method, where the configuration updating method is applied to an application server, where the application server includes an application, and the application server belongs to a server cluster, and the method includes:
receiving target configuration information sent by a server and an application corresponding to the target configuration information when the configuration service detects that the service registration center checks the unconsumed target configuration information;
and updating the application corresponding to the target configuration information according to the target configuration information.
On this basis, the application server has a file system,
when the receiving configuration service detects that the service registration center checks unconsumed target configuration information and after the target configuration information is sent by the server and the application corresponding to the target configuration information, the receiving configuration service further comprises:
storing the configuration information to the file system.
On the basis, if the application is failed to be updated, reading the configuration information from the file system;
and updating the application according to the configuration information.
On the basis, if the preset time is up, reading consumption information corresponding to the configuration information of the application in the service registration center;
if the consumption information is a second value representing the consumption, determining the configuration information of the application as the updated configuration information of the management service;
and if the consumption information is a first value representing non-consumption, determining that the configuration information of the application is not updated by the management service.
In a fourth aspect, an embodiment of the present invention further provides a configuration updating apparatus, where the apparatus is applied in a management server, and the management server includes a configuration service, a management service, and a service registration center. The device includes:
the configuration information editing module is used for sending configuration editing operation of configuration information acting on the application in the application server to the service registration center;
the configuration information operation module is used for editing the configuration information according to the configuration editing operation and marking the configuration information as unconsumed;
a configuration information checking module for checking unconsumed configuration information from the service registry as target configuration information;
the configuration information determining module is used for determining an application server and an application corresponding to the target configuration information;
and the configuration information sending module is used for sending the target configuration information to the application server by the configuration service so as to update the application according to the target configuration information.
On this basis, the configuration information determining module is further configured to:
determining a server cluster in which the unconsumed configuration information takes effect, wherein the server cluster comprises an application server;
determining an application to which the unconsumed configuration information belongs.
On this basis, the service registration center is a message queue, and the device further comprises a message queue module:
the message queue is used for storing application messages, and the application messages comprise application identification numbers of the applications, cluster identification numbers of the server clusters and configuration information of the applications.
On this basis, the configuration information operation module is further configured to:
searching consumption information corresponding to the configuration information;
the message information is set to a first value indicating unconsumed.
On this basis, the configuration information checking module is further configured to:
reading consumption information corresponding to the configuration information in the service registration center;
if the consumption information is a first value representing non-consumption, determining that the configuration information is the non-consumption configuration information and taking the configuration information as target configuration information;
and if the consumption information is a second value representing consumed, determining that the configuration information is consumed configuration information.
On this basis, the system further comprises a configuration information changing module, which is used for:
and marking that the target configuration information is consumed according to the configuration editing operation.
In a fifth aspect, an embodiment of the present invention further provides a configuration updating apparatus, where the apparatus is applied in a management server, and the management server includes a configuration service, a management service, and a service registration center. The device includes:
a configuration information checking sub-module for checking unconsumed configuration information from the service registry as target configuration information;
the configuration information determining submodule is used for determining an application server and an application corresponding to the target configuration information;
and the configuration information sending submodule is used for sending the target configuration information to the application server so as to update the application according to the target configuration information.
In a sixth aspect, an embodiment of the present invention further provides a configuration updating apparatus, where the apparatus is applied to an application server, the application server includes an application, and the application server belongs to a server cluster. The device includes:
the configuration information receiving submodule is used for receiving the target configuration information sent by the server and the application corresponding to the target configuration information when the configuration service detects that the service registration center checks the unconsumed target configuration information;
and the configuration information updating submodule is used for updating the application corresponding to the target configuration information according to the target configuration information.
On this basis, the application server has a file system, and further includes:
storing the configuration information to the file system.
On this basis, still include:
if the application is not updated, reading the configuration information from the file system;
and updating the application according to the configuration information.
On this basis, still include:
if the preset time is reached, reading consumption information corresponding to the configuration information of the application in the service registration center;
if the consumption information is a second value representing the consumption, determining the configuration information of the application as the updated configuration information of the management service;
and if the consumption information is a first value representing non-consumption, determining that the configuration information of the application is not updated by the management service.
In a seventh aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a configuration update method as in any embodiment.
In an eighth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a configuration updating method according to any one of the embodiments.
The invention sends the configuration editing operation of the configuration information of the application acting on the application server to the service registration center through the management service; the service registry edits the configuration information according to the configuration editing operation, and marks the configuration information as unconsumed; the configuration service checks unconsumed configuration information from the service registry as target configuration information; the configuration service determines an application server and an application corresponding to the target configuration information; the configuration service sends the target configuration information to the application server to update the application according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
Drawings
Fig. 1A is a flowchart of a configuration updating method according to an embodiment of the present invention;
fig. 1B is a structural diagram of a configuration updating method according to an embodiment of the present invention;
fig. 2 is a flowchart of a configuration updating method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a configuration updating method according to a third embodiment of the present invention;
fig. 4 is a flowchart of a configuration updating method according to a fourth embodiment of the present invention;
fig. 5 is a flowchart of a configuration updating method according to a fifth embodiment of the present invention;
fig. 6 is a structural diagram of a configuration update apparatus according to a sixth embodiment of the present invention;
fig. 7 is a structural diagram of a configuration update apparatus according to a seventh embodiment of the present invention;
fig. 8 is a structural diagram of a configuration update apparatus according to an eighth embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to a ninth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1A is a flowchart of a configuration updating method according to an embodiment of the present invention. The embodiment can be applied to updating the scenes of part of applications in the application server through the interaction between the management server and the application server. The device may be implemented by a configuration update device, which may be implemented by software and/or hardware, typically configured in a management server. Referring to fig. 1A, the method is applied to a management server, where the management server has a configuration service, a management service, and a service registry, and specifically includes:
s101, the management service sends configuration editing operation of configuration information acting on the application in the application server to the service registration center.
The management service is an interface of the configuration center for modifying the management server, and a user sets configuration information in the configuration center, such as selecting an interface or parameters of a certain application for modification. The configuration information may be understood as a configuration file (or configuration parameters) that is modified for the application in the application server.
The service registry can be a Message component (Message Queue) or a simple Message Queue implemented by a database.
And after receiving the setting operation of the configuration information of the user, the management service sends a configuration editing operation to the service registration center. After receiving the setting operation of the configuration information of the user, the general management service inserts a message record in the service registry to indicate the generation of a new configuration information.
S102, the service registry edits the configuration information according to the configuration editing operation, and marks the configuration information as unconsumed.
The service registry is deployed in a multi-machine manner, that is, the registry service center can obtain backup from other machines (server entity machines in the redis).
The service registry edits the configuration information according to the received configuration editing operation, for example, the configuration information is processed according to a certain mode, for example, the configuration information is processed into a format of 'application identification number-cluster identification number of server cluster-configuration information of application'.
The service registry marks the received configuration information as not consumed. The unconsumed configuration information means that the configuration information is the setting of the configuration information which is recently carried out by the user in the configuration center and is not published to the application server.
S103, the configuration service checks unconsumed configuration information from the service registration center as target configuration information.
The configuration service periodically scans the service registry to check if the service registry has received configuration information marked as unconsumed. And if so, taking the unconsumed configuration information as the target configuration information.
S104, the configuration service determines an application server and an application corresponding to the target configuration information.
And the configuration service determines the application server and the application corresponding to the item tag configuration information according to the content in the target configuration information.
It can be understood that the configuration service determines the application server corresponding to the entry tag configuration information according to the cluster identification number of the server cluster in the target configuration information. And the configuration service determines the application corresponding to the item tag configuration information according to the application identification number in the target configuration information.
S105, the configuration service sends the target configuration information to the application server so as to update the application according to the target configuration information.
And the configuration service determines an application server and an application corresponding to the item tag configuration information according to the content in the target configuration information, and then sends the target configuration information to the application server corresponding to the cluster identification number of the server cluster. Further, the target configuration information is sent to the application corresponding to the application identification number, so that the application is updated according to the target configuration information.
Fig. 1B is a structural diagram of a configuration updating method according to an embodiment of the present invention. The configuration updating method in this embodiment is specifically described with reference to fig. 1B:
the management server 12 has a configuration service 123, a management service 122 and a service registry 121; the application server 11 has a plurality of applications, such as a first application 111, a second application 112, an nth application 113, and the like.
When the management service 122 receives a setting operation of the configuration information of the user, it sends a configuration editing operation to the service registry 121, and inserts a message record in the service registry 121 to indicate the generation of a new configuration information. The service registry 121 processes the configuration information into the format of "application identification number (second application) -cluster identification number of server cluster-configuration information of application", and marks the configuration information as not consumed. The configuration service 123 checks unconsumed configuration information from the service registry 121 as target configuration information. The configuration service 123 determines the application server 11 and the application corresponding to the entry tag configuration information according to the content in the target configuration information. The configuration service sends the target configuration information to the application server 11 to update the second application 112 according to the target configuration information.
The embodiment of the invention sends the configuration editing operation of the configuration information acting on the application in the application server to the service registration center through the management service; the service registry edits the configuration information according to the configuration editing operation, and marks the configuration information as unconsumed; the configuration service checks unconsumed configuration information from the service registry as target configuration information; the configuration service determines an application server and an application corresponding to the target configuration information; the configuration service sends the target configuration information to the application server to update the application according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
Example two
Fig. 2 is a flowchart of a configuration updating method according to a second embodiment of the present invention. The embodiment is a refinement based on the first embodiment, and specifically describes information interaction between the configuration service, the management service, and the service registry. Referring to fig. 2, the method specifically includes:
s201, the management service sends configuration editing operation of configuration information acting on the application in the application server to the service registration center.
And after receiving the setting operation of the configuration information of the user, the management service sends a configuration editing operation to the service registration center. After receiving the setting operation of the configuration information of the user, the general management service inserts a message record in the service registry to indicate the generation of a new configuration information.
S202, the service registration center edits the configuration information according to the configuration editing operation.
The service registry edits the configuration information according to the configuration editing operation received from the management service. The service registration center at this time is a message queue, the message queue is used for storing application messages, and the application messages include the application identification number of the application, the cluster identification number of the server cluster, and the configuration information of the application.
Wherein, the application identification number is used for indicating the application on which the configuration information acts; the cluster identification number is used for indicating which server cluster the configuration information acts on; the configuration information includes at least two pieces of information, one is the configuration information itself for updating, and one is consumption information (consumed and unconsumed) for indicating whether the configuration information has been used for updating.
S203, searching consumption information corresponding to the configuration information.
And when a new application message is inserted into the message queue, determining consumption information corresponding to the application message.
S204, setting the message information to a first value representing unconsumed.
Consumption information of these newly inserted application messages in the message queue is set to a first value. The first value indicates that the configuration information has not been used for an update of the application. And if the consumption information is a second value representing consumed, determining that the configuration information is consumed configuration information.
The first value and the second value are only one kind of marking means, and may be set to 0 to represent the first value and 1 to represent the second value. But also any arrangement that would occur to one skilled in the art as long as consumed can be distinguished from unconsumed.
S205, reading the consumption information corresponding to the configuration information in the service registration center.
The configuration service scans, and in particular reads, the application messages of the message queue one by one to determine whether the message information is consumed or unconsumed.
S206, if the consumption information is a first value representing non-consumption, determining that the configuration information is the non-consumption configuration information and using the configuration information as target configuration information.
The configuration service periodically scans the service registry to check if the service registry has received configuration information marked as unconsumed. And if so, taking the unconsumed configuration information as the target configuration information.
S207, determining a server cluster with the unconsumed configuration information effective, wherein the server cluster comprises an application server.
The configuration information is expressed as "application identification number-cluster identification number of server cluster-configuration information of application". The server cluster for which the unconsumed configuration information is valid can be determined by the cluster identification number of the server cluster.
S208, determining the application to which the unconsumed configuration information belongs.
The configuration information is expressed as "application identification number-cluster identification number of server cluster-configuration information of application". The application to which the unconsumed configuration information belongs can be determined by the application identification number.
S209, the configuration service sends the target configuration information to the application server so as to update the application according to the target configuration information.
And the configuration service determines an application server and an application corresponding to the item tag configuration information according to the content in the target configuration information, and then sends the target configuration information to the application server corresponding to the cluster identification number of the server cluster. Further, the target configuration information is sent to the application corresponding to the application identification number, so that the application is updated according to the target configuration information.
The following is a specific implementation manner of steps S201 to S209:
and newly building an application in a management background, specifying an application identification number (appid) of the newly built application, and then adding configuration information. The application server (client) also sets a corresponding application identification number for the application program, and obtains the configuration information corresponding to the application identification number through server load balancing.
When the management background adds or modifies the configuration information of an application identification number and sets and releases the configuration information, the operation is sent to a service registration center (eureka) through an interface of a management service (admin service). After discovering the configuration update of the management server, the configuration service (config service) actively notifies the application server (client) that there is a new configuration, and sends the new configuration to the corresponding client. This is a rollback (rollback) mechanism to prevent configuration not being updated due to push mechanism failure. The client regularly pulls and reports the local version, so in general, the management server returns no modification (304-Not Modified) for the operation of regularly pulling.
And after the client acquires the latest configuration of the application from the configuration center server, the latest configuration is stored in a cache and a file system respectively. And can still recover configuration from the file system when service unavailability or network unavailability is encountered.
The embodiment of the invention sends the configuration editing operation of the configuration information acting on the application in the application server to the service registration center through the management service; the service registry edits the configuration information according to the configuration editing operation, and marks the configuration information as unconsumed; the configuration service checks unconsumed configuration information from the service registry as target configuration information; the configuration service determines an application server and an application corresponding to the target configuration information; the configuration service sends the target configuration information to the application server to update the application according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
EXAMPLE III
Fig. 3 is a flowchart of a configuration updating method according to a third embodiment of the present invention. The embodiment can be applied to updating the scenes of part of applications in the application server through the interaction between the management server and the application server. The device may be implemented by a configuration update device, which may be implemented by software and/or hardware, typically configured in a management server. Referring to fig. 3, the method is applied to a management server, where the management server has a configuration service, a management service, and a service registry, and specifically includes:
s301, checking unconsumed configuration information from the service registry as target configuration information.
S302, determining an application server and an application corresponding to the target configuration information.
S303, sending the target configuration information to the application server so as to update the application according to the target configuration information.
Steps S301-S303 are described from the perspective of a configuration service in a management server. It can be understood that:
the configuration service periodically scans the service registry to check if the service registry has received configuration information marked as unconsumed. And if so, taking the unconsumed configuration information as the target configuration information. And the configuration service determines the application server corresponding to the item tag configuration information according to the cluster identification number of the server cluster in the target configuration information. And the configuration service determines the application corresponding to the item tag configuration information according to the application identification number in the target configuration information. And the configuration service determines an application server and an application corresponding to the item tag configuration information according to the content in the target configuration information, and then sends the target configuration information to the application server corresponding to the cluster identification number of the server cluster. Further, the target configuration information is sent to the application corresponding to the application identification number, so that the application is updated according to the target configuration information.
The embodiment of the invention checks unconsumed configuration information from the service registration center as target configuration information; determining an application server and an application corresponding to the target configuration information; and sending the target configuration information to an application server so as to update the application according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
Example four
Fig. 4 is a flowchart of a configuration updating method according to a fourth embodiment of the present invention. The embodiment can be applied to updating the scenes of part of applications in the application server through the interaction between the management server and the application server. The apparatus may be implemented by a configuration update apparatus, which may be implemented by software and/or hardware, typically configured in an application server. Referring to fig. 4, the method is applied in an application server, the application server includes an application, and the application server belongs to a server cluster. The method comprises the following steps:
s401, receiving target configuration information sent by a server and an application corresponding to the target configuration information when the configuration service detects that the service registration center checks the unconsumed target configuration information.
A server cluster comprises a plurality of application servers, one application server comprising an application. Different server clusters are distinguished through cluster identification numbers, and different applications are distinguished through application identification numbers.
The configuration service sends the target configuration information to an application server in a certain server cluster according to the cluster identification number, the application identification number and the consumption information (a first value representing unconsumed information) in the target configuration information. And the application server sends the target configuration information to a specific application according to the application identification number.
S402, updating the application corresponding to the target configuration information according to the target configuration information.
And after receiving the target configuration information, a specific application is updated according to the target configuration information.
The embodiment of the invention detects that the service registration center checks the unconsumed target configuration information by receiving the configuration service, and transmits the target configuration information according to the server and the application corresponding to the target configuration information; and updating the application corresponding to the target configuration information according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
EXAMPLE five
Fig. 5 is a flowchart of a configuration updating method according to a fifth embodiment of the present invention. The present embodiment is a refinement performed on the basis of the fourth embodiment, and specifically describes a specific step of updating an application by an application server. Referring to fig. 5, the method specifically includes:
s501, receiving target configuration information sent by a server and an application corresponding to the target configuration information when the configuration service detects that the service registration center checks the unconsumed target configuration information.
And the configuration service sends the target configuration information to an application server in a certain server cluster according to the cluster identification number in the target configuration information. And the application server sends the target configuration information to a specific application according to the application identification number.
S502, storing the configuration information to the file system.
When receiving the target configuration information, the application server stores the target configuration information in the memory and the file system at the same time.
The target configuration information stored in the memory is used for direct updating of the application. The target configuration information stored in the file system may be understood to be used as a backup, and the application may still be able to update the configuration from the file system when a service unavailability or network unavailability is encountered.
And S503, updating the application corresponding to the target configuration information according to the target configuration information.
And after receiving the target configuration information, a specific application is updated according to the target configuration information.
S504, judging whether the application is updated successfully. If successful, go to step S507; if the failure occurs, step S505 is executed.
And judging whether the updating of the application is successful. If the success is achieved, the procedure is ended; and if the application fails, reading the configuration information from the file system, and updating the application according to the configuration information.
And S505, reading the configuration information from the file system.
S506, updating the application according to the configuration information.
Steps S505 to S506 describe a processing manner after the update of the application fails, that is, the application is updated by the target configuration information stored in the file system.
Generally, the application can be updated directly according to the target configuration information in the memory to update the target application, but when the information in the memory disappears due to an emergency such as power failure or downtime, the application needs to be updated according to the target configuration information in the file system.
And S507, ending.
The embodiment of the invention detects that the service registration center checks the unconsumed target configuration information by receiving the configuration service, and transmits the target configuration information according to the server and the application corresponding to the target configuration information; and updating the application corresponding to the target configuration information according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
EXAMPLE six
Fig. 6 is a structural diagram of a configuration update apparatus according to a sixth embodiment of the present invention. The device is applied to a management server, and the management server is provided with a configuration service, a management service and a service registration center. The device includes:
a configuration information editing module 61, configured to send a configuration editing operation of configuration information acting on an application in an application server to the service registry;
a configuration information operation module 62, configured to edit the configuration information according to the configuration editing operation, and mark the configuration information as unconsumed;
a configuration information checking module 63 for checking unconsumed configuration information from the service registry as target configuration information;
a configuration information determining module 64, configured to determine an application server and an application corresponding to the target configuration information;
a configuration information sending module 65, configured to send the target configuration information to the application server by the configuration service, so as to update the application according to the target configuration information.
The embodiment of the invention sends the configuration editing operation of the configuration information acting on the application in the application server to the service registration center through the management service; the service registry edits the configuration information according to the configuration editing operation, and marks the configuration information as unconsumed; the configuration service checks unconsumed configuration information from the service registry as target configuration information; the configuration service determines an application server and an application corresponding to the target configuration information; the configuration service sends the target configuration information to the application server to update the application according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
On the basis of the foregoing embodiment, the configuration information determining module 64 is further configured to:
determining a server cluster in which the unconsumed configuration information takes effect, wherein the server cluster comprises an application server;
determining an application to which the unconsumed configuration information belongs.
On the basis of the above embodiment, the service registration center is a message queue, and the device further includes a message queue module:
the message queue is used for storing application messages, and the application messages comprise application identification numbers of the applications, cluster identification numbers of the server clusters and configuration information of the applications.
On the basis of the above embodiment, the configuration information operation module 62 is further configured to:
searching consumption information corresponding to the configuration information;
the message information is set to a first value indicating unconsumed.
On the basis of the above embodiment, the configuration information checking module 63 is further configured to:
reading consumption information corresponding to the configuration information in the service registration center;
if the consumption information is a first value representing non-consumption, determining that the configuration information is the non-consumption configuration information and taking the configuration information as target configuration information;
and if the consumption information is a second value representing consumed, determining that the configuration information is consumed configuration information.
On the basis of the above embodiment, the system further includes a configuration information changing module, configured to:
and marking that the target configuration information is consumed according to the configuration editing operation.
The configuration updating device provided by the embodiment can be used for executing the configuration updating methods provided by the first embodiment and the second embodiment, and has corresponding functions and beneficial effects.
EXAMPLE seven
Fig. 7 is a structural diagram of a configuration update apparatus according to a seventh embodiment of the present invention. The device is applied to a management server, and the management server is provided with a configuration service, a management service and a service registration center. The device includes:
a configuration information checking sub-module 71 for checking unconsumed configuration information from the service registry as target configuration information;
a configuration information determining submodule 72, configured to determine an application server and an application corresponding to the target configuration information;
a configuration information sending submodule 73, configured to send the target configuration information to the application server, so as to update the application according to the target configuration information.
The embodiment of the invention checks unconsumed configuration information from the service registration center as target configuration information; determining an application server and an application corresponding to the target configuration information; and sending the target configuration information to an application server so as to update the application according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
Example eight
Fig. 8 is a structural diagram of an update apparatus according to an eighth embodiment of the present invention. The device is applied to an application server, the application server comprises an application, and the application server belongs to a server cluster. The device includes:
a configuration information receiving submodule 81, configured to receive target configuration information sent by the server and the application corresponding to the target configuration information when the configuration service detects that the service registry checks unconsumed target configuration information;
and the configuration information updating submodule 82 is configured to update the application corresponding to the target configuration information according to the target configuration information.
The embodiment of the invention detects that the service registration center checks the unconsumed target configuration information by receiving the configuration service, and transmits the target configuration information according to the server and the application corresponding to the target configuration information; and updating the application corresponding to the target configuration information according to the target configuration information. The problem that the management server cannot perform configuration updating on part of applications in part of application servers is solved, and the beneficial effect of updating part of applications in part of application servers is achieved.
On the basis of the above embodiment, the application server has a file system, and further includes:
storing the configuration information to the file system.
On the basis of the above embodiment, the method further includes:
if the application is not updated, reading the configuration information from the file system;
and updating the application according to the configuration information.
On the basis of the above embodiment, the method further includes:
if the preset time is reached, reading consumption information corresponding to the configuration information of the application in the service registration center;
if the consumption information is a second value representing the consumption, determining the configuration information of the application as the updated configuration information of the management service;
and if the consumption information is a first value representing non-consumption, determining that the configuration information of the application is not updated by the management service.
The configuration updating device provided by the embodiment can be used for executing the configuration updating methods provided by the fourth and fifth embodiments, and has corresponding functions and beneficial effects.
Example nine
Fig. 9 is a schematic structural diagram of an electronic device according to a ninth embodiment of the present invention. As shown in fig. 9, the electronic apparatus includes a processor 90, a memory 91, a communication module 92, an input device 93, and an output device 94; the number of the processors 90 in the electronic device may be one or more, and one processor 90 is taken as an example in fig. 9; the processor 90, the memory 91, the communication module 92, the input device 93 and the output device 94 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 9.
The memory 91 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules corresponding to a configuration updating method in the present embodiment (for example, the configuration information editing module 61, the configuration information operating module 62, the configuration information checking module 63, the configuration information determining module 64, and the configuration information transmitting module 65 in a configuration updating apparatus) (for example, the configuration information checking submodule 71, the configuration information determining submodule 72, and the configuration information transmitting submodule 73 in a configuration updating apparatus) (for example, the configuration information receiving submodule 81 and the configuration information updating submodule 82 in a configuration updating apparatus). The processor 90 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 91, that is, implements one of the configuration update methods described above.
The memory 91 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 91 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 91 may further include memory located remotely from the processor 90, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
And the communication module 92 is used for establishing connection with the display screen and realizing data interaction with the display screen. The input device 93 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus.
The electronic device provided in this embodiment may perform the configuration updating method provided in any embodiment of the present invention, and its corresponding functions and advantages are described in detail.
Example ten
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a configuration update method, the method comprising:
the management service sends configuration editing operation of configuration information acting on the application in the application server to the service registration center;
the service registry edits the configuration information according to the configuration editing operation and marks the configuration information as unconsumed;
the configuration service checking unconsumed configuration information from the service registry as target configuration information;
the configuration service determines an application server and an application corresponding to the target configuration information;
and the configuration service sends the target configuration information to the application server so as to update the application according to the target configuration information.
Or the like, or, alternatively,
checking unconsumed configuration information from the service registry as target configuration information;
determining an application server and an application corresponding to the target configuration information;
and sending the target configuration information to the application server so as to update the application according to the target configuration information.
Or the like, or, alternatively,
receiving target configuration information sent by a server and an application corresponding to the target configuration information when the configuration service detects that the service registration center checks the unconsumed target configuration information;
and updating the application corresponding to the target configuration information according to the target configuration information.
Of course, the storage medium provided by the embodiments of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the configuration updating method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a computer electronic device (which may be a personal computer, a server, or a network electronic device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the configuration updating apparatus, each included unit and each included module are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (13)

1. A configuration updating method is applied to a management server, wherein the management server is provided with a configuration service, a management service and a service registration center, and the method comprises the following steps:
the management service sends configuration editing operation of configuration information acting on the application in the application server to the service registration center;
the service registry edits the configuration information according to the configuration editing operation and marks the configuration information as unconsumed;
the configuration service checking unconsumed configuration information from the service registry as target configuration information;
the configuration service determines an application server and an application corresponding to the target configuration information;
the configuration service sends the target configuration information to the application server so as to update the application according to the target configuration information;
and the configuration service determines the application server and the application corresponding to the target configuration information according to the cluster identification number and the application identification number of the server cluster in the target configuration information.
2. The method of claim 1, wherein the determining, by the configuration service, the application server and the application corresponding to the target configuration information comprises:
determining a server cluster in which the unconsumed configuration information takes effect, wherein the server cluster comprises an application server;
determining an application to which the unconsumed configuration information belongs.
3. The method according to claim 1 or 2, characterized in that the service registry is a message queue,
the message queue is used for storing application messages, and the application messages comprise application identification numbers of the applications, cluster identification numbers of the server clusters and configuration information of the applications.
4. The method of claim 1 or 2, wherein said marking said configuration information as not consumed comprises:
searching consumption information corresponding to the configuration information;
the consumption information is set to a first value representing non-consumption.
5. The method according to claim 1 or 2, wherein the configuration service checks unconsumed configuration information from the service registry as target configuration information, comprising:
reading consumption information corresponding to the configuration information in the service registration center;
if the consumption information is a first value representing non-consumption, determining that the configuration information is the non-consumption configuration information and taking the configuration information as target configuration information;
and if the consumption information is a second value representing consumed, determining that the configuration information is consumed configuration information.
6. The method of claim 1 or 2, further comprising:
and the service registry marks that the target configuration information is consumed according to the configuration editing operation.
7. A configuration updating method is applied to a management server, wherein the management server is provided with a configuration service, a management service and a service registration center, and the method comprises the following steps:
checking unconsumed configuration information from the service registry as target configuration information;
determining an application server and an application corresponding to the target configuration information;
sending the target configuration information to the application server to update the application according to the target configuration information;
and the configuration service determines the application server and the application corresponding to the target configuration information according to the cluster identification number and the application identification number of the server cluster in the target configuration information.
8. A configuration update method applied in an application server, wherein the application server includes an application, and the application server belongs to a server cluster, the method comprising:
receiving target configuration information sent by a server and an application corresponding to the target configuration information when the configuration service detects that the service registration center checks the unconsumed target configuration information;
updating the application corresponding to the target configuration information according to the target configuration information;
the target configuration information comprises a cluster identification number and an application identification number, and the cluster identification number and the application identification number are respectively used for determining the application corresponding to the target configuration information.
9. The method of claim 8, wherein the application server has a file system,
when the receiving configuration service detects that the service registration center checks unconsumed target configuration information and after the target configuration information is sent by the server and the application corresponding to the target configuration information, the receiving configuration service further comprises:
storing the configuration information to the file system.
10. The method of claim 9, further comprising:
if the application is not updated, reading the configuration information from the file system;
and updating the application according to the configuration information.
11. The method according to any one of claims 8-10, further comprising:
if the preset time is reached, reading consumption information corresponding to the configuration information of the application in the service registration center;
if the consumption information is a second value representing the consumption, determining the configuration information of the application as the updated configuration information of the management service;
and if the consumption information is a first value representing non-consumption, determining that the configuration information of the application is not updated by the management service.
12. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a configuration update method as claimed in any one of claims 1-11.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a configuration update method according to any one of claims 1 to 11.
CN201910118372.7A 2019-02-15 2019-02-15 Configuration updating method, device, equipment and storage medium Active CN109783136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910118372.7A CN109783136B (en) 2019-02-15 2019-02-15 Configuration updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910118372.7A CN109783136B (en) 2019-02-15 2019-02-15 Configuration updating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109783136A CN109783136A (en) 2019-05-21
CN109783136B true CN109783136B (en) 2022-03-22

Family

ID=66504476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910118372.7A Active CN109783136B (en) 2019-02-15 2019-02-15 Configuration updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109783136B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2549782A1 (en) * 2010-11-15 2013-01-23 ZTE Corporation Data card and method and system for customizing its application service
CN105915369A (en) * 2016-03-31 2016-08-31 北京奇艺世纪科技有限公司 Configuration information management method and configuration information management device
CN108427581A (en) * 2018-02-07 2018-08-21 平安普惠企业管理有限公司 System micro services method and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2549782A1 (en) * 2010-11-15 2013-01-23 ZTE Corporation Data card and method and system for customizing its application service
CN105915369A (en) * 2016-03-31 2016-08-31 北京奇艺世纪科技有限公司 Configuration information management method and configuration information management device
CN108427581A (en) * 2018-02-07 2018-08-21 平安普惠企业管理有限公司 System micro services method and terminal device

Also Published As

Publication number Publication date
CN109783136A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN108040108B (en) Communication switching method, device, coordination server and readable storage medium
CN110661658A (en) Node management method and device of block chain network and computer storage medium
CN102263830B (en) Apparatus, and associated method, for facilitating background processing of push content
CN110597918A (en) Account management method and device and computer readable storage medium
EP3635547B1 (en) Systems and methods for preventing service disruption during software updates
CN104579905A (en) Message passing method and system, MOM (message oriented middleware) server and receiving terminal
CN107347062A (en) A kind of method, electronic equipment and the readable storage medium storing program for executing of daily record data processing
CN112738791A (en) User information correlation backfill method, device, equipment and medium based on 5G core network
US9723480B2 (en) Information processing device, server device, data communication system, data communication method, and computer-readable storage medium storing data communication program
CN101571811B (en) Information transmission method and device thereof
CN111666167A (en) Input event reading processing optimization method, nonvolatile memory and terminal equipment
US8751560B2 (en) Method and device arrangement for managing a client/server environment
CN103701653A (en) Processing method for interface hot plugging and unplugging configuration data and network configuration server
EP3596594B1 (en) System and method for automatically synchronizing responses to conditions on devices
CN104426816A (en) Virtual machine communication method and device
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN109783136B (en) Configuration updating method, device, equipment and storage medium
CN101022633B (en) Allocation data recovering method, system and device
CN109144520B (en) Information interaction method, device, equipment and storage medium among different objects in Android
JP2006113754A (en) Software update device and method
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN111385478B (en) Terminal remote control method and device, smart card, control terminal and medium
CN109375966B (en) Method, device and equipment for initializing node and storage medium
CN115328693A (en) Method, device, equipment and storage medium for recovering service in service process
CN112559472A (en) File transmission method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant