Business data processing method and device, computer equipment and storage medium

By storing business data in data tables and using asynchronous tasks to perform scheduled locking and unlocking operations, the problem of inconsistent processing of multiple data sources in the existing technology is solved, data consistency processing under high concurrency is achieved, and the server processing capability is improved.

CN118673031APending Publication Date: 2024-09-20CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410726958.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

When dealing with high-concurrency scenarios, the existing technology only considers the data source of a single system and a single module, and cannot achieve data consistency processing under multiple data sources. This results in incomplete data in the server cache and cannot effectively process asset data of multiple types and sources.

Method used

Obtain the generation time of business data and store it in the data table, and regularly obtain the processing status based on asynchronous tasks, and perform locking and unlocking operations to ensure that the data of the same business combination is processed by one task and achieve data consistency under multiple data sources. sexual processing.

Benefits of technology

It realizes business data processing from multiple data sources in high-load scenarios, ensures data consistency, avoids the size limit of server running memory space, and can process more data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673031A
    Figure CN118673031A
Patent Text Reader

Abstract

The invention relates to a business data processing method and device, computer equipment, a storage medium and a computer program product, and relates to the technical field of big data processing. The method comprises the following steps: acquiring business data, and sequentially storing the business data into a data table based on the generation time of the business data; based on a preset asynchronous task, obtaining a processing state of the business data in the data table at regular time, and when the processing state comprises to-be-processed, obtaining a business combination number of the business data of which the processing state is to-be-processed; acquiring service data corresponding to the service combination number, and locking the service combination; and sequentially processing the service data in the locked service combination on the basis of the service time, after the service data processing is finished, unlocking the service combination, and modifying the processing state of the service data in the service combination into the processing completion state. And the consistency and integrity of the business data are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data processing technology, and in particular to a method, device, computer equipment, storage medium and computer program product for processing business data. Background Art

[0002] Financial institutions may engage in asset management business and charge corresponding custody fees, management fees, etc. based on the asset portfolio they operate. There are many types of asset portfolios and source channels. For example, asset types can be divided into paid-in, accrued, deferred, refunded, etc. Asset source channels include direct payment through transaction instructions, offline payment, manual re-entry, and other forms.

[0003] In related technologies, when dealing with high-concurrency scenarios, usually only the data source of a single system and a single module is considered. Due to reliance on cache space, only single-source data consistency can be achieved, that is, the source of data generation is relatively single, and data processing is all in the same engineering module. Only in this way can the cache area of ​​the server have complete data, without considering the multiple types and sources of asset data. Summary of the invention

[0004] Based on this, it is necessary to provide a business data processing method, device, computer equipment, storage medium and computer program product for the above technical problems. The acquisition, storage, use and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0005] In a first aspect, the present application provides a method for processing business data. The method comprises:

[0006] Acquire business data, and store the business data in a data table in sequence based on the generation time of the business data, wherein the data table includes a business combination number and a processing status corresponding to the business data;

[0007] Based on the preset asynchronous task, the processing status of the business data in the data table is obtained regularly. When the processing status includes pending processing, the business combination number of the business data whose processing status is pending processing is obtained;

[0008] Obtain all business data corresponding to the business combination number, and lock the business combination;

[0009] The business data in the locked business combination are processed in sequence based on the business time. After the business data processing is completed, the business combination is unlocked, and the processing status of the business data in the business combination is modified to processing completed.

[0010] In one embodiment, the method further comprises:

[0011] The processing status of the business data in the data table is obtained periodically, and the business data whose processing status is completed is cleared from the data table.

[0012] In one embodiment, after the unlocking operation is performed on the service combination, the method further includes:

[0013] The asynchronous task corresponding to the unlocked business combination enters the pause mode to determine whether the current time reaches the business end time;

[0014] When the current time does not reach the service end time, the asynchronous task corresponding to the unlocked service combination re-timingly obtains the processing status of the service data in the data table.

[0015] In one embodiment, during the process of the asynchronous task periodically acquiring the processing status of the business data in the data table, the method includes:

[0016] Determine the number of concurrent asynchronous tasks;

[0017] The asynchronous tasks corresponding to the asynchronous concurrent quantity are executed periodically and concurrently, and when the processing status of the business data in the acquired data table is pending, the asynchronous tasks are initiated for processing.

[0018] In one embodiment, the locking operation on the service combination includes:

[0019] Multiple asynchronous tasks simultaneously acquire all business data corresponding to the business combination number, and after successful locking, generate a lock identifier, the lock identifier including the business combination number;

[0020] Each asynchronous task processes the business combination that generates the lock identifier. The processing process includes: changing the business data processing state of the successfully locked business combination to being processed and marking the task number of the asynchronous task. The same business combination is successfully locked by an asynchronous task.

[0021] In one embodiment, the method further comprises:

[0022] During the processing of the business combination, new business data is generated, and the processing status of the new business data is pending;

[0023] For a business combination with a generated lock identifier, the processing status of the business data generated when locking is changed to being processed. After the processing is completed and the combination is unlocked, the business data to be processed of the combination is continued to be obtained for the next round of locking processing;

[0024] The new business data is stored in the data table.

[0025] In a second aspect, the present application further provides a device for processing business data, the device comprising:

[0026] A storage module, used to obtain business data, and store the business data in a data table in sequence based on the generation time of the business data, wherein the data table includes a business combination number and a processing status corresponding to the business data;

[0027] An acquisition module, used for acquiring the processing status of the business data in the data table based on a preset asynchronous task timing, and obtaining the business combination number of the business data whose processing status is to be processed when the processing status includes to be processed;

[0028] A locking module, used to obtain all business data corresponding to the business combination number and perform a locking operation on the business combination;

[0029] The unlocking module is used to process the business data in the locked business combination in sequence based on the business time. After the business data processing is completed, the business combination is unlocked and the processing status of the business data in the business combination is changed to processing completed.

[0030] In one embodiment, the device further comprises:

[0031] The processing status of the business data in the data table is obtained periodically, and the business data whose processing status is completed is cleared from the data table.

[0032] In one of the embodiments, after the unlocking operation is performed on the service combination, the device further includes:

[0033] The asynchronous task corresponding to the unlocked business combination enters the pause mode to determine whether the current time reaches the business end time;

[0034] When the current time does not reach the service end time, the asynchronous task corresponding to the unlocked service combination re-timingly obtains the processing status of the service data in the data table.

[0035] In one embodiment, during the process of the asynchronous task periodically acquiring the processing status of the business data in the data table, the device includes:

[0036] Determine the number of concurrent asynchronous tasks;

[0037] The asynchronous tasks corresponding to the asynchronous concurrent quantity are executed periodically and concurrently, and when the processing status of the business data in the acquired data table is pending, the asynchronous tasks are initiated for processing.

[0038] In one embodiment, the locking operation on the service combination includes:

[0039] Multiple asynchronous tasks simultaneously acquire all business data corresponding to the business combination number, and after successful locking, generate a lock identifier, the lock identifier including the business combination number;

[0040] Each asynchronous task processes the business combination that generates the lock identifier, and the processing process includes: changing the business data processing state of the successfully locked business combination to being processed, and marking the task number of the asynchronous task, wherein the same business combination is successfully locked by one asynchronous task.

[0041] In one embodiment, the device further comprises:

[0042] During the processing of the business combination, new business data is generated, and the processing status of the new business data is pending;

[0043] For a business combination with a generated lock identifier, the processing status of the business data generated when locking is changed to being processed. After the processing is completed and the combination is unlocked, the business data to be processed of the combination is continued to be obtained for the next round of locking processing;

[0044] The new business data is stored in the data table.

[0045] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for processing business data when executing the computer program.

[0046] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method for processing business data when the computer program is executed by a processor.

[0047] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method for processing business data are implemented.

[0048] The above-mentioned method for processing business data has at least the following beneficial effects:

[0049] In the embodiment scheme provided by the present disclosure, before processing the business data, the information of the business data can be stored in a data table, and then a high-concurrency scheduled task scans the data table and calculates and processes the relevant business data. Data consistency processing under multiple data sources is realized, and the business data is stored in the data table. Therefore, the concurrency control process basically does not occupy the server running memory space, and more data can be processed in high-load scenarios without worrying about the size limit of the server running memory.

[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0052] FIG1 is an application environment diagram of a method for processing business data in one embodiment;

[0053] Figure 2 A flowchart of a method for processing business data in one embodiment;

[0054] Figure 3 is a schematic diagram of a data table in one embodiment;

[0055] Figure 4 is a schematic diagram of a data table in one embodiment;

[0056] Figure 5 is a schematic diagram of a data table in one embodiment;

[0057] Figure 6 is a flowchart of processing business data in one embodiment;

[0058] Figure 7 A structural block diagram of the processing of business data in one embodiment;

[0059] FIG8 is a diagram showing the internal structure of a computer device in one embodiment;

[0060] FIG. 9 is a diagram showing the internal structure of a server in an embodiment. DETAILED DESCRIPTION

[0061] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0063] The embodiment of the present disclosure provides a method for processing business data, which can be applied in the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0064] In some embodiments of the present disclosure, Figure 2 As shown, a method for processing business data is provided, and the method is applied to the server in Figure 1 to process business data as an example for explanation. It can be understood that the method can be applied to the server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In a specific embodiment, the method can include the following steps:

[0065] S202: Acquire business data, and store the business data in a data table in sequence based on the generation time of the business data. The data table includes a business combination number and a processing status corresponding to the business data.

[0066] Business data should essentially be control information data, not real business data. It only contains control information of some business element fields, so that asynchronous tasks know which day, which combination and which type of data to process. Business data is used here. Real business data can be data such as custody fees and management fees collected by business combinations operated by financial institutions. Business data can be divided into types such as actual collection, provision, deferred payment, and refund. Business data can be obtained through direct payment, offline payment, manual supplementary recording, branch transition account transfer, combination account closure push, manual maintenance and other forms. Business data from different sources may be generated from different software modules, and system modules need to receive data from multiple modules at the same time.

[0067] The same business can include multiple types of business data to form a business combination. The business data from each source can be globally uniquely numbered according to the combination to ensure that each business combination has a unique identification code. When the software modules of the asset custody system generate business data, they are registered in the data table in order from the earliest to the latest according to the business data generation time, and the first sorting is performed. The principle of first generation first processing is implemented, and the processing status is changed to pending. Figure 3 As shown, it is a schematic diagram of a data table in an embodiment, and the data table may include combination number, data type, data generation time, processing status, etc.

[0068] S204: Obtaining the processing status of the business data in the data table based on the preset asynchronous task timing, and when the processing status includes pending processing, obtaining the business combination number of the business data whose processing status is pending processing.

[0069] The data table is essentially a data table that stores concurrent control information. This table does not have real business data. The table mainly stores combination information, data date, and processing status. It can include pending, processing, and completed. You can set an asynchronous task to periodically obtain the processing status of the business data in the data table to achieve collaborative work between multiple tasks, handle a large number of concurrent requests, and improve the concurrent processing capabilities of the system. In the case where the processing status of the acquired business data includes pending, the business combination number of the business data with the processing status pending is obtained. For example, the accounting module of the asset custody system starts a scheduled check and scans the data table every 5 minutes. If there is data to be processed, an asynchronous task is initiated for processing.

[0070] S206: Acquire all business data corresponding to the business combination number, and lock the business combination.

[0071] After locking, the business data in the business combination can only be processed by the task that has successfully locked. The purpose is to ensure that the business data of the same combination can only be processed by one task at the same time, thereby avoiding repeated calculation and processing of the business data of the combination by multiple concurrent tasks. The sign of successful locking can generate a corresponding lock mark for the combination.

[0072] In one embodiment of the present disclosure, it is assumed that two asynchronous tasks have been started at this time, with task numbers A and B respectively. Tasks A and B scan the pending information in the data table at the same time, and lock the combination in the data table information. Task A successfully locks the combination AST001, and task B successfully locks the combination AST002.

[0073] S208: Process the business data in the locked business combination in sequence based on the business time. After the business data processing is completed, unlock the business combination and change the processing status of the business data in the business combination to processing completed.

[0074] The task sorts the successfully locked combinations by business date for the second time and changes the processing status to "Processing". Figure 4 As shown, it is a schematic diagram of a data table in an embodiment. Task A first processes the accrual type data of combination AST001 from morning to night according to the business date, and then processes the actual collection type data of combination AST001 from morning to night according to the business date; Task B first processes the actual collection type data of combination AST002 from morning to night according to the business date, and then processes the refund type data of combination AST002 from morning to night according to the business date. After the processing is completed, the tasks refresh the processing status of their respective locked combinations to processing completed, then unlock them, and modify the processing status of the business data in the business combination to processing completed.

[0075] For example, there are associations between different types of data in the same combination, and there are chronological relationships between data of the same type. For example, the accrual data of the combination needs to be processed in sequence from early to late by date, and the accrual summary amount of the combination needs to be consistent with the actual amount received. If it is inconsistent, the system needs to automatically adjust the difference. Therefore, when processing data, the same type of data in a combination must be processed first before processing other types of data in the combination, so as to ensure the consistency and integrity of the business data.

[0076] In the above business data processing method, before the business data is processed, the business data information can be stored in the data table, and then the high-concurrency scheduled task scans the data table and calculates and processes the relevant business data. Data consistency processing under multiple data sources is realized, and business data is stored in the data table. Therefore, the concurrency control process basically does not occupy the server running memory space, and more data can be processed in high-load scenarios without worrying about the size limit of the server running memory.

[0077] In some embodiments of the present disclosure, the method further includes:

[0078] The processing status of the business data in the data table is obtained periodically, and the business data whose processing status is completed is cleared from the data table.

[0079] Figure 5 It is a schematic diagram of a data table in an embodiment. Before the business combination is unlocked, the status of the processed data is first updated to "processing completed", and then the combination is unlocked. If new "pending" business data is generated in the unlocked business combination, then the combination can be locked and processed again by the asynchronous task. When the locking is successful, the processing status of the generated business data will be changed from "pending" to "processing", and the task number of the asynchronous task will be marked. In addition, the system will periodically obtain the processing status of the business data in the data table, and clear the business data with a processing status of processing completed and retained for more than a certain period of time (for example, it can be set to 10 days) from the data table (that is, the data table only retains the concurrency control information of the past 10 days). For example, the control information with a processing status of processing completed in the data table is regularly cleared at 6:00 every day to keep the data volume of the data table at a low scale, thereby achieving higher read and write performance of the data table.

[0080] In some embodiments of the present disclosure, after the unlocking operation is performed on the service combination, the method further includes:

[0081] The asynchronous task corresponding to the unlocked business combination enters the pause mode to determine whether the current time reaches the business end time;

[0082] When the current time does not reach the service end time, the asynchronous task corresponding to the unlocked service combination re-timingly obtains the processing status of the service data in the data table.

[0083] The asynchronous tasks corresponding to the unlocked business combination enter the pause mode. The asynchronous tasks in the pause mode will scan the data table regularly. The business end time can be the time when the accounting and bookkeeping of the day ends (that is, the end time of the business day of the fund accounting system, which is generally 23:30~00:00 every night. No business data will be generated during this time period, so the asynchronous tasks of the day will be cleared. When the timing framework scans new data to be processed the next day, new asynchronous tasks will be started one after another.) If the current time does not reach the business end time, the asynchronous tasks corresponding to the unlocked business combination will re-timingly obtain the processing status of the business data in the data table. For example, Task A and Task B enter the pause mode. In this mode, the data table is scanned every 3 minutes. If there is data table information to be processed, the asynchronous task will re-timingly obtain the processing status of the business data in the data table. If no data table information to be processed is found, the task will continue to be in the pause state.

[0084] In some embodiments of the present disclosure, in the process of the asynchronous task periodically acquiring the processing status of the business data in the data table, the method includes:

[0085] Determine the number of concurrent asynchronous tasks;

[0086] The asynchronous tasks corresponding to the asynchronous concurrent quantity are executed periodically and concurrently, and when the processing status of the business data in the acquired data table is pending, the asynchronous tasks are initiated for processing.

[0087] You can pre-set the maximum number of task instances that can exist in the system at the same time. When the number of tasks exceeds this value, the system will wait for the previous task instances to complete to ensure that the maximum concurrency is not exceeded. This can help prevent system resources from being occupied by too many tasks and maintain system stability.

[0088] In some embodiments of the present disclosure, the locking operation on the service combination includes:

[0089] Multiple asynchronous tasks simultaneously acquire all business data corresponding to the business combination number, and after successful locking, generate a lock identifier, the lock identifier including the business combination number;

[0090] Each asynchronous task processes the business combination that generates the lock identifier, and the processing process includes: changing the business data processing state of the successfully locked business combination to being processed, and marking the task number of the asynchronous task, wherein the same business combination is successfully locked by one asynchronous task.

[0091] There are multiple asynchronous tasks in the system. Multiple asynchronous tasks simultaneously obtain all business data corresponding to the business combination number. When there is business data to be processed, each task obtains the business combination involved in the first 100 pieces of information to be processed in the data table according to the first-in-first-out principle, and adds a global lock to these combinations. The lock id can be a unified prefix + business combination number. After the business combination number is successfully generated, it means that the lock is successful, and each task processes the business combination that it has successfully locked.

[0092] In some embodiments of the present disclosure, the method further includes:

[0093] During the processing of the business combination, new business data is generated, and the processing status of the new business data is pending;

[0094] For a business combination with a generated lock identifier, the processing status of the business data generated when locking is changed to being processed. After the processing is completed and the combination is unlocked, the business data to be processed of the combination is continued to be obtained for the next round of locking processing;

[0095] The new business data is stored in the data table.

[0096] Figure 6 The figure is a flowchart of the processing of business data in one embodiment.

[0097] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0098] Based on the same inventive concept, the embodiment of the present disclosure also provides a device for processing business data for implementing the above-mentioned method for processing business data. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the device for processing business data provided below can refer to the limitations of the method for processing business data above, and will not be repeated here.

[0099] The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method described in the embodiments of this specification and is combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of the present disclosure is as described in the following embodiments. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0100] In one embodiment, Figure 7 As shown, a service data processing device 700 is provided, and the device may be the aforementioned server, or a module, component, device, unit, etc. integrated in the server. The device 700 may include:

[0101] The storage module 702 is used to obtain business data and store the business data in a data table in sequence based on the generation time of the business data. The data table includes a business combination number and a processing status corresponding to the business data.

[0102] The acquisition module 704 is used to acquire the processing status of the business data in the data table based on the preset asynchronous task timing, and when the processing status includes pending processing, obtain the business combination number of the business data whose processing status is pending processing;

[0103] The locking module 706 is used to obtain all the service data corresponding to the service combination number and perform a locking operation on the service combination;

[0104] The unlocking module 708 is used to process the business data in the locked business combination in sequence based on the business time, and after the business data processing is completed, unlock the business combination and modify the processing status of the business data in the business combination to processing completed.

[0105] In one embodiment, the device further comprises:

[0106] The processing status of the business data in the data table is obtained periodically, and the business data whose processing status is completed is cleared from the data table.

[0107] In one of the embodiments, after the unlocking operation is performed on the service combination, the device further includes:

[0108] The asynchronous task corresponding to the unlocked business combination enters the pause mode to determine whether the current time reaches the business end time;

[0109] When the current time does not reach the service end time, the asynchronous task corresponding to the unlocked service combination re-timingly obtains the processing status of the service data in the data table.

[0110] In one embodiment, during the process of the asynchronous task periodically acquiring the processing status of the business data in the data table, the device includes:

[0111] Determine the number of concurrent asynchronous tasks;

[0112] The asynchronous tasks corresponding to the asynchronous concurrent quantity are executed periodically and concurrently, and when the processing status of the business data in the acquired data table is pending, the asynchronous tasks are initiated for processing.

[0113] In one embodiment, the locking operation on the service combination includes:

[0114] Multiple asynchronous tasks simultaneously acquire all business data corresponding to the business combination number, and after successful locking, generate a lock identifier, the lock identifier including the business combination number;

[0115] Each asynchronous task processes the business combination that generates the lock identifier, and the processing process includes: changing the business data processing state of the successfully locked business combination to being processed, and marking the task number of the asynchronous task, wherein the same business combination is successfully locked by one asynchronous task.

[0116] In one embodiment, the device further comprises:

[0117] During the processing of the business combination, new business data is generated, and the processing status of the new business data is pending;

[0118] For a business combination with a generated lock identifier, the processing status of the business data generated when locking is changed to being processed. After the processing is completed and the combination is unlocked, the business data to be processed of the combination is continued to be obtained for the next round of locking processing;

[0119] The new business data is stored in the data table.

[0120] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0121] Each module in the above-mentioned processing device for business data can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0122] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for processing business data is implemented.

[0123] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for processing business data is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, a trackball or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0124] Those skilled in the art will understand that the structures shown in FIG. 8 and FIG. 9 are merely block diagrams of partial structures related to the scheme of the present disclosure, and do not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.

[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0126] In one embodiment, a computer program product is provided, including a computer program, which implements the method described in any embodiment of the present disclosure when executed by a processor.

[0127] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.

[0128] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.

Claims

1. A method for processing business data, characterized in that: The method comprises: Acquire business data, and store the business data in a data table in sequence based on the generation time of the business data, wherein the data table includes a business combination number and a processing status corresponding to the business data; Based on the preset asynchronous task, the processing status of the business data in the data table is obtained regularly. When the processing status includes pending processing, the business combination number of the business data whose processing status is pending processing is obtained; Obtaining the business data corresponding to the business combination number, and performing a locking operation on the business combination; The business data in the locked business combination are processed in sequence based on the business time. After the business data processing is completed, the business combination is unlocked, and the processing status of the business data in the business combination is modified to processing completed.

2. The method according to claim 1, characterized in that The method further comprises: The processing status of the business data in the data table is obtained periodically, and the business data whose processing status is completed is cleared from the data table.

3. The method according to claim 1, characterized in that After the unlocking operation is performed on the service combination, the method further includes: The asynchronous task corresponding to the unlocked business combination enters the pause mode to determine whether the current time reaches the business end time; When the current time does not reach the service end time, the asynchronous task corresponding to the unlocked service combination re-timingly obtains the processing status of the service data in the data table.

4. The method according to claim 1, characterized in that: In the process of the asynchronous task periodically acquiring the processing status of the business data in the data table, the method includes: Determine the number of concurrent asynchronous tasks; The asynchronous tasks corresponding to the asynchronous concurrent quantity are executed periodically and concurrently, and when the processing status of the business data in the acquired data table is pending, the asynchronous tasks are initiated for processing.

5. The method according to claim 1, characterized in that The locking operation on the business combination includes: Multiple asynchronous tasks simultaneously acquire all business data corresponding to the business combination number, and after successful locking, generate a lock identifier, the lock identifier including the business combination number; Each asynchronous task processes the business combination that generates the lock identifier, and the processing process includes: changing the business data processing state of the successfully locked business combination to being processed, and marking the task number of the asynchronous task, wherein the same business combination is successfully locked by one asynchronous task.

6. The method according to claim 1, characterized in that The method further comprises: During the processing of the business combination, new business data is generated, and the processing status of the new business data is pending; For a business combination with a generated lock identifier, the processing status of the business data generated when locking is changed to being processed. After the processing is completed and the combination is unlocked, the business data to be processed of the combination is continued to be obtained for the next round of locking processing; The new business data is stored in the data table.

7. A device for processing business data, characterized in that: The device comprises: A storage module, used to obtain business data, and store the business data in a data table in sequence based on the generation time of the business data, wherein the data table includes a business combination number and a processing status corresponding to the business data; An acquisition module, used for acquiring the processing status of the business data in the data table based on a preset asynchronous task timing, and obtaining the business combination number of the business data whose processing status is to be processed when the processing status includes to be processed; A locking module, used to obtain the service data corresponding to the service combination number and perform a locking operation on the service combination; The unlocking module is used to process the business data in the locked business combination in sequence based on the business time. After the business data processing is completed, the business combination is unlocked and the processing status of the business data in the business combination is changed to processing completed.

8. The device according to claim 7, characterized in that The device also includes: The processing status of the business data in the data table is obtained periodically, and the business data whose processing status is completed is cleared from the data table.

9. The device according to claim 7, characterized in that After the unlocking operation is performed on the service combination, the device further includes: The asynchronous task corresponding to the unlocked business combination enters the pause mode to determine whether the current time reaches the business end time; When the current time does not reach the service end time, the asynchronous task corresponding to the unlocked service combination re-timingly obtains the processing status of the service data in the data table.

10. The device according to claim 7, characterized in that In the process of the asynchronous task periodically acquiring the processing status of the business data in the data table, the device includes: Determine the number of concurrent asynchronous tasks; The asynchronous tasks corresponding to the asynchronous concurrent quantity are executed periodically and concurrently, and when the processing status of the business data in the acquired data table is pending, the asynchronous tasks are initiated for processing.

11. The device according to claim 7, characterized in that The locking operation on the business combination includes: Multiple asynchronous tasks simultaneously acquire all business data corresponding to the business combination number, and after successful locking, generate a lock identifier, the lock identifier including the business combination number; Each asynchronous task processes the business combination that generates the lock identifier, and the processing process includes: changing the business data processing state of the successfully locked business combination to being processed, and marking the task number of the asynchronous task, wherein the same business combination is successfully locked by one asynchronous task.

12. The device according to claim 7, characterized in that The device also includes: After the unlocking operation is performed on the service combination, new service data is generated, and the processing status of the new service data is pending; For a business combination with a generated lock identifier, the processing status of the business data generated when locking is changed to being processed. After the processing is completed and the combination is unlocked, the business data to be processed of the combination is continued to be obtained for the next round of locking processing; The new business data is stored in the data table.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Service processing method and device, server and storage medium

    CN107665234A

  • Data consistency verification method for multiple data sources

    CN117520098A

  • Blockchain-based lock processing method and apparatus, computer device and storage medium

    WO2020151313A1