A real-time data updating method and device, electronic equipment and storage medium

By generating global and local transaction numbers in the data processing system and updating the distributed transaction processing data sequentially in the message queue and cache queue, the problem of data update timing in aggregate databases is solved, and the accuracy and reliability of data updates are improved.

CN115525666BActive Publication Date: 2026-06-02SHANGHAI PUDONG DEVELOPMENT BANK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI PUDONG DEVELOPMENT BANK
Filing Date
2022-09-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, aggregated databases cannot maintain the local transaction commit order of the source sharded databases, which leads to the inability to guarantee the timeliness of real-time data updates, affecting data query efficiency and accuracy.

Method used

A global transaction number and a local transaction number are generated by a global transaction processor. Distributed transaction processing data are synchronously updated in the message queue and cache queue according to the transaction processing order, ensuring that the data processing server can synchronize the data to the aggregate database in the order of transaction processing.

Benefits of technology

It achieves real-time data update sequence, improves the accuracy and reliability of data updates, and ensures the efficiency of joint queries across data shards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115525666B_ABST
    Figure CN115525666B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a real-time data updating method and device, electronic equipment and a storage medium, wherein the real-time data updating method applied to a data processing server comprises: polling a target queue according to a cache queue data flag to sequentially obtain distributed transaction processing data of each local transaction number under a global transaction number corresponding to a real-time data updating operation; wherein the target queue comprises a message queue and / or a cache queue; and synchronously updating the sequentially obtained distributed transaction processing data to an aggregation database according to a transaction processing sequence. The technical solution of the embodiments of the present application can maintain the timing of real-time data updating, thereby improving the accuracy and reliability of real-time data updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a real-time data update method, apparatus, electronic device and storage medium. Background Technology

[0002] With the rapid development of internet applications, their characteristics of massive data, high traffic, and high concurrency have become increasingly prominent and obvious. Traditional master-slave database architectures can no longer meet the needs of the rapid development of internet application businesses. To improve system performance, many IT (Internet Technology) system architectures adopt data sharding architectures. Data sharding refers to dividing data according to a sharding key (such as a customer number or institution number in the financial field), and storing the data in different shards independently, such as storing each shard's data in a separate database.

[0003] In the aforementioned data processing architecture, querying data belonging to the same shard is highly efficient, but cross-shard join queries are difficult to implement and inefficient. To improve cross-shard data query efficiency, a proposed solution involves transforming all shard database data and then synchronizing the processed data to an aggregate database for join queries. This aggregate database can be implemented using big data storage technology.

[0004] In the process of developing this invention, the inventors discovered the following shortcomings in the prior art: During the data synchronization and update process of the aggregated database, because the aggregated database synchronizes data updates from different source shards, even if the aggregated database has global transaction control over the source shard databases, it cannot update data according to the local transaction commit order of the source shard databases. In other words, the aggregated database cannot maintain the orderliness of the source database updates. Summary of the Invention

[0005] This invention provides a real-time data update method, apparatus, electronic device, and storage medium that can maintain the timing of real-time data updates, thereby improving the accuracy and reliability of real-time data updates.

[0006] According to one aspect of the present invention, a real-time data update method is provided, applied to a data processing server, comprising:

[0007] The target queue is polled according to the cache queue data flag to sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and / or a cache queue;

[0008] The distributed transaction processing data obtained sequentially is synchronously updated to the aggregate database according to the transaction processing order.

[0009] According to another aspect of the present invention, a real-time data update method is provided, applied to a local transaction processor, comprising:

[0010] Obtain the local transaction number issued by the global transaction processor based on the real-time data update operation;

[0011] Execute a distributed transaction based on the local transaction number to obtain distributed transaction processing data;

[0012] The distributed transaction processing data is pushed to a message queue for storage;

[0013] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0014] According to another aspect of the present invention, a real-time data update method is provided, applied to a global transaction processor, comprising:

[0015] In response to a real-time data update operation, a global transaction number and a local transaction number corresponding to the real-time data update operation are generated;

[0016] Send the global transaction number and local transaction number corresponding to the real-time data update operation to the data processing server;

[0017] The system receives transaction number association information from the data processing server, and if the transaction number association information passes the verification, pushes the local transaction number to the local transaction processor so that the local transaction processor can execute a distributed transaction based on the local transaction number to obtain distributed transaction processing data.

[0018] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0019] According to another aspect of the present invention, a real-time data update method is provided, comprising:

[0020] In response to a real-time data update operation, the global transaction processor generates a global transaction number and a local transaction number corresponding to the real-time data update operation, and sends the global transaction number and the local transaction number corresponding to the real-time data update operation to the data processing server; it receives the transaction number association information fed back by the data processing server, and pushes the local transaction number to the local transaction processor if it is determined that the transaction number association information passes the verification.

[0021] The local transaction processor obtains the local transaction number issued by the global transaction processor based on the real-time data update operation, executes the distributed transaction based on the local transaction number, obtains the distributed transaction processing data, and pushes the distributed transaction processing data to the message queue for storage.

[0022] The data processing server polls the target queue based on the cache queue data flags to sequentially obtain distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and / or a cache queue; the sequentially obtained distributed transaction processing data is synchronously updated to the aggregate database according to the transaction processing order.

[0023] According to another aspect of the present invention, a real-time data update system is provided, comprising a global transaction processor, a local transaction processor, and a data processing server, wherein the global transaction processor is communicatively connected to the local transaction processor, and the global transaction processor is also communicatively connected to the data processing server, wherein:

[0024] The global transaction processor is configured to: in response to a real-time data update operation, generate a global transaction number and a local transaction number corresponding to the real-time data update operation, and send the global transaction number and the local transaction number corresponding to the real-time data update operation to the data processing server; receive transaction number association information fed back by the data processing server, and push the local transaction number to the local transaction processor if it is determined that the transaction number association information passes the verification.

[0025] The local transaction processor is used to: obtain the local transaction number issued by the global transaction processor based on the real-time data update operation, execute the distributed transaction based on the local transaction number, obtain the distributed transaction processing data, and push the distributed transaction processing data to the message queue for storage.

[0026] The data processing server is used to: poll the target queue according to the cache queue data flag, and sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and / or a cache queue; and synchronously update the sequentially obtained distributed transaction processing data to the aggregate database according to the transaction processing order.

[0027] According to another aspect of the present invention, a real-time data update apparatus is provided, configured in a data processing server, comprising:

[0028] The distributed transaction processing data acquisition module is used to poll the target queue according to the cache queue data flag in order to sequentially acquire the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and / or a cache queue.

[0029] The distributed transaction processing data update module is used to synchronously update the sequentially acquired distributed transaction processing data to the aggregate database according to the transaction processing order.

[0030] According to another aspect of the present invention, a real-time data update apparatus is provided, placed in a local transaction processor, comprising:

[0031] The local transaction number acquisition module is used to acquire the local transaction number issued by the global transaction processor based on the real-time data update operation.

[0032] A distributed transaction processing data generation module is used to execute a distributed transaction based on the local transaction number to obtain distributed transaction processing data.

[0033] A distributed transaction processing data push module is used to push the distributed transaction processing data to a message queue for storage;

[0034] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0035] According to another aspect of the present invention, a real-time data update apparatus is provided, configured in a global transaction processor, comprising:

[0036] The transaction number generation module is used to generate a global transaction number and a local transaction number corresponding to a real-time data update operation in response to the real-time data update operation.

[0037] The transaction number sending module is used to send the global transaction number and local transaction number corresponding to the real-time data update operation to the data processing server;

[0038] The local transaction number push module is used to receive the transaction number association information fed back by the data processing server, and push the local transaction number to the local transaction processor when it is determined that the transaction number association information passes the verification, so that the local transaction processor can execute the distributed transaction according to the local transaction number to obtain the distributed transaction processing data.

[0039] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0040] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0041] At least one processor; and

[0042] A memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the real-time data update method according to any embodiment of the present invention.

[0044] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the real-time data update method according to any embodiment of the present invention.

[0045] This invention addresses the problem of inconsistent real-time data update timing in existing methods by having a data processing server poll the message queue and / or cache queue based on cache queue data flags. This sequentially retrieves distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation, and then synchronously updates the sequentially retrieved distributed transaction processing data to the aggregate database according to the transaction processing order. This ensures the timeliness of real-time data updates and improves the accuracy and reliability of real-time data updates.

[0046] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart of a real-time data update method provided in Embodiment 1 of the present invention;

[0049] Figure 2 This is a flowchart of a real-time data update method provided in Embodiment 2 of the present invention;

[0050] Figure 3 This is a flowchart of a real-time data update method provided in Embodiment 3 of the present invention;

[0051] Figure 4 This is a flowchart of a real-time data update method provided in Embodiment 4 of the present invention;

[0052] Figure 5 This is a schematic diagram of a real-time data update system provided in Embodiment 5 of the present invention;

[0053] Figure 6 This is a schematic diagram of a real-time data update device provided in Embodiment Six of the present invention;

[0054] Figure 7 This is a schematic diagram of a real-time data update device provided in Embodiment 7 of the present invention;

[0055] Figure 8 This is a schematic diagram of a real-time data update device provided in Embodiment 8 of the present invention;

[0056] Figure 9 This is a schematic diagram of the structure of an electronic device provided in Embodiment 9 of the present invention. Detailed Implementation

[0057] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0058] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0059] Example 1

[0060] Figure 1This is a flowchart of a real-time data update method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where distributed transaction processing data is synchronously updated in a time-series manner through a data processing server, message queue, and cache queue. The method can be executed by a real-time data update device configured on the data processing server. This device can be implemented in software and / or hardware and is generally integrated into an electronic device, which can be a server device used in conjunction with a global transaction processor and a local transaction processor. Correspondingly, as... Figure 1 As shown, the method includes the following operations:

[0061] S110. Poll the target queue according to the cache queue data flag to sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and / or a cache queue.

[0062] The data processing server acts as a data aggregator, consuming data from the message queue to aggregate committed data in distributed transactions. It can also interact with the Global Transaction Service (GTS). A cache queue data flag identifies the presence of cached data. Real-time data update operations can be business operations executed in real-time. Optionally, users can execute business operations at the system frontend of the real-time data update system, which triggers real-time updates to the data stored in the database, thus qualifying as a real-time data update operation. The global transaction number is a transaction number generated for each complete real-time data update operation initiated by the frontend system. That is, one global transaction number corresponds to one real-time data update operation. Local transaction numbers are the numbers corresponding to each distributed transaction processing data. It should be noted that one global transaction number can correspond to multiple local transaction numbers, and the local transaction numbers included in a global transaction number have a temporal order. Distributed transaction processing data can be data obtained by local transaction processors after processing distributed transactions. Distributed transactions refer to transactions where participants, supporting servers, resource servers, and transaction managers reside on different nodes within a distributed system; this can also be called local transactions. Local transaction processors can be the processors running within a distributed database. Message queues are responsible for receiving distributed transaction processing data committed by local transaction processors after completing the distributed transaction, allowing the data processing server to consume it. Cache queues are responsible for caching distributed transaction processing data retrieved from message queues for subsequent use by the data processing server.

[0063] In this embodiment of the invention, when the data processing server determines that the distributed transaction processing data of the real-time data update operation needs to be updated in real time, it can sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation by polling the message queue and / or the cache queue. Specifically, sequentially obtaining the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation can be done by obtaining each distributed transaction processing data in sequence according to the temporal order between them.

[0064] In an optional embodiment of the present invention, the step of polling the target queue according to the cache queue data flag to sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation may include: when the flag data of the cache queue data flag is determined to be first flag data, polling the message queue to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; when the flag data of the cache queue data flag is determined to be second flag data, polling the message queue and the cache queue to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, when the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

[0065] The first flag data can be used to identify data that is not cached in the cache queue; for example, the first flag data can be set to false. Correspondingly, the second flag data can be used to identify data that is cached in the cache queue; for example, the second flag data can be set to true. Optionally, by default, the flag data of the cache queue data flag can be the first flag data. The current target local transaction number can be the local transaction number that needs to be processed, determined according to the temporal order of each local transaction number. For example, assume that the local transaction numbers are 001, 002, and 003. If the data processing server is processing distributed transaction processing data for the first time, the current target local transaction number can be 001, meaning that the distributed transaction processing data with number 001 needs to be updated in real time. After the data processor completes the update operation on the distributed transaction processing data with number 001, the current target local transaction number is updated to 002, meaning that the distributed transaction processing data with number 002 needs to be updated in real time. The transaction processing order is also the temporal order in which each local transaction number is processed.

[0066] Specifically, when the data processing server initially polls the target queue, since the default value of the cache queue data flag is the first flag, and there is no cached data in the cache queue at this time, the data processing server can poll the message queue to retrieve the distributed transaction processing data of the current target local transaction number from the message queue according to the transaction processing order, that is, to retrieve the distributed transaction processing data of the first local transaction number. In subsequent data processing, if the cache queue data flag is the second flag, indicating that there is cached data in the cache queue, the data processing server can poll both the message queue and the cache queue to retrieve the distributed transaction processing data of the current target local transaction number from either the message queue or the cache queue according to the transaction processing order.

[0067] Correspondingly, during the polling of the message queue, if the data currently retrieved by the data processing server from the message queue is not the distributed transaction processing data for the current target local transaction number, the data processing server can cache the currently retrieved data to the cache queue. In this case, if the flag data of the cache queue data is the first flag data, it needs to be set to the second flag data. If the data currently retrieved by the data processing server from the message queue is the distributed transaction processing data for the current target local transaction number, the data processing server can either continue polling the target queue or synchronously update the database with the retrieved distributed transaction processing data for the current target local transaction number.

[0068] S120. The distributed transaction processing data obtained sequentially is synchronously updated to the aggregate database according to the transaction processing order.

[0069] Optionally, the sequentially acquired distributed transaction processing data can be synchronously updated to the aggregate database according to the transaction processing order. This can be achieved by acquiring one piece of distributed transaction processing data sequentially and then synchronously updating it to the aggregate database. Alternatively, all distributed transaction processing data corresponding to the real-time data update operation can be acquired according to the transaction processing order, and then all distributed transaction processing data can be synchronously updated to the aggregate database in the same order. As long as the aggregate database can be updated according to the temporal order of the distributed transaction processing data, this embodiment of the invention does not limit the method of updating distributed transaction processing data.

[0070] In an optional embodiment of the present invention, after the distributed transaction processing data obtained sequentially is synchronously updated to the aggregate database according to the transaction processing order, the method may further include: resetting the flag data of the cache queue data flag to the first flag data.

[0071] In a specific example, the data processing server obtains the local transaction numbers LT001, LT002, and LT003 corresponding to the global transaction number GT001 from the global transaction processor. LT001, LT002, and LT003 can form a group of transaction numbers. Further, the data processing server polls the distributed transaction processing data corresponding to the local transaction numbers from the message queue and / or cache queue, and aggregates the polled distributed transaction processing data into the aggregate database.

[0072] Step 1: The data processing server polls the message queue. If the data processing server obtains the distributed transaction processing data corresponding to the first local transaction number in the sequence of transaction number groups LT001, LT002, and LT003 (i.e., LT001), it synchronizes and updates the aggregate data accordingly. If it does not obtain the distributed transaction processing data corresponding to LT001, the data processing server saves it to the cache queue and sets the cache queue data flag associated with the global transaction number GT001 to true. Alternatively, the data processing server can also cache the obtained distributed transaction processing data corresponding to LT001, such as caching it locally, and wait to obtain the distributed transaction processing data of other local transaction numbers in sequence.

[0073] Step 2: If the data processing server has completed processing the distributed transaction processing data corresponding to LT001, and the data processing server detects that the cache queue data flag associated with the global transaction number GT001 in the cache queue is true, then it polls data from both the message queue and the cache queue. If the data processing server obtains the distributed transaction processing data corresponding to the second local transaction number in the order of transaction number groups LT001, LT002, and LT003 (i.e., LT002), it synchronizes and updates it to the aggregated data. If it is not the distributed transaction processing data corresponding to LT002, the data processing server saves it to the cache queue. At this time, if the cache queue data flag associated with the global transaction number GT001 is set to true in the cache queue, no modification to the cache queue data flag is needed; if the cache queue data flag associated with the global transaction number GT001 is set to false in the cache queue, then the cache queue data flag associated with the global transaction number GT001 needs to be set to true. If the data processing server finishes processing the distributed transaction processing data corresponding to LT001, and detects that the cache queue data flag associated with global transaction number GT001 in the cache queue is false, then it continues to poll the message queue to obtain the distributed transaction processing data corresponding to LT002. Alternatively, the data processing server can cache the obtained distributed transaction processing data corresponding to LT002 ​​in the same location as the distributed transaction processing data corresponding to LT001, and wait to obtain the distributed transaction processing data of other local transaction numbers in sequence.

[0074] Step 3: If the data processing server has completed processing the distributed transaction processing data corresponding to LT001 and LT002, and the data processing server detects that the cache queue data flag associated with the global transaction number GT001 in the cache queue is true, then it polls data from both the message queue and the cache queue to obtain the distributed transaction processing data corresponding to LT003. If the data processing server has completed processing the distributed transaction processing data corresponding to LT001 and LT002, and the data processing server detects that the cache queue data flag associated with the global transaction number GT001 in the cache queue is false, then it continues to poll data from the message queue to obtain the distributed transaction processing data corresponding to LT003. After the data processing server obtains the distributed transaction processing data corresponding to LT003, it can synchronously update it to the aggregated data. Alternatively, the data processing server can also cache the obtained distributed transaction processing data corresponding to LT003 after the distributed transaction processing data corresponding to LT002. In this case, the data cached by the data processing server according to the time sequence of the local transaction number consists of the distributed transaction processing data corresponding to LT001, LT002, and LT003, respectively. The data processing server can synchronously update the distributed transaction processing data corresponding to LT001, LT002 ​​and LT003 to the aggregate database in the order of LT001-LT002-LT003.

[0075] After the data processing server completes the update operation of the distributed transaction processing data corresponding to all local transaction numbers LT001, LT002 ​​and LT003 in the transaction number group corresponding to the global transaction number GT001, it can reset the cache queue data flag associated with the global transaction number in the cache queue to false.

[0076] Therefore, by aggregating distributed transaction processing data from application data tables in a distributed database sequentially into an aggregate database used for specific queries, the embodiments of the present invention can ensure the timeliness of real-time data updates in the aggregate database, thereby improving the accuracy and reliability of real-time data updates in the aggregate database.

[0077] This invention addresses the problem of inconsistent real-time data update timing in existing methods by having a data processing server poll the message queue and / or cache queue based on cache queue data flags. This sequentially retrieves distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation, and then synchronously updates the sequentially retrieved distributed transaction processing data to the aggregate database according to the transaction processing order. This ensures the timeliness of real-time data updates and improves the accuracy and reliability of real-time data updates.

[0078] Example 2

[0079] Figure 2 This is a flowchart of a real-time data update method provided in Embodiment 2 of the present invention. This embodiment is applicable to situations where distributed transaction processing data requiring real-time updates is generated through a local transaction processor, and then further updated synchronously in a time-series manner through a data processing server, message queue, and cache queue. This method can be executed by a real-time data update device configured in the local transaction processor. This device can be implemented in software and / or hardware, and is generally integrated into an electronic device, which can be a terminal device or a server device, used in conjunction with a global transaction processor and a data processing server. Correspondingly, as... Figure 2 As shown, the method includes the following operations:

[0080] S210. Obtain the local transaction number issued by the global transaction processor based on the real-time data update operation.

[0081] Local transaction processors can act as transaction initiators, responsible for starting, committing, or rolling back distributed transactions, and can establish communication connections with the global transaction processor to interact. The global transaction processor can act as a transaction coordinator, responsible for advancing distributed transactions and managing their lifecycle. Optionally, the global transaction processor can be a processor running within a centralized database.

[0082] S220. Execute a distributed transaction according to the local transaction number to obtain distributed transaction processing data.

[0083] In this embodiment of the invention, a global transaction processor can generate a global transaction number and local transaction numbers under the global transaction number for each real-time data update operation. After generating the local transaction numbers, the global transaction processor can distribute them to local transaction processors, which then process each distributed transaction of the real-time data update operation according to the local transaction numbers to generate distributed transaction processing data. Optionally, there can be one or more local transaction processors processing the distributed transactions corresponding to each local transaction number; this embodiment of the invention does not impose any limitation on this.

[0084] S230. Push the distributed transaction processing data to a message queue for storage.

[0085] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0086] Correspondingly, after a local transaction processor obtains distributed transaction processing data, it can push it to a message queue for storage, allowing the data processing server to consume it. The data processing server can poll the message queue, and if it determines that the distributed transaction processing data for the current local transaction number is not the distributed transaction processing data for the current target local transaction number, it will cache the distributed transaction processing data for the current local transaction number in the cache queue. In subsequent processes, the data processing server can poll the message queue and / or the cache queue based on the cache queue data flags to sequentially obtain the distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation, and synchronously update the aggregate database with the sequentially obtained distributed transaction processing data according to the transaction processing order.

[0087] This invention provides an embodiment of the invention that obtains the local transaction number issued by the global transaction processor based on the real-time data update operation through a local transaction processor, executes a distributed transaction based on the local transaction number, obtains distributed transaction processing data, and pushes the distributed transaction processing data to a message queue for storage. This enables the data processing server to synchronously update the distributed transaction processing data to the aggregation server according to the transaction processing order, thus solving the problem of the inability to guarantee the timeliness of real-time data updates in existing real-time data update methods. This invention ensures the timeliness of real-time data updates, thereby improving the accuracy and reliability of real-time data updates.

[0088] Example 3

[0089] Figure 3 This is a flowchart of a real-time data update method provided in Embodiment 3 of the present invention. This embodiment is applicable to situations where a global transaction processor generates a transaction number and distributes it to local transaction processors and a data processing server. The local transaction processors then generate distributed transaction processing data that needs to be updated in real time. This distributed transaction processing data is then synchronously updated according to a time sequence through a data processing server, message queue, and cache queue. This method can be executed by a real-time data update device configured in the global transaction processor. This device can be implemented in software and / or hardware and is generally integrated into an electronic device, which can be a terminal device or a server device, used in conjunction with the local transaction processor and the data processing server. Correspondingly, as... Figure 3 As shown, the method includes the following operations:

[0090] S310. In response to the real-time data update operation, generate the global transaction number and local transaction number corresponding to the real-time data update operation.

[0091] In this embodiment of the invention, when a user performs a business operation through the system front-end of the real-time data update system, the global transaction processor in the real-time data update system can respond to the real-time data update operation and generate a global transaction number and a local transaction number corresponding to the real-time data update operation.

[0092] S320. Send the global transaction number and local transaction number corresponding to the real-time data update operation to the data processing server.

[0093] S330. Receive the transaction number association information fed back by the data processing server, and if the transaction number association information passes the verification, push the local transaction number to the local transaction processor so that the local transaction processor can execute the distributed transaction according to the local transaction number to obtain the distributed transaction processing data.

[0094] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order. The transaction number association information can be information related to the transaction number, such as the transaction number itself or character information generated from the transaction number. This embodiment of the invention does not limit the specific content of the transaction number association information.

[0095] Furthermore, the global transaction processor can send the generated global transaction number and local transaction number to the data processing server for verification. Upon receiving the global and local transaction numbers, the data processing server can provide the global transaction processor with transaction number association information. This can be done by directly providing the received global and local transaction numbers, or by encrypting the global and local transaction numbers using an encryption algorithm to generate an encrypted string, which is then sent back to the global transaction processor as transaction number association information. After receiving the transaction number association information from the data processing server, the global transaction processor verifies it. For example, if the transaction number association information is the global and local transaction numbers, it can directly verify whether the global and local transaction numbers are the same as the transaction number information sent to the data processing server. If the transaction number association information is an encrypted string generated by encrypting the global and local transaction numbers using an encryption algorithm, it can decrypt the encrypted string to obtain the global and local transaction numbers, and verify whether the global and local transaction numbers are the same as the transaction number information sent to the data processing server. If the global transaction processor determines that the transaction number association information has passed verification, it can push the local transaction number to the local transaction processor. The local transaction processor executes a distributed transaction based on the received local transaction number, obtaining distributed transaction processing data. The data processing server can then poll the target queue based on the received global transaction number and local transaction number to determine whether the distributed transaction processing data for the current local transaction number is the same as the distributed transaction processing data for the current target local transaction number, thereby sequentially retrieving the distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation.

[0096] This invention, in response to real-time data update operations, utilizes a global transaction processor to generate a global transaction number and a local transaction number corresponding to the real-time data update operation. These global and local transaction numbers are then sent to a data processing server, which in turn receives transaction number association information. If the transaction number association information passes verification, the local transaction number is pushed to a local transaction processor. The local transaction processor then executes a distributed transaction based on the local transaction number, obtaining distributed transaction processing data. Furthermore, the data processing server polls the message queue and / or the cache queue based on cache queue data flags to sequentially retrieve the distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation. This sequentially retrieved distributed transaction processing data is then synchronously updated to the aggregate database according to the transaction processing order. This addresses the issue of existing real-time data update methods failing to guarantee the timeliness of real-time data updates, ensuring the timeliness of real-time data updates and thus improving the accuracy and reliability of real-time data updates.

[0097] Example 4

[0098] Figure 4 This is a flowchart of a real-time data update method provided in Embodiment 4 of the present invention, as follows: Figure 4 As shown, the method includes the following operations:

[0099] S410. In response to the real-time data update operation, the global transaction processor generates the global transaction number and the local transaction number corresponding to the real-time data update operation.

[0100] S420. The global transaction number and local transaction number corresponding to the real-time data update operation are sent to the data processing server through the global transaction processor.

[0101] S430. Receive the transaction number association information fed back by the data processing server through the global transaction processor, and push the local transaction number to the local transaction processor if it is determined that the transaction number association information passes the verification.

[0102] S440. Obtain the local transaction number issued by the global transaction processor based on the real-time data update operation through the local transaction processor, and execute the distributed transaction according to the local transaction number to obtain the distributed transaction processing data.

[0103] S450. The distributed transaction processing data is pushed to the message queue for storage through the local transaction processor.

[0104] S460. The data processing server polls the message queue and / or cache queue according to the cache queue data flag to sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation.

[0105] S470. The distributed transaction processing data obtained sequentially is synchronously updated to the aggregate database according to the transaction processing order through the data processing server.

[0106] Optionally, the data processing server is specifically configured to: poll the message queue when the flag data of the cache queue data flag is determined to be first flag data, to obtain distributed transaction processing data of the current target local transaction number according to the transaction processing order; and poll the message queue and the cache queue when the flag data of the cache queue data flag is determined to be second flag data, to obtain distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

[0107] Optionally, the data processing server is further configured to: after the sequentially acquired distributed transaction processing data is synchronously updated to the aggregate database according to the transaction processing order, reset the flag data of the cache queue data flag to the first flag data.

[0108] In a specific example, the real-time data update method may include the following operations:

[0109] Step 1: Preparatory Work

[0110] Step 1.1: Each time a user performs a real-time data update operation through the system front-end of the real-time data update system, the global transaction server generates a global transaction number, such as GT001, for the real-time data update operation, and generates a set of sequential local transaction numbers LT001, LT002, and LT003 corresponding to this global transaction number GT001. Optionally, this set of local transaction numbers can be collectively referred to as a transaction number group. The order of the local transaction numbers in the transaction number group reflects the intended order of local transaction commits when the global transaction server commits the global transaction.

[0111] Step 1.2: The global transaction processor establishes a communication connection with the data processing server and sends the global transaction number GT001 and its included local transaction numbers LT001, LT002, and LT003 corresponding to this business operation to the data processing server. Upon receiving the transaction number, the data processing server confirms receipt and returns the transaction number association information to the global transaction processor. Simultaneously, the data processing server can store the received transaction number locally.

[0112] Step 1.3: The global transaction processor receives the transaction number association information returned by the data processing server, verifies it, and pushes this group of local transaction numbers to the local transaction processor after confirming that it is correct.

[0113] Step 2: The local transaction processor performs distributed transactions based on local transaction numbers LT001, LT002, and LT003, and then submits the content to the message queue upon completion.

[0114] Step 2.1: The local transaction processor executes the start, commit, and rollback of distributed transactions according to local transaction numbers LT001, LT002, and LT003. Specifically, local transaction number LT001 corresponds to the started distributed transaction, local transaction number LT002 ​​corresponds to the committed distributed transaction, and local transaction number LT003 corresponds to the rolled-back distributed transaction.

[0115] Step 2.2: After the local transaction processor completes processing the distributed transaction, it pushes the resulting distributed transaction processing data to the message queue. It is understandable that due to various influencing factors such as network quality, the distributed transaction processing data stored in the message queue may be out of order or stored sequentially.

[0116] Step 3: The data processing server polls data from the message queue and cache queue based on the global transaction number GT001 and the corresponding transaction number groups LT001, LT002 ​​and LT003 obtained from the global transaction processor, and synchronously updates the data to the aggregation server in the order of transaction processing.

[0117] Step 3.1: The data processing server polls the message queue. If it retrieves distributed transaction processing data for the current target local transaction number in the transaction number group LT001, LT002, and LT003, such as distributed transaction processing data for LT001, then it synchronously updates this distributed transaction processing data to the aggregation server. If it does not retrieve distributed transaction processing data for the current target local transaction number, then it saves this distributed transaction processing data to the cache queue and sets the flag associated with the global transaction number GT001 in the cache queue to true.

[0118] Step 3.2: During the later data polling process, if the flag associated with the global transaction number GT001 in the cache queue is true, the data processing server polls data from both the message queue and the cache queue. If the obtained data is distributed transaction processing data for the current target local transaction number in the order of transaction number groups LT001, LT002, and LT003, such as the distributed transaction processing data for LT002, then this distributed transaction processing data is synchronously updated to the aggregation server. If the flag associated with the global transaction number in the cache queue is false, then the operation in step 3.1 is performed.

[0119] Step 3.3: After the data processing server completes the synchronization update operation of the distributed transaction processing data of all local transaction numbers LT001, LT002 ​​and LT003 in the transaction number group corresponding to the global transaction number GT001, it sets the flag bit associated with the global transaction number in the cache queue to false and disconnects the communication connection with the global transaction processor.

[0120] It should be noted that after the data processing server polls for the distributed transaction processing data of the current target local transaction number, it may temporarily not synchronize it to the aggregation server, but instead cache it locally. Once the data processing server has cached the distributed transaction processing data of all local transaction numbers in sequence, it can then statistically update the cached distributed transaction processing data to the aggregation database according to the transaction processing order.

[0121] Compared to existing real-time data update methods, the aforementioned real-time data update method effectively addresses the issue of maintaining orderliness during data aggregation, thereby ensuring the orderliness of data queries after aggregation. By maintaining orderliness in real-time data aggregation, the problem of discrepancies between data queries and actual business operation results caused by aggregating data from sharded databases can be resolved.

[0122] This invention, in response to real-time data update operations, utilizes a global transaction processor to generate a global transaction number and a local transaction number corresponding to the real-time data update operation. These global and local transaction numbers are then sent to a data processing server, which in turn receives transaction number association information. If the transaction number association information passes verification, the local transaction number is pushed to a local transaction processor. The local transaction processor then executes a distributed transaction based on the local transaction number, obtaining distributed transaction processing data. Furthermore, the data processing server polls the message queue and / or the cache queue based on cache queue data flags to sequentially retrieve the distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation. This sequentially retrieved distributed transaction processing data is then synchronously updated to the aggregate database according to the transaction processing order. This addresses the issue of existing real-time data update methods failing to guarantee the timeliness of real-time data updates, ensuring the timeliness of real-time data updates and thus improving the accuracy and reliability of real-time data updates.

[0123] Example 5

[0124] Figure 5This is a schematic diagram of a real-time data update system provided in Embodiment 5 of the present invention. The structure of the real-time data update system includes: a global transaction processor 510, a local transaction processor 520, and a data processing server 530. The global transaction processor 510 is communicatively connected to the local transaction processor 520, and the global transaction processor 510 is also communicatively connected to the data processing server 530.

[0125] The global transaction processor 510 is configured to: in response to a real-time data update operation, generate a global transaction number and a local transaction number corresponding to the real-time data update operation, and send the global transaction number and the local transaction number corresponding to the real-time data update operation to the data processing server 530; receive transaction number association information fed back by the data processing server 530, and push the local transaction number to the local transaction processor 520 if it is determined that the transaction number association information passes the verification.

[0126] The local transaction processor 520 is used to: obtain the local transaction number issued by the global transaction processor 510 based on the real-time data update operation, execute the distributed transaction based on the local transaction number, obtain the distributed transaction processing data, and push the distributed transaction processing data to the message queue 540 for storage.

[0127] The data processing server 530 is used to: poll the target queue according to the cache queue data flag, and sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue 540 and / or a cache queue 550; and synchronously update the sequentially obtained distributed transaction processing data to the aggregate database according to the transaction processing order.

[0128] Optionally, the data processing server 530 is specifically configured to: poll the message queue 540 when the flag data of the cache queue data flag is determined to be first flag data, to obtain distributed transaction processing data of the current target local transaction number according to the transaction processing order; and poll the message queue 540 and the cache queue 550 when the flag data of the cache queue data flag is determined to be second flag data, to obtain distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue 550.

[0129] Optionally, the data processing server 530 is further configured to: after the sequentially acquired distributed transaction processing data is synchronously updated to the aggregate database according to the transaction processing order, reset the flag data of the cache queue data flag to the first flag data.

[0130] This invention, in response to real-time data update operations, utilizes a global transaction processor to generate a global transaction number and a local transaction number corresponding to the real-time data update operation. These global and local transaction numbers are then sent to a data processing server, which in turn receives transaction number association information. If the transaction number association information passes verification, the local transaction number is pushed to a local transaction processor. The local transaction processor then executes a distributed transaction based on the local transaction number, obtaining distributed transaction processing data. Furthermore, the data processing server polls the message queue and / or the cache queue based on cache queue data flags to sequentially retrieve the distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation. This sequentially retrieved distributed transaction processing data is then synchronously updated to the aggregate database according to the transaction processing order. This addresses the issue of existing real-time data update methods failing to guarantee the timeliness of real-time data updates, ensuring the timeliness of real-time data updates and thus improving the accuracy and reliability of real-time data updates.

[0131] It should be noted that any arrangement or combination of the technical features in the above embodiments also falls within the protection scope of this invention.

[0132] Example 6

[0133] Figure 6 This is a schematic diagram of a real-time data update device provided in Embodiment Six of the present invention. This real-time data update device can be configured on a data processing server, such as... Figure 6 As shown, the device includes: a distributed transaction processing data acquisition module 610 and a distributed transaction processing data update module 620, wherein:

[0134] The distributed transaction processing data acquisition module 610 is used to poll the target queue according to the cache queue data flag, so as to sequentially acquire the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and / or a cache queue.

[0135] The distributed transaction processing data update module 620 is used to synchronously update the sequentially acquired distributed transaction processing data to the aggregate database according to the transaction processing order.

[0136] Optionally, the distributed transaction processing data acquisition module 610 is specifically used to: poll the message queue when the flag data of the cache queue data flag is determined to be the first flag data, so as to acquire the distributed transaction processing data of the current target local transaction number according to the transaction processing order;

[0137] If the flag data of the cache queue data flag is determined to be the second flag data, the message queue and the cache queue are polled to obtain the distributed transaction processing data of the current target local transaction number in accordance with the transaction processing order;

[0138] Wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is used to cache in the cache queue.

[0139] Optionally, the real-time data update device may further include: a flag reset module, used to reset the flag data of the cache queue data flag to the first flag data.

[0140] This invention addresses the problem of inconsistent real-time data update timing in existing methods by having a data processing server poll the message queue and / or cache queue based on cache queue data flags. This sequentially retrieves distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation, and then synchronously updates the sequentially retrieved distributed transaction processing data to the aggregate database according to the transaction processing order. This ensures the timeliness of real-time data updates and improves the accuracy and reliability of real-time data updates.

[0141] The aforementioned real-time data update device can execute the real-time data update method performed by the data processing server provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment can be found in the real-time data update method performed by the data processing server provided in any embodiment of the present invention.

[0142] Example 7

[0143] Figure 7 This is a schematic diagram of a real-time data update device provided in Embodiment 7 of the present invention. This real-time data update device can be configured in a local transaction processor, such as... Figure 7 As shown, the device includes: a local transaction number acquisition module 710, a distributed transaction processing data generation module 720, and a distributed transaction processing data push module 730, wherein:

[0144] The local transaction number acquisition module 710 is used to acquire the local transaction number issued by the global transaction processor based on the real-time data update operation;

[0145] The distributed transaction processing data generation module 720 is used to execute a distributed transaction according to the local transaction number to obtain distributed transaction processing data.

[0146] The distributed transaction processing data push module 730 is used to push the distributed transaction processing data to a message queue for storage.

[0147] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0148] This invention provides an embodiment of the invention that obtains the local transaction number issued by the global transaction processor based on the real-time data update operation through a local transaction processor, executes a distributed transaction based on the local transaction number, obtains distributed transaction processing data, and pushes the distributed transaction processing data to a message queue for storage. This enables the data processing server to synchronously update the distributed transaction processing data to the aggregation server according to the transaction processing order, thus solving the problem of the inability to guarantee the timeliness of real-time data updates in existing real-time data update methods. This invention ensures the timeliness of real-time data updates, thereby improving the accuracy and reliability of real-time data updates.

[0149] The aforementioned real-time data update device can execute the real-time data update method executed by the local transaction processor provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment can be found in the real-time data update method executed by the local transaction processor provided in any embodiment of the present invention.

[0150] Example 8

[0151] Figure 8 This is a schematic diagram of a real-time data update device provided in Embodiment 8 of the present invention. This real-time data update device can be configured in a global transaction processor, such as... Figure 8 As shown, the device includes: a transaction number generation module 810, a transaction number sending module 820, and a local transaction number pushing module 830, wherein:

[0152] The transaction number generation module 810 is used to generate a global transaction number and a local transaction number corresponding to the real-time data update operation in response to the real-time data update operation.

[0153] The transaction number sending module 820 is used to send the global transaction number and local transaction number corresponding to the real-time data update operation to the data processing server.

[0154] The local transaction number push module 830 is used to receive the transaction number association information fed back by the data processing server, and push the local transaction number to the local transaction processor when it is determined that the transaction number association information passes the verification, so that the local transaction processor can execute the distributed transaction according to the local transaction number to obtain the distributed transaction processing data.

[0155] The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order.

[0156] This invention, in response to real-time data update operations, utilizes a global transaction processor to generate a global transaction number and a local transaction number corresponding to the real-time data update operation. These global and local transaction numbers are then sent to a data processing server, which in turn receives transaction number association information. If the transaction number association information passes verification, the local transaction number is pushed to a local transaction processor. The local transaction processor then executes a distributed transaction based on the local transaction number, obtaining distributed transaction processing data. Furthermore, the data processing server polls the message queue and / or the cache queue based on cache queue data flags to sequentially retrieve the distributed transaction processing data for each local transaction number under the global transaction number corresponding to the real-time data update operation. This sequentially retrieved distributed transaction processing data is then synchronously updated to the aggregate database according to the transaction processing order. This addresses the issue of existing real-time data update methods failing to guarantee the timeliness of real-time data updates, ensuring the timeliness of real-time data updates and thus improving the accuracy and reliability of real-time data updates.

[0157] The aforementioned real-time data update device can execute the real-time data update method executed by the global transaction processor provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment can be found in the real-time data update method executed by the global transaction processor provided in any embodiment of the present invention.

[0158] Example 9

[0159] Figure 9A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0160] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0161] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0162] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as real-time data update methods.

[0163] In some embodiments, the real-time data update method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the real-time data update method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the real-time data update method by any other suitable means (e.g., by means of firmware).

[0164] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0165] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0166] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0167] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0168] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0169] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

Claims

1. A real-time data update method, characterized in that, Applications to data processing servers include: The target queue is polled according to the cache queue data flag to sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and a cache queue; The sequentially acquired distributed transaction processing data is synchronously updated to the aggregate database according to the transaction processing order; The step of polling the target queue according to the cache queue data flag to sequentially obtain the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation includes: If the flag data of the cache queue data flag is determined to be the first flag data, the message queue is polled to obtain the distributed transaction processing data of the current target local transaction number in accordance with the transaction processing order; If the flag data of the cache queue data flag is determined to be the second flag data, the message queue and the cache queue are polled to obtain the distributed transaction processing data of the current target local transaction number in accordance with the transaction processing order; Wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is used to cache in the cache queue.

2. The method according to claim 1, characterized in that, After the distributed transaction processing data acquired sequentially is synchronously updated to the aggregate database according to the transaction processing order, the method further includes: Reset the flag data of the cache queue data flag to the first flag data.

3. A real-time data update method, characterized in that, Applied to local transaction processors, including: Obtain the local transaction number issued by the global transaction processor based on the real-time data update operation; Execute a distributed transaction based on the local transaction number to obtain distributed transaction processing data; The distributed transaction processing data is pushed to a message queue for storage; The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order; The data processing server is specifically configured to: poll the message queue when the flag data of the cache queue data flag is determined to be the first flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; and poll the message queue and the cache queue when the flag data of the cache queue data flag is determined to be the second flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

4. A real-time data update method, characterized in that, Applied to the global transaction processor, including: In response to a real-time data update operation, a global transaction number and a local transaction number corresponding to the real-time data update operation are generated; Send the global transaction number and local transaction number corresponding to the real-time data update operation to the data processing server; The system receives transaction number association information from the data processing server, and if the transaction number association information passes the verification, pushes the local transaction number to the local transaction processor so that the local transaction processor can execute a distributed transaction based on the local transaction number to obtain distributed transaction processing data. The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order; The data processing server is specifically configured to: poll the message queue when the flag data of the cache queue data flag is determined to be the first flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; and poll the message queue and the cache queue when the flag data of the cache queue data flag is determined to be the second flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

5. A real-time data update device, characterized in that, Configured on the data processing server, including: The distributed transaction processing data acquisition module is used to poll the target queue according to the cache queue data flag, so as to sequentially acquire the distributed transaction processing data of each local transaction number under the global transaction number corresponding to the real-time data update operation; wherein, the target queue includes a message queue and a cache queue; The distributed transaction processing data update module is used to synchronously update the sequentially acquired distributed transaction processing data to the aggregate database according to the transaction processing order; The distributed transaction processing data acquisition module is specifically used for: when the flag data of the cache queue data flag is determined to be the first flag data, polling the message queue to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; when the flag data of the cache queue data flag is determined to be the second flag data, polling the message queue and the cache queue to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, when the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

6. A real-time data update device, characterized in that, Configured in a local transaction processor, including: The local transaction number acquisition module is used to acquire the local transaction number issued by the global transaction processor based on the real-time data update operation. A distributed transaction processing data generation module is used to execute a distributed transaction based on the local transaction number to obtain distributed transaction processing data. A distributed transaction processing data push module is used to push the distributed transaction processing data to a message queue for storage; The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order; The data processing server is specifically configured to: poll the message queue when the flag data of the cache queue data flag is determined to be the first flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; and poll the message queue and the cache queue when the flag data of the cache queue data flag is determined to be the second flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

7. A real-time data update device, characterized in that, Configured in the global transaction processor, including: The transaction number generation module is used to generate a global transaction number and a local transaction number corresponding to a real-time data update operation in response to the real-time data update operation. The transaction number sending module is used to send the global transaction number and local transaction number corresponding to the real-time data update operation to the data processing server; The local transaction number push module is used to receive the transaction number association information fed back by the data processing server, and push the local transaction number to the local transaction processor when it is determined that the transaction number association information passes the verification, so that the local transaction processor can execute the distributed transaction according to the local transaction number to obtain the distributed transaction processing data. The distributed transaction processing data is used by the data processing server to synchronously update the aggregation server according to the transaction processing order; The data processing server is specifically configured to: poll the message queue when the flag data of the cache queue data flag is determined to be the first flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; and poll the message queue and the cache queue when the flag data of the cache queue data flag is determined to be the second flag data, to obtain the distributed transaction processing data of the current target local transaction number according to the transaction processing order; wherein, if the distributed transaction processing data of the current local transaction number obtained by polling the target queue is not the distributed transaction processing data of the current target local transaction number, the distributed transaction processing data of the current local transaction number is cached in the cache queue.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the real-time data update method according to any one of claims 1-2, 3 or 4.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the real-time data update method according to any one of claims 1-2, 3 or 4.