Data processing method and device

Through the central control device, parallel data requests are processed in the memory, persistence operations are unified, and complex scenarios are processed through the locking mechanism, which solves the low performance and reliability problems in the existing technology and achieves efficient and reliable data processing.

CN113296966BActive Publication Date: 2024-10-22中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110559435.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2024-10-22
Estimated Expiration
2041-05-21

AI Technical Summary

Technical Problem

When existing technologies handle parallel data requests, operations that rely on databases or configuration files result in low performance and low reliability, and complex business scenarios are difficult to effectively handle, easily leading to deadlocks and system paralysis.

Method used

A central control device is used for parallel reading and writing, data and request-related information are loaded into the memory for processing, persistence operations are performed uniformly in the form of one-time commands, and a locking mechanism is used to prevent overlapping processing, and unfinished requests are processed in a queue. Release resources.

Benefits of technology

It improves data processing efficiency and reliability, reduces IO overhead, avoids deadlocks and system paralysis, simplifies the processing process, is suitable for complex business scenarios, and reduces system complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113296966B_ABST
    Figure CN113296966B_ABST
Patent Text Reader

Abstract

The present invention discloses a data processing method and device. The method includes: obtaining concurrent requests, wherein the concurrent requests carry a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; obtaining processing information corresponding to each batch processing subtask in the concurrent requests; determining the execution status of the concurrent requests based on the processing information corresponding to each batch processing subtask; when the execution status indicates that each request in the concurrent requests is successfully processed, persisting the processing results of the concurrent requests to a predetermined location. The present invention solves the technical problems in the related art of performing data processing directly or indirectly, relying on the processing or optimization of the database or configuration file itself, overly relying on IO operations, and having low reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular, to a data processing method and device. Background Art

[0002] In the related technology, there are more and more software-related business scenarios, the software systems are becoming more and more complex, and more and more data results need to be persisted. In some application scenarios in some industries or social places, it is necessary to implement the business of submitting multiple data or multiple batch processing subtasks in parallel in a one-time request submission manner, and the return result of the entire request must be that all the batch processing results of the subtasks are successful, that is, the current request is successful; or when any of the batch processing subtasks fails, that is, the entire request is returned as a failed result. This type of business or process is often difficult to implement in practice. The reasons are: (1) Several batch processing subtasks contained in a request must succeed at the same time to be considered a success. Even if one batch processing subtask fails, the current request must be considered a failure. (1) The request has extremely high requirements for data consistency; (2) In the subsequent continuous concurrent requests, it is possible that the elements involved in one or some batch processing subtasks in the request are the same as the elements involved in the previous request. If the subsequent request is processed directly, then the previous processing result will cause an element in the subsequent request to be occupied due to the existence of the same elements, and the previous request will not be processed normally; (3) In more complex scenarios, there are also a large number of previous requests or batch processing subtasks in the request that cannot be processed in time due to continuous requests. The same elements are occupied more and more, the efficiency is getting lower and lower, and even deadlock and system-level paralysis may occur.

[0003] In view of the above problems, at present, there is no perfect method in the industry or market for the above processing method of "needing to submit data processing results to the configuration file or database in a successful or failed manner in parallel at one time". In the past, a single submission and a single processing were generally adopted, and then the result was judged whether it was successful, and then the next submission was executed and judged again. The whole was processed in such a round-robin manner to obtain the result that all events submitted at that time were all successful or all failed. Although this kind of processing method can solve some problems in such scenarios, it often leads to deadlock or system paralysis problems, and is inefficient. A simple request takes a very long time. Recently, various industries or technologies have also tried to implement transactional submission methods such as flexible transactions (Try-Confirm-Cancel, referred to as TCC) to try to solve such problems, but these methods are often complex to implement, or because of the frequent IO interaction with the database and configuration files, they also lead to a large number of performance bottlenecks, and the transformation and invasive impact on the original entire system are large, which is difficult to implement and cannot effectively solve such problems.

[0004] In addition, the related art also provides an operation by receiving a row read request and determining that the row is versioned. For example, determining that there is first timestamp information for a row destroy transaction associated with the row in a transaction control block, and retrieving the first timestamp information from the transaction control block; and using DVCC technology to reduce the time of finding a version, while using the log in the NVM as a new version method, effectively reducing the number of write operations.

[0005] However, the above-mentioned solution 1 utilizes a transaction control block method for providing readers-writers with access to the transaction commit status, and the solution 2 provides an extensible persistent transaction memory and its working method. The above solutions are basically unable to completely solve the current status of the above industry scenarios, for example: 1). Basically, they all focus on solving the problem from the data side, and in terms of implementation, they generally directly or indirectly rely on the processing or optimization of the database or configuration file itself. Such processing methods greatly increase the IO overhead because they are overly dependent on IO operations. IO is the bottleneck of various systems or applications today, resulting in poor performance; 2). Although such scenarios are handled by attempting to submit or notify submission, this can solve the problems of such scenarios to a certain extent, but it is basically difficult to do in the face of complex business scenarios, and the implementation itself is highly complex, and it is also difficult to handle when exceptions occur, and it is also impossible to perform relatively complete processing for such scenarios.

[0006] Currently, no effective solution has been proposed for the problems of data processing in the above-mentioned related technologies in direct or indirect ways, reliance on the processing or optimization of the database or configuration files themselves, over-reliance on IO operations, and low reliability. Summary of the invention

[0007] The embodiments of the present invention provide a data processing method and device to at least solve the technical problems in the related art of performing data processing directly or indirectly, relying on the processing or optimization of the database or configuration file itself, overly relying on IO operations, and having low reliability.

[0008] According to one aspect of an embodiment of the present invention, there is provided a data processing method, comprising: obtaining concurrent requests, wherein the concurrent requests carry a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; obtaining processing information corresponding to each batch processing subtask in the concurrent requests; determining an execution status of the concurrent requests based on the processing information corresponding to each batch processing subtask; and when the execution status indicates that each request in the concurrent requests is successfully processed, persisting the processing results of the concurrent requests to a predetermined location.

[0009] Optionally, after obtaining the concurrent requests, the data processing method further includes: judging whether each batch processing subtask in the concurrent requests and the elements in each batch processing subtask have been locked to obtain a first judgment result; when the first judgment result indicates that each batch processing subtask in the concurrent requests and the elements in each batch processing subtask have not been locked, judging whether the batch processing subtask in the concurrent requests or the elements in the batch processing subtask need to be locked to obtain a second judgment result; and determining whether it is necessary to perform a locking operation on the batch processing subtask in the concurrent requests or the elements in the batch processing subtask based on the second judgment result.

[0010] Optionally, determining whether it is necessary to perform a locking operation on a batch processing subtask in a concurrent request, or an element in the batch processing subtask, based on a second judgment result includes: determining that a historical concurrent request has the same elements as the concurrent request, and the same elements have not been processed in the historical concurrent request process, and determining that it is necessary to perform a locking operation on the batch processing subtask in the concurrent request, or an element in the batch processing subtask.

[0011] Optionally, after determining that a locking operation needs to be performed on a batch processing subtask in the concurrent request or an element in the batch processing subtask, the data processing method further includes: queuing the concurrent request.

[0012] Optionally, the data processing method also includes: after determining that the processing result of the historical concurrent request is persisted to the predetermined location, or when determining that there is a batch processing subtask that has failed to be processed in the historical concurrent task, releasing the batch processing subtask in the concurrent request, or the locked resources of the elements in the batch processing subtask.

[0013] Optionally, obtaining processing information corresponding to each batch processing subtask in the concurrent request includes: determining a business type corresponding to each batch processing subtask; querying a business processing flow of each batch processing subtask based on the business type; and determining processing information corresponding to each batch processing subtask based on the query result.

[0014] According to another aspect of an embodiment of the present invention, a data processing device is also provided, including: a first acquisition unit, used to acquire concurrent requests, wherein the concurrent requests carry a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; a second acquisition unit, used to acquire processing information corresponding to each batch processing subtask in the concurrent requests; a first determination unit, used to determine the execution status of the concurrent requests based on the processing information corresponding to each batch processing subtask; and a processing unit, used to persist the processing results of the concurrent requests to a predetermined location when the execution status indicates that each request in the concurrent requests is successfully processed.

[0015] Optionally, the data processing device also includes: a first judgment unit, which is used to judge whether each batch processing subtask in the concurrent request and the elements in each batch processing subtask have been locked after obtaining the concurrent request, and obtain a first judgment result; a second judgment unit, which is used to judge whether the batch processing subtask in the concurrent request or the elements in the batch processing subtask need to be locked when the first judgment result indicates that each batch processing subtask in the concurrent request and the elements in each batch processing subtask have not been locked, and obtain a second judgment result; a second determination unit, which is used to determine whether it is necessary to perform a locking operation on the batch processing subtask in the concurrent request or the elements in the batch processing subtask based on the second judgment result.

[0016] Optionally, the second determination unit includes: a first determination module, used to determine that the historical concurrent request has the same elements as the concurrent request, and the same elements have not been processed in the historical concurrent request process, and determine that a locking operation needs to be performed on the batch subtask in the concurrent request, or the elements in the batch subtask.

[0017] Optionally, the data processing device further comprises: a queue processing module, configured to queue the concurrent requests after determining that a locking operation needs to be performed on the batch processing subtasks in the concurrent requests or the elements in the batch processing subtasks.

[0018] Optionally, the data processing device also includes: a release unit, which is used to release the batch subtask in the concurrent request or the locked resources of the elements in the batch subtask after determining that the processing result of the historical concurrent request is persisted to the predetermined location, or when determining that there is a batch subtask that has failed to be processed in the historical concurrent task.

[0019] Optionally, the second acquisition unit includes: a second determination module, used to determine the business type corresponding to each batch processing subtask; a query module, used to query the business processing flow of each batch processing subtask based on the business type; and a third determination module, used to determine the processing information corresponding to each batch processing subtask based on the query result.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned data processing methods.

[0021] According to another aspect of an embodiment of the present invention, a processor is provided, wherein the processor is used to run a computer program, wherein the computer program executes any one of the above-mentioned data processing methods when running.

[0022] In an embodiment of the present invention, a concurrent request is obtained, wherein the concurrent request carries a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; processing information corresponding to each batch processing subtask in the concurrent request is obtained; the execution status of the concurrent request is determined based on the processing information corresponding to each batch processing subtask; when the execution status indicates that each request in the concurrent request is successfully processed, the processing results of the concurrent request are persisted to a predetermined location. The data processing method provided by the embodiment of the present invention achieves the purpose of persisting the processing results in batches to a predetermined location after obtaining the processing information of each batch processing subtask in the concurrent request, and converts the data persistence operation from the previous individual persistence to a one-time concurrent processing, thereby improving the data processing efficiency and the reliability of the data processing, thereby solving the technical problems in the related technology of directly or indirectly processing data, relying on the processing or optimization of the database or configuration file itself, overly relying on IO operations, and having low reliability. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;

[0025] Figure 2 is a schematic diagram of a data processing method according to an embodiment of the present invention;

[0026] Figure 3 is a schematic diagram of a data processing device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] In view of the above problems in the related art, in the embodiment of the present invention, the basic principle of the central control device is used to load the logic of reading the completed data and request-related information or the peripheral request results and writing the database and configuration file into the memory for processing in advance. Here, the central control device plays the role of releasing the blockage and also plays the role of intermediate scheduling. When a business or data request occurs in such a scenario, the central control device will match all business data situations that need to query the database or configuration file according to the data request situation and load them into the memory. At the same time, the central control device blocks the same or similar data requests so that the request can be fully executed later. After the logic processing is performed in the memory, when the data or business processing results need to be submitted to the database or configuration file, the central control device uniformly and in the form of a one-time command issues a data write persistence task. The relevant logic processing program or unit performs parallel persistence processing after receiving the unified processing command. After the program or unit completes the processing, it actively feeds back the processing result to the central control logic main device. The central control logic receives the processing result to determine whether it is the relevant element in this request, and then the central control logic releases the relevant data and information of this request so that the next request can enter.

[0030] By taking the central control device as the core control and dividing the core control device into several core elements, the implementation of each element has the characteristics of diversity, high compatibility and easy maintainability; since parallel reading and writing effectively solve a series of problems such as performance that may be caused when the central control device is used as a valve or intermediate hub control, that is, efficiency is improved through parallel processing, the above two points are combined to form a complete and highly reusable system-level processing for the entire industry with such data or request processes.

[0031] The following will describe the data processing method and device provided by the embodiment of the present invention in detail.

[0032] Example 1

[0033] According to an embodiment of the present invention, a method embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 1 As shown, the data processing method includes the following steps:

[0035] Step S102, obtains a concurrent request, wherein the concurrent request carries a predetermined number of batch subtasks, and the batch subtasks include one or more associated elements.

[0036] Optionally, the concurrent request here requires that all requests be processed successfully or all requests fail, and the result of this request processing shall not be returned with a partially successful or partially failed result.

[0037] Each concurrent request will contain several batch processing subtasks, each of which involves one or more related elements. In the scenario, it must be ensured that all these batch processing subtasks are processed successfully, or if one of them fails, the entire request processing failure is returned. The batch processing subtask summary cannot return the processing result status of the entire request with a partial success or partial failure processing result.

[0038] Step S104: obtain processing information corresponding to each batch subtask in the concurrent request.

[0039] In this embodiment, the central control device can obtain relevant business and process processing information involved in each request in the concurrent request from various resources such as databases and memory information, and determine whether the processing is successful.

[0040] Step S106 determines the execution status of the concurrent request based on the processing information corresponding to each batch subtask.

[0041] In step S108, when the execution status indicates that each request in the concurrent request is successfully processed, the processing result of the concurrent request is persisted to a predetermined location.

[0042] As can be seen from the above, in an embodiment of the present invention, concurrent requests can be obtained, processing information corresponding to each batch processing subtask in the concurrent requests can be obtained, and the execution status of the concurrent requests can be determined based on the processing information corresponding to each batch processing subtask. When the execution status indicates that each request in the concurrent requests is successfully processed, the processing results of the concurrent requests are persisted to a predetermined location. This achieves the purpose of persisting the processing results in batches to a predetermined location after obtaining the processing information of each batch processing subtask in the concurrent requests, if it is determined based on the processing information that each batch processing subtask is successfully processed, and converts the data persistence operation from the previous individual persistence to a one-time concurrent processing, thereby improving data processing efficiency.

[0043] Therefore, the data processing method provided by the embodiment of the present invention solves the technical problems in the related art of performing data processing directly or indirectly, relying on the processing or optimization of the database or configuration file itself, overly relying on IO operations, and having low reliability.

[0044] It should be noted that the executing body of the above-mentioned data processing method is a central control device.

[0045] As an optional embodiment, after obtaining the concurrent request, the data processing method also includes: judging whether each batch processing subtask in the concurrent request and the elements in each batch processing subtask have been locked to obtain a first judgment result; when the first judgment result indicates that each batch processing subtask in the concurrent request and the elements in each batch processing subtask have not been locked, judging whether the batch processing subtask in the concurrent request or the elements in the batch processing subtask need to be locked to obtain a second judgment result; and determining whether it is necessary to perform a locking operation on the batch processing subtask in the concurrent request or the elements in the batch processing subtask based on the second judgment result.

[0046] In this embodiment, the central control device performs a series of processing, first determining whether it is necessary to lock the current concurrent request, all batch processing subtasks in the current concurrent request, and elements in all batch processing subtasks, or determining whether locking has already been performed.

[0047] As an optional embodiment, determining whether it is necessary to perform a locking operation on a batch subtask in a concurrent request, or an element in a batch subtask, is based on a second judgment result, including: determining that a historical concurrent request and a concurrent request have the same elements, and that the same elements have not been processed in the historical concurrent request process, and determining that it is necessary to perform a locking operation on a batch subtask in a concurrent request, or an element in a batch subtask.

[0048] In this embodiment, whether it is necessary to lock the request elements in the concurrent requests, that is, whether a central locking mechanism is needed, is used to prevent subsequent requests from being superimposed when the previous requests have not been fully completed, thus affecting the processing of unprocessed requests in the entire previous concurrent request.

[0049] For example, when the first concurrent request involves element A, when the second concurrent request comes in, it also involves element A, but the first concurrent request has not yet completed processing the requests related to element A. In order to ensure that the first request is fully processed, element A needs to be locked at this time, and the second concurrent request needs to be temporarily queued for processing.

[0050] Among them, each time a concurrent request is made, you can choose to lock all the requests, or you can choose to individually control a certain element in the batch processing subtask of this request, namely the A element mentioned above. This method solves the subsequent processing logic in a parallel way to a greater extent.

[0051] As an optional embodiment, after determining that a locking operation needs to be performed on a batch processing subtask in a concurrent request or an element in a batch processing subtask, the data processing method may further include: queuing the concurrent requests.

[0052] In this embodiment, in order to prevent overlapping processing of the same elements in historical concurrent requests and current concurrent requests, the current concurrent request, or the batch subtask in the current concurrent request, or the elements in the batch subtask in the current concurrent request that are the same as the historical concurrent request can be locked and queued so that the current concurrent request can be processed after the results of the historical concurrent tasks.

[0053] As an optional embodiment, the data processing method also includes: after determining that the processing results of the historical concurrent requests are persisted to a predetermined location, or when determining that there are batch processing subtasks that have failed to be processed in the historical concurrent tasks, releasing the batch processing subtasks in the concurrent requests, or the locked resources of the elements in the batch processing subtasks.

[0054] That is, after the historical concurrent task is completed, or there is a batch subtask that failed to be processed in the historical concurrent task, the batch subtask in the current concurrent request, or the locked resources of the elements in the batch subtask are released to continue processing the current concurrent request.

[0055] As an optional embodiment, obtaining processing information corresponding to each batch processing subtask in a concurrent request includes: determining the business type corresponding to each batch processing subtask; querying the business processing flow of each batch processing subtask based on the business type; and determining the processing information corresponding to each batch processing subtask based on the query result.

[0056] That is, the central control device can obtain related services and process processing information involved in each request in the concurrent request from various resources such as database and memory information.

[0057] A preferred embodiment of the present invention will be described below in conjunction with the accompanying drawings. Figure 2 It is a schematic diagram of a data processing method according to an embodiment of the present invention, such as Figure 2 As shown, when a concurrent request comes in, the central control device performs a series of processing, first of which is valve control, that is, whether it is necessary to lock the request, all batch processing subtasks in the request, and the elements in all batch processing subtasks, or whether locking has been performed; specifically, Figure 2 The main control logic of the central control device determines whether it is necessary to lock the request elements in the concurrent request, that is, whether the central control lock mechanism is needed to prevent subsequent requests from being superimposed when the previous requests have not been fully completed, which affects the processing of unprocessed requests in the entire previous concurrent request. Then the main control logic of the central control device completes the business and process processing in parallel, that is, the central control main memory processing method; then the main control logic collects the processing results of each batch processing subtask, and determines whether the entire concurrent request is fully successful or fully failed; if all are successful, the central control main logic persists the concurrent processing results to a predetermined location (for example, Figure 2 The central control main logic releases all locks and resources immediately if the concurrent request fails and waits for the next concurrent request, thus forming an efficient processing method for such data or request complex processes, namely: a complete closed process of special parallel request-central control lock mechanism-central control business information acquisition-central control memory processing-central control parallel persistence.

[0058] Depend on Figure 2It can be seen that the core of the hardware corresponding to the data processing method provided in the embodiment of the present invention is the central control device, which can perform parallel reading and parallel writing, and is diversified, highly compatible, and easy to maintain, thereby forming a complete and highly reusable industry-wide processing method. The core of the central control device includes two basic attributes: "center" and "control". The attribute of the center lies in the valve, and the attribute of the control lies in that any subsequent processing is initiated by the central control. Concurrent requests must pass through the central control device, which is equivalent to being in the "center" state at this time; the central control device needs to properly control all requests, so it is necessary to improve the processing of all business and process control processes. At the same time, the central control device needs to consider and handle various abnormal situations in business and process processing in specific processing; after processing, the central control device calls the parallel data persistence module and releases the elements involved in this request.

[0059] In order to speed up the processing efficiency of the central control device, it is necessary to maximize parallel processing. Parallel processing includes parallel reading of related business and process data, parallel request of peripheral system data, parallel writing of results and other elements; specifically, when a parallel request comes in, the central control device issues a concurrent request to obtain all data as quickly as possible and perform business or process processing at the memory level; after each concurrent request processes the corresponding business logic, it submits the processing result to the central control device instead of directly continuing to persist the result; the central control device uniformly initiates concurrent persistent result processing commands, and the persistence unit performs parallel persistent processing after receiving the command, thus forming a complete processing logic for such scenarios of division (accepting concurrent requests)-general (intermediate valve control)-division (concurrent processing process)-general (processing result summary)-division (concurrent persistent result).

[0060] As can be seen from the above, the data processing method provided by the embodiment of the present invention is basically dependent on or processes the database or data configuration file itself, compared with the prior art. Such processing methods generally read and write the database or data configuration file in large quantities or frequently, which greatly increases the disk IO overhead, resulting in low performance, and frequent IO operations will also cause more problems and abnormal drawbacks. The central control device is used to convert the previous database or configuration file IO direct operation mode into memory calculation and processing, which reduces the disk IO overhead and improves performance. At the same time, the processing logic that originally interacts with IO frequently or in large quantities is loaded into the memory for processing, and the entire business or process logic is logically controlled through memory control. It is simple and easy to implement, highly efficient, and has diversified methods and is easy to expand. Compared with the prior art in which each request is submitted formally upon success and rolled back upon failure, or in which such business or process scenarios are handled through notification submission, although it can solve some of the problems in such scenarios to a certain extent, it is complex to implement, has relatively stringent technical requirements, and has narrow application scenarios. Each scenario basically needs to be developed separately, and the cost of application implementation is high. It is also difficult to handle abnormalities. The central control device is used to solve the efficiency brought by direct processing of events in concurrent requests or attempts to process events separately. In addition, the central control device maximizes the efficiency brought by changing the previous individual persistence design of data persistence operations to one-time concurrent processing.

[0061] It should be noted that the data processing method provided by the embodiment of the present invention can be widely used in applications and systems in various industries, without the need for complicated R&D processes and costs, and the data processing method can solve such problems encountered in the current industry with exponentially growing efficiency. In addition, it can maintain the integrity and consistency of the data, solve the pain points of business scenarios in businesses and systems, and achieve the effect of one-time R&D investment and widespread use.

[0062] Therefore, through the data processing method provided by the embodiment of the present invention, a central control device is used to process complex logical services. Specifically, the central control device uses an ordinary lock mechanism as the basis, and pre-processes the subsequent services in a logical manner as the core implementation concept, and uses parallel and memory processing methods as methods to improve efficiency, thereby solving a series of drawbacks and problems such as failure caused by previous attempts to submit databases or configuration files to the database or configuration files, that is, the need to roll back. The central control device submits only when it pre-determines that all submissions can be successful. If one of the events fails, no processing results will be submitted. This not only reduces a large number of IO interactions, but also solves the problems of complexity and performance in processing various application scenarios caused by continuous submission-rollback. It is convenient and easy to use, reduces the complexity and performance problems of the previous implementation of the system, and can be widely used in major industries or systems such as banking, operator industry, and education for submission application scenarios related to such data or requests.

[0063] Example 2

[0064] According to another aspect of an embodiment of the present invention, a data processing device is provided. Figure 3 is a schematic diagram of a data processing device provided according to an embodiment of the present invention, such as Figure 3 As shown, the data processing device may include: a first acquisition unit 31, a second acquisition unit 33, a first determination unit 35 and a processing unit 37. The data processing device provided by the embodiment of the present invention is described below.

[0065] The first acquisition unit 31 is used to acquire a concurrent request, wherein the concurrent request carries a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements.

[0066] The second acquisition unit 33 is used to acquire the processing information corresponding to each batch processing subtask in the concurrent request.

[0067] The first determining unit 35 is used to determine the execution status of the concurrent request based on the processing information corresponding to each batch processing subtask.

[0068] The processing unit 37 is configured to persist the processing results of the concurrent requests to a predetermined location when the execution status indicates that each of the concurrent requests is successfully processed.

[0069] It should be noted that the first acquisition unit 31, the second acquisition unit 33, the first determination unit 35 and the processing unit 37 correspond to steps S102 to S108 in Embodiment 1, and the examples and application scenarios implemented by the modules are the same as those of the corresponding steps, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the apparatus can be executed in a computer system such as a set of computer executable instructions.

[0070] As can be seen from the above, in an embodiment of the present invention, a first acquisition unit can be used to acquire concurrent requests, wherein the concurrent requests carry a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; then the second acquisition unit is used to acquire the processing information corresponding to each batch processing subtask in the concurrent request; and the first determination unit is used to determine the execution status of the concurrent request based on the processing information corresponding to each batch processing subtask; and when the processing unit indicates that each request in the concurrent request is successfully processed in the execution status, the processing result of the concurrent request is persisted to a predetermined location. Through the data processing device provided by the embodiment of the present invention, after acquiring the processing information of each batch processing subtask in the concurrent request, if it is determined based on the processing information that each batch processing subtask is successfully processed, the purpose of persisting the processing results in batches to a predetermined location is achieved, and the data persistence operation is converted from the previous respective persistence to a one-time concurrent processing, which improves the data processing efficiency and the reliability of the data processing, and solves the technical problems of data processing in the related technology in direct or indirect manner, relying on the processing or optimization of the database or configuration file itself, overly relying on IO operations, and low reliability.

[0071] Optionally, the data processing device also includes: a first judgment unit, which is used to judge whether each batch processing subtask in the concurrent request and the elements in each batch processing subtask have been locked after obtaining the concurrent request, and obtain a first judgment result; a second judgment unit, which is used to judge whether the batch processing subtasks in the concurrent request or the elements in the batch processing subtasks need to be locked when the first judgment result indicates that each batch processing subtask in the concurrent request and the elements in each batch processing subtask have not been locked, and obtain a second judgment result; a second determination unit, which is used to determine whether it is necessary to perform a locking operation on the batch processing subtasks in the concurrent request or the elements in the batch processing subtasks based on the second judgment result.

[0072] Optionally, the second determination unit includes: a first determination module, used to determine that the historical concurrent request and the concurrent request have the same elements, and the same elements have not been processed in the historical concurrent request process, and determine that a locking operation needs to be performed on the batch subtasks in the concurrent request, or the elements in the batch subtasks.

[0073] Optionally, the data processing device further includes: a queue processing module, which is used to queue the concurrent requests after determining that a locking operation needs to be performed on the batch processing subtasks in the concurrent requests or the elements in the batch processing subtasks.

[0074] Optionally, the data processing device also includes: a release unit, which is used to release the batch subtasks in the concurrent request, or the locked resources of the elements in the batch subtasks, after determining that the processing results of the historical concurrent requests are persisted to a predetermined location, or when determining that there are batch subtasks that have failed to be processed in the historical concurrent tasks.

[0075] Optionally, the second acquisition unit includes: a second determination module, used to determine the business type corresponding to each batch processing subtask; a query module, used to query the business processing flow of each batch processing subtask based on the business type; and a third determination module, used to determine the processing information corresponding to each batch processing subtask based on the query result.

[0076] Example 3

[0077] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data processing methods.

[0078] Example 4

[0079] According to another aspect of an embodiment of the present invention, a processor is provided, and the processor is used to run a computer program, wherein the computer program executes any one of the above data processing methods when it is run.

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

[0081] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

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

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

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

[0086] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that: include: Acquire a concurrent request, wherein the concurrent request carries a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; Obtaining processing information corresponding to each batch processing subtask in the concurrent request; Determining the execution status of the concurrent request based on the processing information corresponding to each batch processing subtask; When the execution status indicates that each of the concurrent requests is successfully processed, the processing results of the concurrent requests are persisted to a predetermined location, After obtaining the concurrent request, the method further includes: Determine whether each batch processing subtask in the concurrent request and the elements in each batch processing subtask have been locked, and obtain a first determination result; When the first judgment result indicates that each batch processing subtask in the concurrent request and the elements in each batch processing subtask are not locked, it is judged whether the batch processing subtask in the concurrent request or the elements in the batch processing subtask need to be locked to obtain a second judgment result; Based on the second judgment result, it is determined whether it is necessary to perform a locking operation on the batch processing subtask in the concurrent request or the elements in the batch processing subtask, Determining whether it is necessary to perform a locking operation on a batch processing subtask in a concurrent request or an element in the batch processing subtask based on the second judgment result includes: Determining that the historical concurrent request has the same elements as the concurrent request, and that the same elements have not been processed completely in the historical concurrent request process, determining that a locking operation needs to be performed on the batch processing subtask in the concurrent request or the elements in the batch processing subtask, The method further comprises: After determining that the processing result of the historical concurrent request is persisted to the predetermined location, or when determining that there is a batch processing subtask that fails in the historical concurrent task, the batch processing subtask in the concurrent request or the locked resources of the elements in the batch processing subtask are released.

2. The method according to claim 1, characterized in that After determining that a locking operation needs to be performed on the batch processing subtasks in the concurrent request or the elements in the batch processing subtasks, the method further includes: The concurrent requests are queued for processing.

3. The method according to claim 1, characterized in that Obtain processing information corresponding to each batch processing subtask in the concurrent request, including: Determine the business type corresponding to each batch processing subtask; Querying the business process flow of each batch processing subtask based on the business type; The processing information corresponding to each batch processing subtask is determined based on the query result.

4. A data processing device, characterized in that: include: A first acquisition unit is used to acquire a concurrent request, wherein the concurrent request carries a predetermined number of batch processing subtasks, and the batch processing subtasks include one or more associated elements; A second acquisition unit is used to acquire processing information corresponding to each batch processing subtask in the concurrent request; A first determining unit, configured to determine an execution state of the concurrent request based on processing information corresponding to each batch processing subtask; a processing unit, configured to persist the processing results of the concurrent requests to a predetermined location when the execution status indicates that each of the concurrent requests is successfully processed; The device also includes: A first judgment unit is used to judge whether each batch processing subtask in the concurrent request and the elements in each batch processing subtask have been locked after obtaining the concurrent request, and obtain a first judgment result; A second judgment unit is used to judge whether the batch processing subtasks in the concurrent request or the elements in the batch processing subtasks need to be locked when the first judgment result indicates that each batch processing subtask in the concurrent request and the elements in each batch processing subtask are not locked, so as to obtain a second judgment result; a second determining unit, configured to determine whether a locking operation needs to be performed on a batch processing subtask in a concurrent request or an element in the batch processing subtask based on a second judgment result, The second determination unit includes: a first determination module, which is used to determine that the historical concurrent request and the concurrent request have the same elements, and the same elements have not been processed in the historical concurrent request process, and determine that a locking operation needs to be performed on the batch processing subtask in the concurrent request or the elements in the batch processing subtask, The data processing device also includes: a releasing unit, which is used to release the batch processing subtasks in the concurrent request or the locked resources of the elements in the batch processing subtasks after determining that the processing results of the historical concurrent requests are persisted to a predetermined location, or when determining that there are batch processing subtasks that have failed to be processed in the historical concurrent tasks.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the data processing method described in any one of claims 1 to 3.

6. A processor, characterized in that: The processor is used to run a computer program, wherein the computer program executes the data processing method according to any one of claims 1 to 3 when running.