Configuration information updating method and apparatus, and storage medium

By updating configuration information by sending blocking and unblocking messages in a distributed database, the problem of low update efficiency in existing technologies is solved, achieving efficient configuration information updates and reducing the scope of impact.

CN116150165BActive Publication Date: 2026-04-21CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2021-11-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, when the configuration information of a distributed database changes, the service needs to be restarted to update, resulting in low update efficiency and affecting all data access.

Method used

The device sends a blocking message to block data access requests by configuring the information management device, updates the configuration information, sends an unblocking message to restore access, and completes the configuration information update without restarting the service.

Benefits of technology

It improves the efficiency of configuration information updates, only affecting data access requests of the relevant routes, without affecting other routes, thus reducing the scope of the update's impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150165B_ABST
    Figure CN116150165B_ABST
Patent Text Reader

Abstract

The present disclosure provides a configuration information updating method and device and a storage medium. The method comprises: a configuration information management device sending a blocking message to a service server in response to a change in configuration information of a distributed database; performing a configuration information updating operation in response to completion of blocking of data access requests in the service server; sending a configuration information updating message to the service server; and sending an unblocking message to the service server in response to completion of updating of the configuration information by the service server. In the present disclosure, updating of configuration information can be completed without restarting the service, thereby improving the updating efficiency of the configuration information and reducing the influence range of the configuration information updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of software technology, and in particular to a method, apparatus and storage medium for updating configuration information. Background Technology

[0002] As businesses continue to grow and expand, the demands for high concurrency in business support systems are increasing, making the construction of distributed applications the mainstream approach. Distributed applications, after database and application splitting, typically involve numerous services. When a distributed database undergoes master-slave failover or expansion, configuration information such as database connection information and data routing information will change.

[0003] Currently, most distributed databases store their configuration information in configuration files. When the configuration information of a distributed database changes, the service needs to be restarted to update the configuration information. This results in low efficiency in updating the configuration information and also affects all data access involved in the service. Summary of the Invention

[0004] To address the aforementioned issues, this disclosure provides a configuration information update method. This method resolves the problem that a service restart is required to update configuration information when it changes in the distributed database, thereby improving update efficiency and reducing the impact of configuration information updates.

[0005] Firstly, this disclosure provides a configuration information updating method, applied to a configuration information management device, including:

[0006] In response to changes in the configuration information of the distributed database, a blocking message is sent to the business server. The blocking message is used to block data access requests for the corresponding route. The configuration information includes database connection information and / or distributed data routing information.

[0007] In response to the blocking of data access requests to the business server, a configuration information update operation is performed to write the changed configuration information into the configuration database.

[0008] Send a configuration information update message to the business server. The configuration information update message is used to indicate that the configuration information should be updated based on the configuration database.

[0009] In response to the business server completing the configuration information update, an unblocking message is sent to the business server. The unblocking message is used to restore data access requests for the corresponding route.

[0010] In one possible implementation, the configuration information management device and the business server communicate and interact through a message middleware.

[0011] In one possible implementation, the registry center writes information about the business server where the application has been started, and also includes at least one of the following: determining, through the registry center, whether the blocking of data access requests to the business server has been completed; and determining, through the registry center, whether the business server has completed the update of configuration information.

[0012] One possible implementation further includes: receiving an acknowledgment message sent by a service server; and determining, based on the acknowledgment message sent by the service server, whether a target item has been completed, the target item including: blocking data access requests, and / or updating configuration information.

[0013] In one possible implementation, there is at least one service server. Determining whether a target item has been completed based on the receipt messages sent by the service servers includes: if all receipt messages sent by at least one service server indicate completion, then the target item is determined to be completed; if a receipt message sent by a first service server indicates incompleteness, then the target item is determined to be incomplete. The at least one service server includes the first service server.

[0014] In one possible implementation, it further includes: if no acknowledgment message is received from the second service server within a set time period after sending the target message, it is determined that the target item has not been completed, at least one service server includes the second service server, and the target message includes a configuration information update message and / or a blocking message.

[0015] In one possible implementation, the method further includes: in response to an uncompleted target item, sending a directed message to a target server, the target server including a first business server and / or a second business server, the directed message being used to instruct the execution of the target item.

[0016] Secondly, this disclosure provides a configuration information update method applied to a business server. The configuration information update method includes:

[0017] In response to receiving a blocking message from the configuration information management device, the data access request is blocked. The blocking message is used to block the data access request of the corresponding route. The blocking message is issued by the configuration information management device in response to changes in the configuration information of the distributed database. The configuration information includes database connection information and / or distributed data routing information.

[0018] In response to receiving a configuration information update message from the configuration information management device, the configuration information is updated based on the configuration database. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database, which contains the changed configuration information.

[0019] In response to receiving an unblocking message from the configuration information management device, the blocking of the data access request is lifted, and the unblocking message is used to restore the data access request for the corresponding route.

[0020] In one possible implementation, the configuration information management device and the business server communicate and interact through a message middleware.

[0021] One possible implementation further includes: writing information about the business server to the registry center, including whether to block data access requests, and / or whether to complete the update of configuration information.

[0022] In one possible implementation, the method further includes sending a receipt message to the configuration information management device, the receipt message indicating whether a target item has been completed, the target item including: blocking data access requests, and / or updating configuration information.

[0023] In one possible implementation, the method further includes: if the receipt message indicates that the target item has not been completed, receiving a directed message from the configuration information management device, the directed message being used to instruct the execution of the target item.

[0024] In one possible implementation, it further includes at least one of the following: before blocking a data access request, determining, based on the blocking message, that the change in configuration information affects the business server; before blocking a data access request, determining that the received data access requests have been processed; and after blocking a data access request, disconnecting the connection with the database.

[0025] Thirdly, this disclosure provides a configuration information update system, comprising: a configuration information management device and a business server, wherein:

[0026] A configuration information management device is used to execute the configuration information update method of the first aspect;

[0027] The business server is used to execute the configuration information update method in the second aspect.

[0028] Fourthly, this disclosure provides a configuration information updating device, applied to a configuration information management device, comprising:

[0029] The first sending module is used to send a blocking message to the business server in response to a change in the configuration information of the distributed database. The blocking message is used to block the data access request of the corresponding route. The configuration information includes database connection information and / or distributed data routing information.

[0030] The execution module is used to respond to the blocking of data access requests in the business server and perform configuration information update operations. The configuration information update operations are used to write the changed configuration information into the configuration database.

[0031] The second sending module is used to send a configuration information update message to the business server. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database.

[0032] The third sending module, in response to the business server completing the configuration information update, sends an unblocking message to the business server. The unblocking message is used to restore the data access request for the corresponding route.

[0033] In one possible implementation, the configuration information management device and the business server communicate and interact through a message middleware.

[0034] In one possible implementation, the system further includes a determining module, which is used to determine at least one of the following: whether the blocking of data access requests to the business server has been completed through the registration center; and whether the business server has completed the update of configuration information through the registration center.

[0035] In one possible implementation, the determining module is further configured to: receive an acknowledgment message sent by the service server; and determine, based on the acknowledgment message sent by the service server, whether the target item has been completed, the target item including: blocking the data access request, and / or updating the configuration information.

[0036] In one possible implementation, the number of service servers is at least one, and the determining module is specifically used to: determine the completed target item if all the receipt messages sent by at least one service server indicate completion; and determine the incomplete target item if there is a receipt message sent by the first service server indicating incompleteness. The at least one service server includes the first service server.

[0037] In one possible implementation, the determining module is further configured to: if no acknowledgment message is received from the second service server within a set time period after sending the target message, determine that the target item has not been completed, wherein at least one service server includes the second service server, and the target message includes a configuration information update message and / or a blocking message.

[0038] In one possible implementation, a fourth sending module is further included, which is used to send a directed message to a target server in response to an incomplete target item. The target server includes a first business server and / or a second business server. The directed message is used to instruct the execution of the target item.

[0039] Fifthly, this disclosure provides a configuration information updating device, applied to a business server, comprising:

[0040] The blocking module is used to block data access requests in response to receiving a blocking message from the configuration information management device. The blocking message is used to block data access requests for the corresponding route. The blocking message is issued by the configuration information management device in response to changes in the configuration information of the distributed database. The configuration information includes database connection information and / or distributed data routing information.

[0041] The update module is used to respond to receiving a configuration information update message from the configuration information management device and update the configuration information based on the configuration database. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database, which contains the changed configuration information.

[0042] The release module is used to release the blockage on the data access request in response to receiving a release message from the configuration information management device. The release message is used to restore the data access request for the corresponding route.

[0043] In one possible implementation, the configuration information management device and the business server communicate and interact through a message middleware.

[0044] In one possible implementation, a writing module is also included, used to write information of the business server to the registry center, including: whether to block data access requests, and / or whether to complete the update of configuration information.

[0045] In one possible implementation, a sending module is further included, which sends an acknowledgment message to the configuration information management device. The acknowledgment message indicates whether a target item has been completed. The target item includes: blocking data access requests, and / or updating configuration information.

[0046] In one possible implementation, a receiving module is further included, which is used to receive a directed message from the configuration information management device if the receipt message indicates that the target item has not been completed. The directed message is used to instruct the execution of the target item.

[0047] In one possible implementation, the system further includes a determining module for performing at least one of the following: determining, based on a blocking message, that the change in configuration information affects the business server before blocking the data access request; determining that the received data access request has been processed before blocking the data access request; and disconnecting the connection to the database after blocking the data access request.

[0048] Sixthly, this disclosure provides an electronic device, comprising:

[0049] Memory and processor;

[0050] Memory is used to store program instructions;

[0051] The processor is used to invoke program instructions in the memory to execute the word correction method of the first aspect.

[0052] In a seventh aspect, this disclosure provides a computer-readable storage medium storing computer program instructions, which, when executed, implement the configuration information update methods of the first and second aspects.

[0053] Eighthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the configuration information update method of the first and second aspects.

[0054] This disclosure provides a configuration information update method, apparatus, and storage medium. The method includes: a configuration information management device, in response to a change in configuration information in a distributed database, sending a blocking message to a business server to block data access requests for the corresponding route; in response to completing the blocking of data access requests in the business server, performing a configuration information update operation to write the changed configuration information into the configuration database; sending a configuration information update message to the business server to instruct it to update the configuration information based on the configuration database; and in response to the business server completing the configuration information update, sending an unblocking message to the business server to restore data access requests for the corresponding route. In this disclosure, the configuration information management device can update the configuration information in the configuration database and the configuration information on the business server without restarting the service when the configuration information in the distributed database changes, through the above series of operations. Compared to existing solutions that require restarting the service to update configuration information, this disclosure only affects data access requests for the corresponding route and does not affect data access for routes unrelated to the changed configuration information. Therefore, it improves the efficiency of configuration information updates and reduces the scope of impact of configuration information updates. Attached Figure Description

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

[0056] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of the present disclosure;

[0057] Figure 2 A flowchart illustrating a configuration information update method provided in an embodiment of this disclosure;

[0058] Figure 3 A flowchart of a configuration information update method provided in another embodiment of this disclosure;

[0059] Figure 4 A flowchart of a configuration information update method provided in yet another embodiment of this disclosure;

[0060] Figure 5 An interactive diagram illustrating a service blocking process provided in an embodiment of this disclosure;

[0061] Figure 6 An interactive diagram illustrating the configuration information update process provided in another embodiment of this disclosure;

[0062] Figure 7 An interactive diagram illustrating the unblocking process provided in yet another embodiment of this disclosure;

[0063] Figure 8 This is a structural diagram of a configuration information update system provided in an embodiment of the present disclosure;

[0064] Figure 9 A structural diagram of a configuration information updating device provided in an embodiment of this disclosure;

[0065] Figure 10 A structural diagram of a configuration information updating device provided in another embodiment of this disclosure;

[0066] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

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

[0068] The configuration information management device, also known as the "data source management controller," is responsible for the overall process control of configuration information updates (data source hot switching), sending scheduling command messages, recording task execution status, providing a visual display of data source update progress, and ensuring successful execution of data source hot switching.

[0069] The command listener is responsible for updating the configuration information of the business server (or hot switching of the data source). It adopts the event-driven design pattern, listens for command queue messages, parses message packets, responds to command messages sent by the configuration information management device, and executes corresponding operations.

[0070] The message middleware serves as the medium for interaction between the configuration information management device and the command listener. It includes a command queue and a receipt queue. The command queue stores command messages sent by the configuration information management device, while the receipt queue stores receipt messages returned by the business server.

[0071] Messages, serving as the medium for interaction between the configuration information management device and the command monitor, utilize a JSON data structure and can be categorized into command messages and receipt messages. Command messages are sent by the configuration information management device and, based on command type, can be divided into four types: blocking messages, configuration information update messages (including data source update commands and route update commands), and unblocking messages. Receipt messages are sent by the business servers, returning their processing results. Command messages can be further categorized by their recipient: broadcast messages and directed messages. Broadcast messages are directed to all business servers, which parse the message and decide whether to process it. Directed messages are directed to a specific service instance, specifying the recipient's service name and / or service identifier (IP:port) information in the message body. Directed messages serve as a compensation mechanism; when a business server returns a receipt message indicating execution failure or fails to return a receipt message within a timeout period, the controller attempts to retry by sending a directed message command, ensuring high reliability of configuration information updates.

[0072] When an application starts, it writes basic information about the business server (IP address, port, service name) to the registry center. The configuration information management device then uses this information to determine which services need to be switched based on the registered applications. Through the registry center, the configuration information management device can promptly detect new services, allowing for elastic scaling. For example, the registry center can be implemented using ZooKeeper.

[0073] Configure the database, maintain database connections, and manage basic configuration information for distributed data routing.

[0074] Data source caching maintains database connection information. When the application starts, it reads the database connection information from the configuration database, creates a database connection pool, and puts it into the local cache to improve data access efficiency. When the database connection information changes, the application needs to update the data source cache.

[0075] The route cache maintains the mapping between route keys and data sources. When the application starts, it loads route information from the configuration database, creates a data route table, and puts it into the local cache to improve the efficiency of distributed data route access. When routes are updated, the application needs to update the route cache.

[0076] For distributed databases, updating configuration information usually only affects data access for some routes. However, if the service needs to be restarted to update the configuration information, it will affect all data access requests, thus expanding the scope of impact.

[0077] Therefore, the current method of updating configuration information has at least the following problems:

[0078] The update process is inefficient and will also affect access to all data involved in the service.

[0079] This problem becomes even more pronounced when there are many application instances involved.

[0080] In addition, some configuration information is stored in the database, requiring periodic retrieval of this information to determine if reloading is necessary. For high-concurrency business systems, periodic retrieval undoubtedly incurs additional overhead, leads to delayed updates when configuration information changes, and causes business interruptions during configuration reloading.

[0081] To address the aforementioned issues, embodiments of this disclosure provide a configuration information update method, apparatus, and storage medium. When configuration information changes, the configuration information management device sends a configuration information update message to the service server, instructing the configuration information to be updated based on the configuration database. Upon receiving the configuration information update message, the service server blocks new data service requests and waits for existing service requests to be processed before reloading configuration information such as configuration database connection information and distributed data routing information from the configuration database and storing them in a local cache, thus completing the configuration information update.

[0082] It should be noted that in the original configuration information update strategy, the business server needed to download the configuration file again while offline to update the configuration information. This disclosure, however, allows the business server to update the configuration information in real time based on the configuration database while online, without requiring a service restart. Therefore, the solution provided by this disclosure can improve the efficiency of configuration information updates, thereby improving data source switching efficiency and reducing service interruption time. Furthermore, the configuration information update process only affects data access requests on the corresponding route, while data access requests on other routes are unaffected, narrowing the scope of impact and enabling uninterrupted application database master-slave failover.

[0083] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure. For example... Figure 1 As shown, this application scenario includes a configuration information management device 101, a business server 1, a business server 2, and a business server 3. The configuration information management device 101 can connect wirelessly to business servers 1 through 3. Each business server is responsible for processing business in a different region or for different types of business. For example, business server 1 handles business processing in the eastern region; business server 2 handles business processing in the northwest region; and business server 3 handles business processing in the southern region.

[0084] In addition, a configuration database 102 is also mounted on the configuration information management device 101. Since the configuration database is distributed, different configuration databases may correspond to different business servers. In this application scenario, configuration database 102 corresponds to business servers 1 through 3. In some examples, business servers 1 through 3 can also locally store the configuration information in their respective configuration databases 102, so that when business processing is required, it is not necessary to repeatedly call the configuration information in configuration database 102, thereby speeding up the efficiency of business processing.

[0085] When configuration information changes, the configuration information management device 101 will determine the service server whose configuration information needs to be updated. That is, if the change does not affect service server 1, the configuration information of service server 1 will not be updated. If service server 2 is determined to be the service server whose configuration information needs to be updated, the configuration information management device 101 will send blocking messages, configuration information update messages, and unblocking messages to service server 2 in sequence. This causes service server 2 to first interrupt the processing of services related to the corresponding route, load the updated configuration information from the configuration database into its local machine, and then resume the processing of subsequent services.

[0086] It should be noted that, Figure 1 This is merely a schematic diagram illustrating one application scenario provided by an embodiment of this disclosure; this embodiment does not necessarily represent an application scenario. Figure 1 The included equipment is not limited, nor is it restricted. Figure 1 The location relationships between devices are defined. For example, the configuration database 102 can be mounted on the configuration information management device 101, or it can be mounted on other devices. In addition, the application scenario can also include a registration center, which registers the various services on business servers 1 to 3.

[0087] Next, the configuration information update method will be introduced through specific embodiments.

[0088] like Figure 2 As shown, Figure 2 This disclosure provides a configuration information update method according to an embodiment, applied to a configuration information management device. The method includes:

[0089] S201. In response to a change in the configuration information of the distributed database, a blocking message is sent to the business server. The blocking message is used to block the data access request of the corresponding route. The configuration information includes database connection information and / or distributed data routing information.

[0090] For example, the blocking message type can be a broadcast message, meaning the configuration information management device sends the blocking message to all associated business servers. Alternatively, the blocking message type can be a targeted message, meaning the configuration information management device sends the blocking message to a subset of business servers. Here, the subset of business servers can be business servers related to the configuration database whose configuration information has changed. In this case, before sending the blocking message, the configuration information management device needs to determine which business servers are related to the configuration database whose configuration information has changed, and then send the blocking message accordingly.

[0091] In addition, the configuration information may include database connection information and distributed data routing information. Database connection information reflects the IP address of the configuration database, which is a data attribute of the configuration database itself; while distributed data routing information reflects the path information between the business server and the configuration database.

[0092] Correspondingly, the service server receives the blocking message and then, through methods such as... Figure 3 The illustrated example demonstrates the operations performed by the service server after receiving a blocking message, which will not be repeated here.

[0093] S202. In response to the completion of blocking the data access request in the business server, a configuration information update operation is performed. The configuration information update operation is used to write the changed configuration information into the configuration database.

[0094] After blocking data access requests from the business server, the configuration information management device will first update the configuration information in the distributed database that needs to be updated.

[0095] In addition, in some embodiments, the configuration information management device may also change the configuration information in the configuration database when it is necessary to change the configuration information, and this disclosure does not limit it.

[0096] Specifically, when performing a configuration information update operation, the configuration information management device can first store the configuration information that needs to be changed and then write the changed configuration information into the configuration database; alternatively, the configuration information management device can directly modify the configuration information in the configuration database to complete the change of configuration information in the configuration database.

[0097] S203. Send a configuration information update message to the business server. The configuration information update message is used to indicate that the configuration information should be updated based on the configuration database.

[0098] For example, similar to blocking messages, configuration information update messages can also be broadcast messages or directed messages, depending on actual needs, and this application embodiment does not limit them.

[0099] The configuration update message can be received by a command listener on the business server. This command listener can also employ an event-driven design pattern, listening for the message, parsing it, and then prompting the business server to respond. Alternatively, a message handler can be installed on the business server. The message handler parses the configuration update message, and then the business server responds accordingly.

[0100] The business server and the configuration information management device can be located on the same gateway or on different gateways. When they are on different gateways, the business server needs to load the updated configuration information from the configuration database into the local device so that the configuration information in the database can be quickly accessed without relying on the network.

[0101] S204. In response to the business server completing the configuration information update, a release blocking message is sent to the business server. The release blocking message is used to restore the data access request for the corresponding route.

[0102] For example, similar to blocking messages, unblocking messages can also be broadcast messages or directed messages, depending on the actual needs, and this application embodiment does not limit them.

[0103] The service server can send a receipt message to the configuration information management device to provide feedback; alternatively, the configuration information management device can monitor the service server to determine the completion status of its configuration information update. Generally, the configuration information management device will only send an unblocking message after confirming that the service server has completed the configuration information update.

[0104] After the blocking is lifted, the business server will resume receiving various business requests from clients.

[0105] In this embodiment of the disclosure, the provided configuration information update method includes: a configuration information management device, in response to a change in configuration information in a distributed database, sends a blocking message to a business server to block data access requests for the corresponding route; in response to completing the blocking of data access requests in the business server, performs a configuration information update operation to write the changed configuration information into the configuration database; sends a configuration information update message to the business server to instruct it to update the configuration information based on the configuration database; and in response to the business server completing the configuration information update, sends an unblocking message to the business server to restore data access requests for the corresponding route. Through this embodiment of the disclosure, when configuration information in a distributed database changes, the configuration information management device can complete the update of configuration information in the configuration database and the update of configuration information on the business server without restarting the service through the above series of operations. Compared with existing solutions that require restarting the service to update configuration information, this disclosure only affects data access requests for the corresponding route and does not affect data access for routes unrelated to the changed configuration information. Therefore, it improves the efficiency of configuration information updates and reduces the scope of impact of configuration information updates.

[0106] In some embodiments, the configuration information management device and the business server can communicate and interact through a message middleware. In a system employing a message middleware mechanism, the configuration information management device and the business server can activate each other's events and complete corresponding operations by exchanging messages. The message sender sends a message to the message server, which stores the message in several queues and forwards it to the message receiver at an appropriate time. Message middleware enables communication between different platforms. It is often used to shield the characteristics of various platforms and protocols, enabling collaboration between applications. Its advantages lie in providing synchronous and asynchronous connections between the configuration information management device and the business server, and in allowing messages to be transmitted or stored and forwarded at any time, which is why it is a further advancement over remote procedure calls.

[0107] In this embodiment of the disclosure, decoupling between the configuration information management device and the business server is achieved by introducing a message middleware.

[0108] Based on the above embodiments, in some implementations, the registration center writes information about the business servers where business applications have been started. In this case, the configuration information update method may further include at least one of the following: determining, through the registration center, whether the blocking of data access requests to the business server has been completed; and determining, through the registration center, whether the business server has completed the update of its configuration information.

[0109] Correspondingly, the business server will write its information to the registry center, including whether it blocks data access requests and / or whether it has completed the update of configuration information.

[0110] Based on the above embodiments, for example, the services handled by the service server need to pre-register their basic information with the registration center. This basic information may include IP address, port, and service name. Simultaneously, the registration center can use ZooKeeper to perform elastic scaling up or down operations for each service. Afterwards, the configuration information management device will obtain the registered services from the registration center and classify and manage them. Furthermore, when a new service registers with the registration center, the configuration information management device will detect it immediately.

[0111] Optionally, the configuration information management device can monitor the business server through the registry center. Since the services handled by the business server are pre-registered with the registry center, the configuration information management device can detect the service interruption when the business server blocks the service. Similarly, when the business server loads the updated configuration information from the configuration database onto its local machine, the configuration information management device can also detect the local update of the configuration information by the business server through the registry center. It should be understood that the configuration information management device can monitor the status of the business server through the registry center without receiving confirmation messages.

[0112] In this embodiment of the disclosure, the configuration information management device can obtain various services of the business server through the registration center, monitor each business server, and thus keep track of the processing progress and configuration update status of the business in real time.

[0113] When the configuration information management device does not rely on a registry center, it needs to monitor the status of the business server through acknowledgment messages sent by the business server. For example, the configuration information management device can receive acknowledgment messages sent by the business server and determine whether the target item has been completed based on the acknowledgment messages sent by the business server. The target item includes: blocking data access requests, and / or updating configuration information.

[0114] That is, after the service server interrupts the service, it will send a receipt message with a service interruption identifier to the configuration information management device; or, after the service server updates the configuration information, it will send a receipt message with a configuration information update identifier to the configuration information management device. The configuration information management device will determine the corresponding target item from the identifier carried in the receipt message.

[0115] Furthermore, there is at least one service server. Determining whether a target item has been completed based on the receipt messages sent by the service servers may include: if all receipt messages sent by at least one service server indicate completion, then the target item is determined to be completed; if a receipt message sent by the first service server indicates incompleteness, then the target item is determined to be incomplete. The at least one service server includes the first service server.

[0116] Alternatively, if no acknowledgment message is received from the second service server within a set time after the target message is sent, the target item is determined to be incomplete. At least one service server includes the second service server, and the target message includes a configuration information update message and / or a blocking message.

[0117] In the above description, the first service server and the second service server can be responsible for the same type of service or different services. Furthermore, the first service server and the second service server can be the same service server or different service servers.

[0118] When a service server (e.g., the first service server) fails to send a receipt message within a set time period, the configuration information management device will locate the first service server that has not sent a receipt message and determine that the target item is incomplete. Alternatively, when a service server (e.g., the second service server) sends a receipt message indicating incompleteness, the configuration information management device will locate the second service server after receiving the receipt message indicating incompleteness and determine that the target item is incomplete.

[0119] Specifically, the incomplete target item will vary depending on the identifier in the receipt message. For example, if the identifier in the receipt message indicates that the interruption was not completed, then the incomplete target item is determined to be a service interruption; if the identifier in the receipt message indicates that the configuration information update was not completed, then the incomplete target item is determined to be a configuration information update.

[0120] In summary, among the business servers, there may be individual business servers, such as the first business server or the second business server. Due to system failures, service interruption delays, or excessive network latency, these business servers may fail to send acknowledgment messages to the configuration information management device, or send acknowledgment messages indicating incomplete completion to the configuration information management device. In view of this situation, this disclosure introduces a fault-tolerance mechanism. For example, the configuration information management device can perform a redirection operation on the business server, that is, the configuration information management device resends the redirection message to the business server.

[0121] In some embodiments, the redirection operation may include: in response to an incomplete target item, sending a redirection message to a target server, including a first business server and / or a second business server, the redirection message being used to instruct the execution of the target item.

[0122] It should be understood that there is a one-to-one correspondence between the unfinished targets and the target targets here.

[0123] In practice, the configuration information management device will identify the aforementioned incomplete target items and the corresponding business servers. It will then resend the redirection message to the business server. It can be understood that the configuration information management device will not resend redirection messages to other business servers. For example, if a third business server has sent a receipt message indicating that the target item has been completed, the configuration information management device can send an unblocking message to that business server, allowing it to resume processing the corresponding service.

[0124] After introducing the configuration information update method on the configuration information management device side, this disclosure further describes the configuration information update method from the business server side, wherein the method can be achieved through... Figure 3 To showcase, Figure 3 This is another embodiment of the configuration information update method provided in this disclosure, such as... Figure 3 As shown, the method may include:

[0125] S301. In response to receiving a blocking message from the configuration information management device, the data access request is blocked. The blocking message is used to block the data access request for the corresponding route. The blocking message is issued by the configuration information management device in response to changes in the configuration information of the distributed database. The configuration information includes database connection information and / or distributed data routing information.

[0126] For example, when blocking data access requests, it can be done by blocking all business requests (data access requests) immediately, or by blocking subsequent business requests after the existing business requests have been processed. This disclosure does not limit this approach.

[0127] Optionally, blocking services may include at least one of the following:

[0128] a. Before blocking a data access request, determine whether the configuration information change affects the business server based on the blocking message; b. Before blocking a data access request, ensure that all received data access requests have been processed; c. After blocking a data access request, disconnect from the database.

[0129] This implementation method is a specific implementation of the above-described approach, in which subsequent business requests are blocked after the existing business requests have been processed.

[0130] S302. In response to receiving a configuration information update message from the configuration information management device, update the configuration information based on the configuration database. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database, which contains the changed configuration information.

[0131] S303. In response to receiving a release message from the configuration information management device, the blocking of the data access request is released. The release message is used to restore the data access request for the corresponding route.

[0132] S302 and S303 are operations opposite to S203 and S204, and their specific processes have been described in S203 and S204, so they will not be repeated here.

[0133] Similarly, receipt messages sent by the business server are also forwarded through message middleware.

[0134] Similarly, the confirmation message used to indicate whether the target item has been completed, as described above, can be updated via the following configuration information update method on the business server side:

[0135] Send an acknowledgement message to the configuration information management device. The acknowledgement message indicates whether the target item has been completed. The target item includes: blocking data access requests and / or updating configuration information.

[0136] Additionally, if the receipt message indicates that the target item has not been completed, a directed message is received from the configuration information management device, which is used to instruct the target item to be executed.

[0137] In this embodiment, by introducing a redirection operation, it is ensured that redirected messages are resent to business servers that malfunction or fail to perform their expected operations without affecting other business servers. This can indirectly improve the overall fault tolerance of the configuration information update method of this disclosure.

[0138] Next, through Figure 4 This can more completely demonstrate the configuration information update method provided in this disclosure, such as Figure 4 As shown, the method includes:

[0139] S401. In response to the need to update configuration information in the configuration database, the configuration information management device sends a blocking message to the service server corresponding to the configuration database.

[0140] S402. The command listener of the business server receives the blocking message. After the business server completes the ongoing business processing, it blocks the new business request and sends a receipt message to the configuration information management device.

[0141] Specifically, it can be done through Figure 5 The interactive diagram is used to further illustrate the service blocking process of S401 and S402, such as Figure 5 As shown, Figure 5 This is an interactive diagram illustrating a service blocking process provided in one embodiment of this disclosure. It includes:

[0142] S501, The configuration information management device sends a blocking message to the message middleware.

[0143] The prerequisite for the configuration information management device to trigger the sending of a blocking message is that the configuration database needs to update its configuration information. This configuration information includes database connection information and distributed data routing information.

[0144] S502, the message middleware forwards and blocks messages from reaching at least one business server.

[0145] The message middleware can be deployed on other servers and may include a command queue and a receipt queue. The command queue stores messages sent by the configuration information management device, while the receipt queue stores receipt messages sent by the business server.

[0146] S503, the service server receives the blocking message.

[0147] Specifically, the command listener of the business server receives the blocking message, parses it, and first determines the scope of its impact—whether it includes the business server. Then, based on the scope of impact, it updates the blocking request flag for the corresponding routing key. The scope of impact can be all business servers or only a subset of them.

[0148] If the scope of the blocking message includes the service server, then execute S504 and update the blocking identifier. This blocking identifier records the time of each blocking message and the corresponding service route. If the scope of the blocking message does not include the service server, then the blocking message does not need to be processed. Optionally, when no blocking message needs to be processed, the service server can also send an acknowledgment message indicating that the blocking message was ignored to the acknowledgment queue of the message middleware.

[0149] S505, The business server rejects new data service requests corresponding to the data route.

[0150] S506. The business server determines whether the processing of the initiated business request has been completed.

[0151] If not, continue waiting; if yes, execute S507.

[0152] S507, The business server disconnected from the database.

[0153] S508, Business server updates data source cache.

[0154] The data source includes database connection information and distributed data routing information from the configuration information.

[0155] S509. The business server sends a blocking completion receipt message to the message middleware.

[0156] S510, the message middleware forwards the blocking completion receipt message to the configuration information management device.

[0157] The receipt message includes the blocking completion receipt message.

[0158] The configuration information management device will also parse the blocking completion receipt message.

[0159] S511, The configuration information management device receives the blocking completion receipt message.

[0160] The configuration information management device parses the blocking completion receipt message to obtain the blocking result of the corresponding business server.

[0161] S512, Configure information management equipment to record the results of blocking business servers.

[0162] S513, Configure the information management device to determine whether the business server has been successfully blocked.

[0163] If the business server fails to block or fails to send a blocking completion confirmation message within the timeout period, proceed to step S514. If the business server successfully blocks, proceed to step S516.

[0164] S514. The configuration information management device sends a blocking message to the message middleware.

[0165] This blocking message is sent to the business server that failed to block or timed out without sending a blocking completion confirmation message, and is used to block data access requests for the corresponding route.

[0166] S515, Message middleware forwarding blocks messages from reaching the business server.

[0167] Correspondingly, the service server that receives the blocking message executes the steps S503 to S509 described above.

[0168] S516. Determine whether the blocking of all relevant business servers has been completed.

[0169] Once all relevant business servers have been blocked, the configuration information management device will confirm that the business server blocking is complete and proceed with subsequent operations.

[0170] S403. After confirming that the blocking is completed, the configuration information management device updates the configuration information in the configuration database and sends the configuration information update message to the service server.

[0171] S404. After receiving the configuration information update message, the command listener of the business server saves the updated configuration information from the configuration database to the local cache.

[0172] Specifically, it can be done through Figure 6 The interactive diagram further illustrates the configuration information update process of S403 and S404, such as... Figure 6 As shown, Figure 6 This is an interactive diagram illustrating the configuration information update process provided in one embodiment of this disclosure. It includes:

[0173] S601, The configuration information management device sends a configuration information update message to the message middleware.

[0174] Once the configuration information management device determines that the business server blocking is complete and updates the configuration information in the configuration database, it will trigger an event to send a configuration information update message.

[0175] The configuration information update message can contain data source update commands and route update commands. These two commands can be sent together or separately. For example, the data source update command indicates an update to the database connection information; the route update command indicates an update to the distributed data routing information.

[0176] Database connection information changes when a configuration database is split. For example, when a configuration database is split into two or more, each database will carry its own database connection information, i.e., its IP address. Similarly, distributed data routing information (path information) corresponding to other business servers will be generated. If the configuration database is merged, no new database connection information will be generated; only the distributed data routing information will change. Furthermore, if a primary / standby switchover operation occurs in the configuration database, only the database connection information will change. Therefore, the IP addresses of the primary and standby configuration databases will be different, but the distributed data routing information, i.e., the path information between the business servers and the configuration database, will remain unchanged.

[0177] S602, The message middleware forwards the configuration information to update the message to the business server.

[0178] S603, the business server receives configuration information update messages.

[0179] Specifically, the command listener of the business server receives configuration information update messages. After parsing the message, it first determines the scope of the impact of the update message, specifically whether it includes the business server. The scope of impact can be all business servers or only a subset of them.

[0180] If the scope of the configuration information update message includes the service server, then execute S604. If the scope of the configuration information update message does not include the service server, then the configuration information update message does not need to be processed. Optionally, when the configuration information update message does not need to be processed, the service server can also send an acknowledgment message indicating that the configuration information update message is ignored to the acknowledgment queue of the message middleware.

[0181] S604. The business server reloads the updated database connection information from the configuration database, creates a new database connection pool, and updates the local data source cache.

[0182] By updating the local data source cache, database connection information can be quickly retrieved from the local machine, thus speeding up the business processing rate of the business server.

[0183] Meanwhile, the database connection information and the distributed data routing information are independent of each other, meaning that both can be changed, or only one of them can be changed. The embodiments disclosed herein are illustrated using the example of both being changed.

[0184] S605, the business server determines whether the distributed data routing information has been updated.

[0185] If an update is required, execute S606 to update the local data routing table cache; otherwise, execute S607. After the data source switch is complete, send an acknowledgment message.

[0186] S607. The business server sends an update completion receipt message to the message middleware.

[0187] The receipt message includes an update completion receipt message.

[0188] S608, the message middleware forwards the update completion receipt message to the configuration information management device.

[0189] S609. The configuration information management device receives an update completion receipt message.

[0190] The configuration information management device parses the update completion receipt message to obtain the update result of the corresponding business server.

[0191] S610, the configuration information management device records the update results of the business server.

[0192] S611, the configuration information management device determines whether the business server has been successfully updated.

[0193] If the business server update fails or times out without sending an update completion receipt message, proceed to step S612. If the business server update succeeds, proceed to step S614.

[0194] S612, The configuration information management device sends a configuration information update message to the message middleware.

[0195] This configuration information update message is sent to the business server that failed to update or timed out without sending an update completion receipt message, and is used to indicate that configuration information should be updated based on the configuration database.

[0196] S613, The message middleware forwards the configuration information to update the message to the business server.

[0197] Correspondingly, the service server that receives the configuration information update message executes the steps S603 to S607 described above.

[0198] S614. Determine whether all relevant business servers have been updated.

[0199] Once all relevant business servers have been updated, the configuration information management device will confirm that the business server update is complete and proceed with subsequent operations.

[0200] S405. The configuration information management device responds to the service server by updating the configuration information and sends an unblocking message to the service server.

[0201] S406. After receiving the unblocking message, the command listener of the business server resumes the processing of business requests.

[0202] Similarly, through Figure 7 The interactive diagram further illustrates the deblocking process from S405 to S406, such as... Figure 7 As shown, Figure 7 This is an interactive diagram illustrating the unblocking process according to an embodiment of this disclosure. It includes:

[0203] S701, The configuration information management device sends an unblocking message to the message middleware.

[0204] The prerequisite for the configuration information management device to trigger the sending of the unblocking message is that the configuration information management device determines that the business server has completed the update of the configuration information.

[0205] S702, the message middleware forwards the unblocking message to the business server.

[0206] S703, the service server receives the unblocking message.

[0207] Specifically, when the command listener of the business server receives the unblocking message, it parses the message and first determines whether the scope of the unblocking message includes the business server. Then, based on the scope of the impact, it updates the blocking request flag for the corresponding routing key. The scope of the impact can be all business servers or only a subset of them.

[0208] If the scope of the unblocking message includes the service server, then execute S704 to update the blocking identifier. This blocking identifier records the time of each blocking message and the corresponding service route. If the scope of the unblocking message does not include the service server, then the unblocking message does not need to be processed. Optionally, when the unblocking message does not need to be processed, the service server can also send an acknowledgment message indicating that the unblocking message was ignored to the acknowledgment queue of the message middleware.

[0209] S705, the business server sends a confirmation message to the message middleware to unblock the message.

[0210] The receipt message includes the unblocking receipt message.

[0211] S706, The message middleware forwards the unblocking receipt message to the configuration information management device.

[0212] S707, the configuration information management device receives the unblocking receipt message.

[0213] The configuration information management device parses the unblocking receipt message to obtain the unblocking result of the corresponding business server.

[0214] S708, Configure information management device to record the result of unblocking the business server.

[0215] S709. Configure the information management device to determine whether the blocking of the business server has been successfully lifted.

[0216] If the service server fails to unblock or fails to send an unblocking receipt message within the timeout period, proceed to step S710. If the service server successfully unblocks, proceed to step S712.

[0217] S710, the configuration information management device sends an unblocking message to the message middleware.

[0218] The unblocking message is sent to the service server that failed to unblock or did not send an unblocking receipt message within the timeout period, and is used to unblock the data access request to the corresponding route.

[0219] S711, the message middleware forwards the unblocking message to the business server.

[0220] Correspondingly, the service server that receives the unblocking message executes the steps S703 to S706 described above.

[0221] S712. Determine whether the blocking of all relevant business servers has been lifted.

[0222] Once all relevant business servers have been unblocked, the configuration information management device will confirm that the business server unblocking is complete and proceed with subsequent operations.

[0223] Figures 4 to 7 In the embodiments described, the following beneficial effects are achieved:

[0224] Real-time configuration information updates are achieved using a configuration information management device. A message middleware is used to decouple the configuration information management device from the business server.

[0225] A compensation mechanism is implemented based on the receipt message. By resending the directed message, the fault tolerance rate can be improved, ensuring that the business server completes the execution of the messages sent by the configuration information management device.

[0226] Based on the registry center, configuration information management devices can grasp the configuration information that needs to be updated and its corresponding business servers, making them suitable for large-scale microservice clusters, distributed applications, and distributed databases. In addition, configuration information management devices can also visualize task execution progress.

[0227] It should be understood that in this disclosure, Figures 2 to 7 The embodiments described herein can be combined with each other arbitrarily or used independently, and all belong to the configuration information update method disclosed herein. No limitation is placed on their combination form.

[0228] Next, we can... Figure 8 The structure of the configuration information update system disclosed herein will be described as follows: Figure 8 As shown, the configuration information update system 800 includes: a configuration information management device and a business server, wherein:

[0229] Configuration information management device 801 is used to execute the aforementioned configuration information update method on the configuration information management device side; business server 802 is used to execute the aforementioned configuration information update method on the business server side.

[0230] In addition, the configuration information update system 800 may also include: a registration center 803, a configuration database 804, and a message middleware 805, and a command listener 806 is also mounted on the business server 802.

[0231] The following section uses specific computer programs to illustrate each step of the configuration information update process.

[0232] The computer program that blocks messages is shown below:

[0233]

[0234] The blocking message includes the request ID "reqId", command type "cmd", route key "routekeys", database type "dbType", database group "dbGroup", and request time "reqTime". Specifically, in the above program, the command type is a blocking request, and the request time is 20210715203010.

[0235] The computer program for receiving a confirmation message for a blocked message is as follows:

[0236]

[0237] The receipt message for the blocking message includes the request ID, command type, service name "respAppName", service identifier "respAppId" (including IP address and port), processing result "dealResult", and response time "respTime".

[0238] In the above procedure, the IP address is 10.161.1.2, and the port is 8080. The processing result can be categorized as success, failure, or ignore. For example, for business servers unaffected by updates to the configuration database information, the processing result is ignored.

[0239] The computer program for targeted message blocking is shown below:

[0240]

[0241] The targeted blocking message includes the request ID, command type, routing key, database type, database group, receiving end business server name (recvAppName), receiving end business server identifier (recvAppId) (including IP address and port), and request time.

[0242] In the above procedure, the name of the receiving end service server is usersrv.

[0243] The computer program that sends configuration information update messages can be as follows:

[0244]

[0245] Similarly, it includes the request ID "reqId", command type "cmd", route key "routekeys", database ID "dbKey", database type "dbType", database group "dbGroup", and request time "reqTime".

[0246] The computer program that handles message cancellation is shown below:

[0247]

[0248] The unblocking command message includes the request ID, command type, routing key, database type, database group, and request time.

[0249] After introducing the configuration information update method and configuration information update system of this disclosure, the configuration information update device proposed in this disclosure will be introduced from the perspectives of the configuration information management device and the business server.

[0250] Figure 9 This disclosure describes a configuration information updating device applied to the configuration information management device side, including:

[0251] The first sending module 901 is used to send a blocking message to the business server in response to a change in the configuration information of the distributed database. The blocking message is used to block the data access request of the corresponding route. The configuration information includes database connection information and / or distributed data routing information.

[0252] The execution module 902 is used to perform a configuration information update operation in response to the blocking of the data access request in the business server. The configuration information update operation is used to write the changed configuration information into the configuration database.

[0253] The second sending module 903 is used to send a configuration information update message to the service server, the configuration information update message being used to instruct configuration information to be updated based on the configuration database;

[0254] The third sending module 904, in response to the service server completing the update of configuration information, sends an unblocking message to the service server, the unblocking message being used to restore the data access request for the corresponding route.

[0255] In one possible implementation, the configuration information management device and the business server communicate and interact through a message middleware.

[0256] In one possible implementation, a determining module (not shown in the figure) is further included, which is used to determine at least one of the following: whether the blocking of data access requests to the business server has been completed through the registration center; and whether the business server has completed the update of configuration information through the registration center.

[0257] In one possible implementation, the determining module is further configured to: receive an acknowledgment message sent by the service server; and determine, based on the acknowledgment message sent by the service server, whether the target item has been completed, the target item including: blocking the data access request, and / or updating the configuration information.

[0258] In one possible implementation, the number of service servers is at least one, and the determining module is specifically used to: determine the completed target item if all the receipt messages sent by at least one service server indicate completion; and determine the incomplete target item if there is a receipt message sent by the first service server indicating incompleteness. The at least one service server includes the first service server.

[0259] In one possible implementation, the determining module is further configured to: if no acknowledgment message is received from the second service server within a set time period after sending the target message, determine that the target item has not been completed, wherein at least one service server includes the second service server, and the target message includes a configuration information update message and / or a blocking message.

[0260] In one possible implementation, a fourth sending module (not shown in the figure) is further included, which is used to send a directed message to a target server in response to an incomplete target item. The target server includes a first business server and / or a second business server. The directed message is used to instruct the execution of the target item.

[0261] Figure 10 This disclosure describes a configuration information update device applied to the business server side, including:

[0262] The blocking module 1001 is used to block data access requests in response to receiving a blocking message from the configuration information management device. The blocking message is used to block data access requests for the corresponding route. The blocking message is issued by the configuration information management device in response to changes in the configuration information of the distributed database. The configuration information includes database connection information and / or distributed data routing information.

[0263] The update module 1002 is used to update the configuration information based on the configuration database in response to receiving a configuration information update message from the configuration information management device. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database, which contains the changed configuration information.

[0264] The release module 1003 is used to release the blocking of data access requests in response to receiving a release blocking message from the configuration information management device. The release blocking message is used to restore data access requests for the corresponding routes.

[0265] In one possible implementation, the configuration information management device and the business server communicate and interact through a message middleware.

[0266] In one possible implementation, a writing module (not shown in the figure) is also included, which is used to write information of the business server to the registry center. The information includes whether to block data access requests and / or whether to complete the update of configuration information.

[0267] In one possible implementation, a sending module (not shown in the figure) is also included, which is used to send a receipt message to the configuration information management device. The receipt message is used to indicate whether the target item has been completed. The target item includes: blocking the data access request, and / or updating the configuration information.

[0268] In one possible implementation, a receiving module (not shown in the figure) is further included, which is used to receive a directed message from the configuration information management device if the receipt message indicates that the target item has not been completed. The directed message is used to instruct the execution of the target item.

[0269] In one possible implementation, a determining module (not shown in the figure) is further included, which performs at least one of the following: before blocking a data access request, determining, based on a blocking message, that the change in configuration information affects the business server; before blocking a data access request, determining that the received data access requests have been processed; and after blocking a data access request, disconnecting the connection with the database.

[0270] The apparatus provided in this disclosure can be used to execute the methods of the embodiments described above, and its implementation principle and technical effects are similar, so they will not be repeated here.

[0271] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, a processing module can be a separate processing element, or it can be integrated into a chip within the above device. Alternatively, it can be stored as program code in the device's memory, and its functions can be called and executed by a processing element. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element mentioned here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0272] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together to implement a system-on-a-chip (SOC).

[0273] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0274] Figure 11 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present disclosure. Exemplarily, the electronic device may be provided as a server. (Refer to...) Figure 11The electronic device 1100 includes a processing component 1101, which further includes one or more processors, and memory resources represented by memory 1102 for storing instructions, such as application programs, that can be executed by the processing component 1101. The application programs stored in memory 1102 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1101 is configured to execute instructions to perform any of the method embodiments described above.

[0275] Electronic device 1100 may also include a power supply component 1103 configured to perform power management of electronic device 1100, a wired or wireless network interface 1104 configured to connect electronic device 1100 to a network, and an input / output (I / O) interface 1105. Electronic device 1100 may operate on an operating system stored in memory 1102, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0276] This disclosure also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described configuration information update method.

[0277] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the configuration information update method described above.

[0278] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0279] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Alternatively, the readable storage medium can be an integral part of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in a configuration information updating device.

[0280] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0281] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and not to limit it; although this disclosure has been described in detail with reference to the foregoing embodiments,

[0282] Those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method for updating configuration information, characterized in that, The configuration information update method, applied to a configuration information management device, includes: In response to a change in the configuration information of the distributed database, a blocking message is sent to the business server. The blocking message is used to block data access requests for the corresponding route. The configuration information includes database connection information and / or distributed data routing information. In response to the completion of blocking the data access request in the business server, a configuration information update operation is performed. The configuration information update operation is used to write the changed configuration information into the configuration database that maintains the database connection and the basic configuration information of the distributed data routing. Send a configuration information update message to the service server. The configuration information update message is used to instruct the service server to load the changed configuration information from the configuration database and update the local configuration information. In response to the service server completing the loading of the updated configuration information from the configuration database, an unblocking message is sent to the service server. The unblocking message is used to restore the data access request for the corresponding route.

2. The configuration information update method according to claim 1, characterized in that, The configuration information management device and the business server communicate and interact through a message middleware.

3. The configuration information update method according to claim 1 or 2, characterized in that, The registry center contains information about the business servers of applications that have been started, and also includes at least one of the following: The registration center determines whether to block data access requests to the business server. The registration center determines whether the business server has completed the configuration information update.

4. The configuration information update method according to claim 1 or 2, characterized in that, Also includes: Receive the receipt message sent by the service server; Based on the receipt message sent by the business server, it is determined whether the target item has been completed. The target item includes: blocking data access requests and / or updating configuration information.

5. The configuration information update method according to claim 4, characterized in that, The number of service servers is at least one, and the step of determining whether the target item has been completed based on the receipt message sent by the service server includes: If the receipt messages sent by at least one of the service servers all indicate completion, then the target item is determined to be completed. If a receipt message sent by the first service server indicates that the task has not been completed, then the target item is determined to be incomplete, and the at least one service server includes the first service server.

6. The configuration information update method according to claim 5, characterized in that, Also includes: If no acknowledgment message is received from the second service server within a set time period after sending the target message, it is determined that the target item has not been completed. The at least one service server includes the second service server, and the target message includes a configuration information update message and / or the blocking message.

7. The configuration information update method according to claim 6, characterized in that, Also includes: In response to the failure to complete the target item, a directed message is sent to the target server, which includes the first business server and / or the second business server, and the directed message is used to instruct the execution of the target item.

8. A method for updating configuration information, characterized in that, Applied to business servers, the configuration information update method includes: In response to receiving a blocking message from the configuration information management device, the data access request is blocked. The blocking message is used to block the data access request for the corresponding route. The blocking message is issued by the configuration information management device in response to a change in the configuration information of the distributed database. The configuration information includes database connection information and / or distributed data routing information. In response to receiving a configuration information update message from the configuration information management device, the modified configuration information is loaded from the configuration database that maintains database connections and distributed data routing basic configuration information, and the local configuration information is updated. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database, which contains the modified configuration information. In response to receiving an unblocking message from the configuration information management device, the blocking of the data access request is lifted, and the unblocking message is used to restore the data access request for the corresponding route.

9. The configuration information update method according to claim 8, characterized in that, The configuration information management device and the business server communicate and interact through a message middleware.

10. The configuration information update method according to claim 8 or 9, characterized in that, Also includes: The information of the business server is written into the registration center, including whether to block data access requests and / or whether to complete the update of configuration information.

11. The configuration information update method according to claim 8 or 9, characterized in that, Also includes: Send an acknowledgment message to the configuration information management device. The acknowledgment message is used to indicate whether the target item has been completed. The target item includes: blocking data access requests and / or updating configuration information.

12. The configuration information update method according to claim 11, characterized in that, Also includes: If the receipt message indicates that the target item has not been completed, a directed message is received from the configuration information management device, the directed message being used to instruct the execution of the target item.

13. The configuration information update method according to claim 8 or 9, characterized in that, It also includes at least one of the following: Before blocking the data access request, it is determined, based on the blocking message, that the change in the configuration information affects the business server; Before blocking a data access request, ensure that all received data access requests have been processed. After blocking data access requests, disconnect from the database.

14. A configuration information update system, comprising: Configure information management equipment and business servers, including: The configuration information management device is used to execute the configuration information update method according to any one of claims 1 to 7; The business server is used to execute the configuration information update method according to any one of claims 8 to 13.

15. A configuration information updating device, applied to a configuration information management device, comprising: The first sending module is used to send a blocking message to the business server in response to a change in the configuration information of the distributed database. The blocking message is used to block the data access request of the corresponding route. The configuration information includes database connection information and / or distributed data routing information. The execution module is used to perform a configuration information update operation in response to the blocking of data access requests in the business server. The configuration information update operation is used to write the changed configuration information into the configuration database that maintains the database connection and the basic configuration information of the distributed data routing. The second sending module is used to send a configuration information update message to the service server. The configuration information update message is used to instruct the service server to load the changed configuration information from the configuration database and update the local configuration information. The third sending module, in response to the service server completing the loading of the updated configuration information from the configuration database, sends an unblocking message to the service server. The unblocking message is used to restore the data access request for the corresponding route.

16. A configuration information updating device, applied to a business server, comprising: The blocking module is used to block data access requests in response to receiving a blocking message from the configuration information management device. The blocking message is used to block data access requests for the corresponding route. The blocking message is issued by the configuration information management device in response to changes in the configuration information of the distributed database. The configuration information includes database connection information and / or distributed data routing information. The update module is used to respond to receiving a configuration information update message from the configuration information management device, load the changed configuration information from the configuration database that maintains database connections and distributed data routing basic configuration information, and update the local configuration information. The configuration information update message is used to indicate that the configuration information is updated based on the configuration database, which contains the changed configuration information. The release module is used to release the blockage on the data access request in response to receiving a release message from the configuration information management device. The release message is used to restore the data access request for the corresponding route.

17. An electronic device comprising: Memory and processor; wherein: The memory is used to store program instructions; The processor is used to invoke program instructions in the memory to execute the configuration information update method according to any one of claims 1 to 13.

18. A computer-readable storage medium storing computer program instructions, which, when executed, implement the configuration information update method according to any one of claims 1 to 13.

19. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, is used to implement the method of any one of claims 1 to 13.

Citation Information

Patent Citations

  • Database synchronization method and device

    CN104809199A

  • Database synchronization method and device

    CN104809201A