A multi-system parameter synchronization method and device

Through the mechanism of obtaining and writing to the cache server on the parameter maintenance server, the problems of poor timeliness and unbalanced change speed in the existing technology are solved, real-time and balanced synchronization of multi-system parameters is realized, and the normality of downstream systems is ensured. Business processing.

CN114020819BActive Publication Date: 2025-01-17CHINA UNIONPAY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111248198.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-01-17
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

When the prior art synchronizes the parameters of multiple downstream systems, the timeliness is poor, which affects the business processing of upstream systems. When the number of upstream system parameters changes is large, it is difficult to balance the parameter change speed of upstream and downstream systems, and increase the business of downstream systems. pressure.

Method used

By obtaining the operation information of each parameter change on the parameter maintenance server and writing it to the cache server, pulling and issuing parameter change information from the cache server based on the subscription mechanism to ensure that the change speed of the parameter synchronization server and the application server is balanced, and synchronization tasks and The mechanism for parameter change queues to achieve real-time issuance and accurate synchronization.

Benefits of technology

On the premise of ensuring the normal business processing and data consistency of upstream systems, real-time distribution of parameters is achieved, balanced the parameter change speed of upstream and downstream systems, and improves the quality and reliability of downstream systems' business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020819B_ABST
    Figure CN114020819B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a multi-system parameter synchronization method and device, including: obtaining each parameter change operation information from a parameter maintenance server and writing it into a cache server, wherein the parameter change operation information includes synchronization tasks and parameter change information; the synchronization task is used to indicate each parameter in the same synchronization batch; the parameter change information is the parameter information of the parameter to be changed; based on the subscription mechanism to the cache server, each parameter change operation information is pulled from the cache server; for any synchronization task in each parameter change operation information, if the parameter change information of each parameter indicated by the synchronization task has been pulled, the parameter change information of each parameter indicated by the synchronization task is sent to each parameter application server. The above method can realize the real-time sending of parameters under the premise of ensuring the normal business processing and data consistency of the upstream system, and balance the parameter change speed of the upstream system and the downstream system, so as to ensure the normal business processing of the downstream system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a multi-system parameter synchronization method and device. Background Art

[0002] With the rapid development of computer technology, more and more application systems are developed to meet more application needs and scenarios. Correspondingly, while providing convenient services to people, large enterprises are also facing difficulties in parameter maintenance and management of application systems due to the increase in the number of application systems.

[0003] As in the prior art, ETL software is generally used to synchronize the parameters of the upstream system with multiple downstream systems at the end of each day, so as to achieve centralized management and unified distribution of parameters. However, the ETL synchronization solution requires regular distribution operations, which has poor timeliness. Moreover, when extracting data from the upstream system, in order to ensure data consistency, it is often necessary to suspend the parameter writing operation of the upstream system, affecting the business processing of the upstream system. In addition, when the number of parameter changes in the upstream system is large, the ETL software cannot well balance the parameter change speed of the upstream and downstream systems, increasing the pressure of parameter changes in the downstream system and affecting the business processing of the downstream system.

[0004] Therefore, there is an urgent need for a multi-system parameter synchronization method and device that can achieve real-time parameter distribution while ensuring normal business processing and data consistency of the upstream system, and balance the parameter change speed of the upstream and downstream systems to ensure normal business processing of the downstream system. Summary of the invention

[0005] The embodiment of the present invention provides a multi-system parameter synchronization method and device, which can realize real-time parameter issuance and balance the parameter change speed of the upstream system and the downstream system under the premise of ensuring normal business processing and data consistency of the upstream system, so as to ensure normal business processing of the downstream system.

[0006] In a first aspect, an embodiment of the present invention provides a multi-system parameter synchronization method, the method comprising:

[0007] Obtaining each parameter change operation information from the parameter maintenance server and writing it into the cache server, wherein the parameter change operation information includes a synchronization task and parameter change information; the synchronization task is used to indicate each parameter in the same synchronization batch; the parameter change information is parameter information of the parameter to be changed;

[0008] Based on a subscription mechanism to the cache server, pull each parameter change operation information from the cache server;

[0009] For any synchronization task in each parameter change operation information, if the parameter change information of each parameter indicated by the synchronization task has been pulled, the parameter change information of each parameter indicated by the synchronization task is sent to each parameter application server.

[0010] In the above method, the parameter synchronization server writes the parameter change operation information to the cache server. In this way, the parameter change speed of the parameter synchronization server and the parameter change speed of the parameter application system server can be balanced to prevent the parameter change speed of the parameter synchronization server from being greater than the parameter change speed of the parameter application system server, which causes the parameter application system server to consume a large amount of resources to complete the parameter change and affect business processing. And compared to the timed issuance of parameter change information in the prior art, the present application can issue parameter change information in real time to ensure the quality of business processing on the parameter application system server. In addition, it can also be determined that the parameter change operation information is issued only after the parameter change information to be changed in the parameter change operation information has been obtained, so as to ensure the accurate change of the parameters on the parameter application system server.

[0011] Optionally, writing to the cache server includes: for any parameter change operation information, writing the synchronization task in the parameter change operation information into a synchronization task queue of the cache server, and writing the parameter change information in the parameter change operation information into a parameter change queue of the cache server;

[0012] Based on the subscription mechanism of the cache server, each parameter change operation information is pulled from the cache server, including:

[0013] Based on the subscription mechanism of the cache server, each synchronization task and each parameter change information are pulled from the synchronization task queue and the parameter change queue of the cache server respectively, and persisted to the local database.

[0014] In the above method, the parameter synchronization server obtains the synchronization task and the change parameter information corresponding to the synchronization task from the parameter maintenance server, writes the synchronization task and the change parameter information into the synchronization task queue and the parameter change queue of the cache server respectively, and persists the synchronization task and the parameter change information from the synchronization task queue and the parameter change queue to the local database respectively. In this way, the parameter synchronization server obtains the synchronization task and the change parameter information from the parameter maintenance server and puts them into the synchronization task queue and the parameter change queue respectively. When the parameter synchronization server obtains the synchronization task and the parameter change information from the queue, it does not need to distinguish the structure of the synchronization task and the parameter change information, but directly obtains the synchronization task and the parameter change information from the corresponding queue, thereby speeding up the delivery of the synchronization task and the parameter change information.

[0015] Optionally, the parameter change information of each parameter indicated by the synchronization task that has been pulled is determined in the following manner, including:

[0016] For any synchronization task in the local database, parameter change information of each parameter indicated by the synchronization task is found from the local database.

[0017] In the above method, when it is determined that each parameter description information in the synchronization task has a corresponding changed parameter in the parameter change information, it is determined that the parameter change information of each parameter indicated by the synchronization task has been pulled, and the synchronization task and parameter change information are sent down to prevent parameter change errors on the parameter application system server side and ensure the quality of business processing.

[0018] Optionally, it also includes: if there is parameter change information of the parameter indicated by the synchronization task that is not found in the local database, the synchronization task is stored in a circular waiting queue; the circular waiting queue is polled periodically through a monitoring process; after the parameter change information of each parameter indicated by the synchronization task is found, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are sent to each parameter application server, and the synchronization task is deleted from the circular waiting queue.

[0019] In the above method, if there is parameter change information of the parameters indicated by the synchronization task that is not found in the local database, it is determined that the change parameter information corresponding to the synchronization task is incomplete, and it is necessary to wait for the parameter change information that is not found to be pulled from the parameter maintenance server. The incomplete parameter change operation information is placed in a circular waiting queue, and when the change parameters of the synchronization task in the circular waiting queue subscribed to from the cache server are complete, it is sent down to ensure the timeliness and completeness of the parameter sending.

[0020] Optionally, after sending parameter change information of each parameter indicated by the synchronization task to each parameter application server, the method further includes:

[0021] For any parameter application server, the synchronization task and parameter change information of each parameter indicated by the synchronization task are determined by the notification engine and sent to the parameter application server, thereby achieving synchronization of each parameter application server.

[0022] In the above method, the parameter change information of each parameter indicated by the synchronization task is determined by the notification engine and sent to the parameter application server, thereby ensuring the synchronization and reliability of the parameter change of the server of the parameter application system.

[0023] Optionally, obtaining each parameter change operation information from the parameter maintenance server includes: accessing a log file of the parameter maintenance server, obtaining each operation instruction for setting a database table from the log file, and parsing each operation instruction to obtain each parameter change operation information.

[0024] In the above method, by splitting the user operation instruction into the synchronization task and the task change parameter, the parameter synchronization server does not need to identify the synchronization task structure and the task change parameter structure to identify the task and the parameter, thereby speeding up the processing.

[0025] Optionally, it also includes: receiving a parameter query request sent by a parameter application server; acquiring corresponding parameter change information from a local database according to the parameter query request, and sending the information to the parameter application server.

[0026] In the above method, if the parameter application server does not need to store parameter change information, the parameter synchronization server can also provide parameter change information query service to improve the availability of parameter changes.

[0027] In a second aspect, an embodiment of the present invention provides a multi-system parameter synchronization device, the device comprising:

[0028] An acquisition module is used to acquire each parameter change operation information from the parameter maintenance server and write it into the cache server through the processing module, wherein the parameter change operation information includes a synchronization task and parameter change information; the synchronization task is used to indicate each parameter in the same synchronization batch; the parameter change information is the parameter information of the parameter to be changed;

[0029] The acquisition module is used to pull each parameter change operation information from the cache server based on a subscription mechanism to the cache server;

[0030] The processing module is used for sending the parameter change information of each parameter indicated by the synchronization task to each parameter application server for any synchronization task in each parameter change operation information if the parameter change information of each parameter indicated by the synchronization task has been pulled.

[0031] In a third aspect, an embodiment of the present application further provides a computing device, comprising: a memory for storing programs; a processor for calling the programs stored in the memory, and executing the methods described in the various possible designs of the first aspect according to the obtained programs.

[0032] In a fourth aspect, an embodiment of the present application further provides a computer-readable non-volatile storage medium, comprising a computer-readable program. When a computer reads and executes the computer-readable program, the computer executes the method described in the various possible designs of the first aspect.

[0033] These implementations or other implementations of the present application will be more concise and understandable in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0035] Figure 1 A schematic diagram of a multi-system parameter synchronization architecture provided by an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the architecture of a multi-system parameter synchronization system provided by an embodiment of the present invention;

[0037] Figure 3 A schematic diagram of a multi-system parameter synchronization method provided by an embodiment of the present invention;

[0038] Figure 4 A schematic diagram of a multi-system parameter synchronization method provided by an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of a multi-system parameter synchronization device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] Figure 1A schematic diagram of the architecture of multi-system parameter synchronization provided by an embodiment of the present invention, wherein the parameter maintenance server 101 is used to record the user's parameter change operation into a database. The parameter synchronization server 102 accesses the database binlog file of the parameter maintenance server 101, obtains each operation instruction for a characteristic database table by parsing the binlog file, and parses each operation instruction to obtain each parameter change operation information. Each parameter change operation information includes a synchronization task and parameter change information corresponding to the synchronization task. The synchronization task may include one or more description information of parameters to be changed that need to be changed at the same time. Accordingly, each description information of the parameter to be changed corresponds to a parameter change information. The parameter synchronization server 102 writes the synchronization task in the parameter change operation information into the synchronization task queue of the cache server 104, and writes the parameter change information in the parameter change operation information into the parameter change queue of the cache server 104. Based on the subscription mechanism of the cache server 104, the parameter synchronization server 102 pulls each synchronization task and each parameter change information from the synchronization task queue and parameter change queue of the cache server 104, and persists them to the local database. The parameter synchronization server 102 searches for parameter change information of each parameter indicated by the synchronization task in the local database for any synchronization task in the local database. If the parameter change information of each parameter indicated by the synchronization task is found in the local database, the synchronization task and the parameter change information indicated by the synchronization task are sent to the parameter application server 103. If the parameter change information of the parameter indicated by the synchronization task is not found in the local database, the synchronization task is stored in a circular waiting queue, and the circular waiting queue is polled regularly through the monitoring process; after the parameter change information of each parameter indicated by the synchronization task is found, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are sent to each parameter application server 103, and the synchronization task is deleted from the circular waiting queue. The parameter synchronization server 102 can also confirm whether the parameter application server 103 has received the corresponding synchronization task and parameter change information sent. If not, the corresponding synchronization task and parameter change information are resent. In addition, in a possible case, if the parameter application server 103 does not store the parameter change information, the parameter synchronization server 102, after receiving the parameter query request sent by the parameter application server 103, obtains the corresponding parameter change information from the local database according to the parameter query request, and sends it to the parameter application server 103. Among them, the parameter maintenance server 101, the parameter synchronization server 102 and the parameter application server 103 can exist in the parameter maintenance server cluster, the parameter synchronization server cluster and the parameter application server cluster respectively. In this way, the parameter change information is sent in real time to ensure the service processing quality of the parameter application server.It is also possible to send parameter change operation information only when it is determined that the parameter change operation information is complete, thereby ensuring accurate changes to the parameters of the parameter application server.

[0042] Based on the above system architecture, an embodiment of the present invention provides a schematic diagram of the architecture of a multi-system parameter synchronization system, such as Figure 2 As shown, it includes: the parameter extraction module 201 is used to access the database binlog file of the parameter maintenance server 101, obtain each operation instruction for setting the database table by parsing the binlog file, and parse each operation instruction to obtain the synchronization task and the parameter change information corresponding to the synchronization task. The parameter extraction module 201 writes the synchronization task into the synchronization task queue of the cache server 104, and writes the parameter change information in the parameter change operation information into the parameter change queue of the cache server 104. The parameter consumption module 202 pulls the synchronization task and the parameter change information from the synchronization task queue and the parameter change queue of the cache server 104 respectively based on the subscription mechanism of the cache server 104, and persists them to the local database. For any synchronization task in the local database, the parameter change information of each parameter indicated by the synchronization task is searched from the local database. If the parameter change information of each parameter indicated by the synchronization task is found from the local database, the synchronization task and the parameter change information indicated by the synchronization task are sent to the parameter application server 103 through the parameter synchronization module 203. If the parameter change information of the parameter indicated by the synchronization task is not found in the local database, the parameter consumption module 202 stores the synchronization task in a circular waiting queue, and periodically polls the circular waiting queue through the monitoring process; after the parameter change information of each parameter indicated by the synchronization task is found, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are sent to each parameter application server 103 through the parameter synchronization module 203, and the synchronization task is deleted from the circular waiting queue. In addition, the parameter synchronization module 203 may also include a notification engine. If the synchronization task and the changed parameters of the synchronization task fail to be sent to the parameter application server 103 according to the pre-configured synchronization rules, the notification engine can resend the corresponding synchronization task and parameter change information to the parameter application server 103 that failed to send.

[0043] Based on the above architecture, the present application embodiment provides a process of a multi-system parameter synchronization method, such as Figure 3 As shown, including:

[0044] Step 301: Obtain parameter change operation information from the parameter maintenance server and write it into the cache server, wherein the parameter change operation information includes synchronization tasks and parameter change information; the synchronization tasks are used to indicate parameters in the same synchronization batch; the parameter change information is parameter information of the parameters to be changed;

[0045] Step 302: based on the subscription mechanism of the cache server, pull each parameter change operation information from the cache server;

[0046] Step 303: For any synchronization task in each parameter change operation information, if the parameter change information of each parameter indicated by the synchronization task has been pulled, the parameter change information of each parameter indicated by the synchronization task is sent to each parameter application server.

[0047] In the above method, the parameter synchronization server writes the parameter change operation information to the cache server. In this way, the parameter change speed of the parameter synchronization server and the parameter change speed of the parameter application system server can be balanced to prevent the parameter change speed of the parameter synchronization server from being greater than the parameter change speed of the parameter application system server, which causes the parameter application system server to consume a large amount of resources to complete the parameter change and affect business processing. And compared to the timed issuance of parameter change information in the prior art, the present application can issue parameter change information in real time to ensure the quality of business processing on the parameter application system server. In addition, it can also be determined that the parameter change operation information is issued only after the parameter change information to be changed in the parameter change operation information has been obtained, so as to ensure the accurate change of the parameters on the parameter application system server.

[0048] An embodiment of the present invention provides a method for persisting parameter change operation information, which is written into a cache server, including: for any parameter change operation information, writing the synchronization task in the parameter change operation information into the synchronization task queue of the cache server, and writing the parameter change information in the parameter change operation information into the parameter change queue of the cache server; based on a subscription mechanism for the cache server, pulling each parameter change operation information from the cache server, including: based on a subscription mechanism for the cache server, pulling each synchronization task and each parameter change information from the synchronization task queue and the parameter change queue of the cache server respectively, and persisting them to a local database.

[0049] Here, the user's parameter maintenance event (such as user operation instruction log information, etc.) is split into two parts: synchronization task and parameter change information of the synchronization task. In this way, by splitting the user's parameter maintenance event into two parts: synchronization task and parameter change information of the synchronization task, the transactionality of parameter change is realized. Compared with the prior art in which the parameter maintenance server system sends the relevant information of the changed parameters to the parameter application server system through the ETL software, the parameter maintenance server system and the parameter application server system need to agree on the information sending and receiving form, and the present invention reduces the coupling between the parameter maintenance server system and the parameter application server system. Among them, the synchronization task contains the description information of the parameters to be changed that need to be sent at the same time (multiple parameters to be changed that need to be changed by the parameter application server at the same time), and the description information of each parameter to be changed of the synchronization task has corresponding parameter change information. That is, the synchronization task needs to save the description information of all parameters involved in a batch of user operations. The synchronization task is written into the synchronization task queue of the cache server, and the parameter change information is written into the parameter change queue of the cache server. In this way, there is no need to identify the structure of the synchronization task and parameter change information to determine the synchronization task and parameter change information. It is only necessary to obtain the corresponding synchronization task or parameter change information from the corresponding synchronization task queue or parameter change queue, saving the steps of identifying the structure of the synchronization task and parameter change information and speeding up the processing speed. In addition, based on the subscription mechanism of the cache server, the parameter change speed of the parameter maintenance server and the parameter application server can be balanced. In one example, the parameter maintenance server can receive 5,000 parameter change operation instructions per minute, but the parameter application server can only make 50 parameter changes per minute. In order to prevent the resources in the parameter application server from being used for parameter changes and affecting business processing, a cache server is introduced so that the parameter synchronization server can issue synchronization tasks and corresponding parameter change information according to the parameter change capability of the parameter application server, without causing the accumulation of synchronization tasks and corresponding parameter change information in the parameter synchronization server. The synchronization task and the corresponding parameter change information are persisted to the local database. In this way, the parameter application server can be supported to check the parameter change information or roll back the parameter application system version of the parameter application server at any time.

[0050] An embodiment of the present invention provides a method for pulling parameter change information indicated by a synchronization task, and the parameter change information of each parameter indicated by the synchronization task that has been pulled is determined in the following manner, including: for any synchronization task in the local database, the parameter change information of each parameter indicated by the synchronization task is found from the local database. In other words, for the description information of each parameter to be changed in the synchronization task in the local database, the parameter change information corresponding to the description information of each parameter to be changed in the synchronization task can be found from the local database. In one example, the synchronization task contains description information of two parameters to be changed: the daily transaction amount cannot exceed [a (a is used to identify the parameter change information corresponding to the description information of the parameter to be changed)], and the transaction amount each time cannot exceed [b (b is used to identify the parameter change information corresponding to the description information of the parameter to be changed)]. The synchronization task corresponds to two parameter change information: a=100 million, b=1 million.

[0051] The embodiment of the present invention provides a method for pulling parameter change information indicated by a synchronization task, further comprising: if the parameter change information of the parameter indicated by the synchronization task is not found in the local database, the synchronization task is stored in a circular waiting queue; the circular waiting queue is periodically polled by a monitoring process; after the parameter change information of each parameter indicated by the synchronization task is found, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are sent to each parameter application server, and the synchronization task is deleted from the circular waiting queue. In this way, if there is a description information of the parameter to be changed in the synchronization task but there is no corresponding parameter change information, the description information of all the parameters to be changed in the synchronization task is waited in the circular waiting queue until there is corresponding parameter change information, and then the synchronization task and the corresponding parameter change information are sent, which effectively ensures the consistency of the synchronization transaction. In addition, the parameter maintenance server can also maintain the record of the synchronization task and the parameter change information sending information, so that the operation and maintenance personnel can perform the operation and maintenance of the business system and the synchronization system according to the record.

[0052] The embodiment of the present invention provides a method for confirming the issuance of synchronization tasks and corresponding parameter change information. After the parameter change information of each parameter indicated by the synchronization task is issued to each parameter application server, the method further includes: for any parameter application server, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are all issued to the parameter application server through a notification engine, thereby realizing the synchronization of each parameter application server. That is to say, by realizing the function of the notification engine, the parameter application server only needs to connect and develop the parameter receiving service according to the specification of the notification engine, so as to realize the sending of the synchronization task and the corresponding parameter change information through the notification engine, and the issuance confirmation of the synchronization task and the corresponding parameter change information. If the issuance of the synchronization task and the corresponding parameter change information fails, it can be re-issued through the notification engine. In addition, the parameter receiving service setting notification engine of the parameter application server business system can also be adapted to save the development cost of the parameter application server. In addition, the notification engine can also include a 'customized' push capability, that is, the synchronization task and parameter change information are issued to one or more parameter application servers set according to the configuration. Accordingly, the consistency of parameter change information in one-to-many scenarios can be achieved.

[0053] An embodiment of the present invention provides a method for obtaining parameter change operation information, which obtains each parameter change operation information from a parameter maintenance server, including: accessing the log file of the parameter maintenance server, obtaining each operation instruction for a setting database table from the log file, and parsing each operation instruction to obtain each parameter change operation information. In other words, a setting database table may exist in the log file of the parameter maintenance server to store the parameter change operation instructions and related information, and the parameter synchronization server obtains each operation instruction from the setting database table and parses to obtain each parameter change operation information. In this way, by directly accessing the setting database table, the entire process can be effectively made transparent to the parameter maintenance server, that is, the system in the parameter maintenance server does not need to be developed accordingly for the synchronization system in the parameter synchronization server, saving development costs.

[0054] An embodiment of the present invention provides a parameter change information query method, which also includes: receiving a parameter query request sent by a parameter application server; acquiring corresponding parameter change information from a local database according to the parameter query request, and sending it to the parameter application server. That is to say, in addition to the above-mentioned method of pushing synchronization tasks and parameter change information to the parameter application server to meet the parameter change requirements in the parameter application server, there is also a method of receiving a parameter query request from a parameter application server, sending the parameter change information corresponding to the parameter query request to the parameter application server, and meeting the parameter change requirements in the parameter application server. In this way, even if the parameter application server does not store the parameter change information, the parameter change can still be achieved through the parameter query service in the parameter maintenance server. It meets the requirements of various parameter change methods of the parameter application server.

[0055] Based on the above architecture and method flow, the present application embodiment provides a multi-system parameter synchronization method flow, such as Figure 4 As shown, including:

[0056] Step 401: The parameter synchronization server accesses the database binlog file of the parameter maintenance server through the parameter extraction module, and obtains various operation instructions for setting the database table by parsing the binlog file.

[0057] Step 402: The parameter synchronization server parses each operation instruction through a parameter extraction module to obtain a synchronization task and parameter change information corresponding to the synchronization task.

[0058] Step 403: The parameter synchronization server writes the synchronization task into the synchronization task queue of the cache server through the parameter extraction module, and writes the parameter change information in the parameter change operation information into the parameter change queue of the cache server.

[0059] Step 404: The parameter synchronization server pulls the synchronization task and the parameter change information from the synchronization task queue and the parameter change queue of the cache server respectively through the parameter consumption module based on the subscription mechanism of the cache server, and persists them to the local database.

[0060] Step 405: The parameter synchronization server searches the local database for parameter change information of each parameter indicated by the synchronization task through the parameter consumption module.

[0061] Step 406 , the parameter synchronization server determines whether the parameter change information of each parameter indicated by the synchronization task is obtained through the parameter consumption module. If so, step 409 is executed; otherwise, step 408 is executed.

[0062] Step 407: The parameter synchronization server stores the synchronization task into a circular waiting queue through the parameter consumption module, and periodically polls the circular waiting queue through the monitoring process.

[0063] Step 408: The parameter synchronization server sends the synchronization task and parameter change information of each parameter indicated by the synchronization task to each parameter application server through the parameter synchronization module.

[0064] Step 409, the parameter synchronization server determines through the parameter synchronization module whether the parameter application server has successfully received the synchronization task and the parameter change information of each parameter indicated by the synchronization task. If so, the process ends; if not, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are reissued.

[0065] Step 410: The parameter synchronization server receives a parameter query request from the parameter application server.

[0066] Step 411: The parameter synchronization server determines the corresponding parameter change information according to the parameter query request, or sends the parameter change information and the synchronization task of the parameter change information to the parameter application server.

[0067] Here, the information content sent can be sent according to the specific needs of the parameter application server, that is, the parameter change information in the local database can be obtained and sent according to the one or more parameter change information in the parameter query request, or the synchronization tasks of the one or more parameter change information in the parameter query request can be determined respectively, and the parameter change information of each parameter of the synchronization task can be further obtained, and the synchronization task and parameter change information can be sent. There is no restriction on the specific information content sent here.

[0068] It should be noted that the above method flow is not unique, for example, step 410 and step 411 may be executed or not executed, and step 409 may be executed or not executed.

[0069] Based on the same concept, an embodiment of the present invention provides a multi-system parameter synchronization device. Figure 5 A multi-system parameter synchronization device is provided in an embodiment of the present application, such as Figure 5 Including:

[0070] The acquisition module 501 is used to obtain each parameter change operation information from the parameter maintenance server and write it to the cache server through the processing module 502, wherein the parameter change operation information includes a synchronization task and parameter change information; the synchronization task is used to indicate each parameter in the same synchronization batch; the parameter change information is the parameter information of the parameter to be changed;

[0071] The acquisition module 501 is used to pull each parameter change operation information from the cache server based on a subscription mechanism to the cache server;

[0072] The processing module 502 is used for sending the parameter change information of each parameter indicated by the synchronization task to each parameter application server if the parameter change information of each parameter indicated by the synchronization task has been pulled for any synchronization task in each parameter change operation information.

[0073] Optionally, the processing module 502 is specifically used to, for any parameter change operation information, write the synchronization task in the parameter change operation information into the synchronization task queue of the cache server, and write the parameter change information in the parameter change operation information into the parameter change queue of the cache server; the processing module 502 is specifically used to, based on a subscription mechanism for the cache server, pull each synchronization task and each parameter change information from the synchronization task queue and the parameter change queue of the cache server respectively, and persist them to a local database.

[0074] Optionally, the processing module 502 is specifically configured to, for any synchronization task in the local database, search the local database for parameter change information of each parameter indicated by the synchronization task.

[0075] Optionally, the processing module 502 is also used to, if there is parameter change information of the parameter indicated by the synchronization task that is not found in the local database, store the synchronization task in a circular waiting queue; periodically poll the circular waiting queue through a monitoring process; after the parameter change information of each parameter indicated by the synchronization task is found, send the synchronization task and the parameter change information of each parameter indicated by the synchronization task to each parameter application server, and delete the synchronization task from the circular waiting queue.

[0076] Optionally, the processing module 502 is also used to, for any parameter application server, determine through the notification engine that the synchronization task and parameter change information of each parameter indicated by the synchronization task are all sent to the parameter application server, thereby achieving synchronization of each parameter application server.

[0077] Optionally, the acquisition module 501 is specifically used to access the log file of the parameter maintenance server, obtain various operation instructions for setting the database table from the log file, and parse the various operation instructions to obtain various parameter change operation information.

[0078] Optionally, the acquisition module 501 is further used to receive a parameter query request sent by a parameter application server; the processing module 502 acquires corresponding parameter change information from a local database according to the parameter query request, and sends it to the parameter application server.

[0079] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0083] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A multi-system parameter synchronization method, characterized in that: The method comprises: Obtaining each parameter change operation information from the parameter maintenance server and writing it into the cache server, wherein the parameter change operation information includes a synchronization task and parameter change information; the synchronization task is used to indicate each parameter in the same synchronization batch; the parameter change information is parameter information of the parameter to be changed; the synchronization task includes description information of multiple parameters to be changed that need to be changed by the parameter application server at the same time; Based on a subscription mechanism to the cache server, pull each parameter change operation information from the cache server; For any synchronization task in each parameter change operation information, if the parameter change information of each parameter indicated by the synchronization task has been pulled, the parameter change information of each parameter indicated by the synchronization task is sent to each parameter application server.

2. The method according to claim 1, characterized in that Write cache server, including: For any parameter change operation information, write the synchronization task in the parameter change operation information into the synchronization task queue of the cache server, and write the parameter change information in the parameter change operation information into the parameter change queue of the cache server; Based on the subscription mechanism of the cache server, each parameter change operation information is pulled from the cache server, including: Based on the subscription mechanism of the cache server, each synchronization task and each parameter change information are pulled from the synchronization task queue and the parameter change queue of the cache server respectively, and persisted to the local database.

3. The method as claimed in claim 2, characterized in that Determining the parameter change information of each parameter indicated by the synchronization task that has been pulled out in the following manner includes: For any synchronization task in the local database, parameter change information of each parameter indicated by the synchronization task is found from the local database.

4. The method as claimed in claim 3, characterized in that Also includes: If parameter change information of the parameter indicated by the synchronization task is not found in the local database, the synchronization task is stored in a circular waiting queue; Regularly polling the circular waiting queue through a monitoring process; After the parameter change information of each parameter indicated by the synchronization task is found, the synchronization task and the parameter change information of each parameter indicated by the synchronization task are sent to each parameter application server, and the synchronization task is deleted from the circular waiting queue.

5. The method according to claim 1, characterized in that After the parameter change information of each parameter indicated by the synchronization task is sent to each parameter application server, the method further includes: For any parameter application server, the synchronization task and parameter change information of each parameter indicated by the synchronization task are determined by the notification engine and sent to the parameter application server, thereby achieving synchronization of each parameter application server.

6. The method according to any one of claims 1 to 5, characterized in that: Obtain parameter change operation information from the parameter maintenance server, including: The log file of the parameter maintenance server is accessed, each operation instruction for setting the database table is obtained from the log file, and each operation instruction is parsed to obtain each parameter change operation information.

7. The method as claimed in claim 6, characterized in that Also includes: Receive parameter query requests sent by parameter application servers; The corresponding parameter change information is obtained from the local database according to the parameter query request, and sent to the parameter application server.

8. A multi-system parameter synchronization device, characterized in that: The device comprises: The acquisition module is used to obtain each parameter change operation information from the parameter maintenance server and write it to the cache server through the processing module, wherein the parameter change operation information includes a synchronization task and parameter change information; the synchronization task is used to indicate each parameter in the same synchronization batch; the parameter change information is the parameter information of the parameter to be changed; the synchronization task includes description information of multiple parameters to be changed that need to be changed by the parameter application server at the same time; The acquisition module is used to pull each parameter change operation information from the cache server based on a subscription mechanism to the cache server; The processing module is used for sending the parameter change information of each parameter indicated by the synchronization task to each parameter application server for any synchronization task in each parameter change operation information if the parameter change information of each parameter indicated by the synchronization task has been pulled.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is run on a computer, the computer is enabled to implement the method according to any one of claims 1 to 7.

10. A computer device, characterized in that: include: Memory for storing computer programs; A processor is used to call the computer program stored in the memory, and execute the method according to any one of claims 1 to 7 according to the obtained program.

Citation Information

Patent Citations

  • Cache data synchronization method, server, application system and storage device

    CN109800272A