Distributed business data management system and method

By designing a distributed service data management system in the telecom billing system, using the global lock management module and data version for consistency verification, the distributed transaction and data consistency problems are solved, and the performance and reliability of the system are improved.

CN119996149AActive Publication Date: 2025-05-13CHINA TELECOM CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510083970.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-13
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

In telecom billing systems, distributed transactions and data consistency problems lead to large performance losses in the system under high computing loads and difficult to achieve business continuity.

Method used

Design a distributed business data management system, use the global lock management module to lock business data with mutually exclusive locking, and use the data version and the global lock version to perform real-time consistency verification to ensure the consistency of data among multi-service centers.

Benefits of technology

It effectively avoids data inconsistency problems caused by concurrent operations, improves the real-time and efficiency of data consistency verification, reduces the impact of abnormal transactions on business continuity, and ensures the final consistency of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996149A_ABST
    Figure CN119996149A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed service data management system and method. The system comprises a management center and a plurality of service centers, the management center comprises a global lock management module and a checking module, and each service center comprises at least one service application and a service database; when a first business application of a first business center processes a transaction, performing mutual exclusion locking on first business data through a global lock management module, and submitting target data containing second business data obtained by processing the first business data, a data version and a global lock version to a first database after the transaction is completed; the first database synchronizes the target data to databases of other business centers through message middleware; and the checking module checks the consistency of the target data in all the databases according to the data version and the global lock version when the data synchronization is finished according to the synchronous data stream. According to the method and the device, the technical problem that checking is difficult due to the fact that the amount of service data needing to be synchronized is large in a distributed service data processing scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed data processing technology, and in particular to a distributed business data management system and method. Background Art

[0002] As the core business support platform of operators, the telecommunications billing system must ensure that it has the ability to process business around the clock without interruption. Any system failure or disaster event may lead to the loss of billing data or service interruption, which in turn affects the operator's revenue and customer satisfaction. Therefore, in order to ensure business continuity, it is crucial to establish an effective disaster recovery system that can quickly restore business operations when a disaster occurs. At the data level, disaster recovery requires data synchronization between data centers in different geographical locations and proper handling of distributed transaction issues. Distributed transactions and data consistency are key prerequisites for ensuring the accuracy of business processing results in multiple data centers. Although the industry's existing strong consistency distributed transaction solutions (such as the RAFT (Raft Consensus Algorithm) protocol) can solve the problem of distributed transactions, they usually bring about a large performance loss, which is not suitable for telecommunications billing systems in computing-intensive scenarios. If you choose not to use a strong consistency distributed transaction protocol, but pursue eventual consistency, although you can reduce the impact on performance during transaction processing, this also introduces new challenges of data consistency and transaction compensation. In the daily operation of the telecommunications billing system, it involves changes in various data such as user information and account details. These changes require a large amount of data verification between multiple centers, which puts higher requirements on timeliness and data access pressure. Although stream data processing frameworks such as Flink and Spark can be used for data consistency verification, they have high requirements for hardware resources and it is difficult to provide an effective transaction compensation mechanism for specific billing business scenarios. In summary, when designing a disaster recovery solution for a telecommunications billing system, it is necessary to weigh the relationship between the consistency and performance of distributed transactions and explore methods that can meet both data consistency requirements and adapt to high computing loads. Faced with this complex situation, it may be necessary to apply different technologies and strategies in combination to find the most suitable solution for the telecommunications billing system.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a distributed business data management system and method to at least solve the technical problem of verification difficulties caused by the large amount of business data to be synchronized in a distributed business data processing scenario.

[0005] According to one aspect of an embodiment of the present application, a distributed business data management system is provided, including: a management center and multiple business centers, the management center including: a global lock management module and a verification module, each business center including: at least one business application and a business database, wherein the first business application in the first business center is used to perform mutual exclusive locking on the first business data corresponding to the target transaction through the global lock management module when processing the target transaction, and submit the target business data to the first business database in the first business center after the target transaction is processed, wherein the target business data includes: second business data obtained by processing the first business data, the data version corresponding to the second business data, and the global lock version used, the first business center is any business center among the multiple business centers, and the first business application is any business application in the first business center; the first business database is used to synchronize the target business data to the second business database in each second business center through a message middleware, wherein the second business center is other business centers among the multiple business centers except the first business center; the verification module is used to respond to the synchronization data stream in the message middleware, and when the data synchronization is completed, the consistency of the target business data in each second business database and the target business data in the first business database is checked according to the data version and the global lock version.

[0006] Optionally, the verification module is used to perform mutual exclusive locking on the target business data in the second business database through the global lock management module when the target business data in any second business database and the target business data in the first business database fail to pass the consistency verification; periodically perform consistency verification on the target business data in the second business database and the target business data in the first business database within a preset time period; if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency verification after the preset time period, perform data repair on the target business data in the second business database; after the data repair is completed, release the mutual exclusive lock on the target business data in the second business database.

[0007] Optionally, the first business application is used to send a global lock acquisition request to the global lock management module when processing a target transaction; the global lock management module is used to detect the locking status of the first business data; when the first business data has been locked, the data locking prompt information is fed back to the first business application; when the first business data is not locked, the global lock is allocated to the first business application; the first business application is used to record the global lock version of the global lock allocated by the global lock management module, and mutually exclusively lock the first business data based on the global lock, wherein, in the mutually exclusive locked state, other business applications except the first business application cannot access the first business data.

[0008] Optionally, the first business application is used to process the first business data according to the target transaction, obtain the second business data, and record the data version corresponding to the second business data; submit the second business data, data version and global lock version as target business data to the first business database; release the global lock and release the mutual exclusion lock on the second business data.

[0009] Optionally, a verification module is used to monitor the status of the synchronization data flow in the message middleware; when the message middleware synchronizes the target business data to any second business database, the data version and global lock version of the target business data in the second business database are compared with the target business data in the first business database; when the data version and the global lock version are consistent, it is determined that the target business data in the second business database and the target business data in the first business database have passed the consistency check; when the data version and / or the global lock version are inconsistent, it is determined that the target business data in the second business database and the target business data in the first business database have not passed the consistency check.

[0010] Optionally, the verification module is used to notify the first business database to re-synchronize the target business data to the second business database through the target channel if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check after a preset period of time, and after the re-synchronization is completed, to re-check the consistency of the target business data in the second business database and the target business data in the first business database, wherein the target channel includes at least one of the following: message middleware, a preset data transmission channel; if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check, sending a manual repair prompt message to the target object; the second business database is used to store the manually repaired target business data.

[0011] Optionally, the global lock versions of the global locks allocated by the global lock management module to different transactions are all different; and the data versions of the data services obtained by each business application after processing each transaction are all different.

[0012] According to another aspect of an embodiment of the present application, a distributed business data management method is also provided, including: when processing a target transaction, requesting a global lock management module of a management center to perform mutual exclusion locking on the first business data corresponding to the target transaction; after the target transaction is processed, storing the second business data obtained by processing the first business data, the data version corresponding to the second business data, and the global lock version used as the target business data in the first business database of the first business center; synchronizing the target business data to the second business database in the second business center through a message middleware, wherein the management center also includes a verification module, which is used to respond to the synchronization data stream in the message middleware, and at the end of data synchronization, the target business data in the second business database and the target business data in the first business database are checked for consistency based on the data version and the global lock version.

[0013] According to another aspect of an embodiment of the present application, a distributed business data management method is also provided, including: in response to a global lock acquisition request sent by a first business center when processing a target transaction, calling a global lock management module to perform mutual exclusion locking on the first business data corresponding to the target transaction, wherein the first business center is used to process the first business data according to the target transaction, and synchronize the obtained second business data, the data version corresponding to the second business data, and the used global lock version as the target business data to the second business center through the message middleware; monitor the status of the synchronization data flow in the message middleware, and when the message middleware synchronizes the target business data to the second business center, perform consistency verification on the target business data in the second business center and the target business data in the first business center based on the data version and the global lock version.

[0014] Optionally, when the target business data in the second business center and the target business data in the first business center fail to pass the consistency check, the target business data in the second business center are mutually exclusive locked by the global lock management module; the target business data in the second business center and the target business data in the first business center are periodically checked for consistency within a preset time period; if after the preset time period, the target business data in the second business center and the target business data in the first business center still fail to pass the consistency check, data repair is performed on the target business data in the second business center; after the data repair is completed, the mutual exclusive lock on the target business data in the second business center is released.

[0015] According to another aspect of an embodiment of the present application, a computer program product is further provided, the computer program product comprising: a computer program, wherein when the computer program is executed by a processor, the above-mentioned distributed business data management method is implemented.

[0016] According to another aspect of an embodiment of the present application, an electronic device is further provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned distributed business data management method through the computer program.

[0017] In an embodiment of the present application, when processing a target transaction, the global lock management module performs mutual exclusive locking on specific business data to ensure that only one business application can modify the data at the same time, thereby avoiding data inconsistency problems caused by concurrent operations; real-time consistency verification is performed using data version and global lock version information. This mechanism enables the verification module to quickly and accurately determine the consistency of data between multiple business centers after data synchronization is completed. Compared with the audit of each data item, the comparison of version numbers greatly reduces the consumption of computing resources and improves the real-time and efficiency of the audit; when the data version or the global lock version is inconsistent, that is, the data consistency check fails, the system can automatically lock the problem data to prevent the abnormal data from being further used, and try to automatically repair the data consistency problem. If the automatic repair cannot solve the problem, the system will notify manual intervention to restore data consistency by resynchronization or manual repair. This mechanism reduces the impact of abnormal transactions on business continuity and ensures the ultimate consistency of data. It is a reflection of system reliability and robustness, and thus solves the technical problem of verification difficulties caused by the large amount of business data to be synchronized in distributed business data processing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 is a schematic diagram of the structure of an optional distributed business data management system according to an embodiment of the present application;

[0020] Figure 2 is a flow chart of an optional distributed business data management method according to an embodiment of the present application;

[0021] Figure 3 is a flow chart of an optional distributed business data management method according to an embodiment of the present application;

[0022] Figure 4 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] Example 1

[0026] According to an embodiment of the present application, a distributed business data management system is provided, such as Figure 1 As shown, the distributed business data management system at least includes: a management center 11 and multiple business centers 1 (2-m), the management center includes: a global lock management module 111 and a verification module 112, each business center includes: at least one business application 1 (2-m) 1 and a business database 1 (2-m) 2, wherein,

[0027] The first business application in the first business center, when processing a target transaction, mutually locks the first business data corresponding to the target transaction through the global lock management module 111, and submits the target business data to the first business database in the first business center after the target transaction is processed, wherein the target business data includes: second business data obtained by processing the first business data, a data version corresponding to the second business data, and a global lock version used, the first business center is any business center among the multiple business centers, and the first business application is any business application in the first business center;

[0028] The first business database is used to synchronize the target business data to the second business databases in each second business center through the message middleware, wherein the second business center is other business centers among the multiple business centers except the first business center;

[0029] The verification module 112 is used to respond to the synchronization data flow in the message middleware, and when the data synchronization is completed, perform consistency verification on the target business data in each second business database and the target business data in the first business database according to the data version and the global lock version.

[0030] The functions of each module of the distributed business data management system are explained below in conjunction with the specific implementation process.

[0031] When processing a target transaction, the first business application in the first business center mutually exclusively locks the first business data corresponding to the target transaction through the global lock management module, and submits the target business data to the first business database in the first business center after the target transaction is processed, wherein the target business data includes: second business data obtained by processing the first business data, a data version corresponding to the second business data, and a global lock version used. The first business center is any business center among the multiple business centers, and the first business application is any business application in the first business center.

[0032] The first business application processes the first business data according to the target transaction to obtain the second business data, and records the data version corresponding to the second business data; submits the second business data, the data version and the global lock version as the target business data to the first business database; releases the global lock and releases the mutual exclusion lock on the second business data.

[0033] For example: When the business application of the first business center needs to process a target transaction, such as a user recharge operation, it first sends a lock request to the global lock management module, requesting a mutual exclusive lock on the first business data related to the transaction (such as user account information). After receiving the request, the global lock management module will check the current status of the business data. If the data is not locked, a global lock will be assigned to the first business application, and the new global lock version will be recorded. If the data has been locked, feedback will be given to the first business application to inform it that it needs to wait for the lock to be released. After the first business application successfully obtains the global lock, it begins to process the first business data. During this period, other business applications will not be able to modify the same business data to ensure data consistency.

[0034] Under the protection of the mutual exclusion lock, the first business application executes the target transaction, such as modifying the user account balance, and generates new business data, namely the second business data. After processing the target transaction, the first business application will generate a new data version identifier to indicate that the data has been updated and is different from the previous version. The first business application packages the second business data, the data version of the data, and the global lock version used when processing the transaction, and submits them as the target business data to the business database of the first business center.

[0035] After submitting data to the first business database, the first business application sends a lock release request to the global lock management module to release the mutual exclusive lock on the first business data, allowing other business applications to request and obtain locks when needed.

[0036] The first business database synchronizes the target business data to the second business databases in each second business center through the message middleware, wherein the second business center is other business centers among the multiple business centers except the first business center.

[0037] Among them, the message middleware can be Apache Kafka, ActiveMQ, RocketMQ, RabbitMQ, etc.

[0038] It should be noted that the global lock versions of the global locks allocated by the global lock management module to different transactions are all different; and the data versions of the data services obtained by each business application after processing each transaction are all different.

[0039] The verification module responds to the synchronization data flow in the message middleware, and when data synchronization is completed, performs consistency verification on the target business data in each second business database and the target business data in the first business database according to the data version and the global lock version.

[0040] As an optional implementation, the implementation process of the verification module can take the following steps:

[0041] A verification module monitors the status of the synchronization data flow in the message middleware; when the message middleware synchronizes the target business data to any second business database, the data version and global lock version of the target business data in the second business database are compared with the target business data in the first business database; when the data version and the global lock version are consistent, it is determined that the target business data in the second business database and the target business data in the first business database have passed the consistency check; when the data version and / or the global lock version are inconsistent, it is determined that the target business data in the second business database and the target business data in the first business database have not passed the consistency check.

[0042] When the target business data in any second business database and the target business data in the first business database fail to pass the consistency check, the verification module performs mutual exclusive locking on the target business data in the second business database through the global lock management module; since the database itself has an automatic recovery mechanism, a period of time is reserved for it to recover automatically. If it cannot recover automatically, intervention will be made. Therefore, the target business data in the second business database and the target business data in the first business database are periodically checked for consistency within a preset time period; if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check after the preset time period, data repair is performed on the target business data in the second business database; after the data repair is completed, the mutual exclusive lock on the target business data in the second business database is released.

[0043] After a preset period of time, if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check, the verification module notifies the first business database to re-synchronize the target business data to the second business database through the target channel, and after the re-synchronization is completed, the target business data in the second business database and the target business data in the first business database are again checked for consistency, wherein the target channel includes at least one of the following: message middleware, a preset data transmission channel; if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check, a manual repair prompt message is sent to the target object; the second business database is used to store the manually repaired target business data.

[0044] In an embodiment of the present application, when processing a target transaction, the global lock management module performs mutual exclusive locking on specific business data to ensure that only one business application can modify the data at the same time, thereby avoiding data inconsistency problems caused by concurrent operations; real-time consistency verification is performed using data version and global lock version information. This mechanism enables the verification module to quickly and accurately determine the consistency of data between multiple business centers after data synchronization is completed. Compared with the audit of each data item, the comparison of version numbers greatly reduces the consumption of computing resources and improves the real-time and efficiency of the audit; when the data version or the global lock version is inconsistent, that is, the data consistency check fails, the system can automatically lock the problem data to prevent the abnormal data from being further used, and try to automatically repair the data consistency problem. If the automatic repair cannot solve the problem, the system will notify manual intervention to restore data consistency by resynchronization or manual repair. This mechanism reduces the impact of abnormal transactions on business continuity and ensures the ultimate consistency of data. It is a reflection of system reliability and robustness, and thus solves the technical problem of verification difficulties caused by the large amount of business data to be synchronized in distributed business data processing scenarios.

[0045] Example 2

[0046] According to an embodiment of the present application, a distributed business data management method is provided for application to a distributed business data management system in Example 1. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0047] Figure 2 is a flow chart of a distributed business data management method provided according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0048] Step S202: when processing the target transaction, request the global lock management module of the management center to perform a mutual exclusive lock on the first business data corresponding to the target transaction;

[0049] Step S204, after the target transaction is processed, the second business data obtained by processing the first business data, the data version corresponding to the second business data, and the used global lock version are stored as target business data in the first business database of the first business center;

[0050] Step S206, synchronize the target business data to the second business database in the second business center through the message middleware, wherein the management center also includes a verification module, which is used to respond to the synchronization data stream in the message middleware. When the data synchronization is completed, the consistency of the target business data in the second business database and the target business data in the first business database is checked based on the data version and the global lock version.

[0051] The following describes each step of the distributed business data management method in conjunction with a specific implementation process.

[0052] When processing a target transaction, the first business application in the first business center requests the global lock management module of the management center to perform a mutual exclusive lock on the first business data corresponding to the target transaction.

[0053] For example, when a user initiates a service operation such as recharge or payment at the first service center, the target transaction begins to be processed.

[0054] After receiving the request, the global lock management module checks the locking status of the corresponding first business data. If the data is not locked, a new global lock is allocated and the version number of the global lock is recorded.

[0055] After acquiring the lock, the first business application processes the target transaction.

[0056] After the target transaction is processed, the second business data obtained by processing the first business data, the data version corresponding to the second business data, and the global lock version used are stored as target business data in the first business database of the first business center.

[0057] After this step is completed, the business application releases the global lock and releases the mutually exclusive lock state of the business data.

[0058] The first business database synchronizes the target business data to the second business database in the second business center through the message middleware, wherein the management center also includes a verification module, which is used to respond to the synchronization data stream in the message middleware. When the data synchronization is completed, the consistency of the target business data in the second business database and the target business data in the first business database is checked based on the data version and the global lock version.

[0059] It should be noted that the various implementation steps in the distributed business data management method in the embodiment of the present application correspond one-to-one with the various implementation steps of the distributed business data management system in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be elaborated here.

[0060] Example 3

[0061] According to an embodiment of the present application, a distributed business data management method is provided for application to a distributed business data management system in Example 1. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0062] Figure 3 is a flow chart of a distributed business data management method provided according to an embodiment of the present application, such as Figure 3 As shown, the method comprises the following steps:

[0063] Step S302, in response to the global lock acquisition request sent by the first business center when processing the target transaction, calling the global lock management module to perform mutual exclusive locking on the first business data corresponding to the target transaction, wherein the first business center is used to process the first business data according to the target transaction, and synchronize the obtained second business data, the data version corresponding to the second business data, and the used global lock version as the target business data to the second business center through the message middleware;

[0064] Step S304, monitor the status of the synchronization data flow in the message middleware, and when the message middleware synchronizes the target business data to the second business center, perform consistency check on the target business data in the second business center and the target business data in the first business center based on the data version and the global lock version.

[0065] The following describes each step of the distributed business data management method in conjunction with a specific implementation process.

[0066] In response to the global lock acquisition request sent by the first business center when processing the target transaction, the global lock management module is called to perform mutual exclusion lock on the first business data corresponding to the target transaction, wherein the first business center is used to process the first business data according to the target transaction, and synchronize the obtained second business data, the data version corresponding to the second business data, and the used global lock version as the target business data to the second business center through the message middleware.

[0067] It can be understood as follows: when the first business center is processing the target transaction, its business application sends a global lock acquisition request to the management center. The global lock management module of the management center receives the request, and the global lock management module detects the locking status of the first business data. If the data is not locked, a global lock is allocated to the first business application, and the global lock version of the lock is recorded. The global lock management module performs a mutually exclusive locking operation to ensure that when the first business application is processing the target transaction, the first business data will not be modified by other applications at the same time, thereby ensuring the atomicity and consistency of data modification.

[0068] Monitor the status of the synchronization data flow in the message middleware, and when the message middleware synchronizes the target business data to the second business center, perform consistency check on the target business data in the second business center and the target business data in the first business center based on the data version and the global lock version.

[0069] It can be understood as follows: the verification module of the management center continuously monitors the synchronization data flow status in the message middleware to ensure the integrity of the data synchronization process. When the first business center synchronizes the target business data (including the second business data, data version, and global lock version) to the second business center through the message middleware, the verification module responds to this synchronization process. After the data synchronization is completed, the verification module immediately performs a consistency check on the target business data in the second business database of the second business center and the target business data in the first business database of the first business center based on the data version and global lock version information.

[0070] In the case that the target business data in the second business center and the target business data in the first business center fail to pass the consistency check, the target business data in the second business center are mutually exclusive locked by the global lock management module; the target business data in the second business center and the target business data in the first business center are periodically checked for consistency within a preset time period; if the target business data in the second business center and the target business data in the first business center still fail to pass the consistency check after the preset time period, data repair is performed on the target business data in the second business center; after the data repair is completed, the mutual exclusive lock on the target business data in the second business center is released.

[0071] If the consistency check passes, it means that the data synchronization is successful and the data of the first business center and the second business center are consistent; if the consistency check fails, it means that there is a difference in the data version or the global lock version, and there may be data inconsistency. At this time, the verification module will start the exception handling process, including but not limited to locking related data, periodic re-verification, data repair attempts, and notifying manual intervention and repair when necessary, to ensure that the data is finally consistent.

[0072] It should be noted that the various implementation steps in the distributed business data management method in the embodiment of the present application correspond one-to-one with the various implementation steps of the distributed business data management system in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be elaborated here.

[0073] Example 4

[0074] According to an embodiment of the present application, a computer program product is also provided, which includes a computer program, wherein when the computer program is executed by a processor, the distributed business data management method in Example 2 or Example 3 is implemented.

[0075] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the distributed business data management method in Example 2 or Example 3 by running the computer program.

[0076] According to an embodiment of the present application, a processor is also provided, which is used to run a computer program, wherein the distributed business data management method in Example 2 or Example 3 is executed when the computer program is running.

[0077] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the distributed business data management method in Example 2 or Example 3 through the computer program.

[0078] Specifically, when the computer program is running, the following steps are performed:

[0079] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 4 FIG. 1 shows a hardware structure block diagram of an electronic device for implementing a distributed service data management method. Figure 4 As shown, the electronic device 40 may include one or more (402a, 402b, ..., 402n are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 404 for storing data, and a transmission device 406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.

[0080] It should be noted that the one or more processors 402 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 40. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0081] The memory 404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the distributed business data management method in the embodiment of the present application. The processor 402 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, that is, realizing the vulnerability detection method of the above-mentioned application. The memory 404 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 404 may further include a memory remotely arranged relative to the processor 402, and these remote memories may be connected to the electronic device 40 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0082] The transmission device 406 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 40. In one example, the transmission device 406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0083] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 40 .

[0084] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.

[0085] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0087] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0088] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0090] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A distributed business data management system, characterized in that: include: A management center and multiple business centers, the management center includes: a global lock management module and a verification module, each of the business centers includes: at least one business application and a business database, wherein, The first business application in the first business center is used to perform mutual exclusive locking on the first business data corresponding to the target transaction through the global lock management module when processing the target transaction, and submit the target business data to the first business database in the first business center after the target transaction is processed, wherein the target business data includes: second business data obtained by processing the first business data, a data version corresponding to the second business data, and a global lock version used, the first business center is any business center among the multiple business centers, and the first business application is any business application in the first business center; The first business database is used to synchronize the target business data to the second business databases in each second business center through the message middleware, wherein the second business center is other business center among the multiple business centers except the first business center; The verification module is used to respond to the synchronous data flow in the message middleware, and when the data synchronization is completed, the consistency of the target business data in each of the second business databases and the target business data in the first business database is checked according to the data version and the global lock version.

2. The system according to claim 1, characterized in that The verification module is used to perform mutual exclusive locking on the target business data in any second business database through the global lock management module when the target business data in any second business database and the target business data in the first business database fail to pass the consistency verification; periodically perform consistency verification on the target business data in the second business database and the target business data in the first business database within a preset time period; if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency verification after the preset time period, perform data repair on the target business data in the second business database; after the data repair is completed, release the mutual exclusive lock on the target business data in the second business database.

3. The system according to claim 1, characterized in that The first business application is used to send a global lock acquisition request to the global lock management module when processing the target transaction; The global lock management module is used to detect the locking state of the first business data; if the first business data has been locked, feedback data locking prompt information to the first business application; if the first business data is not locked, allocate a global lock to the first business application; The first business application is used to record the global lock version of the global lock assigned by the global lock management module, and to perform mutual exclusive locking on the first business data based on the global lock, wherein, in the mutual exclusive locking state, other business applications except the first business application cannot access the first business data.

4. The system according to claim 3, characterized in that The first business application is used to process the first business data according to the target transaction to obtain the second business data, and record the data version corresponding to the second business data; submit the second business data, the data version and the global lock version as the target business data to the first business database; release the global lock and release the mutual exclusion lock on the second business data.

5. The system according to claim 1, characterized in that The verification module is used to monitor the status of the synchronization data flow in the message middleware; when the message middleware synchronizes the target business data to any second business database, compare the data version and global lock version of the target business data in the second business database and the target business data in the first business database; when the data version and the global lock version are consistent, determine that the target business data in the second business database and the target business data in the first business database have passed the consistency check; when the data version and / or the global lock version are inconsistent, determine that the target business data in the second business database and the target business data in the first business database have not passed the consistency check.

6. The system according to claim 2, characterized in that The checking module is used for, if after the preset time period, the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check, notifying the first business database to resynchronize the target business data to the second business database through the target channel, and after the resynchronization is completed, re-checking the consistency of the target business data in the second business database and the target business data in the first business database, wherein the target channel includes at least one of the following: the message middleware, a preset data transmission channel; if the target business data in the second business database and the target business data in the first business database still fail to pass the consistency check, sending a manual repair prompt message to the target object; The second service database is used to store the manually repaired target service data.

7. The system according to any one of claims 1 to 6, characterized in that: The global lock versions of the global locks allocated by the global lock management module to different transactions are all different; The data versions of the data services obtained by each business application after processing each transaction are different.

8. A distributed business data management method, characterized in that: include: When processing the target transaction, the global lock management module of the request management center performs a mutual exclusive lock on the first business data corresponding to the target transaction; After the target transaction is processed, the second business data obtained by processing the first business data, the data version corresponding to the second business data, and the used global lock version are stored as target business data in the first business database of the first business center; The target business data is synchronized to the second business database in the second business center through the message middleware, wherein the management center also includes a verification module, and the verification module is used to respond to the synchronization data stream in the message middleware. When the data synchronization is completed, the consistency of the target business data in the second business database and the target business data in the first business database is checked based on the data version and the global lock version.

9. A distributed business data management method, characterized in that: include: In response to a global lock acquisition request sent by the first business center when processing a target transaction, the global lock management module is called to perform mutual exclusive locking on the first business data corresponding to the target transaction, wherein the first business center is used to process the first business data according to the target transaction, and synchronize the obtained second business data, the data version corresponding to the second business data, and the used global lock version as the target business data to the second business center through the message middleware; Monitor the status of the synchronization data flow in the message middleware, and when the message middleware synchronizes the target business data to the second business center, perform consistency check on the target business data in the second business center and the target business data in the first business center based on the data version and the global lock version.

10. The method according to claim 9, characterized in that The method further comprises: When the target business data in the second business center and the target business data in the first business center fail to pass the consistency check, mutually exclusive locking the target business data in the second business center is performed by the global lock management module; Periodically performing consistency check on the target service data in the second service center and the target service data in the first service center within a preset time period; If after the preset time period, the target service data in the second service center and the target service data in the first service center still fail to pass the consistency check, repairing the target service data in the second service center; After the data repair is completed, the mutual exclusive lock on the target business data in the second business center is released.

11. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, it implements the distributed business data management method described in any one of claims 8 to 10.

12. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the distributed business data management method according to any one of claims 8 to 10 through the computer program.

Citation Information

Patent Citations

  • Transaction processing method and device, computer equipment and storage medium

    CN112231071A

  • Method, device and system for processing distributed transactions in SQL (Structured Query Language) database

    CN114328613A

  • Lock checking method in distributed transactional memory state locking process

    CN115357399A

  • Data consistency maintenance system and data consistency maintenance method

    JP2024165927A

  • Scaleable method for maintaining and making consistent updates to caches

    US6216212B1