A data processing method, device, apparatus, and storage medium

By retrieving the transaction detail event set from the compensation event table and querying the associated table to store the data, the problem of increased latency caused by out-of-order data in streaming computing was solved, thereby improving data accuracy and user experience.

CN115601172BActive Publication Date: 2026-02-17SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211301834.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2026-02-17
Estimated Expiration
2042-10-24

AI Technical Summary

Technical Problem

Existing streaming computing methods suffer from data out-of-order issues when processing high-concurrency data streams, leading to increased latency and affecting data accuracy.

Method used

By retrieving the set of transaction details to be queried from the compensation event table, querying the related tables based on the customer account, and storing the transaction details in the database, the problem of data disorder is solved and data accuracy is improved.

Benefits of technology

Without affecting the latency of most data, it improves data accuracy, ensures that most data is entered into the database in near real-time, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115601172B_ABST
    Figure CN115601172B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method, device and equipment and a storage medium. The method comprises the following steps: acquiring a to-be-inquired transaction detail event set from a compensation event table according to a preset acquisition condition; inquiring an association table corresponding to a customer account number of each to-be-inquired transaction detail event in the to-be-inquired transaction detail event set, wherein the association table comprises a corresponding relationship between the customer account number and the customer number; if a target customer number corresponding to the to-be-inquired transaction detail event is inquired, storing the target customer number and transaction details corresponding to the to-be-inquired transaction detail event into a database. Through the technical scheme of the application, the data out-of-order problem in high-concurrency data stream processing based on Flink stream processing can be solved, and the data accuracy can be improved without affecting the delay of most data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Stream computing is a data engine designed to process infinite datasets. Currently, the main methods for handling out-of-order data include: windowing, watermarking, and allowing late arrivals.

[0003] Window mode: A window is a method of dividing infinite data into finite blocks for processing. Opening a window can solve the problem of data disorder.

[0004] Watermark method: Flink's time semantic Watermark uses the event time minus the maximum allowed out-of-order time as the watermark. The principle is equivalent to giving the data a certain amount of extra time, then closing the window and triggering the calculation.

[0005] Allowing late arrival: The principle is to give the data a certain amount of time to arrive late, based on the watermark. When the watermark reaches the window size, the calculation is triggered, but the window is not closed. The window is actually closed after the allowed late arrival time is reached.

[0006] Conventional methods for handling out-of-order data have the following drawbacks:

[0007] Windowed calculations can introduce latency to the overall data due to the size or duration of the window.

[0008] WaterMark adds further latency to the data on top of the windowed model.

[0009] Allowing late arrivals also adds a delay to the data processing based on the window calculation. Summary of the Invention

[0010] This invention provides a data processing method, apparatus, device, and storage medium to solve the data out-of-order problem in high-concurrency data stream processing based on Flink streaming processing, and to improve data accuracy without affecting most data latency.

[0011] According to one aspect of the present invention, a data processing method is provided, comprising:

[0012] Based on preset collection conditions, obtain the set of transaction detail events to be queried from the compensation event table;

[0013] Query the association table based on the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried, wherein the association table includes: the correspondence between customer account and customer number;

[0014] If the target customer number corresponding to the transaction details event to be queried is found, the target customer number and the transaction details corresponding to the transaction details event to be queried are stored in the database.

[0015] According to another aspect of the present invention, a data processing apparatus is provided, the data processing apparatus comprising:

[0016] The acquisition module is used to obtain a set of transaction detail events to be queried from the compensation event table according to preset acquisition conditions;

[0017] The query module is used to query the association table based on the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried, wherein the association table includes the correspondence between customer accounts and customer numbers;

[0018] The storage module is used to store the target customer number and the transaction details corresponding to the transaction details event to be queried into the database if the target customer number corresponding to the transaction details event to be queried is found.

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

[0020] At least one processor; and

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

[0022] 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 data processing method according to any embodiment of the present invention.

[0023] 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 data processing method described in any embodiment of the present invention.

[0024] This invention, through its embodiments, obtains a set of transaction detail events to be queried from a compensation event table based on preset collection conditions; queries a correlation table based on the customer account corresponding to each transaction detail event in the set, wherein the correlation table includes the correspondence between customer accounts and customer numbers; if a target customer number corresponding to the transaction detail event is found, the target customer number and the transaction details corresponding to the transaction detail event are stored in a database. This solves the data out-of-order problem in high-concurrency data stream processing based on Flink streaming processing, and improves data accuracy without affecting most data latency.

[0025] 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

[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0030] 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.

[0031] 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.

[0032] Example 1

[0033] Figure 1This is a flowchart illustrating a data processing method provided in an embodiment of the present invention. This embodiment is applicable to data processing situations. The method can be executed by the data processing device in this embodiment of the present invention, which can be implemented in software and / or hardware, such as... Figure 1 As shown, the method specifically includes the following steps:

[0034] S110: Based on the preset collection conditions, obtain the set of transaction detail events to be queried from the compensation event table.

[0035] The preset collection conditions may be: the number of retries for the transaction detail event is less than or equal to the number of retries threshold and the event status of the transaction detail event is unprocessed; or, the preset collection conditions may be that the event status of the transaction detail event is unprocessed.

[0036] The compensation event table includes: transaction details events for which no customer number was found, the number of retries for the transaction details events for which no customer number was found, and the status information of the transaction details events for which no customer number was found.

[0037] The compensation event table can be generated as follows: A first event set is obtained from a first topic using the Source component; the first event set is filtered according to the table name field corresponding to each event to obtain a transaction detail event set; the associated table is queried based on the customer account corresponding to each transaction detail event in the transaction detail event set; and a compensation event table is generated based on transaction detail events for which no customer number was found. The compensation event table is updated as follows: if no target customer number corresponding to the transaction detail event to be queried is found, the transaction detail event to be queried is stored in the compensation event table, and the retry count for the transaction detail event to be queried is updated. The compensation event table can also be updated as follows: if a target customer number corresponding to the transaction detail event to be queried is found, the target customer number and the transaction details corresponding to the transaction detail event to be queried are stored in the database, and the status information corresponding to the transaction detail event to be queried is modified to the processed status.

[0038] Specifically, based on preset collection conditions, the method for obtaining the set of transaction detail events to be queried from the compensation event table can be as follows: obtain a preset number of transaction detail events to be queried from the compensation event table that have a retry count less than or equal to the count threshold and whose event status is unprocessed, and generate the set of transaction detail events to be queried based on the preset number of transaction detail events to be queried.

[0039] S120, query the association table according to the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried.

[0040] The association table includes the correspondence between customer accounts and customer numbers.

[0041] The association table includes the correspondence between customer accounts and customer numbers. The customer number is a unique identifier for each customer. The association table can be generated as follows: a second event set is obtained from a second topic using the Source component; the second event set is filtered according to the table name field corresponding to each event to obtain a customer information event set; and an association table is generated based on the event type and customer information corresponding to each customer information event in the customer information event set.

[0042] Specifically, parsing transaction detail events yields transaction details, which include: customer account.

[0043] Specifically, the method for querying the association table based on the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried can be as follows: parse each transaction detail event in the set of transaction detail events to be queried to obtain the transaction details corresponding to each transaction detail event, and then obtain the customer account corresponding to each transaction detail event. Query the association table based on the customer account corresponding to each transaction detail event.

[0044] S130, if the target customer number corresponding to the transaction details event to be queried is found, the target customer number and the transaction details corresponding to the transaction details event to be queried are stored in the database.

[0045] Specifically, if the target customer number corresponding to the transaction details event to be queried is found, the target customer number and the transaction details corresponding to the transaction details event to be queried are stored in the database, and the status information of the transaction details event to be queried in the compensation event table is updated to the processed status.

[0046] It should be noted that if the target customer number corresponding to the transaction details event to be queried is not found, the transaction details event to be queried will be stored in the compensation event table, and the retry count of the transaction details event to be queried will be updated.

[0047] Optionally, the preset collection conditions include: the number of retries for the transaction detail event is less than or equal to a threshold number, and the event status of the transaction detail event is unprocessed.

[0048] The number of retries is incremented by one for each query, starting from when the transaction details event is stored in the compensation event table. The threshold number of retries is preset.

[0049] If a transaction detail event is one where no customer number is found, then the event status of the transaction detail event will be determined as unprocessed.

[0050] Optionally, based on preset collection conditions, a set of transaction detail events to be queried can be obtained from the compensation event table, including:

[0051] Retrieve a preset number of transaction detail events from the compensation event table that have a retry count less than or equal to the threshold and whose event status is unprocessed.

[0052] A set of transaction detail events to be queried is generated based on the preset number of transaction detail events to be queried.

[0053] The preset quantity can be a pre-set batch size.

[0054] In a specific example, data in the compensation event table that is in an unprocessed state is collected using a periodic collection method with a limited batch size. The collection conditions are: the number of retries does not exceed the set size, and the data status is unprocessed.

[0055] Optionally, before retrieving the set of transaction detail events to be queried from the compensation event table based on preset collection conditions, the following steps are also included:

[0056] The first event set is obtained from the first topic using the Source component;

[0057] The first event set is filtered based on the table name field corresponding to each event to obtain the transaction detail event set;

[0058] Query the associated table based on the customer account corresponding to each transaction detail event in the transaction detail event set;

[0059] A compensation event table is generated based on transaction details events for which no customer number was found.

[0060] Specifically, the method for retrieving the first event set from the first topic through the Source component can be as follows: obtain the first configuration information of the Source component, determine the topic identifier as the first topic based on the first configuration information of the Source component, and then retrieve the first event set from the first topic through the Source component.

[0061] Specifically, the method for filtering the first event set based on the table name field corresponding to each event to obtain the transaction detail event set can be as follows: obtain the table name field corresponding to each event in the first event set, match the table name field corresponding to each event with a first preset table name field list (the first preset table name field list is the list of table name fields corresponding to transaction detail events), obtain the events in the first event set that have the same table name field as those in the first preset table name field list; generate the transaction detail event set based on the events that have the same table name field as those in the first preset table name field list.

[0062] Specifically, the method for generating a compensation event table based on transaction details events for which no customer number was found is as follows: obtain the transaction details events for which no customer number was found, the status information of the transaction details events, and the number of retries (the initial number of retries is 0); generate a compensation event table based on the transaction details events for which no customer number was found, the status information of the transaction details events, and the number of retries.

[0063] Optional, also includes:

[0064] The second event set is obtained from the second topic through the Source component;

[0065] The second event set is filtered based on the table name field corresponding to each event to obtain the customer information event set;

[0066] The association table is updated based on the event type and customer information corresponding to each customer information event in the customer information event set.

[0067] The method for retrieving the second event set from the second topic through the Source component can be as follows: Obtain the second configuration information of the Source component, determine the topic identifier as the second topic based on the second configuration information of the Source component, and then retrieve the second event set from the second topic through the Source component.

[0068] The method for filtering the second event set based on the table name field corresponding to each event to obtain the customer information event set can be as follows: obtain the table name field corresponding to each event in the second event set, match the table name field corresponding to each event with a second preset table name field list (the second preset table name field list is the list of table name fields corresponding to customer information events), obtain the events in the second event set that have the same table name field as those in the second preset table name field list, and generate the customer information event set based on the events that have the same table name field as those in the second preset table name field list.

[0069] Specifically, updating the associated table based on the event type and customer information corresponding to each customer information event in the customer information event set can be done in the following ways: Generate database operation statements based on the event type and customer information corresponding to each customer information event in the customer information event set, and then synchronize the customer information to the database using these database operation statements. Alternatively, updating the associated table based on the event type and customer information corresponding to each customer information event in the customer information event set can be done as follows: if the event type is an add event, perform an add operation on the associated table based on the customer information; if the event type is a delete event, perform a delete operation on the associated table based on the customer information; and if the event type is a modify event, perform a modify operation on the associated table based on the customer information.

[0070] Optionally, the association table can be updated based on the event type and customer information corresponding to each customer information event in the customer information event set, including:

[0071] If the event type is a new event, then add the relevant table based on the customer information;

[0072] If the event type is a deletion event, then the related table will be deleted based on the customer information;

[0073] If the event type is a modification event, then the associated table will be modified based on the customer information.

[0074] If the event type is a new event, the way to add a new event to the associated table based on the customer information is as follows: if the event type is a new event, obtain the customer account and customer number included in the customer information, and add the customer account and customer number included in the customer information to the associated table.

[0075] If the event type is a deletion event, the method for deleting the associated table based on customer information can be as follows: If the event type is a deletion event, obtain the customer account and customer number included in the customer information, query the associated table based on the customer number, obtain the data in the associated table corresponding to the customer number, and delete the data in the associated table corresponding to the customer number from the associated table.

[0076] If the event type is a modification event, the modification operation on the associated table based on the customer information can be performed as follows: If the event type is a modification event, the customer account and customer number included in the customer information are retrieved, the associated table is queried based on the customer number, the data in the associated table corresponding to the customer number is obtained, and the data in the associated table is modified based on the customer information.

[0077] Optional, also includes:

[0078] If the target customer number corresponding to the transaction details event to be queried is not found, the transaction details event to be queried is stored in the compensation event table, and the retry count of the transaction details event to be queried is updated.

[0079] Specifically, the way to update the retry count for the transaction details to be queried is to increment the retry count by one.

[0080] In a specific example, the business system's OLTP implementation generates transaction details and stores them in the business system's database. The CDC data acquisition tool collects these transaction details and stores them in a specified Kafka topic. Flink's Source component retrieves transaction detail events from the corresponding topic. During Flink's data flow processing, the Flink-connect-jdbc component queries the related tables. Finally, the Flink-connect-jdbc component sinks the transaction details to the TiDB database. The TiDB database is provided to the frontend via either an OLAP service or an OLTP service.

[0081] In terms of business sequence, customer information is generated first in the business system before customers can actually conduct transactions, thus generating transaction details. In practice, some transaction details cannot be associated with customer IDs. Tracing and investigation revealed that due to various factors such as network issues, backpressure, and upstream system data supply methods, customer information events had not yet been stored in the association table, while the transaction details had already been consumed and processed by the Flink cluster. This resulted in out-of-order data, generating dirty data and affecting data consistency. This embodiment of the invention processes transaction details that are not associated with customer IDs separately, thus not affecting the main data flow. The vast majority of transaction detail data can be stored in the database near real-time, thereby improving user experience.

[0082] In another specific example, three Flink streaming processes were designed to implement data processing:

[0083] First, customer information flow processing flow

[0084] Customer information generated by the business system is persisted to the business system database via OLTP. The CDC tool collects and configures the customer information table in the business database, capturing add / modify / delete operations in the customer information table, assembling them into individual events according to agreed event templates, and storing them in the corresponding topic in the Kafka cluster. The Source component binds to the specified topic in the Kafka cluster, obtaining read-only permissions through authentication. To maintain data consistency, the event consumption configuration uses a pre-commit approach to prevent duplicate consumption and dirty data. Customer information events are filtered based on the table name field in the event, and the business fields in the event are mapped to the context of the streaming process. In the Processing layer, database operation flags (add / update / logical delete) in the event are read from the context to generate database operation statements. In the Sink layer, the Flink-connector-jdbc component is used to synchronize upserts to the TIDB database.

[0085] Second, the transaction details streaming process

[0086] Transaction details generated by the business system are persisted to the database via OLTP. The CDC tool collects and configures the transaction detail tables in the business database, assembles them into individual events according to agreed-upon event templates, and stores them in the corresponding topic in the Kafka cluster. The Source component binds to the specified topic in the Kafka cluster, obtaining read-only permissions through authentication. To maintain data consistency, the event consumption configuration uses a pre-commit approach to prevent duplicate consumption and dirty data. Transaction detail events are filtered based on the table name field in the event, and the business fields in the event are mapped to the context of the streaming process. In the Processing layer, based on the account field in the context, the Flink-connector-JDB component queries the related tables. If the customer number is found, the transaction details are widened, assembled into an insert statement based on the business fields in the context, and stored in TIDB, providing online transaction queries for OLAPOLTP. If the customer number cannot be found, the initial retry count is 0, the status is unprocessed, and the transaction details, retry count, status and other information are output to the compensation event table using flink-connector-jdbc, waiting for the data out-of-order compensation process to process.

[0087] Third, the data disorder compensation process

[0088] The source data source is a custom data acquisition component that collects data in the compensation event table that is in an unprocessed state. Data collection is performed periodically with a limited batch size. The collection conditions are that the number of retries does not exceed the set size and the data status is unprocessed. The transaction detail events to be queried obtained from the compensation event table are parsed to obtain fields such as account, retries, and data status, which are then mapped to the context. When processing a transaction detail event, if a corresponding customer number can be found based on the customer account in the context, the data is widened and stored in the database, and the status of the event in the compensation event table is updated to processed. If no corresponding customer number can be found for the transaction detail, the retries in the compensation event table are incremented by one, and the event status remains unprocessed, awaiting batch processing in the next cycle.

[0089] It should be noted that the compensation process parameter configuration and database custom query component can be adjusted according to the actual production operation to achieve the optimal situation and improve the accuracy and data consistency of Flink streaming processing.

[0090] The technical solution of this embodiment obtains a set of transaction detail events to be queried from a compensation event table according to preset collection conditions; queries a correlation table based on the customer account corresponding to each transaction detail event in the set, wherein the correlation table includes the correspondence between customer accounts and customer numbers; if a target customer number corresponding to the transaction detail event is found, the target customer number and the transaction details corresponding to the transaction detail event are stored in the database, which can ensure that most data can be stored in the database in near real-time, improving customer experience. Furthermore, it can ensure the persistence of out-of-order data in the database, so that even if it is not processed in the compensation process, it can be processed in a scheduled batch task at the end of the day.

[0091] Example 2

[0092] Figure 2 This is a schematic diagram of a data processing device provided in an embodiment of the present invention. This embodiment is applicable to data processing applications. The device can be implemented using software and / or hardware, and can be integrated into any device that provides data processing functionality, such as… Figure 2 As shown, the data processing device specifically includes: an acquisition module 210, a query module 220, and a storage module 230.

[0093] The acquisition module is used to obtain a set of transaction detail events to be queried from the compensation event table according to preset acquisition conditions.

[0094] The query module is used to query the association table based on the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried, wherein the association table includes the correspondence between customer accounts and customer numbers;

[0095] The storage module is used to store the target customer number and the transaction details corresponding to the transaction details event to be queried into the database if the target customer number corresponding to the transaction details event to be queried is found.

[0096] The above-described products can perform the methods provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects for performing the methods.

[0097] Example 3

[0098] Figure 3A 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.

[0099] like Figure 3 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.

[0100] 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.

[0101] 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 data processing methods.

[0102] In some embodiments, the data processing 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 data processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data processing method by any other suitable means (e.g., by means of firmware).

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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).

[0107] 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.

[0108] 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.

[0109] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0110] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data processing method, characterized in that, include: Based on preset collection conditions, obtain the set of transaction detail events to be queried from the compensation event table; Query the association table based on the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried, wherein the association table includes: the correspondence between customer account and customer number; If the target customer number corresponding to the transaction details event to be queried is found, the target customer number and the transaction details corresponding to the transaction details event to be queried are stored in the database; Based on preset collection conditions, obtain the set of transaction details events to be queried from the compensation event table, including: obtaining the first event set from the first topic through the Source component; The first event set is filtered based on the table name field corresponding to each event to obtain the transaction detail event set; Query the associated table based on the customer account corresponding to each transaction detail event in the transaction detail event set; Generate a compensation event table based on transaction details events for which no customer number was found; Retrieve a preset number of transaction detail events from the compensation event table that have a retry count less than or equal to the threshold and whose event status is unprocessed. A set of transaction detail events to be queried is generated based on the preset number of such events; The second event set is obtained from the second topic through the Source component; The second event set is filtered based on the table name field corresponding to each event to obtain the customer information event set; The association table is updated based on the event type and customer information corresponding to each customer information event in the customer information event set.

2. The method according to claim 1, characterized in that, The associated table is updated based on the event type and customer information corresponding to each customer information event in the customer information event set, including: If the event type is a new event, then add the relevant table based on the customer information; If the event type is a deletion event, then the related table will be deleted based on the customer information; If the event type is a modification event, then the associated table will be modified based on the customer information.

3. The method according to claim 1, characterized in that, Also includes: If the target customer number corresponding to the transaction details event to be queried is not found, the transaction details event to be queried is stored in the compensation event table, and the retry count of the transaction details event to be queried is updated.

4. A data processing apparatus, characterized in that, include: The acquisition module is used to obtain a set of transaction detail events to be queried from the compensation event table according to preset acquisition conditions; The query module is used to query the association table based on the customer account corresponding to each transaction detail event in the set of transaction detail events to be queried, wherein the association table includes the correspondence between customer accounts and customer numbers; The storage module is used to store the target customer number and the transaction details corresponding to the transaction details event to be queried into the database if the target customer number corresponding to the transaction details event to be queried is found. The data processing device is specifically used for: The first event set is obtained from the first topic using the Source component; The first event set is filtered based on the table name field corresponding to each event to obtain the transaction detail event set; Query the associated table based on the customer account corresponding to each transaction detail event in the transaction detail event set; Generate a compensation event table based on transaction details events for which no customer number was found; Retrieve a preset number of transaction detail events from the compensation event table that have a retry count less than or equal to the threshold and whose event status is unprocessed. A set of transaction detail events to be queried is generated based on the preset number of such events; The second event set is obtained from the second topic through the Source component; The second event set is filtered based on the table name field corresponding to each event to obtain the customer information event set; The association table is updated based on the event type and customer information corresponding to each customer information event in the customer information event set.

5. 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 data processing method according to any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the data processing method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Data query method and device and electronic equipment

    CN110674112A

  • Distributed transaction processing method and device, medium and equipment

    CN112925614A