CN110391949B - configuration change method and related device - Google Patents

configuration change method and related device Download PDF

Info

Publication number
CN110391949B
CN110391949B CN201910888312.3A CN201910888312A CN110391949B CN 110391949 B CN110391949 B CN 110391949B CN 201910888312 A CN201910888312 A CN 201910888312A CN 110391949 B CN110391949 B CN 110391949B
Authority
CN
China
Prior art keywords
configuration
server
information
patch
rollback
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
CN201910888312.3A
Other languages
Chinese (zh)
Other versions
CN110391949A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910888312.3A priority Critical patent/CN110391949B/en
Priority to CN201911252740.3A priority patent/CN112532415B/en
Publication of CN110391949A publication Critical patent/CN110391949A/en
Application granted granted Critical
Publication of CN110391949B publication Critical patent/CN110391949B/en
Priority to PCT/CN2020/116618 priority patent/WO2021052502A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings

Abstract

the embodiment of the application provides a configuration change method and a related device, a rollback patch message is constructed according to patch information and configuration change, when a client needs to perform configuration change on a server database, the server database can firstly receive configuration information from a server agent, and determine a configuration object needing configuration change from target objects pointed by the received configuration information by comparing the received configuration information with local configuration information. And then, the server database can execute configuration change according to the corresponding configuration operation of the configuration object in the configuration information, and then constructs a rollback patch message, wherein the rollback patch message contains relevant information of the configuration object, so that the server can indicate the configuration change condition of the server database to the client based on the rollback patch message, all data before the target object is changed does not need to be stored, the storage space of the server can be saved, and the storage resource can be effectively utilized.

Description

Configuration change method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for configuration change and a related apparatus.
background
a network configuration protocol (NETCONF) is a network management protocol based on extensible markup language (XML), which provides a method for configuring and managing network devices.
when the configuration of the network equipment needs to be changed, a configuration information can be sent to the NETCONF server on the network equipment through the NETCONF client, a database in the NETCONF server can change the configuration of each target object according to the configuration information, and the NETCONF server usually notifies the NETCONF client that the configuration change is completed after the change is executed. In order to determine the configuration change condition of the target object, the NETCONF client generally needs to obtain the configuration data of all target objects before the change and the configuration data of all target objects after the change from the NETCONF server in sequence, and then compares the two types of configuration data to determine which target objects in the NETCONF server have changed in configuration.
in the above configuration change process, in order to enable the NETCONF client to obtain the configuration change condition of the target object, the database of the NETCONF server needs to store the configuration data before the change and the configuration data after the change after the configuration change operation is completed, and occupies a large storage space.
disclosure of Invention
the embodiment of the application provides a configuration change method, which can save the storage space of a server and effectively utilize storage resources.
A first aspect of an embodiment of the present application provides a method for configuration change, including:
When the client needs to change the configuration of the server, a configuration request can be issued to the server. After receiving the configuration request, the server agent may generate configuration information based on the configuration request, and send the configuration information to the server database to perform configuration change, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a rollback patch message needs to be acquired.
the server database stores local configuration information of the target objects, and can determine the configuration objects needing configuration change from the target objects according to the received configuration information and the local configuration information.
because the patch information in the configuration information indicates that the rollback patch message needs to be acquired, after the server database determines the configuration object, the configuration change can be executed according to the configuration operation of the configuration object in the configuration information, and the rollback patch message is constructed based on the configuration change process, and comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and the old data of the configuration object.
And the server database sends the rollback patch message to the server agent. After the server agent obtains the rollback patch message, the client may be notified of the configuration change condition of the server database based on the rollback patch message.
from the above method of configuration change, it can be seen that: the rollback patch message constructed by the server database contains the inverse operation of the configuration operation executed on the configuration object and the old data of the configuration object, so that the server can determine which part of the target objects (namely the configuration objects) execute the configuration change, namely the configuration change condition of the server database based on the rollback patch message, and the configuration data before all target nodes are changed does not need to be stored, so that the storage space of the server can be saved, and the storage resources can be effectively utilized.
In a possible implementation manner of the first aspect, before the server database performs the configuration change according to the configuration operation of the configuration object corresponding to the configuration information, the method further includes:
the server database stores the old data of the configuration object;
constructing a rollback patch message according to the patch information and the configuration change, comprising the following steps:
The server database extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
And the server database constructs a rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object.
in the above embodiment, the server database may store the old data of the configuration object in advance before the configuration change is performed, and construct the rolling-back patch message according to the stored old data of the configuration object and the inverse operation of the configuration object corresponding to the configuration information after the configuration change is performed, thereby improving flexibility and selectivity of the scheme.
In a possible implementation manner of the first aspect, after the server database constructs the rollback patch message according to the old data of the configuration object and the inverse operation of the configuration operation performed on the configuration object, before the server database sends the rollback patch message to the server agent, the method further includes:
the server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information.
in the above embodiment, after the rollback patch message is constructed, the server database may delete the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information, so as to effectively save the storage space of the server database.
in a possible implementation manner of the first aspect, after the server database sends the rollback patch message to the server agent, the method further includes:
the server database receives a rollback request from the server agent, wherein the rollback request comprises old data of the configuration object and an inverse operation of the configuration operation performed on the configuration object;
And the server database executes configuration rollback according to the reverse operation corresponding to the configuration object in the rollback request.
in the above embodiment, after the server database sends the rollback patch message to the server agent, when the server database receives the rollback request from the server agent, the configuration rollback of the configuration object may be performed based on the rollback request.
in a possible implementation manner of the first aspect, the rollback patch message adopts a tree structure, wherein old data of all configuration objects and an inverse operation of a configuration operation performed on all configuration objects are presented in the tree structure.
in the above embodiment, the rollback patch message may store the relevant information of the configuration object in a tree structure manner, so as to improve the flexibility and selectivity of the scheme.
in a possible implementation manner of the first aspect, the rollback patch message uses entry records, where one entry includes old data of one configuration object, and an inverse operation of a configuration operation performed on one configuration object or one entry includes an inverse operation of a configuration operation performed on one configuration object.
in the above embodiment, the rollback patch message may store the relevant information of the configuration object in an entry record manner, so as to improve the flexibility and selectivity of the scheme.
A second aspect of the present application provides a method for configuration change, including:
when the client needs to perform configuration change on the server, the server agent may first receive a configuration request from the client, generate configuration information according to information included in the configuration request, and send the configuration information to the server database, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a rollback patch message needs to be acquired.
after the server database performs configuration change operation based on the configuration information, the server agent may receive a rollback patch message from the server database, where the rollback patch message is constructed after the server database performs configuration change on a configuration object that needs to be subjected to configuration change in a target object according to the configuration information, and the rollback patch message includes a reverse operation of the configuration operation performed on the configuration object in the configuration change process and old data of the configuration object.
The server agent may notify the client of a configuration change of the server database based on the rollback patch message.
from the above method of configuration change, it can be seen that: after the server database executes configuration change on the configuration object, a rollback patch message can be constructed and sent to the server agent, and the rollback patch message contains the inverse operation of the configuration operation executed on the configuration object and the old data of the configuration object, so that the server can determine which part of target objects (namely the configuration objects) execute the configuration change, namely the configuration change condition of the server database, based on the rollback patch message, the configuration data before all target nodes are changed does not need to be stored, the storage space of the server can be saved, and the storage resources can be effectively utilized.
In a possible implementation manner of the second aspect, after the server agent receives the rollback patch message from the server database, the method further includes:
and the server agent performs reverse analysis on the rollback patch message to obtain configuration change information, wherein the configuration change information comprises configuration operation executed on a configuration object.
In a possible implementation manner of the second aspect, after the server agent performs reverse analysis on the rolling patch packet to obtain the configuration change information, the method further includes:
and the server agent sends the configuration change information to the target application, and the target application is an application subscribing the configuration change information. In a possible implementation manner of the second aspect, after the server agent sends the configuration change information to the target application, the method further includes:
The server agent receives first response information from the target application, wherein the first response information is used for indicating that the target application accepts the configuration operation executed on the configuration object.
In the above embodiment, after receiving the rollback patch message, the server agent may perform inverse analysis on the rollback patch message to obtain the configuration change information, where the configuration change information includes a configuration operation performed on the configuration object to notify the target application of the configuration change condition of the server database, and when the target application receives the configuration change condition of the server database, the server agent may return the first response information to the server agent, so that the server agent may perform a corresponding subsequent operation according to the response information of the target application, thereby improving the flexibility of the scheme.
in a possible implementation manner of the second aspect, if the configuration request includes patch information indicating that a rolling-back patch message needs to be acquired, after the server agent receives the first response information from the target application, the method further includes:
And the server agent sends the rollback patch message to the client.
In the above embodiment, the configuration request issued by the client to the server agent includes the patch information indicating that the rollback patch message needs to be acquired, and since the server agent already has the rollback patch message returned by the server database, the rollback patch message may be directly sent to the client. The server can directly inform the client of the configuration change condition of the server database through the patch message, and the logic analysis pressure of the client can be effectively reduced.
In a possible implementation manner of the second aspect, if the configuration request includes patch information indicating that the patch change message needs to be acquired, after the server agent receives the first response information from the target application, the method further includes:
The server agent constructs a change patch message according to the configuration operation executed on the configuration object;
and the server agent sends the change patch message to the client.
In the above embodiment, the configuration request issued by the client to the server agent includes the patch information indicating that the patch change message needs to be acquired, so that the server agent can construct the patch change message according to the configuration operation performed on the configuration object and send the patch change message to the client. The server can directly inform the client of the configuration change condition of the server database through the patch change message, so that the client does not need to acquire and compare the configuration data before and after the change to obtain the configuration change condition of the server database, and the logic analysis pressure of the client can be effectively reduced.
In a possible implementation manner of the second aspect, if the configuration request includes patch information indicating that a reconfiguration patch message needs to be acquired, after the server agent receives the first response information from the target application, the method further includes:
The server agent obtains the new data of the configuration object, and constructs a reconfiguration patch message according to the configuration operation executed on the configuration object and the new data of the configuration object;
And the server agent sends the reconfiguration patch message to the client.
in the above embodiment, the configuration request issued by the client to the server agent includes the patch information indicating that the reconfiguration patch message needs to be acquired, so that the server agent can construct the reconfiguration patch message according to the new data of the configuration object and the configuration operation performed on the configuration object, and send the reconfiguration patch message to the client. The server can directly inform the client of the configuration change condition of the server database through the reconfiguration patch message, and the logic analysis pressure of the client can be effectively reduced.
furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
in a possible implementation manner of the second aspect, after the server agent sends the configuration change information to the target application, the method further includes:
The server agent receives second response information from the target application, wherein the second response information is used for indicating that the target application does not accept the configuration operation executed on the configuration object;
the server agent constructs a rollback request according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object, wherein the old data of the configuration object is included in the rollback patch message;
the server agent sends the rollback request to a server database;
And the server agent sends the second response information to the client.
In the above embodiment, when the server determines that the configuration change operation fails, the server may autonomously complete the configuration rollback without waiting for the client to issue the rollback request, which may save time consumed by the configuration rollback and improve efficiency of the configuration rollback.
In a possible implementation manner of the second aspect, after the sending, by the server agent, the rollback patch message to the client further includes:
the method comprises the steps that a server agent receives a rollback request from a client, wherein the rollback request is generated based on a rollback patch message, and comprises old data of a configuration object and reverse operation of configuration operation executed on the configuration object;
The server agent sends a rollback request to the server database.
In the foregoing embodiment, if the configuration change operation of the server associated with the server fails, the client may further perform configuration rollback on the server through the rollback patch message, and a rollback request generated by the client based on the rollback patch message only includes relevant information of the configuration object and does not include relevant information of other non-configuration objects, so that information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
a third aspect of the embodiments of the present application provides a method for configuration change, including:
when the client needs to perform configuration change on the server, the server can receive a configuration request from the client and generate configuration information according to the configuration request, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired;
The server stores local configuration information of the target object, and determines a configuration object needing configuration change from the target object according to the configuration information and the local configuration information;
because the patch information in the configuration information indicates that the rollback patch message needs to be acquired, after the server determines the configuration object, the server can execute configuration change according to the configuration operation of the configuration object in the configuration information, and construct the rollback patch message based on the configuration change process, wherein the rollback patch message comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and old data of the configuration object.
The server may notify the client of a configuration change of the server database based on the rollback patch message.
From the above method of configuration change, it can be seen that: the rollback patch message constructed by the server contains the inverse operation of the configuration operation executed on the configuration object and the old data of the configuration object, so that the server can determine which part of the target object (namely the configuration object) executes the configuration change, namely the configuration change condition of the server database based on the rollback patch message, and the configuration data before all target nodes are changed does not need to be stored, so that the storage space of the server can be saved, and the storage resource can be effectively utilized.
In a possible implementation manner of the third aspect, before the server performs the configuration change according to the configuration operation of the configuration object corresponding to the configuration information, the method further includes:
the server stores the old data of the configuration object;
constructing a rollback patch message according to the patch information and the configuration change, comprising the following steps:
the server extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
and the server constructs a rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object.
In the above embodiment, the server may store the old data of the configuration object in advance before executing the configuration change, and construct the rollback patch message according to the stored old data of the configuration object and the inverse operation of the configuration object corresponding to the configuration information after executing the configuration change, thereby improving flexibility and selectivity of the scheme.
In a possible implementation manner of the third aspect, after the server constructs the rolling-back patch message according to the old data of the configuration object and the reverse operation of the configuration operation performed on the configuration object, the method further includes:
The server deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information.
in the above embodiment, after constructing the rollback patch message, the server may delete the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information, so as to effectively save the storage space of the server.
In a possible implementation manner of the third aspect, after the server performs configuration change according to a configuration operation of the configuration object corresponding to the configuration information, and constructs a rollback patch packet according to the patch information and the configuration change, the method further includes:
And the server performs reverse analysis on the rollback patch message to obtain configuration change information, wherein the configuration change information comprises configuration operation executed on a configuration object.
In a possible implementation manner of the third aspect, after the server performs reverse analysis on the rolling patch packet to obtain the configuration change information, the method further includes:
and the server sends the configuration change information to the target application, and the target application is an application subscribing the configuration change information.
In a possible implementation manner of the third aspect, after the server sends the configuration change information to the target application, the method further includes:
The server receives first response information from the target application, wherein the first response information is used for indicating that the target application accepts the configuration operation executed on the configuration object.
in the above embodiment, after receiving the rollback patch message, the server may perform inverse analysis on the rollback patch message to obtain the configuration change information, where the configuration change information includes a configuration operation performed on the configuration object to notify the target application of the configuration change condition of the server database, and when the target application receives the configuration change condition of the server database, the server may return the first response information to the server, so that the server may perform a corresponding subsequent operation according to the response information of the target application, thereby improving the flexibility of the scheme.
in a possible implementation manner of the third aspect, if the configuration request includes patch information indicating that the rolling-back patch packet needs to be acquired, after the server receives the first response information from the target application, the method further includes:
and the server sends the rollback patch message to the client.
in the above embodiment, the configuration request issued by the client to the server includes the patch information indicating that the rollback patch message needs to be acquired, and since the server already has the rollback patch message returned by the server database, the rollback patch message may be directly sent to the client. The server can directly inform the client of the configuration change condition of the server database through the patch message, and the logic analysis pressure of the client can be effectively reduced.
in a possible implementation manner of the third aspect, if the configuration request includes patch information indicating that the patch change message needs to be acquired, after the server receives first response information from the target application, the method further includes:
The server constructs a change patch message according to the configuration operation executed on the configuration object;
and the server sends the patch change message to the client.
in the above embodiment, the configuration request issued from the client to the server includes the patch information indicating that the patch change message needs to be acquired, so that the server can construct the patch change message according to the configuration operation performed on the configuration object and send the patch change message to the client. The server can directly inform the client of the configuration change condition of the server database through the patch change message, so that the client does not need to acquire and compare the configuration data before and after the change to obtain the configuration change condition of the server database, and the logic analysis pressure of the client can be effectively reduced.
In a possible implementation manner of the third aspect, if the configuration request includes patch information indicating that a reconfiguration patch message needs to be acquired, after the server receives first response information from the target application, the method further includes:
the server acquires new data of the configuration object, and constructs a reconfiguration patch message according to the configuration operation executed on the configuration object and the new data of the configuration object;
and the server sends the reconfiguration patch message to the client.
in the above embodiment, the configuration request issued by the client to the server includes the patch information indicating that the reconfiguration patch message needs to be acquired, so that the server can construct the reconfiguration patch message according to the configuration operation performed on the configuration object and send the reconfiguration patch message to the client. The server can directly inform the client of the configuration change condition of the server database through the reconfiguration patch message, and the logic analysis pressure of the client can be effectively reduced.
In a possible implementation manner of the third aspect, after the server sends the configuration change information to the target application, the method further includes:
The server receives second response information from the target application, wherein the second response information is used for indicating that the target application does not accept the configuration operation executed on the configuration object;
the server constructs a rollback request according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object, wherein the old data of the configuration object is included in the rollback patch message;
The server executes configuration rollback according to the corresponding reverse operation of the configuration object in the rollback request;
And the server agent sends the second response information to the client.
In the above embodiment, when the server determines that the configuration change operation fails, the server may autonomously complete the configuration rollback without waiting for the client to issue the rollback request, which may save time consumed by the configuration rollback and improve efficiency of the configuration rollback.
in a possible implementation manner of the third aspect, after the server sends the rollback patch message to the client, the method further includes:
the server receives a rollback request from the client, wherein the rollback request is generated based on the rollback patch message, and comprises old data of the configuration object and reverse operation of configuration operation executed on the configuration object;
and the server executes configuration rollback according to the corresponding reverse operation of the configuration object in the rollback request.
in the foregoing embodiment, if the configuration change operation of the server associated with the server fails, the client may further perform configuration rollback on the server through the rollback patch message, and a rollback request generated by the client based on the rollback patch message only includes relevant information of the configuration object and does not include relevant information of other non-configuration objects, so that information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
in a possible implementation manner of the third aspect, the reconfiguration patch message is used to instruct the client to perform configuration change on the remaining servers.
in the above embodiment, the client may also perform the same configuration change on the other servers through the reconfiguration patch message, and the client only includes the relevant information of the configuration object and does not include the relevant information of other non-configuration objects based on the configuration request generated by the reconfiguration change message, so that information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
A fourth aspect of the present embodiment provides a method for configuration change, including:
the server database receives configuration information from the server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a reconfiguration patch message needs to be acquired;
The server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
The server database stores the configuration operation corresponding to the configuration object in the configuration information and the new data of the configuration object, and constructs a reconfiguration patch message according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
the server database sends the reconfiguration patch message to a server agent;
the server database receives a change request from the server agent, wherein the change request is used for indicating the server database to execute configuration change;
And the server database executes configuration change according to the configuration operation corresponding to the saved configuration object.
From the above method of configuration change, it can be seen that: the reconfiguration patch message constructed by the server database contains the configuration operation corresponding to the configuration object and the new data of the configuration object, so that the server can determine the configuration change condition of the server database based on the reconfiguration patch message, the configuration data before all target nodes are changed does not need to be stored, the storage space of the server can be saved, and the storage resource can be effectively utilized.
in a possible implementation manner of the fourth aspect, after the server database sends the reconfiguration patch message to the server agent, the method further includes:
the server database receives a deletion request from a server agent;
and the server database deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object according to the deletion request.
In the above embodiment, after the server database sends the reconfiguration patch message to the server agent, if a deletion request is received from the server agent, the configuration operation corresponding to the stored configuration object and the new data of the configuration object are deleted. When the target application does not accept the configuration change condition about to happen to the server database, the server agent can inform the server database to refuse to perform the configuration change, namely, delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object, and not perform the configuration change, so that the server database maintains the original state.
In a possible implementation manner of the fourth aspect, the reconfiguration patch message adopts a tree structure, where new data of all configuration objects and configuration operations corresponding to all configuration objects are presented in the tree structure.
In the above embodiment, the reconfiguration patch message may store the relevant information of the configuration object in a tree structure manner, so that the flexibility and the selectivity of the scheme are improved.
In a possible implementation manner of the fourth aspect, the reconfiguration patch message uses entry records, where one entry includes new data of one configuration object, and a configuration operation corresponding to one configuration object or one entry includes a configuration operation performed on one configuration object.
in the above embodiment, the reconfiguration patch message may store the relevant information of the configuration object in an entry record manner, so that the flexibility and selectivity of the scheme are improved.
a fifth aspect of the present application provides a method for configuration change, including:
the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a reconfiguration patch message needs to be acquired;
the server agent receives a reconfiguration patch message from a server database, the reconfiguration patch message is constructed after the server database determines a configuration object needing configuration change from target objects according to configuration information, and the reconfiguration patch message comprises configuration operation corresponding to the configuration object in the configuration information and new data of the configuration object;
the server agent obtains configuration change information from the reconfiguration patch message, wherein the configuration change information comprises configuration operation corresponding to a configuration object;
The server agent sends the configuration change information to a target application, and the target application is an application subscribing the configuration change information;
If the server agent receives first response information from the target application, the first response information is used for indicating the target application to receive configuration operation corresponding to the configuration object;
The server agent sends a change request to the server database, the change request being used to instruct the server database to perform a configuration change.
From the above method of configuration change, it can be seen that: before the server database is configured and changed, a reconfiguration patch message can be constructed and sent to the server agent, and the reconfiguration patch message contains configuration operation corresponding to the configuration object and new data of the configuration object, so that the server can determine the configuration change condition of the server database based on the reconfiguration patch message, and the configuration data before all target nodes are changed does not need to be stored, so that the storage space of the server can be saved, and the storage resources can be effectively utilized.
In a possible implementation manner of the fifth aspect, if the configuration request includes patch information indicating that a reconfiguration patch message needs to be acquired, after the server agent receives the first response information from the target application, the method further includes:
and the server agent sends the reconfiguration patch message to the client.
In the above embodiment, the configuration request issued by the client to the server agent includes patch information indicating that a reconfiguration patch message needs to be acquired, and the server agent already has the reconfiguration patch message returned by the server database, and can directly send the reconfiguration patch message to the client. The server can directly inform the client of the configuration change condition of the server database through the patch message, and the logic analysis pressure of the client can be effectively reduced.
furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
in a possible implementation manner of the fifth aspect, if the configuration request includes patch information indicating that the patch change message needs to be acquired, after the server agent receives the first response information from the target application, the method further includes:
the server agent constructs a change patch message according to the configuration operation corresponding to the configuration object;
And the server agent sends the change patch message to the client.
In the above embodiment, in the configuration request issued by the client to the server agent, the patch information indicating that the patch change message needs to be acquired is included, so that the server agent may construct the patch change message according to the configuration operation performed on the configuration object and send the patch change message to the client. The server can directly inform the client of the configuration change condition of the server database through the patch change message, so that the client does not need to acquire and compare the configuration data before and after the change to obtain the configuration change condition of the server database, and the logic analysis pressure of the client can be effectively reduced.
in a possible implementation manner of the fifth aspect, after the server agent sends the configuration change information to the target application, the method further includes:
If the server agent receives second response information from the target application, the second response information is used for indicating that the target application does not accept the configuration operation corresponding to the configuration object;
the server agent sends a deletion request to the server database, wherein the deletion request is used for indicating the server database to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
and the server agent sends the second response information to the client.
In the above embodiment, after the server determines that the target application does not accept the upcoming configuration change condition of the configuration data set, the server may autonomously refuse to perform the configuration change operation, maintain the original state of the configuration data set, and improve the flexibility of the scheme.
a sixth aspect of the present application provides a method of configuration change, including:
The server receives a configuration request from the client and generates configuration information according to the configuration request, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a reconfiguration patch message needs to be acquired;
the server determines a configuration object needing configuration change from the target object according to the configuration information and the local configuration information;
The server stores the configuration operation corresponding to the configuration object in the configuration information and the new data of the configuration object, and constructs a reconfiguration patch message according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
The server acquires configuration change information from the reconfiguration patch message, wherein the configuration change information comprises configuration operation corresponding to a configuration object;
The server sends the configuration change information to a target application, and the target application is an application subscribing the configuration change information;
If the server receives first response information from the target application, the first response information is used for indicating the target application to receive configuration operation corresponding to the configuration object;
And the server executes configuration change according to the configuration operation corresponding to the stored configuration object.
from the above method of configuration change, it can be seen that: the reconfiguration patch message constructed by the server contains the configuration operation corresponding to the configuration object and the new data of the configuration object, so that the server can determine the configuration change condition of the server database based on the reconfiguration patch message, and does not need to store all the configuration data before the target node is changed, thereby saving the storage space of the server and effectively utilizing the storage resource.
in a possible implementation manner of the sixth aspect, if the configuration request includes patch information indicating that a reconfiguration patch message needs to be acquired, after the server receives the first response information from the target application, the method further includes:
and the server sends the reconfiguration patch message to the client.
in the above embodiment, the configuration request issued by the client to the server includes the patch information indicating that the reconfiguration patch message needs to be acquired, and since the server already has the reconfiguration patch message returned by the server database, the reconfiguration patch message can be directly sent to the client. The server can directly inform the client of the configuration change condition of the server database through the patch message, and the logic analysis pressure of the client can be effectively reduced.
in a possible implementation manner of the sixth aspect, if the configuration request includes patch information indicating that the patch change message needs to be acquired, after the server receives the first response information from the target application, the method further includes:
the server constructs a change patch message according to the configuration operation corresponding to the configuration object;
and the server sends the patch change message to the client.
In the above embodiment, in the configuration request issued from the client to the server in the above embodiment, the patch information indicating that the patch change message needs to be acquired is included, so that the server may construct the patch change message according to the configuration operation performed on the configuration object, and send the patch change message to the client. The server can directly inform the client of the configuration change condition of the server database through the patch change message, so that the client does not need to acquire and compare the configuration data before and after the change to obtain the configuration change condition of the server database, and the logic analysis pressure of the client can be effectively reduced.
in one possible implementation manner of the sixth aspect, after the server sends the configuration change information to the target application, the method further includes:
If the server receives second response information from the target application, the second response information is used for indicating that the target application does not accept the configuration operation corresponding to the configuration object;
The server deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
And the server sends the second response information to the client.
In the above embodiment, after the server determines that the target application does not accept the upcoming configuration change condition of the configuration data set, the server may autonomously refuse to perform the configuration change operation, maintain the original state of the configuration data set, and improve the flexibility of the scheme.
in a possible implementation manner of the sixth aspect, the reconfiguration patch message is used to instruct the client to perform configuration change on the remaining servers.
In the above embodiment, the client may also perform the same configuration change on the other servers through the reconfiguration patch message, and the client only includes the relevant information of the configuration object and does not include the relevant information of other non-configuration objects based on the configuration request generated by the reconfiguration change message, so that information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
a seventh aspect of the present embodiment further provides a method for configuration change, including:
the server database receives configuration information from the server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired;
the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
The server database stores new data of the configuration object, configuration operation corresponding to the configuration object in the configuration information, old data of the configuration object and inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
The server database constructs a rollback patch message according to the stored old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object;
the server database sends the rollback patch message to a server agent;
The server database receives a change request from the server agent, wherein the change request is used for indicating the server database to execute configuration change;
and the server database executes configuration change according to the configuration operation corresponding to the saved configuration object.
In a possible implementation manner of the seventh aspect, after the server database performs the configuration change according to the configuration operation corresponding to the saved configuration object, the method further includes:
The server database constructs a reconfiguration patch message according to the stored new data of the configuration object and the configuration operation corresponding to the configuration object;
The server deletes the stored new data of the configuration object and the configuration operation corresponding to the configuration object;
The server database sends the reconfigured patch message to the server agent.
in the implementation manner, the reconfiguration patch message constructed by the server database includes the configuration operation corresponding to the configuration object and the new data of the configuration object, so that the server can determine the configuration change condition of the server database based on the reconfiguration patch message, and does not need to store all the configuration data before the target node is changed, thereby saving the storage space of the server and effectively utilizing the storage resource.
furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
In a possible implementation manner of the seventh aspect, after the server database constructs the rollback patch message according to the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, before the server database sends the rollback patch message to the server agent, the method further includes:
and the server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object.
In the above embodiment, after the rollback patch message is constructed, the server database may delete the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information, so as to effectively save the storage space of the server database.
in a possible implementation manner of the seventh aspect, after the server database sends the rollback patch message to the server agent, the method further includes:
The server database receives a deletion request from a server agent;
and the server database deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object according to the deletion request.
In the above embodiment, after the server database sends the reconfiguration patch message to the server agent, if a deletion request is received from the server agent, the configuration operation corresponding to the stored configuration object and the new data of the configuration object are deleted. When the target application does not accept the configuration change condition about to happen to the server database, the server agent can inform the server database to refuse to perform the configuration change, namely, delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object, and not perform the configuration change, so that the server database maintains the original state.
in a possible implementation manner of the seventh aspect, the rollback patch message adopts a tree structure, where old data of all configuration objects and an inverse operation of configuration operations corresponding to all configuration objects are presented in the tree structure.
in the above embodiment, the rollback patch message may store the relevant information of the configuration object in a tree structure manner, so as to improve the flexibility and selectivity of the scheme.
In a possible implementation manner of the seventh aspect, the rollback patch message uses entry records, where one entry includes old data of one configuration object, and an inverse operation of a configuration operation corresponding to one configuration object or one entry includes an inverse operation of a configuration operation corresponding to one configuration object.
in the above embodiment, the rollback patch message may store the relevant information of the configuration object in an entry record manner, so as to improve the flexibility and selectivity of the scheme.
in a possible implementation manner of the seventh aspect, the reconfiguration patch message adopts a tree structure, where new data of all configuration objects and configuration operations corresponding to all configuration objects are presented in the tree structure.
in the above embodiment, the reconfiguration patch message may store the relevant information of the configuration object in a tree structure manner, so that the flexibility and the selectivity of the scheme are improved.
in a possible implementation manner of the seventh aspect, the reconfiguration patch message uses entry records, where one entry includes new data of one configuration object, and one configuration operation corresponding to the configuration object or one entry includes a configuration operation corresponding to the configuration object.
In the above embodiment, the reconfiguration patch message may store the relevant information of the configuration object in an entry record manner, so that the flexibility and selectivity of the scheme are improved.
an eighth aspect of the present application provides a method for configuration change, including:
the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired;
the method comprises the steps that a server agent receives a rollback patch message from a server database, the rollback patch message is constructed after the server database determines a configuration object needing configuration change from a target object according to configuration information, and the rollback patch message comprises reverse operation of the configuration operation corresponding to the configuration object in the configuration information and old data of the configuration object;
the server agent performs reverse analysis on the rollback patch message to obtain configuration change information, wherein the configuration change information comprises configuration operation executed on a configuration object;
The server agent sends the configuration change information to a target application, and the target application is an application subscribing the configuration change information;
If the server agent receives first response information from the target service, the first response information is used for indicating the target service to receive the configuration operation corresponding to the configuration object;
The server agent sends a change request to the server database, the change request being used to instruct the server database to perform a configuration change.
in a possible implementation manner of the eighth aspect, the configuring request includes patch information indicating that a reconfiguration patch message needs to be acquired, and after the server agent sends the change request to the server database, the method further includes: the server agent receives a reconfiguration patch message from a server database, wherein the reconfiguration patch message comprises new data of a configuration object and configuration operation corresponding to the configuration object in configuration information;
the server agent sends a reconfiguration patch message to the client.
In the implementation manner, the reconfiguration patch message constructed by the server database includes the configuration operation corresponding to the configuration object and the new data of the configuration object, so that the server can determine the configuration change condition of the server database based on the reconfiguration patch message, and does not need to store all the configuration data before the target node is changed, thereby saving the storage space of the server and effectively utilizing the storage resource.
furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
In a possible implementation manner of the eighth aspect, after the server agent sends the configuration change information to the target application, the method further includes:
if the server agent receives second response information from the target application, the second response information is used for indicating that the target application does not accept the configuration operation corresponding to the configuration object;
The server agent sends a deletion request to the server database, wherein the deletion request is used for indicating the server database to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
and the server agent sends the second response information to the client.
in the implementation manner, after the server determines that the target application does not accept the configuration change condition about to occur in the configuration data set, the server can autonomously refuse to execute the configuration change operation, maintain the original state of the configuration data set, and improve the flexibility of the scheme.
a ninth aspect of the present application provides a method of configuration change, including:
the server receives a configuration request from the client and generates configuration information according to the configuration request, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired;
the server determines a configuration object needing configuration change from the target object according to the configuration information and the local configuration information;
the server stores the new data of the configuration object, the configuration operation corresponding to the configuration object in the configuration information, the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
The server constructs a rollback patch message according to the stored old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object;
the server performs reverse analysis on the rollback patch message to obtain configuration change information, wherein the configuration change information comprises configuration operation executed on a configuration object;
the server sends the configuration change information to a target application, and the target application is an application subscribing the configuration change information;
if the server receives first response information from the target service, the first response information is used for indicating the target service to receive the configuration operation corresponding to the configuration object;
and the server executes configuration change according to the configuration operation corresponding to the stored configuration object.
In a possible implementation manner of the ninth aspect, the configuring request includes patch information used for indicating that a reconfiguration patch message needs to be acquired, and after the server performs configuration change according to a configuration operation corresponding to the stored configuration object, the configuring request further includes:
And the server constructs a reconfiguration patch message according to the stored new data of the configuration object and the corresponding configuration operation of the configuration object in the configuration information.
the server sends a reconfiguration patch message to the client.
In the implementation manner, the reconfiguration patch message constructed by the server includes the configuration operation corresponding to the configuration object and the new data of the configuration object, so that the server can determine the configuration change condition of the server database based on the reconfiguration patch message, and does not need to store all the configuration data before the target node is changed, thereby saving the storage space of the server and effectively utilizing the storage resource.
furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
In a possible implementation manner of the ninth aspect, after the server constructs the rolling-back patch message according to the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, the method further includes:
and the server deletes the stored old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object.
In the above embodiment, after constructing the rollback patch message, the server may delete the stored old data of the configuration object and the inverse operation of the configuration object corresponding to the configuration information, so as to effectively save the storage space of the server database.
In a possible implementation manner of the ninth aspect, after the server sends the configuration change information to the target application, the method further includes:
if the server receives second response information from the target application, the second response information is used for indicating that the target application does not accept the configuration operation corresponding to the configuration object;
The server deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
And the server sends the second response information to the client.
In the implementation manner, after the server determines that the target application does not accept the configuration change condition about to occur in the configuration data set, the server can autonomously refuse to execute the configuration change operation, maintain the original state of the configuration data set, and improve the flexibility of the scheme.
a tenth aspect of the present application provides a server database, including:
the receiving module is used for receiving configuration information from the server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information for indicating that a rollback patch message needs to be acquired;
The processing module is used for determining a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
The processing module is further used for executing configuration change according to the configuration operation of the configuration object in the configuration information, and constructing a rollback patch message according to the patch information and the configuration change, wherein the rollback patch message comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and old data of the configuration object;
and the sending module is used for sending the rollback patch message to the server agent.
In a possible implementation manner of the tenth aspect, the processing module is further configured to:
Saving old data of the configuration object;
extracting the stored old data of the configuration object according to the patch information, and acquiring the inverse operation of the configuration operation executed on the configuration object;
and constructing a rolling back patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object.
in a possible implementation manner of the tenth aspect, the processing module is further configured to delete the saved old data of the configuration object and an inverse operation of a corresponding configuration operation of the configuration object in the configuration information.
In a possible implementation manner of the tenth aspect, the receiving module is further configured to receive a rollback request from the server agent, where the rollback request includes old data of the configuration object and an inverse operation of the configuration operation performed on the configuration object;
and the processing module is also used for executing configuration rollback according to the reverse operation of the configuration object in the rollback request.
In a possible implementation manner of the tenth aspect, the rollback patch message adopts a tree structure, wherein old data of all configuration objects and an inverse operation of a configuration operation performed on all configuration objects are presented in the tree structure.
In a possible implementation manner of the tenth aspect, the rollback patch message uses entry records, where one entry includes old data of one configuration object, and the inverse operation of the configuration operation performed on one configuration object or one entry includes the inverse operation of the configuration operation performed on one configuration object.
an eleventh aspect of an embodiment of the present application provides a server agent, including:
the first receiving module is used for receiving a configuration request from a client;
The processing module is used for generating configuration information according to the configuration request;
the system comprises a sending module, a server database and a rolling back patch message sending module, wherein the sending module is used for sending configuration information to the server database, and the configuration information comprises a target object, configuration operation corresponding to the target object and patch information for indicating that the rolling back patch message needs to be obtained;
the second receiving module is used for receiving a rollback patch message from the server database, wherein the rollback patch message is constructed after the server database performs configuration change on a configuration object which needs to be subjected to configuration change in a target object according to the configuration information, and the rollback patch message comprises reverse operation of configuration operation performed on the configuration object in a configuration change process and old data of the configuration object.
in a possible implementation manner of the eleventh aspect, the processing module is further configured to perform inverse parsing on the rolling patch packet to obtain configuration change information, where the configuration change information includes a configuration operation performed on the configuration object.
in a possible implementation manner of the eleventh aspect, the sending module is further configured to send the configuration change information to a target application, and the target application is an application that subscribes to the configuration change information.
In a possible implementation manner of the eleventh aspect, the second receiving module is further configured to receive first response information from the target application, where the first response information is used to indicate that the target application accepts the configuration operation performed on the configuration object.
In a possible implementation manner of the eleventh aspect, if the configuration request includes patch information indicating that a rolling-back patch packet needs to be acquired, the sending module is further configured to send the rolling-back patch packet to the client.
in a possible implementation manner of the eleventh aspect, if the configuration request includes patch information indicating that the patch change message needs to be acquired, the processing module is further configured to construct the patch change message according to a configuration operation performed on the configuration object;
And the sending module is also used for sending the patch change message to the client.
in a possible implementation manner of the eleventh aspect, if the configuration request includes patch information indicating that a reconfiguration patch message needs to be acquired, the processing module is further configured to acquire new data of the configuration object, and construct a reconfiguration patch message according to the configuration operation performed on the configuration object and the new data of the configuration object;
And the sending module is also used for sending the reconfiguration patch message to the client.
In a possible implementation manner of the eleventh aspect, the second receiving module is further configured to receive second response information from the target application, where the second response information is used to indicate that the target application does not accept the configuration operation performed on the configuration object;
The processing module is further used for constructing a rollback request according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object, wherein the old data of the configuration object is included in the rollback patch message;
the sending module is also used for sending the rollback request to a server database;
and the sending module is also used for sending the second response information to the client.
in a possible implementation manner of the eleventh aspect, the first receiving module is further configured to receive a rollback request from the client, where the rollback request is a request generated based on the rollback patch message, and the rollback request includes old data of the configuration object and a reverse operation of a configuration operation performed on the configuration object;
And the sending module is also used for sending the rollback request to the server database.
a twelfth aspect of embodiments of the present application further provides a server, including the server database according to the tenth aspect and the server agent according to the eleventh aspect.
A thirteenth aspect of embodiments of the present application provides a server database, including:
The receiving module is used for receiving configuration information from the server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information for indicating that a reconfiguration patch message needs to be acquired;
the processing module is used for determining a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
the processing module is further used for storing the configuration operation corresponding to the configuration object in the configuration information and the new data of the configuration object, and constructing a reconfiguration patch message according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
The sending module is used for sending the reconfiguration patch message to the server agent;
The receiving module is also used for receiving a change request from the server agent, and the change request is used for indicating the server database to execute configuration change;
and the processing module is also used for executing configuration change according to the configuration operation corresponding to the saved configuration object.
in a possible implementation manner of the thirteenth aspect, the receiving module is further configured to receive a deletion request from the server agent;
And the processing module is also used for deleting the stored configuration operation corresponding to the configuration object and the new data of the configuration object according to the deletion request.
In a possible implementation manner of the thirteenth aspect, the reconfiguration patch message adopts a tree structure, where new data of all configuration objects and configuration operations corresponding to all configuration objects are presented in the tree structure.
in a possible implementation manner of the thirteenth aspect, the reconfiguration patch message uses entry records, where one entry includes new data of one configuration object, and a configuration operation corresponding to one configuration object or one entry includes a configuration operation performed on one configuration object.
A fourteenth aspect of an embodiment of the present application provides a server agent, including:
The first receiving module is used for receiving a configuration request from a client;
The processing module is used for generating configuration information according to the configuration request;
the sending module is used for sending the configuration information to the server database, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information for indicating that a reconfiguration patch message needs to be acquired;
The second receiving module is used for receiving a reconfiguration patch message from the server database, wherein the reconfiguration patch message is constructed after the server database determines a configuration object needing configuration change from the target object according to the configuration information, and the reconfiguration patch message comprises configuration operation corresponding to the configuration object in the configuration information and new data of the configuration object;
the processing module is further used for acquiring configuration change information from the reconfiguration patch message, wherein the configuration change information comprises configuration operation corresponding to the configuration object;
The sending module is also used for sending the configuration change information to a target application, and the target application is an application subscribing the configuration change information;
The second receiving module is further configured to, if first response information from the target application is received, indicate the target application to accept the configuration operation corresponding to the configuration object;
And the sending module is also used for sending a change request to the server database, wherein the change request is used for indicating the server database to execute configuration change.
In a possible implementation manner of the fourteenth aspect, if the configuration request includes patch information indicating that a reconfiguration patch packet needs to be acquired, the sending module is further configured to send the reconfiguration patch packet to the client.
in a possible implementation manner of the fourteenth aspect, if the configuration request includes patch information used to indicate that the patch change message needs to be acquired, the processing module is further configured to construct the patch change message according to a configuration operation corresponding to the configuration object;
and the sending module is also used for sending the patch change message to the client.
in a possible implementation manner of the fourteenth aspect, the second receiving module is further configured to, if second response information from the target application is received, indicate that the target application does not accept a configuration operation corresponding to the configuration object;
the sending module is further used for sending a deletion request to the server database, wherein the deletion request is used for indicating the server database to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
and the sending module is also used for sending the second response information to the client.
a fifteenth aspect of embodiments of the present application further provides a server, including the server database according to the thirteenth aspect and the server agent according to the fourteenth aspect.
a sixteenth aspect of an embodiment of the present application provides a server database for acquiring configuration change information from a reconfiguration patch message, where the configuration change information includes configuration operations corresponding to configuration objects and sends the configuration change information to a target application, and the server database includes:
the receiving module is used for receiving configuration information from the server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information for indicating that a rollback patch message needs to be acquired;
the processing module is used for determining a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
the processing module is further used for storing new data of the configuration object, configuration operation corresponding to the configuration object in the configuration information, old data of the configuration object and inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
the processing module is also used for constructing a rolling-back patch message according to the stored old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object;
the sending module is used for sending the rollback patch message to the server agent;
The receiving module is also used for receiving a change request from the server agent, and the change request is used for indicating the server database to execute configuration change;
and the processing module is also used for executing configuration change according to the configuration operation corresponding to the saved configuration object.
In a possible implementation manner of the sixteenth aspect, the processing module is further configured to construct a reconfiguration patch message according to the stored new data of the configuration object and the configuration operation corresponding to the configuration object;
The processing module is also used for deleting the stored new data of the configuration object and the configuration operation corresponding to the configuration object;
And the sending module is also used for sending the reconfiguration patch message to a server agent.
In a possible implementation manner of the sixteenth aspect, the processing module is further configured to delete the saved old data of the configuration object and an inverse operation of the configuration operation corresponding to the configuration object.
in a possible implementation manner of the sixteenth aspect, the receiving module is further configured to receive a deletion request from the server agent;
And the processing module is also used for deleting the stored configuration operation corresponding to the configuration object and the new data of the configuration object according to the deletion request.
in a possible implementation manner of the sixteenth aspect, the rollback patch message adopts a tree structure, wherein the old data of all the configuration objects and the inverse operation of the configuration operation corresponding to all the configuration objects are presented in the tree structure.
In a possible implementation manner of the sixteenth aspect, the rollback patch message uses entry records, where one entry includes old data of one configuration object, and a reverse operation of a configuration operation corresponding to the one configuration object or one entry includes a reverse operation of a configuration operation corresponding to the one configuration object.
In a possible implementation manner of the sixteenth aspect, the reconfiguration patch message adopts a tree structure, where new data of all configuration objects and configuration operations corresponding to all configuration objects are presented in the tree structure.
In a possible implementation manner of the sixteenth aspect, the reconfiguration patch message uses entry records, where one entry includes new data of one configuration object, and one configuration operation corresponding to the configuration object or one entry includes a configuration operation corresponding to the configuration object.
A seventeenth aspect of an embodiment of the present application further provides a server agent, including:
the first receiving module is used for receiving a configuration request from a client;
the processing module is used for generating configuration information according to the configuration request;
the system comprises a sending module, a server database and a rolling back patch message sending module, wherein the sending module is used for sending configuration information to the server database, and the configuration information comprises a target object, configuration operation corresponding to the target object and patch information for indicating that the rolling back patch message needs to be obtained;
The second receiving module is used for receiving a rollback patch message from the server database, wherein the rollback patch message is constructed after the server database determines a configuration object needing configuration change from a target object according to the configuration information, and the rollback patch message comprises the reverse operation of the configuration operation corresponding to the configuration object in the configuration information and old data of the configuration object;
the processing module is also used for carrying out reverse analysis on the rollback patch message to obtain configuration change information, and the configuration change information comprises configuration operation executed on a configuration object;
The sending module is also used for sending the configuration change information to a target application, and the target application is an application subscribing the configuration change information;
the second receiving module is further configured to, if first response information from the target service is received, indicate the target service to receive the configuration operation corresponding to the configuration object;
And the sending module is also used for sending a change request to the server database, wherein the change request is used for indicating the server database to execute configuration change.
in a possible implementation manner of the seventeenth aspect, the configuration request includes patch information indicating that a reconfiguration patch packet needs to be acquired, and the server agent further includes:
The second receiving module is further configured to receive a reconfiguration patch message from the server database, where the reconfiguration patch message includes new data of the configuration object and a configuration operation corresponding to the configuration object in the configuration information;
and the sending module is also used for sending the reconfiguration patch message to the client.
in a possible implementation manner of the seventeenth aspect, the second receiving module is further configured to, if receiving second response information from the target application, indicate that the target application does not accept a configuration operation corresponding to the configuration object;
the sending module is further used for sending a deletion request to the server database, wherein the deletion request is used for indicating the server database to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
And the sending module is also used for sending the second response information to the client.
an eighteenth aspect of the present application provides a server comprising a server database as described in the sixteenth aspect and a server agent as described in the seventeenth aspect.
the nineteenth aspect of the embodiment of the present application further provides a server, including: one or more processors, input and output interfaces, and a power supply;
The processor is configured to execute the method in any one of the possible implementations of the first aspect and the first aspect, any one of the possible implementations of the second aspect and the second aspect, any one of the possible implementations of the third aspect and the third aspect, any one of the possible implementations of the fourth aspect and the fourth aspect, any one of the possible implementations of the fifth aspect and the fifth aspect, any one of the possible implementations of the sixth aspect and the sixth aspect, any one of the possible implementations of the seventh aspect and the seventh aspect, any one of the possible implementations of the eighth aspect and the eighth aspect, and any one of the possible implementations of the ninth aspect and the ninth aspect.
a twentieth aspect of embodiments of the present application provides a computer-readable storage medium, comprising program instructions, the computer program product is configured to, when executed on a computer device, cause the computer device to perform the method according to any one of the possible implementations of the first aspect and the first aspect, any one of the possible implementations of the second aspect and the second aspect, any one of the possible implementations of the third aspect and the third aspect, any one of the possible implementations of the fourth aspect and the fourth aspect, any one of the possible implementations of the fifth aspect and the fifth aspect, any one of the possible implementations of the sixth aspect and the sixth aspect, any one of the possible implementations of the seventh aspect and the seventh aspect, any one of the possible implementations of the eighth aspect and the eighth aspect, and any one of the possible implementations of the ninth aspect and the ninth aspect.
according to the technical scheme, the embodiment of the application has the following advantages:
the embodiment of the application provides a configuration change method and a related device, wherein the method comprises the following steps: when the configuration change of the server database is needed, the server database firstly receives configuration information from the server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired. And then the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information. And the server database executes configuration change according to the corresponding configuration operation of the configuration object in the configuration information, and constructs a rollback patch message according to the patch information and the configuration change, wherein the rollback patch message comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and the old data of the configuration object. And finally, the server database sends the rollback patch message to a server agent. In the configuration change process, the rollback patch message constructed by the server database includes the inverse operation of the configuration operation performed on the configuration object and the old data of the configuration object, so that the server can determine which part of the target objects (i.e. the configuration objects) perform the configuration change, namely the configuration change condition of the server database, based on the rollback patch message, and the configuration data before all the target objects are changed does not need to be stored, so that the storage space of the server can be saved, and the storage resources can be effectively utilized.
drawings
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for configuration change according to an embodiment of the present application;
Fig. 3 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
Fig. 4 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
fig. 5 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
fig. 6 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
fig. 7 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
Fig. 8 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
Fig. 9 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
fig. 10 is another schematic flow chart of a method for configuration change according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a server database provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of a server proxy according to an embodiment of the present application;
Fig. 13 is a schematic structural diagram of a server according to an embodiment of the present application;
Fig. 14 is another schematic structural diagram of a server database provided in an embodiment of the present application;
Fig. 15 is another schematic structural diagram of a server proxy according to an embodiment of the present application;
Fig. 16 is another schematic structural diagram of a server according to an embodiment of the present application;
fig. 17 is another schematic structural diagram of a server database provided in an embodiment of the present application;
Fig. 18 is another schematic structural diagram of a server proxy according to an embodiment of the present application;
fig. 19 is another schematic structural diagram of a server according to an embodiment of the present application;
fig. 20 is another schematic structural diagram of a server according to an embodiment of the present application;
Fig. 21 is a schematic diagram of a rollback patch message in an embodiment of the present application;
Fig. 22 is another schematic diagram of a rollback patch message in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a configuration change method, which can save the storage space of a server and effectively utilize storage resources.
the technical scheme of the embodiment of the application is applied to a network architecture of NETCONF, FIG. 1 is a schematic structural diagram of the network architecture provided by the embodiment of the application, and as shown in FIG. 1, the network architecture comprises a NETCONF client and a plurality of network devices, wherein the NETCONF client can perform centralized management and configuration on the plurality of network devices, each network device is provided with a NETCONF server, and the NETCONF servers can perform information interaction with the NETCONF client. For convenience of description, a network device provided with a NETCONF server is described, and the NETCONF server on the network device includes a server agent, a server database, and an application. The application may be software installed on a NETCONF server, and the server agent is an information forwarding center of the NETCONF server, for example, to forward information from a NETCONF client to a service module or a server database, or to transmit information from the service module or the server database to the NETCONF client. The server database is configured to store Yang (layer adjacent next generation) modeling data, where the server database may include a plurality of configuration data sets, such as an operating configuration data set (running configuration data store), a candidate configuration data set (candidate configuration data store), and the like, it should be noted that, in the subsequent description in this embodiment, the configuration data sets that need to be configured and changed are all operating configuration data sets, the configuration data sets are used to store configuration data used by the network device in the current operation, and the configuration data generally refers to data values of a plurality of configuration nodes included in the configuration data sets.
the NETCONF client and the NETCONF server are in communication connection, communication content between the NETCONF client and the NETCONF server is a bidirectional extensible markup language (XML) type Remote Procedure Call (RPC) message defined by a NETCONF protocol, the RPC message comprises a request message sent from the NETCONF client to the NETCONF server and a response message returned by the NETCONF server to the NETCONF client, for example, the NETCONF client sends a configuration request message to the NETCONF server, and the NETCONF server returns a response message to the NETCONF client after configuration change is performed on a configuration data set according to the message, so as to inform the NETCONF client of completion of the change operation. The message format of the RPC message is defined by the Yang model, which may define the format of the message as well as the format of the configuration data contained in the message.
for ease of explanation, the NETCONF client and NETCONF server will be referred to simply as a client and server in the following description. The method for configuration change provided by the embodiment of the application can be applied to various scenarios, for example, configuration change detection, configuration rollback, association rollback, reconfiguration and the like, in order to implement the various scenarios, the embodiment of the application expands the RPC between the client and the server, taking a configuration change message (which may also be referred to as a configuration request message) as an example, where the configuration change message (exit-configuration) may be a standard RPC message, and the embodiment of the application adds patch information in the configuration change message, where the patch information is used to instruct the server to generate and return a Yang patch message (Yang-patch), and the Yang patch message is a carrier for carrying the configuration change condition of the server database. Further, the patch information may be an identifier, and the identifier may have a plurality of values, for example, when the value of the patch information is a change-patch message (change-patch) that needs to be obtained, the yang-patch that the server needs to return to the client is the change-patch message (change-patch), when the value of the patch information is a need to obtain a relocation patch message (need do-patch), the yang-patch that the server needs to return to the client is the relocation patch message (reset-patch), and when the value of the patch information is a need to obtain a rollback patch message (need-patch), the yang-patch that the server needs to return to the client is the rollback patch message (undo-patch).
the following description starts with a scenario for implementing configuration change detection in the embodiment of the present application, and specifically describes a configuration change method provided in the embodiment of the present application from the perspective of a server. Fig. 2 is a schematic flowchart of a method for configuration change according to an embodiment of the present application, please refer to fig. 2, where the method includes:
201. the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
when the client needs to perform configuration change on the server, a configuration request (also referred to as a configuration request message) may be issued to the server, where the configuration request generally includes at least one target object in the configuration dataset, configuration operation corresponding to the target object, new data of the target object, and patch information for indicating that a change patch message needs to be obtained. It should be noted that the target object included in the configuration request generally refers to the name (identification) of the configuration node of the configuration data set.
after receiving a configuration request from a client, a server agent can analyze the configuration request, extract a target object, new data of the target object, configuration operation corresponding to the target object and patch information used for indicating that a change patch message needs to be obtained, and modify the value of the patch information so that the patch information is used for indicating that a rollback patch message needs to be obtained, namely, the value of the patch information is modified from need change-patch to need undo-patch, and then generate configuration information according to the target object, the new data of the target object, the configuration operation corresponding to the target object and the patch information with the value of need undo-patch. After the server agent generates the configuration information, the configuration information may be sent to a server database.
Specifically, the configuration data set of the server database includes a plurality of configuration nodes, the configuration information may perform configuration change on all or part of the nodes in the configuration data set, and all or part of the nodes to be subjected to configuration change are the target objects pointed by the configuration information. In the configuration information, each target object corresponds to a configuration operation, and the configuration operation may be any one of creation, deletion, or modification. The configuration information further includes new data of the target object, and it should be noted that, when the configuration operation corresponding to a certain target object is creation or modification, the target object has corresponding new data in the configuration information, for example, a node a with a value of 8 is created, and at this time, 8 is new data of the node a of the target object. For another example, the value of node B is modified from 2 to 4, where 4 is the new data of the target node B and 2 is the old data of node B. When the configuration operation corresponding to a certain target object is deletion, the target object does not have corresponding new data in the configuration information, for example, the node C is deleted, and the new data of the node C is not written in the configuration information.
202. the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
and after the server database receives the configuration information, comparing the received configuration information with the local configuration information, and determining a configuration object needing configuration change from the target objects. It is understood that the configuration object is all or part of the target objects, and the local configuration information is existing data of each target object (i.e. old data of the target object) on the configuration data set.
Specifically, since the configuration information includes new data of the target object and the configuration data set stores old data of the target object, the server database may determine, in the target object, a configuration object that requires configuration change according to a change between the new data and the old data of the target object. For example, when the configuration operation corresponding to the target object is modification, if the new data and the old data of the target object are different, the target object is determined as a configuration object requiring configuration change, and if the new data and the old data of the target object are the same, the target object is determined as a non-configuration object requiring no configuration change. When the configuration operation corresponding to the target object is creation, the target object does not exist in the configuration data set before the target object is changed, that is, the old data of the target object does not exist, and the configuration information includes the new data of the target object, so that the target object can be determined as the configuration object which needs to be subjected to configuration change. When the configuration operation corresponding to the target object is deletion, if the target object exists in the configuration data set before the target object is not changed, that is, the old data of the target object exists, and the new data of the target object does not exist in the configuration information, the target object can also be determined as the configuration object which needs to be subjected to configuration change.
203. the server database stores the old data of the configuration object;
before determining the configuration object, the server database may open a temporary data set according to the patch information (whose value is a need undo-patch). And when the server database determines the configuration object, storing the configuration object and the old data of the configuration object into a temporary data set. Specifically, when a certain target object is determined to be a configuration object that needs configuration change, the configuration operation of the configuration object is obtained from the configuration information, and the configuration operation is negated, so that the inverse operation of the configuration operation can be obtained.
it should be noted that, after the server database determines the configuration object and obtains the inverse operation corresponding to the configuration object, before the configuration change is executed, the server database may store the inverse operation of the configuration operation corresponding to the configuration object, the old data of the configuration object and the old data of the configuration object into the temporary data set at the same time, or may only store the old data of the configuration object and the old data of the configuration object into the temporary data set, and after the configuration change is executed on the configuration object (i.e., after step 204), store the inverse operation of the configuration operation corresponding to the configuration object into the temporary data set, which is not limited herein.
taking the example of simultaneously storing the inverse operation of the configuration operation corresponding to the configuration object, the configuration object and the old data of the configuration object into the temporary data set before the configuration change, when the node D is determined to be the configuration object, if the corresponding configuration operation of the node D in the configuration information is modification, if the inverse operation is still modified, storing the old data of the node D, the name of the node D and the inverse operation of the configuration operation corresponding to the node D into the temporary data set, if the configuration operation corresponding to the node D in the configuration information is creation, if the reverse operation is delete, the name of node D and the reverse operation of the configuration operation corresponding to node D are stored in the temporary data set, if the inverse operation is creation, the old data of the node D, the name of the node D and the inverse operation of the configuration operation corresponding to the node D are stored into the temporary data set.
It should be understood that the above example is only schematically illustrated by using one configuration object, i.e. node D, and does not limit the number of configuration objects.
204. The server database executes configuration change according to the configuration operation of the configuration object in the configuration information;
After the server database stores the old data of the configuration object, the server database may perform configuration change on the configuration object according to the new data of the configuration object and the corresponding configuration operation of the configuration object in the configuration information. When a plurality of configuration objects are provided, each time a server database determines one configuration object in the target objects, the server database stores the relevant information of the configuration object into the temporary data set, performs configuration change on the configuration object, and after the next configuration object is determined, performs the same operation as the above process until configuration change is completed on all the configuration objects.
Still like the above example, when it is determined that the node D in the target object is the configuration object, if the corresponding configuration operation of the node D in the configuration information is modification, new data of the node D in the configuration information is acquired, and the data value of the node D is modified from the old data to the new data. And if the corresponding configuration operation of the node D in the configuration information is creation, acquiring new data of the node D in the configuration information, creating the node D with the value as the new data in the configuration data set, and if the corresponding configuration operation of the node D in the configuration information is deletion, deleting the node D in the configuration data set.
It should be understood that the above example is only schematically illustrated by using one configuration object, i.e. node D, if there are other configuration objects, e.g. node K, node L, etc., each node may also perform any one of the above three operations, and the number of configuration objects is not limited herein.
It should also be understood that the server database may perform configuration change only on all configuration objects in the target objects that need configuration change, and the rest non-configuration objects in the target objects do not perform any operation, or the server database may perform configuration change on all target objects, but the non-configuration objects are not changed, which is equivalent to performing invalid configuration change, and the specific processing manner of the non-configuration objects is not limited herein.
205. the server database extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
After the server database completes configuration change, according to the indication (value is a need undo-patch) of the patch information, the server database determines that a rollback patch message needs to be generated, and then extracts the configuration object, the old data of the configuration object, and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information from the temporary data set (that is, the inverse operation of the configuration operation executed by the server database on the configuration object, which can be obtained from the temporary data set). It should be understood that the configuration operation performed by the server database on the configuration object is equal to the configuration operation corresponding to the configuration object in the configuration information, and for convenience of description, the configuration operation corresponding to the configuration object is hereinafter referred to simply as the configuration operation corresponding to the configuration object.
206. the server database constructs a rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object;
and after the server database acquires the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object from the temporary data set, the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object are constructed in a rollback patch message, namely, the undo-patch. Because the undo-patch contains relevant rollback information of the configuration object (namely, old data of the configuration object and the inverse operation of the configuration operation executed by the configuration object), the server can determine and notify the configuration change condition of the configuration object of the client based on the undo-patch, so that the server database does not need to store all the configuration data before the target object is changed, the storage space of the server can be saved, and the storage resource can be effectively utilized.
in the data structure of Yang-patch, the information carried by the Yang-patch can be edited in various ways, and therefore, the information carried by the undo-patch can also be edited in various ways, which will be described below:
In one possible implementation, the undo-patch employs a tree structure, where the tree structure includes all configuration objects, old data of all configuration objects, and an inverse operation of the configuration operation performed on all configuration objects. It should be noted that fig. 21 is a schematic diagram of the rollback patch message in the embodiment of the present application, and as shown in fig. 21, the undo-patch only includes one piece of editing information, and the related information of all the configuration objects is recorded in the editing information and is presented in a tree structure. Specifically, in the undo-patch of the tree structure, if the inverse operation of the configuration operation corresponding to a certain configuration object is delete, the message does not include the old data of the configuration object, and conversely, if the inverse operation of the configuration operation corresponding to a certain configuration object is create or modify, the message includes the old data of the configuration object.
In one possible implementation, the undo-patch uses entry records, where an entry includes a configuration object, old data of the configuration object, and an inverse operation of the configuration operation performed on the configuration object or an entry includes a configuration object and an inverse operation of the configuration operation performed on the configuration object. It should be noted that fig. 22 is another schematic diagram of the rollback patch message in the embodiment of the present application, and as shown in fig. 22, the undo-patch includes a plurality of parallel editing information, each editing information is equivalent to an entry, and each entry is used to record related information of one configuration object. Specifically, if the reverse operation of the configuration operation corresponding to the configuration object stored in a certain entry is deletion, the entry does not include the old data of the configuration object, and if the reverse operation of the configuration operation corresponding to the configuration object stored in a certain entry is creation or modification, the entry includes the old data of the configuration object.
207. the server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
after the server constructs the undo-patch, the server may delete the temporary data set, that is, delete the old data of the saved configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information.
208. the server database sends the rollback patch message to a server agent;
And after the temporary data set is deleted by the server database, the undo-patch is sent to the server agent.
209. The server agent performs reverse analysis on the rollback patch message to obtain configuration change information;
because the server is provided with at least one application, if part of the applications usually subscribe the configuration change information of the configuration data set to the server proxy, the server proxy determines the part of the applications as target applications and notifies the configuration change condition of the configuration data set of the target applications in real time. Therefore, when the server agent receives the undo-patch, the undo-patch can be reversely analyzed to obtain the configuration operation corresponding to the configuration object.
specifically, the server agent analyzes the undo-patch, extracts the configuration object contained in the undo-patch and the inverse operation of the configuration operation corresponding to the configuration object, and inverts the inverse operation of the configuration operation corresponding to the configuration object, so as to obtain the configuration operation corresponding to the configuration object, and generates configuration change information according to the configuration object and the configuration operation corresponding to the configuration object, at this time, the information contained in the configuration change information can represent the configuration change condition of the configuration data set.
210. The server agent sends the configuration change information to the target application;
And after the server agent obtains the configuration operation corresponding to the configuration object, the configuration object and the configuration operation corresponding to the configuration object are constructed in the configuration change information and are sent to the target application so as to inform the target application of the configuration change condition of the configuration data set.
211. the server agent receives first response information from the target application;
after receiving the configuration object and the configuration operation corresponding to the configuration object, the target application can determine which part of the configuration nodes in the configuration data set executes the configuration change, and further perform corresponding processing on the service data, if the processing is successful, it indicates that the target application receives the configuration operation executed by the server database on the configuration object, that is, the configuration change condition of the configuration data set is received, and the target application can return first response information to the server agent, so as to indicate the server agent that the target application receives the configuration operation executed by the server database on the configuration object.
212. The server agent constructs a change patch message according to the configuration operation executed on the configuration object;
and when the target application receives the configuration change condition of the configuration data set, the configuration change operation of the client to the server is successful. In the configuration request issued by the client to the server agent, the original patch information included in the configuration request indicates that the client needs to acquire a change patch message, which indicates that the client needs to acquire the configuration change condition of the server database, so the server agent can construct a change patch message, i.e., change-patch, according to the configuration object and the configuration operation corresponding to the configuration object (the configuration operation corresponding to the configuration object can be acquired from the configuration information or the configuration request, or can be acquired from the result obtained by the inverse analysis in step 209).
like the undo-patch, the information carried by the change-patch can also be edited in various ways, which are described below:
In one possible implementation, the change-patch employs a tree structure, where the tree structure includes all configuration objects and configuration operations performed on all configuration objects. It should be noted that the change-patch only includes one piece of edit information, and the information related to all the configuration objects is recorded in the edit information and presented in a tree structure. Specifically, in the change-patch of the tree structure, no matter which of deletion, creation, or modification is the configuration operation corresponding to any one configuration object, the message does not include the new data of the configuration object, and only includes the configuration object and the configuration operation corresponding to the configuration object.
in one possible implementation, change-patch employs entry records, where an entry includes a configuration object and a configuration operation performed on a configuration object. It should be noted that the change-patch includes a plurality of pieces of parallel edit information, each piece of edit information corresponds to an entry, and each entry is used for recording information related to one configuration object. Specifically, any entry in the change-patch only contains one configuration object and the configuration operation corresponding to the configuration object, and does not contain new data of the configuration object.
213. And the server agent sends the change patch message to the client.
after the server agent obtains the change-patch, the server agent returns the change-patch to the client. The client can analyze the change-patch, determine which part of the nodes in the configuration data set execute the configuration change according to the information contained in the change-patch, and further know the configuration change condition of the server database.
in the embodiment of the application, after the server completes the configuration change requested by the client, the server can autonomously generate the change patch message, and the client can be directly informed of the configuration change condition of the server database through the patch message, so that the client does not need to acquire and compare the configuration data before and after the change to obtain the configuration change condition of the server database, and the logic analysis pressure of the client can be effectively reduced.
The above specifically introduces a scenario for implementing configuration change detection in the embodiment of the present application, and then, a scenario for implementing reconfiguration in the embodiment of the present application will be described continuously, and a method for configuration change provided in the embodiment of the present application will be specifically described in terms of a server. Fig. 3 is another schematic flow chart of a method for configuration change according to an embodiment of the present application, please refer to fig. 3, where the method includes:
301. The server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
The specific description of step 301 may refer to the related description content of step 201 in the foregoing embodiment, and the difference between step 301 and step 201 is that in the configuration request issued by the client to the server, the patch information included in the configuration request is used to indicate that a reconfiguration patch message needs to be acquired. After the server agent receives and analyzes the configuration request, the value of the patch information can be modified, so that the patch information is used for indicating that the rollback patch message needs to be acquired, namely the value of the patch information is modified from the need redo-patch to the need undo-patch.
302. The server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
303. the server database stores the old data of the configuration object;
304. The server database executes configuration change according to the configuration operation of the configuration object in the configuration information;
305. The server database extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
306. the server database constructs a rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object;
307. The server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
308. the server database sends the rollback patch message to a server agent;
309. The server agent performs reverse analysis on the rollback patch message to obtain configuration change information;
310. the server agent sends the configuration change information to the target application;
311. the server agent receives first response information from the target application;
For the detailed description of step 302 to step 311, reference may be made to the related description of step 202 to step 211 in the above embodiments, and details are not repeated here.
312. The server agent obtains the new data of the configuration object, and constructs a reconfiguration patch message according to the configuration operation executed on the configuration object and the new data of the configuration object;
When the target application accepts the configuration change condition of the configuration data set, the configuration change operation of the client to the server is successful. Because the original patch information included in the configuration request issued by the client to the server indicates that the client needs to acquire a reconfiguration patch message, which indicates that the client has a need to perform the same configuration change operation on the other servers, the server agent constructs a reconfiguration patch message, i.e., a redo-patch, according to the configuration object, the new data of the configuration object (which can be acquired from the configuration request or the configuration information) and the configuration operation corresponding to the configuration object (which can be acquired from the configuration information or the configuration request or from the result obtained by the inverse analysis in step 309) based on the original patch information.
Like the undo-patch, the information carried by the redo-patch can also be edited in various ways, which will be described separately below:
in one possible implementation, the redo-patch employs a tree structure, where the tree structure includes all configuration objects, new data for all configuration objects, and configuration operations performed on all configuration objects. It should be noted that the redo-patch only contains one piece of editing information, and the related information of all the configuration objects is recorded in the editing information and presented in a tree structure. Specifically, in the redo-patch of the tree structure, if the configuration operation corresponding to a certain configuration object is delete, the message does not include the new data of the configuration object, and conversely, if the configuration operation corresponding to a certain configuration object is create or modify, the message includes the new data of the configuration object.
in one possible implementation, the redo-patch uses entry records, where an entry includes a configuration object, new data for a configuration object, and configuration operations performed on a configuration object or an entry includes a configuration object and configuration operations performed on a configuration object. The redo-patch includes a plurality of pieces of parallel edit information, each piece of edit information corresponds to an entry, and each entry is used for recording information related to one configuration object. Specifically, if the configuration operation corresponding to the configuration object stored in a certain entry is deletion, the entry does not include the new data of the configuration object, and if the configuration operation corresponding to the configuration object stored in a certain entry is creation or modification, the entry includes the new data of the configuration object.
313. And the server agent sends the reconfiguration patch message to the client.
And the server agent obtains the redo-patch and sends the redo-patch to the client. The redo-patch includes the configuration operation corresponding to the configuration object, so that the client can also extract the configuration operation corresponding to the configuration object from the redo-patch to determine which part of the nodes in the configuration data set performs the configuration change, and further know the configuration change condition of the server database. Furthermore, because the redo-patch also includes the new data of the configuration object, the client can extract the configuration object, the new data of the configuration object and the configuration operation corresponding to the configuration object included in the redo-patch, generate a new configuration request, and send the new configuration request to another server, so that the other server and the server have the same configuration change.
In the embodiment of the application, after the server completes the configuration change requested by the client, the server can autonomously generate the reconfiguration patch message, and the client can be directly informed of the configuration change condition of the server database through the patch message, so that the logic analysis pressure of the client can be effectively reduced. Furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
The scenario that the embodiment of the present application is used to implement reconfiguration is specifically introduced above, and then, the scenario that the embodiment of the present application is used to implement configuration rollback will be continuously introduced, and a method for configuration change provided by the embodiment of the present application is specifically described in terms of a server. Fig. 4 is another schematic flow chart of a method for configuration change according to an embodiment of the present application, please refer to fig. 4, where the method includes:
401. the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
The specific description of step 401 may refer to the related description content of step 201 in the foregoing embodiment, and the difference between step 401 and step 201 is that, in the configuration request issued by the client to the server, the value of the patch information included in the configuration request may be any one of a need change-patch, a need undo-patch, or a need redo-patch. When the server agent receives and analyzes the configuration request, if the value of the patch information is the need change-patch or the need do-patch, the value of the patch information is changed into the need undo-patch, and if the value of the patch information is the need undo-patch, the value is kept unchanged.
402. the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
403. the server database stores the old data of the configuration object;
404. the server database executes configuration change according to the configuration operation of the configuration object in the configuration information;
405. The server database extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
406. the server database constructs a rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object;
407. The server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
408. The server database sends the rollback patch message to a server agent;
409. the server agent performs reverse analysis on the rollback patch message to obtain configuration change information;
410. The server agent sends the configuration change information to the target application;
for the detailed description of step 402 to step 410, reference may be made to the related description of step 202 to step 210 in the foregoing embodiments, and details are not repeated here.
411. The server agent receives second response information from the target application;
After receiving the configuration object and the configuration operation corresponding to the configuration object, the target application may determine which part of the configuration nodes in the configuration data set performs the configuration change, and further perform corresponding processing on the service data, and if the processing fails, it indicates that the target application does not accept the configuration operation performed by the server database on the configuration object, that is, does not accept the configuration change condition of the configuration data set, and the target application may return second response information to the server agent, so as to indicate to the server agent that the target application does not accept the configuration operation performed by the server database on the configuration object.
412. The server agent constructs a rollback request according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object, wherein the old data of the configuration object is included in the rollback patch message;
When the target application does not accept the configuration change condition of the configuration data set, which is equivalent to failure of configuration change operation of the client to the server, the server agent needs to restore the configuration data set to a state before change, that is, needs to rollback the configuration of the server database, because the configuration data set of the server database has been subjected to configuration change. Based on the second response information, the server agent extracts the configuration object, the old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object from the rollback patch message, and constructs a rollback request so as to enable the server database to perform configuration rollback through the rollback request.
413. the server agent sends the rollback request to a server database;
and after the server agent obtains the rollback request, sending the rollback request to a server database so that the server database performs configuration rollback according to the rollback request.
414. The server database executes configuration rollback according to the reverse operation corresponding to the configuration object in the rollback request;
after receiving the rollback request from the server agent, the server database can analyze the rollback request to obtain the configuration object, the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, then after determining the configuration object which needs to be configured in the configuration data set, the configuration object is configured and rolled back according to the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, so that the configuration data set is restored to the state before change.
for example, it is assumed that the configuration of the node L in the configuration data set is changed after the configuration change in step 404. If the corresponding configuration operation of the node L is modification and the data value thereof is modified from the old data 6 to the new data 9, correspondingly, the corresponding inverse operation of the node L is modification at this time. And the server database performs configuration rollback on the node L according to the inverse operation corresponding to the node L and the old data, namely, the data value of the node L is modified from the new data 9 to the old data 6. If the configuration operation corresponding to the node L is creation, that is, the node L with the value of 8 is created in the configuration data set, at this time, the reverse operation corresponding to the node L is deletion (since the configuration data set before the change does not have the node L, the rollback request does not include the old data of the node L), and the server database performs configuration rollback on the node L according to the reverse operation corresponding to the node L, that is, deletes the node L in the configuration data set. If the configuration operation corresponding to the node L is deletion, that is, the node L (old data of which is 7) is deleted in the configuration data set, the reverse operation corresponding to the node L is creation at this time, and the server database performs configuration rollback on the node L according to the reverse operation corresponding to the node L and the old data, that is, the node L with the value of 7 is created in the configuration data set.
415. and the server agent sends the second response information to the client.
after receiving the second response message from the target application, the server agent may send a second response message to the client to indicate to the client that its configuration change operation on the server has failed.
it should be understood that step 412 and step 415 may be performed synchronously or asynchronously, and if the two steps are performed asynchronously, the execution order of the two steps may be set according to actual requirements, and is not limited herein.
In the embodiment of the application, when the server determines that the configuration change operation fails, the server can autonomously complete the configuration rollback without waiting for the client to issue the rollback request, so that the time consumed by the configuration rollback can be saved, and the efficiency of the configuration rollback can be improved.
The above specifically introduces a scenario for implementing configuration rollback in the embodiment of the present application, and then, a scenario for implementing associated rollback in the embodiment of the present application will be continuously introduced, and a method for changing configuration provided in the embodiment of the present application will be specifically described in terms of a server. Fig. 5 is another schematic flow chart of a method for configuration change according to an embodiment of the present application, please refer to fig. 5, where the method includes:
501. the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
The specific description of step 501 may refer to the related description content of step 501 in the foregoing embodiment, and the difference between step 501 and step 201 is that in the configuration request issued by the client to the server, the patch information included in the configuration request is used to indicate that the rolling back patch packet needs to be acquired. When the server agent receives and analyzes the configuration request, the value of the patch information does not need to be modified.
502. The server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
503. The server database stores the old data of the configuration object;
504. the server database executes configuration change according to the configuration operation of the configuration object in the configuration information;
505. the server database extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
506. The server database constructs a rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object;
507. the server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
508. The server database sends the rollback patch message to a server agent;
509. the server agent performs reverse analysis on the rollback patch message to obtain configuration change information;
510. The server agent sends the configuration change information to the target application;
511. the server agent receives first response information from the target application;
for the detailed description of step 502 to step 511, reference may be made to the related description of step 202 to step 211 in the foregoing embodiments, and details are not repeated here.
512. The server agent sends the rollback patch message to the client;
when the target application accepts the configuration change condition of the configuration data set, the configuration change operation of the client to the server is successful. In the configuration request issued by the client to the server agent, the patch information contained in the configuration request indicates that the client needs to acquire the rollback patch message, which indicates that the client may need to perform associated rollback, so that the server agent can directly return the generated rollback patch message (undo-patch) to the client based on the patch information. It should be noted that, since the undo-patch includes the inverse operation of the configuration operation corresponding to the configuration object, the client may perform inverse analysis on the undo-patch to obtain the configuration operation corresponding to the configuration object, so as to determine which part of the nodes in the configuration data set performs the configuration change, and further know the configuration change condition of the server database.
513. the server agent receives a rollback request from the client;
when there are other servers associated with the server (the server executing the present embodiment), the client may issue a configuration request to the server and the other servers associated with the server, so that both the server and the other servers perform configuration changes. After the configuration change operation of the server is successful, a rollback patch message generated by the server can be returned to the client, and if the configuration change operations of the other servers fail, the client needs to make the server perform configuration rollback so as to restore the database of the server to the state before change. At this time, the client may generate a rollback request according to the rollback patch message returned by the server, so as to enable the server to perform configuration rollback.
specifically, the client analyzes the rollback patch message returned by the server to obtain the configuration object, the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, then constructs a rollback request according to the configuration object, the old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, and issues the rollback request to the server agent.
514. the server agent sends the rollback request to a server database;
And after receiving the rollback request from the client, the server sends the rollback request to the server database so as to enable the server database to perform configuration rollback.
515. And the server database executes configuration rollback according to the reverse operation corresponding to the configuration object in the rollback request.
For the detailed description of step 515, reference may be made to the related description part of step 414 in the above embodiments, and details are not repeated here.
in the embodiment of the application, after the server completes the configuration change requested by the client, the server can autonomously generate the rollback patch message, and the client can be directly informed of the configuration change condition of the server database through the patch message, so that the logic analysis pressure of the client can be effectively reduced. Furthermore, if the configuration change operation of the server associated with the server fails, the client may also perform configuration rollback on the server through the rollback patch message, and a rollback request generated by the client based on the rollback patch message only includes relevant information of the configuration object and does not include relevant information of other non-configuration objects, so that information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
It should be noted that, in each of the messages including the information related to the configuration object, for example, in the configuration request, the configuration information, and the redo-patch, if the configuration operation corresponding to the configuration object is delete, the message does not include the new data of the configuration object, and conversely, if the configuration operation corresponding to the configuration object is create or modify, the message includes the new data of the configuration object. For another example, in the rollback request and the undo-patch, if the reverse operation of the configuration operation corresponding to the configuration object is delete, the message does not include the old data of the configuration object, and conversely, if the configuration operation corresponding to the configuration object is create or modify, the message includes the old data of the configuration object.
in the foregoing embodiments, the Yang-patch generated by the server database is all undo-patches, and in order to improve the flexibility and the selectivity of the technical solution of the present application, the Yang-patch generated by the server database may also be redo-patch, which may be used to implement three scenarios, namely, configuration change detection, reconfiguration and configuration rejection, and the three scenarios will be introduced separately below.
The following description starts with a scenario for implementing configuration change detection in the embodiment of the present application, and specifically describes a configuration change method provided in the embodiment of the present application from the perspective of a server. Fig. 6 is a schematic flowchart of a method for configuration change according to an embodiment of the present application, please refer to fig. 6, where the method includes:
601. the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
The specific description of step 601 may refer to the related description content of step 201 in the foregoing embodiment, and the difference between step 601 and step 201 is that in the configuration request issued by the client to the server, the patch information included in the configuration request is used to indicate that the patch change message needs to be acquired. After the server agent receives and analyzes the configuration request, the value of the patch information can be modified, so that the patch information is used for indicating that a reconfiguration patch message needs to be acquired, namely the value of the patch information is modified from the needchange-patch to the needcredo-patch. And then generating configuration information according to the target object, the new data of the target object, the configuration operation corresponding to the target object and the patch information with the value of the need do-patch. After the server agent generates the configuration information, the configuration information may be sent to a server database.
602. The server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
For the detailed description of step 602, reference may be made to the related description of step 202 in the foregoing embodiments, and further description is omitted here.
603. the server database stores the corresponding configuration operation of the configuration object in the configuration information and the new data of the configuration object;
before determining the configuration object, the server database may open a temporary data set according to the patch information (whose value is a new redo-patch). And when the server database determines the configuration object, the new data of the configuration object and the corresponding configuration operation temporary data set of the configuration object in the configuration information are acquired.
for example, when it is determined that the node X is a configuration object, if the configuration operation corresponding to the node X in the configuration information is modification, the new data of the node X, the name of the node X, and the configuration operation corresponding to the node X are stored in the temporary data set, if the configuration operation corresponding to the node X in the configuration information is creation, the new data of the node X, the name of the node X, and the configuration operation corresponding to the node X are stored in the temporary data set, and if the configuration operation corresponding to the node X in the configuration information is deletion, the name of the node X and the configuration operation corresponding to the node X are stored in the temporary data set.
It should be understood that the above example is only schematically illustrated by using one configuration object, i.e. node X, and does not limit the number of configuration objects.
604. the server database constructs a reconfiguration patch message according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
After the server database completes the storage operation, the configuration object, the new data of the configuration object and the configuration operation corresponding to the configuration object can be extracted from the temporary data set, and then the configuration object, the new data of the configuration object and the configuration operation corresponding to the configuration object are built in a reconfiguration patch message, namely, a redo-patch.
605. the server database sends the reconfiguration patch message to a server agent;
And after the server database obtains the redo-patch, the redo-patch is sent to the server agent.
606. The server agent obtains configuration change information from the reconfiguration patch message;
After receiving the redo-patch from the server database, the server agent can analyze the redo-patch to obtain the configuration operation corresponding to the configuration object, and generate configuration change information according to the configuration operation corresponding to the configuration object. Since the configuration object of the configuration data set has not yet performed the configuration change, the configuration operation corresponding to the configuration object is the configuration operation to be performed on the configuration object by the server database. At this time, the configuration operation corresponding to the configuration object may represent an impending configuration change of the configuration data set.
607. the server agent sends the configuration change information to the target application;
and after the server agent obtains the configuration operation corresponding to the configuration object, the configuration object and the configuration operation corresponding to the configuration object are constructed in the configuration change information and are sent to the target application so as to inform the target application about the impending configuration change condition of the configuration data set.
608. the server agent receives first response information from the target application;
after receiving the configuration object and the configuration operation corresponding to the configuration object, the target application may determine which part of the configuration nodes in the configuration data set is ready to perform the configuration change, and further perform corresponding processing on the service data, if the processing is successful, it indicates that the target application receives the configuration operation to be performed by the server database on the configuration object, that is, receives the configuration change situation to be performed by the configuration data set, and the target application may return first response information to the server agent, which is used to indicate to the server agent that the target application receives the configuration operation to be performed by the server database on the configuration object.
609. the server agent sends a change request to a server database;
When the server agent receives the first reply message, it may be determined that the target application accepts the impending configuration change of the configuration data set, so the server agent may notify the server database to perform the configuration change. Specifically, the server agent may generate a change request for instructing the server database to perform the configuration change, and send the change request to the server database, so that the server database performs the configuration change.
610. the server database executes configuration change according to the configuration operation corresponding to the saved configuration object;
When the server database receives the change request, based on the change request, the server database extracts the configuration object, the new data of the configuration object and the configuration operation corresponding to the configuration object from the temporary data set, and executes configuration change on the configuration object according to the new data of the configuration object and the configuration operation corresponding to the configuration object. The specific process of configuration change may refer to the relevant description part of step 204 in the above embodiments, and is not described herein again.
611. The server agent constructs a change patch message according to the configuration operation corresponding to the configuration object;
In the configuration request issued by the client to the server agent, the original patch information contained in the configuration request indicates that the client needs to acquire a change patch message, which indicates that the client needs to acquire the configuration change condition of the server database, so that the server agent can construct the change patch message, namely change-patch, according to the configuration object and the configuration operation corresponding to the configuration object based on the original patch information.
It should be understood that step 611 and step 609 may be performed synchronously or asynchronously, and if the two steps are performed asynchronously, the execution order of the two steps may be set according to actual requirements, which is not limited herein.
612. and the server agent sends the change patch message to the client.
after the server agent obtains the change-patch, the server agent returns the change-patch to the client. The client can analyze the change-patch and determine the configuration change condition of the server database according to the information contained in the change-patch.
in the embodiment of the application, the server can autonomously generate the change patch message, and the client can be directly informed of the configuration change condition of the server database through the patch message, so that the client does not need to acquire and compare the configuration data before and after the change to obtain the configuration change condition of the server database, and the logic analysis pressure of the client can be effectively reduced.
the above specifically introduces a scenario for implementing configuration change detection in the embodiment of the present application, and then, a scenario for implementing reconfiguration in the embodiment of the present application will be described continuously, and a method for configuration change provided in the embodiment of the present application will be specifically described in terms of a server. Fig. 7 is another schematic flow chart of a method for configuration change according to an embodiment of the present application, please refer to fig. 7, where the method includes:
701. the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
the specific description of step 701 may refer to the related description content of step 601 in the foregoing embodiment, and the difference between step 701 and step 601 is that in the configuration request issued by the client to the server, the patch information included in the configuration request is used to indicate that a reconfiguration patch message needs to be acquired. When the server agent receives and analyzes the configuration request, the value of the patch information does not need to be modified.
702. The server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
703. The server database stores the corresponding configuration operation of the configuration object in the configuration information and the new data of the configuration object;
704. the server database constructs a reconfiguration patch message according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
705. the server database sends the reconfiguration patch message to a server agent;
706. The server agent obtains configuration change information from the reconfiguration patch message;
707. The server agent sends the configuration change information to the target application;
708. The server agent receives first response information from the target application;
709. the server agent sends a change request to a server database;
710. the server database executes configuration change according to the configuration operation corresponding to the saved configuration object;
for the detailed description of step 702 to step 710, reference may be made to the related description parts of step 602 to step 610 in the above embodiments, which are not described herein again.
711. and the server agent sends the reconfiguration patch message to the client.
in the configuration request sent by the client to the server agent, the patch information contained in the configuration request indicates that the client needs to obtain the reconfiguration patch message, and indicates that the client needs to perform the same configuration change operation on the other servers, so that the server agent can directly send the generated redo-patch to the client. Since the redo-patch includes the configuration operation corresponding to the configuration object, the client may extract the configuration operation corresponding to the configuration object from the redo-patch to determine the configuration change condition of the server database.
it should be understood that step 711 and step 709 may be performed synchronously or asynchronously, and if the two steps are performed asynchronously, the execution order of the two steps may be set according to actual requirements, and is not limited herein.
In the embodiment of the application, the server can autonomously generate the reconfiguration patch message, and the client can be directly informed of the configuration change condition of the server database through the patch message, so that the logic analysis pressure of the client can be effectively relieved. Furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
The scenario that the embodiment of the present application is used to implement reconfiguration is specifically introduced above, and then, the scenario that the embodiment of the present application is used to implement configuration rejection is continuously introduced, and a method for changing the configuration provided by the embodiment of the present application is specifically described in terms of a server. Fig. 8 is another schematic flow chart of a method for configuration change according to an embodiment of the present application, please refer to fig. 8, where the method includes:
801. The server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
the specific description of step 801 may refer to the related description content of step 601 in the foregoing embodiment, and the difference between step 801 and step 601 is that, in the configuration request issued by the client to the server, the value of the patch information included in the configuration request is a needredo-patch or a needchange-patch. After the server agent receives and analyzes the configuration request, if the value of the patch information is the need change-patch, the value of the patch information is modified to the need do-patch, and if the value of the patch information is the need do-patch, the value of the patch information is not modified.
802. the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
803. The server database stores the corresponding configuration operation of the configuration object in the configuration information and the new data of the configuration object;
804. the server database constructs a reconfiguration patch message according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
805. the server database sends the reconfiguration patch message to a server agent;
806. The server agent obtains configuration change information from the reconfiguration patch message;
807. The server agent sends the configuration change information to the target application;
for the detailed description of steps 802 to 807, reference may be made to the related description parts of steps 602 to 610 in the above embodiments, which are not repeated herein.
808. the server agent receives second response information from the target application;
After receiving the configuration object and the configuration operation corresponding to the configuration object, the target application may determine which part of the configuration nodes in the configuration data set is ready to perform the configuration change, and further perform corresponding processing on the service data, if the processing fails, it indicates that the target application does not accept the configuration operation to be performed on the configuration object by the server database, that is, does not accept the configuration change situation to be performed on the configuration data set, and the target application may return second response information to the server agent, which is used to indicate to the server agent that the target application does not accept the configuration operation to be performed on the configuration object by the server database.
809. the server agent sends a deletion request to a server database;
when the server agent receives the second response message, it may be determined that the target application does not accept the impending configuration change of the configuration data set, so the server agent may notify the server database not to perform the configuration change. Specifically, the server agent may generate a deletion request for instructing the server database not to perform configuration change, and send the deletion request to the server database, so that the server data deletes the temporary database, that is, deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object.
810. the server database deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
After the server database receives the deletion request, based on the deletion request, the server database deletes the entire temporary database, that is, deletes the configuration operation corresponding to the stored configuration object and the new data of the configuration object. At this point, the server database does not perform the configuration change, i.e., refuses to perform the configuration change operation.
811. And the server agent sends the second response information to the client.
after receiving the second response message from the target application, the server agent may send a second response message to the client to indicate to the client that its configuration change operation on the server has failed.
it should be understood that step 811 and step 809 may be performed synchronously or asynchronously, and if the two steps are performed asynchronously, the execution sequence of the two steps may be set according to actual requirements, and is not limited herein.
in the embodiment of the application, after the server determines that the target application does not accept the upcoming configuration change condition of the configuration data set, the server can autonomously refuse to execute the configuration change operation, the original state of the configuration data set is maintained, and the flexibility of the scheme is improved.
in the foregoing embodiments, the Yang-patch generated by the server database is only an undo-patch or a redo-patch, and in order to improve the flexibility and the selectivity of the technical solution of the present application, the Yang-patch generated by the server database may further include an undo-patch and a redo-patch at the same time, and this situation may be used to implement reconfiguration and refuse to configure two scenarios, which will be introduced below respectively.
first, a scenario for implementing reconfiguration according to the embodiment of the present application is introduced, and a method for changing configuration according to the embodiment of the present application is specifically described in terms of a server. Fig. 9 is a flowchart illustrating a method for configuration change according to an embodiment of the present application, please refer to fig. 9, where the method includes:
901. The server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
The specific description of step 901 may refer to the related description content of step 201 in the foregoing embodiment, and the difference between step 901 and step 201 is that in the configuration request issued by the client to the server, the patch information included in the configuration request is used to indicate that a reconfiguration patch message needs to be acquired. After the server agent receives and analyzes the configuration request, the value of the patch information can be modified, so that the patch information is used for indicating that the rollback patch message needs to be acquired, namely the value of the patch information is modified from the need redo-patch to the need undo-patch.
902. the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
for the detailed description of step 902, reference may be made to the related description of step 202 in the foregoing embodiments, and further description is omitted here.
903. the server database stores new data of the configuration object, configuration operation corresponding to the configuration object in the configuration information, old data of the configuration object and inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
It should be noted that, after the server agent receives the configuration request, the server agent sends a transaction start request to the server database before the server agent generates the configuration information. The server database may pre-open the first temporary data set based on the transaction initiation request. After the server database receives the configuration information sent by the server agent and before the server database determines the configuration object, the server database can analyze the configuration information to obtain patch information with a value of need undo-patch, and a second temporary data set is set up based on the patch information.
After the server database determines the configuration object, the new data of the configuration object, and the corresponding configuration operation of the configuration object in the configuration information may be stored in the first temporary data set, and the configuration object, the old data of the configuration object, and the inverse operation of the corresponding configuration operation of the configuration object in the configuration information may be stored in the second temporary data set.
904. the server database constructs a rollback patch message according to the stored old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object;
after the configuration change is completed in the server database, the configuration object, the old data of the configuration object, and the inverse operation of the configuration operation corresponding to the configuration object are extracted from the second temporary data set, and the configuration object, the old data of the configuration object, and the inverse operation of the configuration operation corresponding to the configuration object are constructed in a rollback patch message, namely, an undo-patch.
905. the server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object;
And after the server database obtains the undo-patch, deleting the second temporary data set, namely deleting the configuration object, the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object.
906. The server database sends the rollback patch message to a server agent;
and after the second temporary data set is deleted by the server database, sending the undo-patch to the server agent.
907. the server agent performs reverse analysis on the rollback patch message to obtain configuration change information;
after receiving the undo-patch from the server database, the server agent may perform inverse analysis on the undo-patch to obtain the configuration operation corresponding to the configuration object, where the configuration operation corresponding to the configuration object is the configuration operation to be performed on the configuration object by the server database because the configuration object of the configuration data set has not performed the configuration change. At this time, the configuration operation corresponding to the configuration object included in the configuration change information may represent an upcoming configuration change situation of the configuration data set.
908. the server agent sends the configuration change information to the target application;
and after the server agent obtains the configuration operation corresponding to the configuration object, the configuration object and the configuration operation corresponding to the configuration object are constructed in the configuration change information and are sent to the target application so as to inform the target application about the impending configuration change condition of the configuration data set.
909. the server agent receives first response information from the target service;
after receiving the configuration object and the configuration operation corresponding to the configuration object, the target application may determine which part of the configuration nodes in the configuration data set is ready to perform the configuration change, and further perform corresponding processing on the service data, if the processing is successful, it indicates that the target application receives the configuration operation to be performed by the server database on the configuration object, that is, receives the configuration change situation to be performed by the configuration data set, and the target application may return first response information to the server agent, which is used to indicate to the server agent that the target application receives the configuration operation to be performed by the server database on the configuration object.
910. The server agent sends a change request to a server database;
When the server agent receives the first reply message, it may be determined that the target application accepts the impending configuration change of the configuration data set, so the server agent may notify the server database to perform the configuration change. In particular, the server agent may generate a transaction termination request, such as a change request for instructing the server database to perform a configuration change, and send the transaction termination request to the server database to cause the server database to perform the configuration change.
911. the server database executes configuration change according to the configuration operation corresponding to the saved configuration object;
when the server database receives the change request, based on the change request, the server database extracts the configuration object, the new data of the configuration object and the configuration operation corresponding to the configuration object from the first temporary data set, and executes configuration change on the configuration object according to the new data of the configuration object and the configuration operation corresponding to the configuration object. The specific process of configuration change may refer to the relevant description part of step 204 in the above embodiments, and is not described herein again.
912. the server database constructs a reconfiguration patch message according to the stored new data of the configuration object and the configuration operation corresponding to the configuration object;
In a configuration request issued by a client to a server agent, original patch information contained in the configuration request indicates that the client needs to acquire a reconfiguration patch message, indicating that the client needs to perform reconfiguration. The change request generated by the server agent may also be used to instruct the server database to generate a redo-patch. Therefore, after the configuration change is executed in the server database, the re-configuration patch message, i.e., the redo-patch, can be constructed according to the configuration object and the configuration operation corresponding to the configuration object.
913. the server database deletes the stored new data of the configuration object and the configuration operation corresponding to the configuration object;
and (4) the server database generates a redo-patch, and the first temporary database is deleted, namely the stored configuration object, the new data of the configuration object and the configuration operation corresponding to the configuration object are deleted.
914. the server database sends the reconfiguration patch message to a server agent;
and after the first temporary database is deleted by the server database, returning the redo-patch to the server agent.
915. the server agent sends a reconfiguration patch message to the client.
in the configuration request sent by the client to the server agent, the patch information contained in the configuration request indicates that the client needs to obtain the reconfiguration patch message, and indicates that the client needs to perform the same configuration change operation on the other servers, so that the server agent can directly send the generated redo-patch to the client. Since the redo-patch includes the configuration operation corresponding to the configuration object, the client may extract the configuration operation corresponding to the configuration object from the redo-patch to determine the configuration change condition of the server database.
in the embodiment of the application, the server can autonomously generate the reconfiguration patch message, and the client can be directly informed of the configuration change condition of the server database through the patch message, so that the logic analysis pressure of the client can be effectively relieved. Furthermore, the client can also perform the same configuration change on the other servers through the reconfiguration patch message, and the configuration request generated by the client based on the reconfiguration change message only contains the relevant information of the configuration object and does not contain the relevant information of other non-configuration objects, so that the information redundancy can be effectively avoided, and the information processing pressure of the server is reduced.
the scenario that the embodiment of the present application is used to implement reconfiguration is specifically introduced above, and then, the scenario that the embodiment of the present application is used to implement configuration rejection is continuously introduced, and a method for changing the configuration provided by the embodiment of the present application is specifically described in terms of a server. Fig. 10 is another schematic flow chart of a method for configuration change according to an embodiment of the present application, please refer to fig. 10, where the method includes:
1001. the server agent receives a configuration request from the client, generates configuration information according to the configuration request and sends the configuration information to the server database;
1002. The server database determines a configuration object needing configuration change from the target objects according to the received configuration information and the local configuration information;
1003. The server database stores new data of the configuration object, configuration operation corresponding to the configuration object in the configuration information, old data of the configuration object and inverse operation of the configuration operation corresponding to the configuration object in the configuration information;
1004. The server database constructs a rollback patch message according to the stored old data of the configuration object and the reverse operation of the configuration operation corresponding to the configuration object;
1005. The server database deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object;
1006. the server database sends the rollback patch message to a server agent;
1007. The server agent performs reverse analysis on the rollback patch message to obtain configuration change information;
1008. The server agent sends the configuration change information to the target application;
For the detailed description of step 1001 to step 1008, reference may be made to the related description parts of step 901 to step 908 in the above embodiments, and details are not repeated here.
1009. The server agent receives second response information from the target service;
after receiving the configuration object and the configuration operation corresponding to the configuration object, the target application may determine which part of the configuration nodes in the configuration data set is ready to perform the configuration change, and further perform corresponding processing on the service data, if the processing fails, it indicates that the target application does not accept the configuration operation to be performed on the configuration object by the server database, that is, does not accept the configuration change situation to be performed on the configuration data set, and the target application may return second response information to the server agent, which is used to indicate to the server agent that the target application does not accept the configuration operation to be performed on the configuration object by the server database.
1010. the server agent sends a deletion request to a server database;
when the server agent receives the second response message, it may be determined that the target application does not accept the impending configuration change of the configuration data set, so the server agent may notify the server database not to perform the configuration change. Specifically, the server agent may generate a transaction end request, for example, a delete request for instructing the server database not to perform configuration change, and send the transaction end request to the server database, so that the server data deletes the temporary database, that is, deletes the saved configuration operation corresponding to the configuration object and the new data of the configuration object.
1011. The server database deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object;
After the server database receives the deletion request, based on the deletion request, the server database deletes the entire first temporary database, that is, deletes the stored configuration operation corresponding to the configuration object and the new data of the configuration object. At this point, the server database does not perform the configuration change, i.e., refuses to perform the configuration change operation.
1012. And the server agent sends the second response information to the client.
after receiving the second response message from the target application, the server agent may send a second response message to the client to indicate to the client that its configuration change operation on the server has failed.
It should be understood that step 1012 and step 1010 may be performed synchronously or asynchronously, and if the two steps are performed asynchronously, the execution order of the two steps may be set according to actual requirements, and is not limited herein.
in the embodiment of the application, after the server determines that the target application does not accept the upcoming configuration change condition of the configuration data set, the server can autonomously refuse to execute the configuration change operation, the original state of the configuration data set is maintained, and the flexibility of the scheme is improved.
the above is a detailed description of a configuration change method provided in the embodiment of the present application, and the following will specifically describe a structure and a connection relationship of a server provided in the embodiment of the present application, fig. 11 is a schematic structural diagram of a server database provided in the embodiment of the present application, please refer to fig. 11, where the server database 1100 may be a server database in any embodiment shown in fig. 2 to 5, and the server database 1100 includes:
a receiving module 1101, configured to receive configuration information from a server agent, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a rolling-back patch message needs to be obtained, and a specific implementation process may refer to the specific description of step 201 in the embodiment shown in fig. 2, which is not described herein again;
A processing module 1102, configured to determine, from the target objects, a configuration object that needs to be configured and changed according to the received configuration information and the local configuration information, where a specific implementation process may refer to the specific description of step 202 in the embodiment shown in fig. 2, and is not described here again;
the processing module 1102 is further configured to execute configuration change according to a configuration operation of the configuration object corresponding to the configuration information, and construct a rolling-back patch message according to the patch information and the configuration change, where the rolling-back patch message includes a reverse operation of the configuration operation executed on the configuration object in the configuration change process and old data of the configuration object, and a specific implementation process may refer to specific descriptions of step 204 and step 206 in the embodiment shown in fig. 2, which is not described herein again;
a sending module 1103, configured to send the rollback patch message to the server agent, where the specific implementation process may refer to the specific description of step 208 in the embodiment shown in fig. 2, and details are not described here again.
Optionally, the processing module 1102 is further configured to:
for saving the old data of the configuration object, the specific implementation process may refer to the specific description of step 203 in the embodiment shown in fig. 2, which is not described herein again;
Extracting old data of the stored configuration object according to the patch information, and obtaining a reverse operation of the configuration operation performed on the configuration object, where the specific implementation process may refer to the specific description of step 205 in the embodiment shown in fig. 2, and details are not described here;
The rolling-back patch packet is constructed according to the old data of the configuration object and the reverse operation of the configuration operation performed on the configuration object, and the specific implementation process may refer to the specific description of step 206 in the embodiment shown in fig. 2, which is not described herein again.
Optionally, the processing module 1102 is further configured to delete the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information, and the specific implementation process may refer to the specific description in step 207 in the embodiment shown in fig. 2, which is not described herein again.
Optionally, the receiving module 1101 is further configured to receive a rollback request from the server agent, where the rollback request includes old data of the configuration object and a reverse operation of a configuration operation performed on the configuration object, and a specific implementation process may refer to a specific description of step 413 in the embodiment shown in fig. 4 or a specific description of step 514 in the embodiment shown in fig. 5, which is not described herein again;
The processing module 1102 is further configured to perform configuration rollback according to a reverse operation of the configuration object in the rollback request, and a specific implementation process may refer to the specific description of step 414 in the embodiment shown in fig. 4 or the specific description of step 515 in the embodiment shown in fig. 5, which is not described herein again.
optionally, the rollback patch message adopts a tree structure, where old data of all configuration objects and an inverse operation of a configuration operation performed on all configuration objects are presented in the tree structure, and a specific implementation process may refer to the specific description of step 206 in the embodiment shown in fig. 2, which is not described herein again.
optionally, the rolling back patch message uses entry records, where one entry includes old data of one configuration object, and an inverse operation of a configuration operation performed on one configuration object or one entry includes an inverse operation of a configuration operation performed on one configuration object, and a specific implementation process may refer to the specific description of step 206 in the embodiment shown in fig. 2, which is not described herein again.
fig. 12 is a schematic structural diagram of a server agent according to an embodiment of the present application, please refer to fig. 12, where the server agent 1200 may be the server agent according to any one of the embodiments shown in fig. 2 to 5, and the server agent 1200 includes:
a first receiving module 1201, configured to receive a configuration request from a client, where a specific implementation process may refer to the specific description of step 201 in the embodiment shown in fig. 2, and is not described here again;
A processing module 1202, configured to generate configuration information according to the configuration request, where a specific implementation process may refer to the specific description of step 201 in the embodiment shown in fig. 2, or the specific description of step 301 in the embodiment shown in fig. 3, or the specific description of step 401 in the embodiment shown in fig. 4, or the specific description of step 501 in the embodiment shown in fig. 5, and is not described again here;
A sending module 1203, configured to send configuration information to a server database, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a rolling-back patch message needs to be obtained, and a specific implementation process may refer to the specific description of step 201 in the embodiment shown in fig. 2, which is not described herein again;
A second receiving module 1204, configured to receive a rollback patch message from the server database, where the rollback patch message is constructed after the server database performs configuration change on a configuration object that needs to be configured and changed in a target object according to the configuration information, and the rollback patch message includes a reverse operation of a configuration operation performed on the configuration object in a configuration change process and old data of the configuration object, and a specific implementation process may refer to the specific description of step 208 in the embodiment shown in fig. 2, which is not described herein again.
optionally, the processing module 1202 is further configured to perform inverse analysis on the rollback patch packet to obtain configuration change information, where the configuration change information includes a configuration operation performed on a configuration object, and a specific implementation process may refer to the specific description of step 209 in the embodiment shown in fig. 2, which is not described herein again.
Optionally, the sending module 1203 is further configured to send the configuration change information to a target application, where the target application is an application that subscribes to the configuration change information, and a specific implementation process may refer to the specific description of step 210 in the embodiment shown in fig. 2, which is not described herein again.
Optionally, the second receiving module 1204 is further configured to receive first response information from the target application, where the first response information is used to indicate that the target application receives a configuration operation performed on a configuration object, and a specific implementation process may refer to the specific description of step 211 in the embodiment shown in fig. 2, which is not described herein again.
Optionally, if the configuration request includes patch information used to indicate that the rolling back patch packet needs to be acquired, the sending module 1203 is further configured to send the rolling back patch packet to the client, and a specific implementation process may refer to the specific description of step 512 in the embodiment shown in fig. 5, which is not described here again.
optionally, if the configuration request includes patch information used to indicate that the patch change message needs to be acquired, the processing module 1202 is further configured to construct the patch change message according to a configuration operation performed on the configuration object, and a specific implementation process may refer to the specific description of step 212 in the embodiment shown in fig. 2, which is not described herein again;
the sending module 1203 is further configured to send the patch change packet to the client, and the specific implementation process may refer to the specific description of step 213 in the embodiment shown in fig. 2, which is not described herein again.
optionally, if the configuration request includes patch information used to indicate that a reconfiguration patch message needs to be acquired, the processing module 1202 is further configured to acquire new data of the configuration object, and construct a reconfiguration patch message according to configuration operation performed on the configuration object and the new data of the configuration object, where a specific implementation process may refer to the specific description of step 312 in the embodiment shown in fig. 3, and details are not described here again;
The sending module 1203 is further configured to send the reconfiguration patch packet to the client, and the specific implementation process may refer to the specific description of step 313 in the embodiment shown in fig. 3, which is not described herein again.
Optionally, the second receiving module 1204 is further configured to receive second response information from the target application, where the second response information is used to indicate that the target application does not accept the configuration operation performed on the configuration object, and a specific implementation process may refer to the specific description of step 411 in the embodiment shown in fig. 4, which is not described herein again;
the processing module 1202 is further configured to construct a rollback request according to old data of the configuration object included in the rollback patch message and a reverse operation of the configuration operation performed on the configuration object, and a specific implementation process may refer to the specific description of step 412 in the embodiment shown in fig. 4, which is not described herein again;
a sending module 1203, configured to send the rollback request to the server database, where a specific implementation process may refer to the specific description of step 413 in the embodiment shown in fig. 4, which is not described herein again;
The sending module 1203 is further configured to send the second response message to the client, and the specific implementation process may refer to the specific description of step 415 in the embodiment shown in fig. 4, which is not described herein again.
optionally, the first receiving module 1201 is further configured to receive a rollback request from the client, where the rollback request is a request generated based on the rollback patch message, and the rollback request includes old data of a configuration object and a reverse operation of a configuration operation performed on the configuration object, and a specific implementation process may refer to a specific description of step 513 in the embodiment shown in fig. 5, which is not described herein again;
the sending module 1203 is further configured to send the rollback request to the server database, and the specific implementation process may refer to the specific description of step 514 in the embodiment shown in fig. 5, which is not described herein again.
Fig. 13 is a schematic structural diagram of a server according to an embodiment of the present application, and referring to fig. 13, the server 1300 includes a server database 1100 shown in fig. 11 and a server agent 1200 shown in fig. 12.
Fig. 14 is another schematic structural diagram of a server database provided in an embodiment of the present application, please refer to fig. 14, where the server database 1400 may be the server database in any one of the embodiments shown in fig. 6 to 8, where the server database 1400 includes:
A receiving module 1401, configured to receive configuration information from a server agent, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a patch packet needs to be reconfigured, and a specific implementation process may refer to the specific description of step 601 in the embodiment shown in fig. 6, which is not described herein again;
a processing module 1402, configured to determine, according to the received configuration information and the local configuration information, a configuration object that needs to be configured and changed from the target object, where a specific implementation process may refer to the specific description of step 602 in the embodiment shown in fig. 6, and details are not described here again;
The processing module 1402 is further configured to store a configuration operation corresponding to the configuration object in the configuration information and new data of the configuration object, and construct a reconfiguration patch packet according to the stored configuration operation corresponding to the configuration object and the new data of the configuration object, where a specific implementation process may refer to specific descriptions of step 603 and step 604 in the embodiment shown in fig. 6, and details are not described here again;
A sending module 1403, configured to send the reconfiguration patch packet to the server agent, where a specific implementation process may refer to the specific description of step 605 in the embodiment shown in fig. 6, and details are not described here again;
A receiving module 1401, further configured to receive a change request from a server agent, where the change request is used to instruct a server database to perform configuration change, and a specific implementation process may refer to the specific description of step 609 in the embodiment shown in fig. 6, which is not described herein again;
the processing module 1402 is further configured to execute configuration change according to a configuration operation corresponding to the stored configuration object, and the specific implementation process may refer to the specific description of step 610 in the embodiment shown in fig. 6, which is not described herein again.
optionally, the receiving module 1401 is further configured to receive a deletion request from a server agent, and a specific implementation process may refer to the specific description of step 809 in the embodiment shown in fig. 8, which is not described herein again;
the processing module 1402 is further configured to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object according to the deletion request, and the specific implementation process may refer to the specific description of step 810 in the embodiment shown in fig. 8, which is not described herein again.
optionally, the reconfiguration patch message adopts a tree structure, where new data of all configuration objects and configuration operations corresponding to all configuration objects are presented in the tree structure, and a specific implementation process may refer to the specific description of step 312 in the embodiment shown in fig. 3, which is not described herein again.
Optionally, the reconfiguration patch packet adopts entry records, where one entry includes new data of one configuration object, and a configuration operation corresponding to one configuration object or one entry includes a configuration operation performed on one configuration object, and a specific implementation process may refer to the specific description of step 312 in the embodiment shown in fig. 3, which is not described herein again.
fig. 15 is another schematic structural diagram of a server agent according to an embodiment of the present application, please refer to fig. 15, where the server agent 1500 may be the server agent in any one of the embodiments shown in fig. 6 to 8, where the server agent 1500 includes:
A first receiving module 1501 is configured to receive a configuration request from a client, where a specific implementation process may refer to the specific description in step 601 in the embodiment shown in fig. 6, and details are not described here again;
A processing module 1502, configured to generate configuration information according to the configuration request, where a specific implementation process may refer to the specific description of step 601 in the embodiment shown in fig. 6 described above in the embodiment shown in fig. 7 or the specific description of step 801 in the embodiment shown in fig. 8, and is not described here again;
a sending module 1503, configured to send configuration information to the server database, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a patch packet needs to be reconfigured, and a specific implementation process may refer to the specific description of step 601 in the embodiment shown in fig. 6, which is not described herein again;
A second receiving module 1504, configured to receive a reconfiguration patch message from the server database, where the reconfiguration patch message is constructed after the server database determines a configuration object that needs to be configured and changed from the target object according to the configuration information, and the reconfiguration patch message includes configuration operation of the configuration object in the configuration information and new data of the configuration object, and a specific implementation process may refer to the specific description in step 605 in the embodiment shown in fig. 6, which is not described herein again;
The processing module 1502 is further configured to obtain configuration change information from the reconfiguration patch packet, where the configuration change information includes configuration operations corresponding to the configuration object, and a specific implementation process may refer to the specific description of step 606 in the embodiment shown in fig. 6, which is not described herein again;
the sending module 1503 is further configured to send the configuration change information to a target application, where the target application is an application that subscribes to the configuration change information, and a specific implementation process may refer to the specific description of step 607 in the embodiment shown in fig. 6, which is not described herein again;
the second receiving module 1504 is further configured to, if first response information from the target application is received, indicate that the target application receives a configuration operation corresponding to the configuration object, and the specific implementation process may refer to the specific description of step 608 in the embodiment shown in fig. 6, which is not described herein again;
the sending module 1503 is further configured to send a change request to the server database, where the change request is used to instruct the server database to perform configuration change, and the specific implementation process may refer to the specific description of step 609 in the embodiment shown in fig. 6, which is not described herein again.
optionally, if the configuration request includes patch information used to indicate that the reconfiguration patch packet needs to be acquired, the sending module 1503 is further configured to send the reconfiguration patch packet to the client, and a specific implementation process may refer to the specific description of step 711 in the embodiment shown in fig. 7, which is not described here again.
optionally, if the configuration request includes patch information used to indicate that the patch change message needs to be acquired, the processing module 1502 is further configured to construct the patch change message according to a configuration operation corresponding to the configuration object, and a specific implementation process may refer to the specific description of step 611 in the embodiment shown in fig. 6, which is not described herein again;
the sending module 1503 is further configured to send the patch change packet to the client, and the specific implementation process may refer to the specific description of step 612 in the embodiment shown in fig. 6, which is not described herein again.
optionally, the second receiving module 1504 is further configured to, if receiving second response information from the target application, where the second response information is used to indicate that the target application does not accept the configuration operation corresponding to the configuration object, and a specific implementation process may refer to the specific description in step 808 in the embodiment shown in fig. 8, which is not described herein again;
the sending module 1503 is further configured to send a delete request to the server database, where the delete request is used to instruct the server database to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object, and a specific implementation process may refer to specific description of step 809 in the embodiment shown in fig. 8, which is not described herein again;
the sending module 1503 is further configured to send the second response message to the client, and the specific implementation process may refer to the specific description of step 811 in the embodiment shown in fig. 8, which is not described herein again.
Fig. 16 is another schematic structural diagram of a server according to an embodiment of the present application, and referring to fig. 16, the server 1600 includes the server database 1400 shown in fig. 14 and the server agent 1500 shown in fig. 15.
Acquiring configuration change information from the reconfiguration patch message, where the configuration change information includes configuration operations corresponding to configuration objects and sends the configuration change information to a target application, fig. 17 is another schematic structural diagram of a server database provided in the embodiment of the present application, please refer to fig. 17, where the server database 1700 may be a server database in any one of the embodiments shown in fig. 9 to fig. 10, and the server database 1700 includes:
a receiving module 1701, configured to receive configuration information from the server agent, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a rolling-back patch message needs to be obtained, and a specific implementation process may refer to the specific description of step 901 in the embodiment shown in fig. 9, which is not described herein again;
a processing module 1702, configured to determine, according to the received configuration information and the local configuration information, a configuration object that needs to be configured and changed from the target object, where a specific implementation process may refer to the specific description in step 902 in the embodiment shown in fig. 9, and details are not described here again;
The processing module 1702 is further configured to store new data of the configuration object, a configuration operation corresponding to the configuration object in the configuration information, old data of the configuration object, and an inverse operation of the configuration operation corresponding to the configuration object in the configuration information, where a specific implementation process may refer to a specific description of step 903 in the embodiment shown in fig. 9, and is not described here again;
the processing module 1702 is further configured to construct a rolling-back patch message according to the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, and a specific implementation process may refer to the specific description of step 904 in the embodiment shown in fig. 9, which is not described herein again;
A sending module 1703, configured to send the rollback patch message to the server agent, where the specific implementation process may refer to the specific description of step 906 in the embodiment shown in fig. 9, which is not described herein again;
the receiving module 1701 is further configured to receive a change request from the server agent, where the change request is used to instruct the server database to perform configuration change, and a specific implementation process may refer to the specific description of step 910 in the embodiment shown in fig. 9, which is not described herein again;
The processing module 1702 is further configured to execute configuration change according to the configuration operation corresponding to the stored configuration object, and the specific implementation process may refer to the specific description of step 911 in the embodiment shown in fig. 9, which is not described herein again.
optionally, the processing module 1702 is further configured to construct a reconfiguration patch message according to the stored new data of the configuration object and the configuration operation corresponding to the configuration object, and a specific implementation process may refer to the specific description of step 912 in the embodiment shown in fig. 9, which is not described herein again;
the processing module 1702 is further configured to delete the stored new data of the configuration object and the configuration operation corresponding to the configuration object, and the specific implementation process may refer to the specific description of step 913 in the embodiment shown in fig. 9, which is not described herein again;
the sending module 1703 is further configured to send the reconfiguration patch message to the server agent, and the specific implementation process may refer to the specific description of step 914 in the embodiment shown in fig. 9, which is not described herein again.
optionally, the processing module 1702 is further configured to delete the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object, and the specific implementation process may refer to the specific description of step 905 in the embodiment shown in fig. 9, which is not described herein again.
optionally, the receiving module 1701 is further configured to receive a deletion request from a server agent, and a specific implementation process may refer to the specific description of step 1010 in the embodiment shown in fig. 10, which is not described herein again;
The processing module 1702 is further configured to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object according to the deletion request, and the specific implementation process may refer to the specific description of step 1011 in the embodiment shown in fig. 10, which is not described herein again.
Optionally, the rollback patch message adopts a tree structure, where old data of all configuration objects and inverse operations of configuration operations corresponding to all configuration objects are presented in the tree structure, and a specific implementation process may refer to the specific description of step 206 in the embodiment shown in fig. 2, which is not described herein again.
optionally, the rolling back patch message uses entry records, where one entry includes old data of one configuration object, and a reverse operation of a configuration operation corresponding to the configuration object or one entry includes a reverse operation of a configuration operation corresponding to the configuration object, and a specific implementation process may refer to the specific description of step 206 in the embodiment shown in fig. 2, which is not described herein again.
optionally, the reconfiguration patch message adopts a tree structure, where new data of all configuration objects and configuration operations corresponding to all configuration objects are presented in the tree structure, and a specific implementation process may refer to the specific description of step 312 in the embodiment shown in fig. 3, which is not described herein again.
Optionally, the reconfiguration patch message uses entry records, where one entry includes new data of one configuration object, and one configuration operation corresponding to one configuration object or one entry includes a configuration operation corresponding to one configuration object, and a specific implementation process may refer to the specific description of step 312 in the embodiment shown in fig. 3, which is not described herein again.
Fig. 18 is another schematic structural diagram of a server proxy according to an embodiment of the present application, please refer to fig. 18, where the server proxy 1800 may be the server proxy according to any one of the embodiments shown in fig. 9 to 10, where the server proxy 1800 includes:
a first receiving module 1801, configured to receive a configuration request from a client, where a specific implementation process may refer to the specific description of step 901 in the embodiment shown in fig. 9, and is not described here again;
A processing module 1802, configured to generate configuration information according to the configuration request, where a specific implementation process may refer to the specific description of step 901 in the embodiment shown in fig. 9, which is not described herein again;
A sending module 1803, configured to send configuration information to a server database, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information used to indicate that a rolling-back patch message needs to be obtained, and a specific implementation process may refer to the specific description of step 901 in the embodiment shown in fig. 9, which is not described herein again;
A second receiving module 1804, configured to receive a rollback patch message from the server database, where the rollback patch message is constructed after the server database determines, according to the configuration information, a configuration object that needs to be configured and changed from the target object, and the rollback patch message includes a reverse operation of a configuration operation corresponding to the configuration object in the configuration information and old data of the configuration object, and a specific implementation process may refer to the specific description of step 906 in the embodiment shown in fig. 9, which is not described herein again;
the processing module 1802 is further configured to perform reverse analysis on the rollback patch packet to obtain configuration change information, where the configuration change information includes a configuration operation performed on a configuration object, and a specific implementation process may refer to the specific description of step 907 in the embodiment shown in fig. 9, which is not described herein again;
a sending module 1803, further configured to send the configuration change information to a target application, where the target application is an application that subscribes the configuration change information, and a specific implementation process may refer to the specific description of step 908 in the embodiment shown in fig. 9, which is not described herein again;
the second receiving module 1804 is further configured to, if the first response information from the target service is received, indicate that the target service receives the configuration operation corresponding to the configuration object, where a specific implementation process may refer to the specific description of step 909 in the embodiment shown in fig. 9, and details are not described here again;
The sending module 1803 is further configured to send a change request to the server database, where the change request is used to instruct the server database to perform configuration change, and the specific implementation process may refer to the specific description of step 910 in the embodiment shown in fig. 9, which is not described herein again.
optionally, the configuration request includes patch information indicating that a reconfiguration patch message needs to be acquired, and the server agent 1800 further includes:
The second receiving module 1804 is further configured to receive a reconfiguration patch message from the server database, where the reconfiguration patch message includes new data of a configuration object and a configuration operation of the configuration object in the configuration information, and a specific implementation process may refer to the specific description of step 914 in the embodiment shown in fig. 9, which is not described herein again;
The sending module 1803 is further configured to send the reconfiguration patch message to the client, and the specific implementation process may refer to the specific description of step 915 in the embodiment shown in fig. 9, which is not described herein again.
optionally, the second receiving module 1804 is further configured to, if receiving second response information from the target application, indicate that the target application does not accept the configuration operation corresponding to the configuration object, where a specific implementation process may refer to the specific description of step 1009 in the embodiment shown in fig. 10, and is not described here again;
A sending module 1803, further configured to send a delete request to the server database, where the delete request is used to instruct the server database to delete the stored configuration operation corresponding to the configuration object and the new data of the configuration object, and a specific implementation process may refer to the specific description of step 1010 in the embodiment shown in fig. 9, which is not described herein again;
The sending module 1803 is further configured to send the second response message to the client, and the specific implementation process may refer to the specific description of step 1012 in the embodiment shown in fig. 9, which is not described herein again.
Fig. 19 is another schematic structural diagram of a server according to an embodiment of the present application, and referring to fig. 19, the server 1900 includes the server database 1700 shown in fig. 17 and the server agent 1800 shown in fig. 18.
It should be noted that, because the contents of information interaction, execution process, and the like between the modules/units of the apparatus are based on the same concept as the method embodiment of the present application, the technical effect brought by the contents is the same as the method embodiment of the present application, and specific contents may refer to the description in the foregoing method embodiment of the present application, and are not described herein again.
fig. 20 is another schematic structural diagram of a server according to an embodiment of the present application, where the server includes: one or more processors 2001, memory 2002, input-output interfaces 2003, power supplies 2004;
The memory 2002 is a transient storage memory or a persistent storage memory. Further, the processor 2001 is configured to communicate with the memory 2002 to execute a series of instruction operations in the memory 2002 on the server. The memory 2002 may be located outside the processor 2001 or within the processor 2001.
specifically, the processor 2001 is configured to perform the following steps:
generating configuration information according to a configuration request from a client, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired;
determining a configuration object needing configuration change from the target object according to the configuration information and the local configuration information;
and executing configuration change according to the corresponding configuration operation of the configuration object in the configuration information, and constructing a rollback patch message according to the patch information and the configuration change, wherein the rollback patch message comprises the inverse operation of the configuration operation executed on the configuration object in the configuration change process and the old data of the configuration object.
the specific implementation manner of the above steps may refer to the processing procedure of step 201 in the embodiment shown in fig. 2 (or step 301 in the embodiment shown in fig. 3 or step 401 in the embodiment shown in fig. 4 or step 501 in the embodiment shown in fig. 5), step 202, step 204, step 205, and step 206, which is not described herein again.
In another embodiment, the processor 2001 may further perform step 203 in the embodiment shown in fig. 2, step 207 to step 213 or the processor 2001 may further perform step 303 in the embodiment shown in fig. 3, step 307 to step 313 or the processor 2001 may further perform step 403 in the embodiment shown in fig. 4, step 407 to step 415 or the processor 2001 may further perform step 503 in the embodiment shown in fig. 5, step 507 to step 515.
in addition, when the modules in fig. 11 to 19 are implemented in software, for example, the receiving module, the processing module, and the sending module of the server database, and also for example, the first receiving module, the processing module, the sending module, and the second receiving module of the server agent, are executed by the processor 2001 to implement the functions and processes of the modules described in the above figures.
the embodiment of the present application also relates to a computer-readable storage medium, which includes program instructions, and is characterized in that when the program instructions are run on a computer device, the computer device is caused to execute the method corresponding to fig. 2 to fig. 10.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
in the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
in addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (43)

1. A method of configuration change, the method comprising:
The method comprises the steps that a server database receives configuration information from a server agent, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be acquired;
the server database determines a configuration object needing configuration change from the target objects according to the received configuration information and local configuration information;
The server database executes configuration change according to the configuration operation of the configuration object in the received configuration information, and constructs a rollback patch message according to the patch information and the configuration change, wherein the rollback patch message comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and old data of the configuration object;
And the server database sends the rollback patch message to the server agent.
2. The method of claim 1, wherein before the server database performs configuration change according to the configuration operation corresponding to the configuration object in the configuration information, the method further comprises:
the server database stores old data of the configuration object;
The constructing the rollback patch message according to the patch information and the configuration change includes:
The server database extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
and the server database constructs the rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object.
3. the method of claim 2, wherein after the server database constructs the rollback patch message according to the old data of the configuration object and the inverse operation of the configuration operation performed on the configuration object, and before the server database sends the rollback patch message to the server agent, the method further comprises:
And the server database deletes the stored old data of the configuration object and the inverse operation of the configuration object corresponding to the configuration information.
4. the method according to any one of claims 1 to 3, wherein after the server database sends the rollback patch message to the server agent, the method further comprises:
The server database receiving a rollback request from the server agent, the rollback request including old data of the configuration object and an inverse of a configuration operation performed on the configuration object;
and the server database executes configuration rollback according to the reverse operation of the configuration object in the rollback request.
5. the method according to any one of claims 1 to 3, wherein the rollback patch message is in a tree structure, wherein old data of all the configuration objects and an inverse operation of a configuration operation performed on all the configuration objects are presented in the tree structure.
6. A method according to any one of claims 1 to 3, wherein the rollback patch message uses entry records, wherein an entry comprises old data of one of the configuration objects and an inverse operation of a configuration operation performed on one of the configuration objects or an entry comprises an inverse operation of a configuration operation performed on one of the configuration objects.
7. a method of configuration change, the method comprising:
the method comprises the steps that a server agent receives a configuration request from a client, generates configuration information according to the configuration request and sends the configuration information to a server database, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be obtained;
The server agent receives the rollback patch message from the server database, wherein the rollback patch message is constructed by the server database after configuration change is carried out on a configuration object which needs to be subjected to configuration change in the target object according to the configuration information, and the rollback patch message comprises reverse operation of configuration operation executed on the configuration object in a configuration change process and old data of the configuration object.
8. The method of claim 7, wherein after the server agent receives the rollback patch message from the server database, further comprising:
And the server agent performs reverse analysis on the rollback patch message to obtain configuration change information, wherein the configuration change information comprises configuration operation executed on the configuration object.
9. the method of claim 8, wherein the server agent performs reverse parsing on the rollback patch packet to obtain configuration change information, and further comprising:
And the server agent sends the configuration change information to a target application, wherein the target application is an application subscribing the configuration change information.
10. the method of claim 9, wherein after the server agent sends the configuration change information to the target application, further comprising:
the server agent receives first response information from the target application, wherein the first response information is used for indicating that the target application accepts the configuration operation executed on the configuration object.
11. the method of claim 10, wherein if the configuration request includes the patch information indicating that a rolling back patch message needs to be obtained, after the server agent receives first response information from the target application, further comprising:
and the server agent sends the rollback patch message to the client.
12. The method of claim 10, wherein if the configuration request includes patch information indicating that a change patch message needs to be obtained, after the server agent receives first response information from the target application, further comprising:
the server agent constructs a change patch message according to the configuration operation executed on the configuration object;
and the server agent sends the patch change message to the client.
13. the method of claim 10, wherein if the configuration request includes patch information indicating that a reconfiguration patch message needs to be obtained, after the server agent receives first response information from the target application, further comprising:
The server agent obtains the new data of the configuration object, and constructs a reconfiguration patch message according to the configuration operation executed on the configuration object and the new data of the configuration object;
and the server agent sends the reconfiguration patch message to the client.
14. The method of claim 9, wherein after the server agent sends the configuration change information to the target application, further comprising:
the server agent receives second response information from the target application, wherein the second response information is used for indicating that the target application does not accept the configuration operation executed on the configuration object;
The server agent constructs a rollback request according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object, wherein the old data of the configuration object is contained in the rollback patch message;
the server agent sends the rollback request to the server database;
And the server agent sends the second response information to the client.
15. The method of claim 11, wherein sending the rollback patch message to the client by the server agent further comprises:
The server agent receives a rollback request from the client, wherein the rollback request is generated based on the rollback patch message and comprises old data of the configuration object and a reverse operation of a configuration operation performed on the configuration object;
The server agent sends the rollback request to the server database.
16. A method of configuration change, the method comprising:
The method comprises the steps that a server receives a configuration request from a client and generates configuration information according to the configuration request, wherein the configuration information comprises a target object, configuration operation corresponding to the target object and patch information used for indicating that a rollback patch message needs to be obtained;
The server determines a configuration object needing configuration change from the target objects according to the configuration information and the local configuration information;
And the server executes configuration change according to the configuration operation of the configuration object in the received configuration information, and constructs the rollback patch message according to the patch information and the configuration change, wherein the rollback patch message comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and the old data of the configuration object.
17. The method of claim 16, wherein before the server performs configuration change according to the configuration operation of the configuration object corresponding to the configuration information, the method further comprises:
the server saves the old data of the configuration object;
The constructing the rollback patch message according to the patch information and the configuration change includes:
the server extracts the stored old data of the configuration object according to the patch information and acquires the inverse operation of the configuration operation executed on the configuration object;
And the server constructs the rollback patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object.
18. the method of claim 17, wherein after the server constructs the rollback patch message according to the old data of the configuration object and the inverse operation of the configuration operation performed on the configuration object, the method further comprises:
And the server deletes the stored old data of the configuration object and the inverse operation of the configuration operation corresponding to the configuration object in the configuration information.
19. The method according to any one of claims 16 to 18, wherein after the server executes configuration change according to the configuration operation of the configuration object corresponding to the configuration information and constructs the rollback patch message according to the patch information and the configuration change, the method further comprises:
and the server performs reverse analysis on the rollback patch message to obtain configuration change information, wherein the configuration change information comprises configuration operation executed on the configuration object.
20. the method of claim 19, wherein the server performs inverse parsing on the rollback patch packet to obtain configuration change information, and further comprising:
and the server sends the configuration change information to a target application, wherein the target application is an application subscribing the configuration change information.
21. The method of claim 20, wherein after the server sends the configuration change information to the target application, further comprising:
The server receives first response information from the target application, wherein the first response information is used for indicating that the target application accepts the configuration operation executed on the configuration object.
22. the method of claim 21, wherein if the configuration request includes the patch information indicating that a rolling back patch message needs to be obtained, after the server receives first response information from the target application, the method further comprises:
and the server sends the rollback patch message to the client.
23. the method of claim 21, wherein if the configuration request includes patch information indicating that a patch change message needs to be obtained, after the server receives first response information from the target application, the method further comprises:
The server constructs a patch change message according to the configuration operation executed on the configuration object;
and the server sends the patch change message to the client.
24. the method of claim 21, wherein if the configuration request includes patch information indicating that a reconfiguration patch message needs to be obtained, after the server receives first response information from the target application, the method further comprises:
The server acquires new data of the configuration object, and constructs a reconfiguration patch message according to the configuration operation executed on the configuration object and the new data of the configuration object;
and the server sends the reconfiguration patch message to the client.
25. The method of claim 21, wherein after the server sends the configuration change information to the target application, further comprising:
The server receives second response information from the target application, wherein the second response information is used for indicating that the target application does not accept the configuration operation executed on the configuration object;
The server constructs a rollback request according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object, wherein the old data of the configuration object is included in the rollback patch message;
The server executes configuration rollback according to the reverse operation of the configuration object in the rollback request;
and the server sends the second response information to the client.
26. The method of claim 22, wherein sending the rollback patch message to the client by the server further comprises:
the server receives a rollback request from the client, wherein the rollback request is generated based on the rollback patch message and comprises old data of the configuration object and a reverse operation of a configuration operation performed on the configuration object;
and the server executes configuration rollback according to the reverse operation of the configuration object in the rollback request.
27. the method of claim 24, wherein the reconfiguration patch message is used to instruct the client to perform configuration changes on remaining servers.
28. a server database, the server database comprising:
a receiving module, configured to receive configuration information from a server agent, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information indicating that a rollback patch packet needs to be acquired;
the processing module is used for determining a configuration object needing configuration change from the target object according to the received configuration information and the local configuration information;
Executing configuration change according to the configuration operation of the configuration object corresponding to the received configuration information, and constructing the rollback patch message according to the patch information and the configuration change, wherein the rollback patch message comprises the reverse operation of the configuration operation executed on the configuration object in the configuration change process and old data of the configuration object;
And the sending module is used for sending the rollback patch message to the server agent.
29. the server database of claim 28, wherein the processing module is further configured to:
saving old data of the configuration object;
Extracting the stored old data of the configuration object according to the patch information, and acquiring the inverse operation of the configuration operation executed on the configuration object;
and constructing a rolling back patch message according to the old data of the configuration object and the reverse operation of the configuration operation executed on the configuration object.
30. the server database of claim 29, wherein the receiving module is further configured to receive a rollback request from the server agent, the rollback request including old data of the configuration object and an inverse of the configuration operation performed on the configuration object;
The processing module is further configured to perform configuration rollback according to a reverse operation of the configuration object in the rollback request.
31. a server agent, wherein the server agent comprises:
The first receiving module is used for receiving a configuration request from a client;
The processing module is used for generating configuration information according to the configuration request;
a sending module, configured to send configuration information to a server database, where the configuration information includes a target object, a configuration operation corresponding to the target object, and patch information indicating that a rollback patch message needs to be obtained;
A second receiving module, configured to receive the rollback patch message from the server database, where the rollback patch message is constructed by the server database after performing configuration change on a configuration object that needs to be subjected to configuration change in the target object according to the configuration information, and the rollback patch message includes a reverse operation of a configuration operation performed on the configuration object in a configuration change process and old data of the configuration object.
32. the server agent of claim 31, wherein the processing module is further configured to perform inverse parsing on the rollback patch packet to obtain configuration change information, and the configuration change information includes configuration operations performed on the configuration object.
33. The server agent of claim 32, wherein the sending module is further configured to send the configuration change information to a target application, and the target application is an application that subscribes to the configuration change information.
34. the server agent of claim 33, wherein the second receiving module is further configured to receive first response information from the target application, the first response information indicating that the target application accepts the configuration operation performed on the configuration object.
35. The server agent of claim 34, wherein the sending module is further configured to send the rollback patch message to the client if the configuration request includes patch information indicating that the rollback patch message needs to be obtained.
36. The server agent of claim 34, wherein if the configuration request includes patch information indicating that a patch change message needs to be obtained, the processing module is further configured to construct the patch change message according to a configuration operation performed on the configuration object;
The sending module is further configured to send the patch change message to the client.
37. The server agent of claim 34, wherein if the configuration request includes patch information indicating that a reconfiguration patch message needs to be obtained, the processing module is further configured to obtain new data of the configuration object, and construct the reconfiguration patch message according to the configuration operation performed on the configuration object and the new data of the configuration object;
The sending module is further configured to send the reconfiguration patch message to the client.
38. The server agent of claim 33, wherein the second receiving module is further configured to receive second response information from the target application, the second response information indicating that the target application does not accept the configuration operation performed on the configuration object;
The processing module is further configured to construct a rollback request according to old data of the configuration object included in the rollback patch message and a reverse operation of a configuration operation performed on the configuration object;
The sending module is further configured to:
sending a rollback request to a server database;
and sending the second response information to the client.
39. The server agent of claim 35, wherein the first receiving module is further configured to receive a rollback request from the client, the rollback request being a request generated based on the rollback patch message, the rollback request including old data of the configuration object and a reverse operation of the configuration operation performed on the configuration object;
the sending module is further configured to send the rollback request to the server database.
40. A server, characterized in that the server comprises a server database according to any of claims 28 to 30 and a server agent according to any of claims 31 to 39.
41. A server, characterized in that the server comprises: one or more processors, input and output interfaces, and a power supply;
the processor is configured to perform the method of any one of claims 1 to 27.
42. a system of configuration change, characterized in that the system comprises a client and a server according to claim 40 or 41.
43. a computer readable storage medium comprising program instructions which, when run on a computer device, cause the computer device to perform the method of any one of claims 1 to 27.
CN201910888312.3A 2019-09-19 2019-09-19 configuration change method and related device Active CN110391949B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201910888312.3A CN110391949B (en) 2019-09-19 2019-09-19 configuration change method and related device
CN201911252740.3A CN112532415B (en) 2019-09-19 2019-09-19 Configuration change method and related device
PCT/CN2020/116618 WO2021052502A1 (en) 2019-09-19 2020-09-21 Configuration change method and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910888312.3A CN110391949B (en) 2019-09-19 2019-09-19 configuration change method and related device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201911252740.3A Division CN112532415B (en) 2019-09-19 2019-09-19 Configuration change method and related device

Publications (2)

Publication Number Publication Date
CN110391949A CN110391949A (en) 2019-10-29
CN110391949B true CN110391949B (en) 2019-12-13

Family

ID=68289704

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201911252740.3A Active CN112532415B (en) 2019-09-19 2019-09-19 Configuration change method and related device
CN201910888312.3A Active CN110391949B (en) 2019-09-19 2019-09-19 configuration change method and related device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201911252740.3A Active CN112532415B (en) 2019-09-19 2019-09-19 Configuration change method and related device

Country Status (2)

Country Link
CN (2) CN112532415B (en)
WO (1) WO2021052502A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532415B (en) * 2019-09-19 2022-05-17 华为技术有限公司 Configuration change method and related device
CN110912743B (en) * 2019-11-26 2021-11-16 中国银联股份有限公司 Method and device for executing configuration instruction
CN111130872A (en) * 2019-12-19 2020-05-08 紫光云技术有限公司 Method for restoring network equipment configuration in cloud computing
CN113064658B (en) * 2019-12-31 2023-09-08 北京华为数字技术有限公司 Copying method, copying device, copying equipment and computer readable storage medium for configuration data
CN113157462A (en) * 2020-01-22 2021-07-23 华为技术有限公司 Data management method, device, equipment, computer readable storage medium and system
CN116055309A (en) * 2021-10-28 2023-05-02 华为技术有限公司 Method, device, system, storage medium and program product for configuration management
CN116389262B (en) * 2023-06-02 2023-08-18 新华三技术有限公司 Configuration rollback method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977127A (en) * 2010-11-26 2011-02-16 迈普通信技术股份有限公司 SNMP (Simple Network Management Protocol) based equipment configuration roll back method and SNMP network management equipment

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6233582B1 (en) * 1998-05-14 2001-05-15 Sun Microsystems, Inc. Persistent storage interface for a configuration object-based system
US8942689B2 (en) * 2007-03-06 2015-01-27 Qualcomm Incorporated Method and technology for remote administration of wireless devices
CN101163043B (en) * 2007-11-08 2010-06-02 华为技术有限公司 Network management function configuring method and system
CN100591022C (en) * 2007-11-29 2010-02-17 上海华为技术有限公司 Method and apparatus for implementing preactivation of batch configuration
CN102725999B (en) * 2011-06-30 2014-08-20 华为技术有限公司 Data configuration method and telecommunication system device
CN102427409A (en) * 2012-01-31 2012-04-25 迈普通信技术股份有限公司 Configuration data submission method based on network configuration (NETCONF) protocol and server thereof
US9699029B2 (en) * 2014-10-10 2017-07-04 Brocade Communications Systems, Inc. Distributed configuration management in a switch group
CN107038085B (en) * 2016-02-03 2021-01-08 阿里巴巴集团控股有限公司 Method, device and system for repairing client application
US10289401B1 (en) * 2016-12-30 2019-05-14 Juniper Networks, Inc Systems and methods for efficiently downgrading operating systems installed on network devices
CN110018835B (en) * 2018-01-09 2022-08-02 中兴通讯股份有限公司 YANG model configuration data processing method and device, terminal device and storage medium
CN108632101B (en) * 2018-05-31 2020-02-14 北京百度网讯科技有限公司 Method and apparatus for updating configuration object, edge computing device, and medium
CN109361553B (en) * 2018-11-30 2022-04-08 新华三技术有限公司合肥分公司 Configuration rollback method and device
CN112532415B (en) * 2019-09-19 2022-05-17 华为技术有限公司 Configuration change method and related device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977127A (en) * 2010-11-26 2011-02-16 迈普通信技术股份有限公司 SNMP (Simple Network Management Protocol) based equipment configuration roll back method and SNMP network management equipment

Also Published As

Publication number Publication date
WO2021052502A1 (en) 2021-03-25
CN110391949A (en) 2019-10-29
CN112532415A (en) 2021-03-19
CN112532415B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN110391949B (en) configuration change method and related device
US20190026193A1 (en) Method and apparatus for executing data recovery operation
CN111752799A (en) Service link tracking method, device, equipment and storage medium
US10095699B2 (en) Computer-readable recording medium, execution control method, and information processing apparatus
CN111355802A (en) Information pushing method and device
CN116560626A (en) Data processing method, system, equipment and storage medium based on custom rules
CN114173355A (en) Dynamic execution method and system for network instruction with separated design operation state
JP2023553220A (en) Process mining for multi-instance processes
CN111008095A (en) State snapshot generation and recovery method facing edge cloud
CN110941658A (en) Data export method, device, server and storage medium
CN116033002A (en) Service field configuration method, device, equipment and readable storage medium
CN107168822B (en) Oracle streams exception recovery system and method
CN111782608B (en) File automatic generation method and device, electronic equipment and storage medium
CN113805850A (en) Artificial intelligence management system based on multiple deep learning and machine learning frameworks
CN113360558A (en) Data processing method, data processing device, electronic device, and storage medium
CN112291312B (en) ETL data synchronization method and device, electronic equipment and storage medium
US8788483B2 (en) Method and apparatus for searching in a memory-efficient manner for at least one query data element
CN104834724A (en) Method and device for synchronizing database
CN111885206A (en) Cloud platform supporting multi-power-provider platform and pushing data to appointed environment
US9613051B2 (en) Data processing method, information processing apparatus, and recording medium
CN117389908B (en) Dependency analysis method, system and medium for interface automation test case
CN115834701A (en) K8S application environment management method, system and storage medium
CN117472365A (en) Data processing method, terminal device and storage medium
CN113987045A (en) Big data service system and big data service system construction method
CN115391463A (en) Data synchronization method and device and server cluster

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