Business data processing method and device, computer equipment and readable storage medium
By grouping and parallel processing of business data, using task processing messages to ensure data orderliness and traceability, the data processing accuracy and high concurrency problems in traditional methods are solved, and the accuracy and reliability of business data processing are improved.
Patent Information
- Application Number
- CN202411236423.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-27
AI Technical Summary
When processing massive and complex business transaction data, traditional methods can easily lead to data being missed or repeated processing, resulting in low processing accuracy and the pressure of a single server is difficult to cope with high concurrency demand.
By grouping target service data, saving grouping information to the clearing task team list, and publishing task processing messages, multiple servers can obtain grouping information from the queue list in parallel to perform registration subtasks, monitor the subtask status in real time, and ensure data processing Order and traceability reduce single server load.
It significantly improves the accuracy and reliability of business data processing, avoids omissions or repeated processing, improves concurrency capabilities, and reduces latency and bottleneck problems.
Smart Images

Figure CN119201440A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment and readable storage medium for processing business data. Background Art
[0002] In the modern business environment, with the rapid development of e-commerce, financial transactions and other services, banks need to process a large amount of business transaction data from different sources every day, such as fund transaction data. Due to the diversity of data sources and the huge transaction volume, enterprises face huge challenges in processing these business data. Traditional methods usually rely on a single server to uniformly process all business data. For example, business personnel uniformly submit business data at the front end, and a single server uniformly processes the uploaded business data. The number of concurrent data processing is also limited by the capacity of a single server.
[0003] In order to deal with these problems, business transaction data can currently be processed through multiple servers, but this method can only alleviate the pressure on a single server to a certain extent. When faced with massive business data with complex sources, it is easy for business data to be omitted or repeatedly processed during processing, resulting in low accuracy of business data processing. Summary of the invention
[0004] Based on this, it is necessary to provide a business data processing method, apparatus, computer equipment and readable storage medium that can improve the accuracy of business data processing in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for processing business data, comprising:
[0006] In response to a resource registration request for target business data, the target business data is grouped to obtain a plurality of grouped data; the target business data includes any business data among the business data uploaded by a plurality of resource transaction channel terminals;
[0007] Saving the grouping information of the plurality of grouping data to the clearing task queue table corresponding to the target business data; the grouping information includes processing status information and storage location information of the grouping data;
[0008] Publishing a task processing message so that a plurality of servers subscribing to the task processing message can obtain the grouping information from the clearing task queue table in parallel, and perform a registration subtask on the grouping data according to the grouping information; the registration subtask is used to perform a resource registration operation on the grouping data;
[0009] The resource registration operation results of the plurality of group data are determined according to the subtask execution states of the group data returned by the plurality of servers.
[0010] In one embodiment, determining the resource registration operation results of the plurality of group data according to the subtask execution states of the group data returned by the plurality of servers includes:
[0011] According to the subtask execution status of the grouped data returned by the multiple servers, the processing status information of the grouped data in the clearing task queue list is updated to obtain the updated clearing task queue list;
[0012] The resource registration operation results of the plurality of grouped data are determined according to the updated clearing task team list.
[0013] In one embodiment, the method further comprises:
[0014] According to the preset time interval, regularly query the updated liquidation task team list;
[0015] When it is determined according to the updated clearing task queue table that the resource registration operation results of the multiple grouped data all indicate that the resource registration operation has been completed, the task execution result of the target business data is returned; the task execution result is used to indicate that the resource registration operation of the target business data has been completed.
[0016] In one embodiment, the task processing message carries the maximum number of subtasks; after the task processing message is issued, the method further includes:
[0017] Multiple grouping information matching the maximum number of subtasks are locked in parallel from the clearing task queue table, corresponding registration subtasks are generated for the grouping data corresponding to the multiple grouping information, each of the registration subtasks is assigned to each thread in the thread pool of the server, and each thread is executed; each thread corresponds to each registration subtask one by one.
[0018] In one embodiment, the target business data includes account business data and resource business data; the method further includes:
[0019] When it is detected that all the business data uploaded by the multiple resource transaction channel terminals have been received, obtaining a resource registration operation result for the account-type business data;
[0020] The method of grouping the target business data to obtain a plurality of grouped data in response to a resource registration request for the target business data comprises: when a result of a resource registration operation on the account-type business data indicates that the resource registration operation has been completed, grouping the resource-type business data to obtain a plurality of grouped data in response to a resource registration request for the resource-type business data.
[0021] In one embodiment, the target service data is grouped to obtain a plurality of grouped data, including:
[0022] Acquire business data corresponding to at least two business types in the target business data;
[0023] According to the preset service type processing order, the service data corresponding to each service type are grouped in sequence to obtain the grouped service data corresponding to each service type;
[0024] Using the grouped service data corresponding to each of the service types as the plurality of grouped data;
[0025] The business type processing sequence is the execution steps of each business type.
[0026] In one embodiment, the method further comprises:
[0027] When the resource registration operation results of the business data uploaded by the multiple resource transaction channel terminals all indicate that the resource registration operation has been completed, generating confirmation files corresponding to the multiple resource transaction channel terminals;
[0028] The confirmation file is returned to the corresponding resource transaction channel end; the confirmation file is used to confirm that the resource transaction channel end is allowed to start the process of uploading business data next time.
[0029] In a second aspect, the present application also provides a device for processing business data, including:
[0030] A grouping module, for responding to a resource registration request for target business data, grouping the target business data to obtain a plurality of grouped data; the target business data includes any business data uploaded by a plurality of resource transaction channel terminals;
[0031] A queue module, used for saving the grouping information of the plurality of grouping data to a clearing task queue table corresponding to the target business data; the grouping information includes processing status information and storage location information of the grouping data;
[0032] A publishing module, used for publishing a task processing message, so that a plurality of servers subscribing to the task processing message can obtain the grouping information from the clearing task queue table in parallel, and perform a registration subtask on the grouping data according to the grouping information; the registration subtask is used for performing a resource registration operation on the grouping data;
[0033] The determination module is used to determine the resource registration operation results of the plurality of grouped data according to the subtask execution states of the grouped data returned by the plurality of servers.
[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0036] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0037] The above-mentioned business data processing method, device, computer equipment and readable storage medium, by responding to a resource registration request for the target business data, grouping the target business data to determine a plurality of grouped data; the target business data includes any business data uploaded by a plurality of resource transaction channel terminals; saving the grouping information of the plurality of grouped data to a clearing task queue table corresponding to the target business data, wherein the grouping information includes processing status information and storage location information of the grouped data; publishing a task processing message to obtain the grouping information from the clearing task queue table in parallel through a plurality of servers subscribing to the task processing message, and executing a registration subtask for executing a resource registration operation on the grouped data according to the grouping information; The subtask execution status determines the resource registration operation results of multiple grouped data. By grouping the target business data and saving the group information to the clearing task queue table, the orderliness and traceability of data processing are ensured; with the help of the publication of task processing messages, multiple servers that subscribe to the task processing message can obtain and process the grouped data in parallel, thereby significantly improving the concurrency of data processing, reducing the load pressure of a single server, and avoiding delays and bottlenecks caused by centralized processing in traditional methods; real-time monitoring of the subtask execution status returned by each server ensures the integrity and consistency of business data processing, effectively avoiding the omission or repeated processing of business data during the resource registration operation, thereby greatly improving the reliability and accuracy of business data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] FIG1 is an application environment diagram of a method for processing business data in one embodiment;
[0040] FIG2 is a schematic diagram of a flow chart of a method for processing business data in one embodiment;
[0041] FIG3 is a flowchart of a business data processing in one embodiment;
[0042] FIG4 is a schematic diagram of an architecture for business data processing in one embodiment;
[0043] FIG5 is a flowchart of another type of business data processing in one embodiment;
[0044] FIG6 is a flow chart of a service data processing process in one embodiment;
[0045] FIG7 is a schematic diagram of another architecture of business data processing in one embodiment;
[0046] FIG8 is a flow chart of another method for processing business data in one embodiment;
[0047] FIG9 is a block diagram of a device for processing service data in one embodiment;
[0048] FIG. 10 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] The processing method of business data provided by the embodiment of the present application can be applied to 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. The server 104 responds to the resource registration request for the target business data, groups the target business data, and obtains multiple grouped data; the target business data includes any business data in the business data uploaded by multiple resource transaction channel terminals; the server 104 saves the grouping information of the multiple grouped data to the clearing task queue table corresponding to the target business data; the grouping information includes the processing status information and storage location information of the grouped data; the server 104 publishes a task processing message so that multiple servers that subscribe to the task processing message obtain the grouping information from the clearing task queue table in parallel, and perform the registration subtask on the grouped data according to the grouping information; the registration subtask is used to perform a resource registration operation on the grouped data; the server 104 determines the resource registration operation results of the multiple grouped data according to the subtask execution status of the grouped data returned by the multiple servers.
[0051] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0052] In an exemplary embodiment, as shown in FIG. 2 , a method for processing business data is provided, which is described by taking the method applied to the server 104 in FIG. 1 as an example, and includes:
[0053] Step S202 : in response to a resource registration request for target service data, group the target service data to obtain a plurality of grouped data.
[0054] The target business data includes any business data uploaded by multiple resource transaction channel terminals.
[0055] Among them, the resource transaction channel end can refer to the system or platform used to generate and upload business data, and the resource transaction channel can be an enterprise or individual that conducts financial transactions, commodity transactions, and data transactions.
[0056] The resource registration request is used to start the business processing flow for the target business data and perform the corresponding resource registration operation on the target business data. The resource registration operation may include the operation of recording the change of the resource.
[0057] Taking the fund transaction scenario as an example, the fund manager can entrust the bank to perform the fund share registration, accounting and other duties on its behalf. Among them, fund share registration is a key step to ensure the efficient operation of the fund. Fund share registration can maintain the fund share data of fund investors and accurately track and record their purchases, redemptions, dividends and other transactions. The fund manager can entrust the fund sales agency (agent) to conduct fund transactions with investors. Exemplarily, the resource transaction channel end can be the fund sales agency in the above example; the business data can be the fund share data mentioned above; and the resource registration operation can be the fund share registration mentioned above.
[0058] In a specific implementation, a business person can start a business process on the user interface of a business application of a terminal, thereby sending a resource registration request to a server cluster; a central server in the server cluster can respond to the resource registration request for target business data. Optionally, the central server can be any server in the server cluster, or the central server with the strongest computing power in the server cluster, without specific limitation.
[0059] In a specific implementation, the target business data is grouped to obtain a plurality of grouped data. The target business data may be grouped according to business type, or the target business data may be evenly grouped according to a preset number of groups to obtain a plurality of grouped data.
[0060] Step S204: save the grouping information of the plurality of grouped data into the clearing task queue table corresponding to the target business data.
[0061] The central server in the server cluster saves the grouping information of the plurality of grouped data into a clearing task queue list corresponding to the target business data.
[0062] The grouping information includes processing status information and storage location information of the grouping data.
[0063] The processing status information of the packet data may include the completion status of the resource registration operation of the packet data, such as completed, uncompleted, in progress, etc.; the storage location information of the packet data may include the storage location of the packet data in the database, such as the row number of the database, or the record number of the database. Exemplarily, since a packet data may generally include multiple data, the storage location information of the packet data may also include a segment start number and a segment end number. The segment start number may be used to indicate the row number of the database where the starting data in a packet data is located, and the end service data may be used to indicate the row number of the database where the ending data in a packet data is located.
[0064] In one embodiment, the grouping information may also include a business type identifier, a resource identifier, and execution server information, wherein the server execution information may be used to indicate which server acquires and processes the grouping information, and the server execution information may include the identifier of the server that acquires and processes the grouping information, such as the server number and name, etc. Exemplarily, taking the fund transaction scenario as an example, the business type identifier may include business type identifiers such as share freezing, dividends, share adjustments, share reductions, fast transfers, fund income distribution, non-transaction transfers, and product liquidations; the resource identifier may include a fund code to distinguish different fund products; the server execution information may be 07, which indicates that the server numbered 07 has received the grouping information and processed the grouping data corresponding to the grouping information.
[0065] In a specific implementation, the clearing task queue list can be used to manage the grouping information of the grouped data, and can update the grouping information of the grouped data in real time according to the resource registration operations of multiple servers on the grouped data. For example, the processing status information of the grouped data can be updated, which is conducive to the subsequent multiple servers to orderly obtain the grouping information from the clearing task queue list and perform resource registration operations on the grouped data. Real-time updating of the clearing task queue list is conducive to timely tracking of the business processing status of the grouped data.
[0066] Step S206 , publishing a task processing message so that multiple servers subscribing to the task processing message can obtain group information from the clearing task queue table in parallel, and perform a registration subtask on the group data according to the group information.
[0067] Among them, the task processing message can be used to trigger multiple servers to obtain grouping information from the clearing task queue list and execute corresponding processing tasks. The task processing message can be sent in an asynchronous manner to ensure that multiple servers in the server cluster can process tasks in parallel, thereby improving the efficiency of business data processing.
[0068] The central server in the server cluster can publish task processing messages to multiple servers in the server cluster that have subscribed to task processing messages. The server that publishes the task processing message can send the task processing message to a specific server (for example, a server that has subscribed to the task processing message) through the publish / subscribe mechanism. At the same time, the server that subscribes to the task processing message can actively listen to or subscribe to a specific server through the publish / subscribe mechanism. For example, the central server in the server cluster can quickly respond to the task processing message, obtain the group information from the clearing task queue table, and determine the unprocessed group data based on the processing status information in the group information, and extract the unprocessed group data based on the storage location information of the unprocessed group data and execute the corresponding registration subtask. The publish / subscribe mechanism can adapt to dynamic business needs, so that each server that has subscribed to the task processing message can process the group data in parallel, thereby improving the efficiency of business data processing.
[0069] The registration subtask is used to perform resource registration operations on the grouped data.
[0070] In a specific implementation, in response to a resource registration request for target business data, a central server in a server cluster may create and execute a main task, which is used to group the target business data to obtain a plurality of grouped data, and save the grouping information of the plurality of grouped data to a clearing task queue list corresponding to the target business data. When receiving the task processing message, a plurality of servers in the server cluster that have subscribed to the task processing message may obtain the grouping information from the clearing task queue list in parallel, and may create and execute a subtask, which may be a registration subtask for performing a resource registration operation on the grouped data according to the grouping information. Among them, performing a resource registration operation on the grouped data according to the grouping information may be, according to the business type corresponding to the grouped data, performing a resource registration operation corresponding to the business type on the grouped data, that is, different resource registration operations may be performed on grouped data of different business types.
[0071] Therefore, the server cluster adopts flexible grouping strategies through the main task for different stages of business processing, and can select the most suitable grouping method as needed to ensure that the subtasks have higher pertinence and flexibility when obtaining the grouped data to be processed.
[0072] In a specific implementation, a server in a server cluster that subscribes to task processing messages can obtain multiple grouping information from the clearing task queue table, and create and execute registration subtasks for corresponding grouping data according to the multiple grouping information. The number of grouping information is consistent with the number of registration subtasks created.
[0073] Exemplarily, the main fields of the clearing task queue table may be as shown in Table 1.
[0074] Table 1
[0075]
[0076] Step S208: determining resource registration operation results of the plurality of group data according to the subtask execution states of the group data returned by the plurality of servers.
[0077] Among them, the subtask execution status may refer to the subtask completion status returned when the server performs the registration subtask of the resource registration operation on the grouped data, which may include "success", "failure", "partial success", "partial failure", etc. The subtask execution status is used to determine whether the resource registration operation of each grouped data is completed correctly, and serves as the basis for finally determining the result of the resource registration operation.
[0078] The resource registration operation result may be the final processing result obtained based on the execution status of all registration subtasks, reflecting whether the target business data has successfully completed the resource registration operation, and whether there is unprocessed or erroneous data that causes the resource registration operation to fail. Exemplarily, if the subtask execution status returned by any server is "failed", "partially failed" or "partially successful", the resource registration operation result may be "resource registration operation failed"; if the subtask execution status of the grouped data returned by all servers is "successful", the resource registration operation result is "resource registration operation successful".
[0079] In the above-mentioned business data processing method, by responding to a resource registration request for the target business data, the target business data is grouped to determine a plurality of grouped data; the target business data includes any business data among the business data uploaded by a plurality of resource transaction channel terminals; the grouping information of the plurality of grouped data is saved to a clearing task queue table corresponding to the target business data, wherein the grouping information includes processing status information and storage location information of the grouped data; a task processing message is published so as to obtain the grouping information from the clearing task queue table in parallel through a plurality of servers subscribing to the task processing message, and a registration subtask for performing a resource registration operation on the grouped data is executed on the grouped data according to the grouping information; the subtask execution status of the grouped data returned by the plurality of servers is obtained, Determine the resource registration operation results of multiple grouped data, group the target business data, and save the group information to the clearing task queue table to ensure the orderliness and traceability of data processing; with the help of the publication of task processing messages, multiple servers that subscribe to the task processing messages can obtain and process the grouped data in parallel, thereby significantly improving the concurrency of data processing, reducing the load pressure of a single server, and avoiding delays and bottlenecks caused by centralized processing in traditional methods; monitor the execution status of subtasks returned by each server in real time to ensure the integrity and consistency of business data processing, effectively avoiding the omission or repeated processing of business data during the resource registration operation, thereby greatly improving the reliability and accuracy of business data processing.
[0080] In an exemplary embodiment, resource registration operation results of multiple grouped data are determined based on the subtask execution status of the grouped data returned by multiple servers, including: updating the processing status information of the grouped data in the clearing task queue list according to the subtask execution status of the grouped data returned by multiple servers to obtain an updated clearing task queue list; determining the resource registration operation results of the multiple grouped data based on the updated clearing task queue list.
[0081] Exemplarily, if the subtask execution status of any group data returned by any server is "failed", "partially failed" or "partially successful", the processing status information of the group data in the clearing task queue list is updated to "processing failed"; if the subtask execution status of any group data returned by any server is "processing", the processing status information of the group data in the clearing task queue list is updated to "processing"; if the subtask execution status of any group data returned by any server is "successful", the processing status information of the group data in the clearing task queue list is updated to "processing successful". In the case where the subtask execution status of each group data is "successful", the resource registration operation result can be "resource registration operation successful".
[0082] For example, in Table 1, the processing status information in the liquidation task queue table can be represented by a processing status code, such as 01 for unprocessed, 02 for processing, and 03 for completed processing, without specific limitation.
[0083] The above scheme updates the clearing task queue list in real time, and determines the resource registration operation results of multiple grouped data based on the updated clearing task queue list. It can monitor the processing progress and status of each grouped data in real time, ensure comprehensive grasp of the business data processing process, avoid omissions or duplications in business data processing, and improve the orderliness and accuracy of business data processing.
[0084] In an exemplary embodiment, the central server in the server cluster can also periodically query the updated clearing task queue list at preset time intervals; when it is determined according to the updated clearing task queue list that the resource registration operation results of multiple grouped data all indicate that the resource registration operation has been completed, the task execution result of the target business data is returned; the task execution result is used to indicate that the resource registration operation of the target business data has been completed.
[0085] Optionally, the preset time interval may be determined according to actual needs of the system, complexity of the processing task, real-time requirements, and availability of system resources, such as 5 seconds or 10 seconds.
[0086] By regularly querying the updated clearing task queue list, the progress of resource registration operations can be continuously monitored within the preset time interval, which helps to ensure that the resource registration operations of all grouped data can be completed correctly, avoid omissions or unfinished tasks, and improve the accuracy of the entire resource registration operation. Only after it is determined that the resource registration operations of all grouped data in the clearing task queue list have been completed, the task execution results of the target business data are returned, providing clear processing status guidance for subsequent business processes, so that business personnel who initiate business processing processes can obtain clear resource registration operation completion status through business applications and continue to perform subsequent operations, improving the smoothness of business processes.
[0087] In an exemplary embodiment, a task processing message carries a maximum number of subtasks; after a central server in a server cluster publishes a task processing message, multiple servers in the server cluster that have subscribed to the task processing message can lock multiple grouping information that matches the maximum number of subtasks from a clearing task queue in parallel, generate corresponding registration subtasks for the grouping data corresponding to the multiple grouping information, assign each registration subtask to each thread in a thread pool of the server, and execute each thread; each thread corresponds one-to-one to each registration subtask.
[0088] The maximum number of subtasks can be the number of registered subtasks that can be processed in parallel by each server that has subscribed to the task processing message, and the maximum number of subtasks can also be equal to the maximum number of grouping information that the server can lock from the clearing task queue list. Each server that has subscribed to the task processing message can lock and obtain multiple grouping information that matches the maximum number of subtasks from the clearing task queue list at one time. The server extracts as many grouping information as it can create and execute as many parallel registered subtasks. The number of registered subtasks executed by each server is equal to the number of grouping information received by the server. In addition, the server can initialize a thread pool, assign each locked grouping information to each thread in the thread pool to execute the corresponding registered subtask, each thread corresponds to each registered subtask one by one, and each registered subtask corresponds to each grouping information one by one. Among them, the thread pool can refer to a resource management mechanism in the server, which is used to manage and reuse multiple threads to improve task processing efficiency. The thread is the smallest unit for executing tasks, and each thread is used to execute a specific registered subtask.
[0089] By locking multiple group information that matches the maximum number of subtasks, the server can ensure that the locked group information will not be accessed by other servers or other processes, avoiding multiple threads from repeatedly processing the same group data, effectively preventing data conflicts and reducing resource waste, improving the orderliness of business data processing, and thus improving the accuracy of business data processing.
[0090] By controlling the maximum number of subtasks carried by the task processing message, the number of concurrent registered subtasks of each server can be reasonably controlled, thereby improving the resource utilization of the server. In addition, the maximum number of subtasks can be used to flexibly adjust the number of concurrent tasks according to the current load conditions, thereby better adapting to different business needs and system resource conditions, and improving the flexibility of business data processing. By locking multiple grouping information that matches the maximum number of subtasks, it can be ensured that these grouping data will not be repeatedly processed or modified by other threads or tasks during the processing process, effectively preventing data conflicts and repeated processing problems, and improving the accuracy of business data processing and the reliability of task execution. The generated registration subtasks are assigned to each thread in the server's thread pool and executed one by one, which can maximize the use of the thread pool's processing capacity, avoid resource waste, and ensure efficient operation of business data processing.
[0091] In one embodiment, the task processing message may also carry a database number and a main task number; wherein, when the central server of the server cluster responds to resource registration requests for business data uploaded by different resource transaction channel terminals, different main tasks will be created respectively, each main task is used to group the business data uploaded by different resource transaction channel terminals to obtain multiple grouped data, and each main task corresponds to a different main task number, which is used to distinguish the group processing of business data uploaded by different resource transaction channel terminals; and, since the business data uploaded by different resource transaction channel terminals can be stored in different databases respectively, the database number can be used to indicate in which database the target business data is stored. When receiving the task processing message, the server subscribed to the task processing message in the server cluster can switch to the corresponding database according to the database number, and obtain the group data corresponding to the group information from the corresponding database according to the group information obtained from the clearing task queue table, and execute the corresponding registration subtask. Since different main tasks can correspond to different maximum subtask numbers, the server subscribed to the task processing message can determine the corresponding maximum subtask number according to the main task number when receiving the task processing message, so that the efficiency and accuracy of business data processing can be guaranteed through the task processing message.
[0092] In an exemplary embodiment, the target business data includes account-type business data and resource-type business data; the central server in the server cluster can also obtain the resource registration operation result for the account-type business data when it detects that all the business data uploaded by the resource transaction channel has been received; the central server in the server cluster responds to the resource registration request for the target business data and groups the target business data to obtain multiple grouped data, which may include: when the resource registration operation result for the account-type business data indicates that the resource registration operation has been completed, respond to the resource registration request for the resource-type business data to group the resource-type business data to obtain multiple grouped data.
[0093] Among them, account-related business data may be business data related to account management, such as business data of business types such as account opening, account closing, and adding trading accounts. Such data requires precise resource registration operations to ensure the accuracy and completeness of account information; resource-related business data may refer to business data related to resource transactions, such as business data of business types such as subscription, application, and redemption. By way of example, resource registration operations for resource-related business data may include accurately calculating transaction fees, confirming transaction amounts, and updating investor share records.
[0094] In one of the embodiments, if a resource registration request for resource-type business data is received when the result of the resource registration operation for account-type business data indicates that the resource registration operation is not completed, the resource registration request for the resource-type business data may not be responded to, thereby ensuring the orderliness of business data processing.
[0095] After detecting that all business data uploaded by all resource transaction channels have been received, the resource registration operation results of the account business data are obtained, and the resource business data is grouped and the subsequent resource registration operations are processed based on this result, thereby ensuring the sequentiality of business data processing. Since account business data is usually the basis of resource business data, ensuring that the resource registration operation of account data is completed before processing resource data helps maintain the consistency of business data and the accuracy of processing.
[0096] In order to facilitate the understanding of those skilled in the art, FIG3 exemplarily provides a flowchart of business data processing. Taking the fund transaction scenario as an example, after the end of daily transactions, the sales agency uploads the business data of the day to the bank's resource registration system through the prescribed file interface standard. The resource registration system can be used to perform resource registration operations on the business data, and the resource registration system is configured in the server cluster. The bank's resource registration system needs to integrate the business data uploaded by all sales agencies and store the business data in the local database. When the business data of all sales agencies are collected, the business personnel start the processing flow of account-type business data on the user interface of the business application of the resource registration system, so that a resource registration request for account-type business data can be initiated to the server cluster corresponding to the resource registration system. After completing the resource registration operation on the account-type business data through the server cluster, the business personnel can trigger the processing of the resource-type business data, so that a resource registration request for the resource-type business data can be initiated to the server cluster. After confirming the resource registration operation results of the account-type business data and the resource-type business data, external interface data is generated. The external interface data can be a confirmation file generated after the resource registration operation is completed for each business data, and the corresponding confirmation file is generated according to the interface standard, and the confirmation file is fed back to the corresponding sales agency one by one. It can be seen that when the solution of this application is applied to fund trading scenarios, it comprehensively improves the performance in daily business processes such as account management, transaction settlement and generation of external interface data, ensures the timeliness and efficiency of daily business processing, and meets peak business needs.
[0097] In an exemplary embodiment, target business data is grouped to obtain multiple grouped data, including: obtaining business data corresponding to at least two business types in the target business data; grouping the business data corresponding to each business type in turn according to a preset business type processing order to obtain grouped business data corresponding to each business type; and treating the grouped business data corresponding to each business type as multiple grouped data; wherein the business type processing order is the execution steps of each business type.
[0098] For example, taking the fund transaction scenario as an example, the business types may include share freezing, dividends, share adjustments, share reductions, quick transfers, fund income distribution, non-transaction transfers, and product liquidation, etc. For example, the business type processing order can be seen in Table 2.
[0099] Table 2
[0100]
[0101] It can be seen that the grouping order of business data of each business type can be configured through the business type processing order, so that the business data corresponding to each business type can be grouped in turn according to the preset business type processing order, and the grouped business data corresponding to each business type can be obtained after the business data of each business type is grouped, and the grouped business data corresponding to each business type can be used as multiple business data.
[0102] Taking the fund trading scenario as an example, there are strict sequence requirements between different business types. For example, the business data of the share freezing business type must be processed before the business data of the quick transfer business type. Processing in the order of business types can ensure that each business step is executed in the correct order, avoiding transaction failures or data inconsistencies caused by incorrect sequences, and improving the accuracy of business data processing.
[0103] In a specific implementation, the service data corresponding to each service type may be grouped by calling a grouping interface corresponding to each service type, thereby obtaining the grouped service data corresponding to each service type.
[0104] In an exemplary embodiment, when the resource registration operation results of business data uploaded by multiple resource transaction channel ends all indicate that the resource registration operation has been completed, confirmation files corresponding to the multiple resource transaction channel ends are generated; the confirmation files are returned to the corresponding resource transaction channel ends; the confirmation files are used to confirm that the resource transaction channel ends are allowed to start the process of uploading business data next time.
[0105] The confirmation file can be a file generated according to the file interface standard that integrates the business data of all resource transaction channel terminals and completes the business data processing of resource registration operations. The purpose of the confirmation file can be to confirm to each resource transaction channel terminal that the business data uploaded by it has completed the resource registration operation and meets the standard requirements.
[0106] When the resource registration operation results of business data uploaded by multiple resource transaction terminals all indicate that the resource registration operation has been completed, a confirmation file is generated and returned to the corresponding channel terminal, ensuring that the resource registration operations of all channel terminals are completed and correct, thereby improving the accuracy of business data processing; through the feedback mechanism of returning the confirmation file to the corresponding resource transaction channel terminal, it can be ensured that each resource transaction channel terminal can start the next business process only after receiving the confirmation file, which can ensure the compliance of business data processing, and facilitate the effective collaboration between the server cluster and each resource transaction channel, thereby improving the integrity, security and efficiency of the business data processing process.
[0107] To facilitate the understanding of those skilled in the art, FIG4 exemplarily provides a schematic diagram of the architecture of business data processing. Taking the fund trading scenario as an example, the resource registration system configured in the server cluster collects application documents from all sales agencies on each trading day. The application documents include business data and request files for resource registration operations on business data. Business personnel can directly start business processing according to the established workflow in the user interface of the business application configured with the resource registration system. Through the server cluster resources of the resource registration system, the tasks of resource registration operations are intelligently decomposed to the entire server cluster to improve the parallel processing capabilities of business data, thereby improving the efficiency of business data processing and ensuring that the tasks of resource registration operations can be completed quickly and effectively under various workloads to meet high timeliness requirements.
[0108] Further, in order to facilitate the understanding of those skilled in the art, FIG5 exemplarily provides another flowchart of business data processing. It can be seen that the overall task can be divided into a main task and subtasks. The main task does not process business logic, but only groups the business data to be processed on the day and writes it into the clearing task queue list. The task processing message is sent to notify multiple servers in the server cluster to create subtasks to process the tasks in the clearing task queue list. Specifically, the following process may be included:
[0109] 1. Business personnel start the business process of the day (such as account settlement, transaction settlement, etc.) on the user interface. The resource registration system creates a main task in the background and executes it on a server in the backend server cluster. This main task does not process specific business logic. Its main function is to call the grouping interface of each business type, generate detailed grouping information and save it to the clearing task queue. In the process of processing business data, the processing order of business types is strictly followed. Each business type is designed as an independent processing step of the "main task" to ensure that the grouped data of all business types are grouped and executed in the established order. The steps of different business types are executed in sequence in the main task. The grouping information is obtained by calling the grouping interface of different business types, and the grouping information is saved in the clearing task queue.
[0110] 2. After the group information is saved in the clearing task queue list, a task processing message is sent to notify the servers in the backend server cluster that have subscribed to the task processing message (such as servers 1, 2, ..., N in Figure 5) that they can obtain the group information from the clearing task queue list and start business logic processing on the business data corresponding to the group information.
[0111] 3. Multiple servers that have subscribed to the task processing message initialize a thread pool and start listening for the task processing message. Once the task processing message sent by the main task is received, it will switch to the corresponding database according to the database code in the task processing message. Then, according to the main task code in the task processing message, at most threadNum grouping information is taken out from the clearing task queue table for processing at one time, where threadNum is the maximum number of subtasks. The grouping data corresponding to each grouping information will be assigned to a specific thread in the thread pool to perform the corresponding business processing, that is, the resource registration operation.
[0112] 4. When a subtask successfully processes a group of data, it will immediately update the processing status information of the corresponding grouped data in the clearing task queue.
[0113] 5. The main task continuously checks the completion status of all subtasks to ensure that all business data processing has been completed. If all subtasks are completed, the main task ends and returns the task execution result to the business personnel.
[0114] Further, in order to facilitate the understanding of those skilled in the art, FIG6 exemplarily provides a flow chart of business data processing. The specific flow includes:
[0115] 1. Business personnel initiate resource registration requests through business applications. The server cluster can store business data in the database corresponding to the resource identifier according to the resource identifier associated with the business data, create a main task in the database corresponding to the resource identifier, and then start execution.
[0116] 2. The main task follows the preset business type processing order to execute the business data of each business type in sequence, calls the grouping interface of the corresponding business implementation class, and stores the grouping information in the clearing task queue list.
[0117] 3. The main task publishes a task processing message to remind all servers that have subscribed to the task processing message that there are tasks to be processed.
[0118] 4. The main task then enters the loop checking phase, monitoring the running status of the clearing task queue at the set time interval. If unprocessed tasks are found, notifications will be continuously sent to the batch processing service for processing; if a faulty task is encountered, the main task will be immediately terminated and the error details will be fed back.
[0119] 5. After all servers receive the message, they use the row-level locking mechanism to query and lock the specific task in the clearing task queue. Once the task is successfully obtained, the task status will be locked, and a subtask will be generated to wait for the thread pool to allocate a thread for execution.
[0120] 6. When the thread pool activates the subtask, it calls the business interface provided by the business implementation class to start business logic processing. After execution, it updates the processing status information of the clearing task queue list.
[0121] 7. When the main task detects that all tasks in the clearing task queue list have been successfully executed, the loop will stop and the entire execution process will be successful.
[0122] The above scheme divides the task execution into two parts: the main task and the subtask. The main task intelligently groups all the business data to be processed, does not directly involve specific business logic processing, and stores these grouping information in the clearing task queue table. Subsequently, the task processing message is issued to the servers that have subscribed to the task processing message, instructing these servers to obtain the grouping information from the clearing task queue table and generate subtasks. The subtask calls the business processing function module to perform specific resource registration operations on the business data, thereby significantly improving the utilization efficiency of the server cluster, and improving the concurrency capability of business data processing and the efficiency of business data processing. In addition, for different stages of business processing, the main task adopts a flexible grouping strategy, which can select the most suitable grouping method as needed, such as different grouping methods according to different business types, to ensure that the subtask has higher pertinence and flexibility when obtaining the data to be processed.
[0123] Exemplarily, the business data of the subscription business type is taken as an example to illustrate the entire business data processing process. Assume that there are 4 servers in the server cluster that subscribe to task processing messages, namely servers 1, 2, 3, and 4. The central server in the server cluster receives the business data of the subscription business type uploaded by each resource transaction channel, and stores it in different databases according to the resource identifier corresponding to the business data of the subscription business type. The resource identifier can refer to the fund code or the code of the fund manager. Different fund managers have different corresponding resource identifiers, and different databases can be stored accordingly. The distribution of business data of all subscription business types on the day can be shown in Table 3.
[0124] Table 3
[0125]
[0126] To facilitate the understanding of those skilled in the art, FIG7 exemplarily provides another schematic diagram of the architecture of business data processing. The specific process is as follows:
[0127] 1. The business personnel initiates a resource registration request in the user interface, and the central server of the server cluster generates a main task in the database where each manager is located.
[0128] 2. The main task calls the grouping interface of the subscription business type (processing 1,000 data items per group). All subscription business data of manager A is divided into 3 groups, all subscription business data of manager B is divided into 2 groups, all subscription business data of manager C and all subscription business data of manager D are divided into 1 group, and the grouping information is written into the clearing task team list. The clearing task team list is shown in Table 4.
[0129] Table 4
[0130]
[0131] 3. The main task sends a task processing message to notify the server to process the task, and the subtask obtains the business data to be processed from the clearing task team list to process the subscription business.
[0132] 4. The subtask obtains the grouping message from the clearing task team list, obtains the current subscription business data that needs to be processed from the database through the segment start number and segment end number, calls the subscription business processing function module to complete the business processing, saves the processing results, and updates the processing status of the clearing task team list. The clearing task team list after business processing is shown in Table 5.
[0133] Table 5
[0134]
[0135] 5. The main task polls to check whether all subtasks have been processed and returns the task execution results to the business personnel.
[0136] In summary, by decomposing the large-volume business data tasks that need to be processed daily into a main task and multiple subtasks, each subtask can be executed independently, thus achieving parallel processing of tasks; by adopting a message subscription and publishing mechanism, all servers that perform business processing are subscribers of the message. Once the task processing message is received, the server will retrieve the business data to be processed from the clearing task queue list, and then start the subtask to perform the corresponding business data processing. Distributing business data processing tasks to the entire back-end server cluster not only improves the efficiency of server resource utilization, but also strengthens the overall concurrency capability of the system, thereby greatly improving the processing speed and system performance.
[0137] FIG. 8 is another method for processing business data according to an exemplary embodiment. As shown in FIG. 8 , the method is applied to the server 104 in FIG. 1 as an example for description, and includes the following steps:
[0138] Step S802 : in response to a resource registration request for target service data, group the target service data to obtain a plurality of grouped data.
[0139] The target business data includes any business data uploaded by multiple resource transaction channel terminals.
[0140] In one of the embodiments, the target business data includes account-type business data and resource-type business data; further comprising: when it is detected that all business data uploaded by multiple resource transaction channel terminals have been received, obtaining a resource registration operation result for the account-type business data; in response to a resource registration request for the target business data, grouping the target business data to obtain a plurality of grouped data, including: when the resource registration operation result for the account-type business data indicates that the resource registration operation has been completed, in response to a resource registration request for the resource-type business data, grouping the resource-type business data to obtain a plurality of grouped data.
[0141] In one of the embodiments, target business data is grouped to obtain multiple grouped data, including: obtaining business data corresponding to at least two business types in the target business data; grouping the business data corresponding to each business type in turn according to a preset business type processing order to obtain grouped business data corresponding to each business type; treating the grouped business data corresponding to each business type as multiple grouped data; wherein the business type processing order is the execution steps of each business type.
[0142] Step S804: save the grouping information of the plurality of grouped data into the clearing task queue table corresponding to the target business data.
[0143] The grouping information includes processing status information and storage location information of the grouping data;
[0144] Step S806 , publishing a task processing message, so that multiple servers subscribing to the task processing message can obtain the grouping information from the clearing task queue table in parallel, and perform the registration subtask on the grouping data according to the grouping information.
[0145] The registration subtask is used to perform resource registration operations on grouped data.
[0146] The maximum number of subtasks that a task processing message carries.
[0147] Step S808, locking multiple grouping information matching the maximum number of subtasks from the clearing task queue in parallel, generating corresponding registration subtasks for the grouping data corresponding to the multiple grouping information, assigning each registration subtask to each thread in the thread pool of the server, and executing each thread.
[0148] Each thread corresponds to each registered subtask one by one.
[0149] Step S810 , updating the processing status information of the grouped data in the clearing task queue list according to the subtask execution status of the grouped data returned by multiple servers, to obtain an updated clearing task queue list.
[0150] Step S812: regularly query the updated liquidation task team list at a preset time interval.
[0151] Step S814, determining resource registration operation results of the plurality of grouped data according to the updated clearing task queue list.
[0152] Step S816, when it is determined according to the updated clearing task queue list that the resource registration operation results of the plurality of grouped data all indicate that the resource registration operation has been completed, the task execution result of the target business data is returned.
[0153] The task execution result is used to indicate that the target business data has completed the resource registration operation.
[0154] Step S818: When the resource registration operation results of the business data uploaded by the multiple resource transaction channel terminals all indicate that the resource registration operation has been completed, confirmation files corresponding to the multiple resource transaction channel terminals are generated.
[0155] Step S820, returning the confirmation file to the corresponding resource transaction channel end.
[0156] The confirmation file is used to confirm that the resource transaction channel is allowed to start the next process of uploading business data.
[0157] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a method for processing business data above, which will not be repeated here.
[0158] 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.
[0159] Based on the same inventive concept, the embodiment of the present application also provides a device for processing business data for implementing the method for processing business data involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more embodiments 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.
[0160] In an exemplary embodiment, as shown in FIG9 , a device for processing business data is provided, including:
[0161] The grouping module 910 is used to group the target business data in response to a resource registration request for the target business data to obtain a plurality of grouped data; the target business data includes any business data uploaded by a plurality of resource transaction channel terminals.
[0162] The queue module 920 is used to save the grouping information of the plurality of grouped data to the clearing task queue table corresponding to the target business data; the grouping information includes the processing state information and storage location information of the grouped data.
[0163] The publishing module 930 is used to publish a task processing message so that multiple servers subscribed to the task processing message can obtain the grouping information from the clearing task queue table in parallel and perform a registration subtask on the grouped data according to the grouping information; the registration subtask is used to perform a resource registration operation on the grouped data.
[0164] The determination module 940 is configured to determine resource registration operation results of the plurality of grouped data according to the subtask execution states of the grouped data returned by the plurality of servers.
[0165] In one embodiment, the determination module 940 is used to update the processing status information of the grouped data in the clearing task queue list according to the subtask execution status of the grouped data returned by the multiple servers, so as to obtain the updated clearing task queue list; and determine the resource registration operation results of the multiple grouped data according to the updated clearing task queue list.
[0166] In one of the embodiments, the device also includes a return module, which is used to periodically query the updated clearing task queue list at a preset time interval; when it is determined according to the updated clearing task queue list that the resource registration operation results of the multiple grouped data all indicate that the resource registration operation has been completed, the task execution result of the target business data is returned; the task execution result is used to indicate that the resource registration operation of the target business data has been completed.
[0167] In one of the embodiments, the task processing message carries a maximum number of subtasks; the device also includes an execution module, which is used to lock multiple grouping information matching the maximum number of subtasks from the clearing task queue in parallel, generate corresponding registration subtasks for the grouping data corresponding to the multiple grouping information, assign each of the registration subtasks to each thread in the thread pool of the server, and execute each of the threads; each thread corresponds one-to-one to each of the registration subtasks.
[0168] In one embodiment, the target business data includes account-type business data and resource-type business data; the device also includes an acquisition module, which is used to obtain the resource registration operation result for the account-type business data when it is detected that all the business data uploaded by the multiple resource transaction channel terminals have been received; the grouping module 910 is also used to group the resource-type business data in response to a resource registration request for the resource-type business data to obtain multiple grouped data when the resource registration operation result for the account-type business data indicates that the resource registration operation has been completed.
[0169] In one of the embodiments, the grouping module 910 is used to obtain business data corresponding to at least two business types in the target business data; group the business data corresponding to each of the business types in turn according to a preset business type processing order to obtain grouped business data corresponding to each of the business types; and use the grouped business data corresponding to each of the business types as the multiple grouped data; wherein the business type processing order is the execution steps of each of the business types.
[0170] In one of the embodiments, the device also includes a return module, which is used to generate confirmation files corresponding to the multiple resource transaction channel ends when the resource registration operation results of the business data uploaded by the multiple resource transaction channel ends all indicate that the resource registration operation has been completed; return the confirmation files to the corresponding resource transaction channel ends; the confirmation file is used to confirm that the resource transaction channel end is allowed to start the process of uploading business data next time.
[0171] Each module in the above-mentioned business data processing device 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.
[0172] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. 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 input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing business data is implemented.
[0173] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0174] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0175] 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 steps in the above-mentioned method embodiments are implemented.
[0176] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0178] 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 in the present application can include at least one of non-volatile memory 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), magnetic 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 in this application 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 in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0179] 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 application.
[0180] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for processing business data, characterized in that: The method comprises: In response to a resource registration request for target business data, the target business data is grouped to obtain a plurality of grouped data; the target business data includes any business data among the business data uploaded by a plurality of resource transaction channel terminals; Saving the grouping information of the plurality of grouped data to the clearing task queue table corresponding to the target business data; the grouping information includes processing status information and storage location information of the grouped data; Publishing a task processing message so that a plurality of servers subscribing to the task processing message can obtain the grouping information from the clearing task queue table in parallel, and perform a registration subtask on the grouping data according to the grouping information; the registration subtask is used to perform a resource registration operation on the grouping data; The resource registration operation results of the plurality of group data are determined according to the subtask execution states of the group data returned by the plurality of servers.
2. The method according to claim 1, characterized in that The determining the resource registration operation results of the plurality of grouped data according to the subtask execution states of the grouped data returned by the plurality of servers comprises: According to the subtask execution status of the grouped data returned by the multiple servers, the processing status information of the grouped data in the clearing task queue list is updated to obtain the updated clearing task queue list; The resource registration operation results of the plurality of grouped data are determined according to the updated clearing task team list.
3. The method according to claim 2, characterized in that The method further comprises: According to the preset time interval, regularly query the updated liquidation task team list; When it is determined according to the updated clearing task queue table that the resource registration operation results of the multiple grouped data all indicate that the resource registration operation has been completed, the task execution result of the target business data is returned; the task execution result is used to indicate that the resource registration operation of the target business data has been completed.
4. The method according to claim 1, characterized in that The task processing message carries a maximum number of subtasks; After the task processing message is published, the method further includes: In parallel, multiple grouping information matching the maximum number of subtasks are locked from the clearing task queue table, corresponding registration subtasks are generated for the grouping data corresponding to the multiple grouping information, each of the registration subtasks is respectively assigned to each thread in the thread pool of the server, and each of the threads is executed; Each of the threads corresponds to each of the registered subtasks one by one.
5. The method according to claim 1, characterized in that The target business data includes account business data and resource business data; the method further includes: When it is detected that all the business data uploaded by the multiple resource transaction channel terminals have been received, obtaining a resource registration operation result for the account-type business data; The method of grouping the target business data to obtain a plurality of grouped data in response to a resource registration request for the target business data comprises: when a result of a resource registration operation on the account-type business data indicates that the resource registration operation has been completed, grouping the resource-type business data to obtain a plurality of grouped data in response to a resource registration request for the resource-type business data.
6. The method according to claim 1, characterized in that The target service data is grouped to obtain a plurality of grouped data, including: Acquire business data corresponding to at least two business types in the target business data; According to the preset service type processing order, the service data corresponding to each service type are grouped in sequence to obtain the grouped service data corresponding to each service type; Using the grouped service data corresponding to each of the service types as the plurality of grouped data; The business type processing sequence is the execution steps of each business type.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the resource registration operation results of the business data uploaded by the multiple resource transaction channel terminals all indicate that the resource registration operation has been completed, generating confirmation files corresponding to the multiple resource transaction channel terminals; The confirmation file is returned to the corresponding resource transaction channel end; the confirmation file is used to confirm that the resource transaction channel end is allowed to start the process of uploading business data next time.
8. A device for processing business data, characterized in that: The device comprises: A grouping module, for responding to a resource registration request for target business data, grouping the target business data to obtain a plurality of grouped data; the target business data includes any business data uploaded by a plurality of resource transaction channel terminals; A queue module, used for saving the grouping information of the plurality of grouping data to a clearing task queue table corresponding to the target business data; the grouping information includes processing status information and storage location information of the grouping data; A publishing module, used for publishing a task processing message, so that a plurality of servers subscribing to the task processing message can obtain the grouping information from the clearing task queue table in parallel, and perform a registration subtask on the grouping data according to the grouping information; the registration subtask is used for performing a resource registration operation on the grouping data; The determination module is used to determine the resource registration operation results of the plurality of grouped data according to the subtask execution states of the grouped data returned by the plurality of servers.
9. The device according to claim 8, characterized in that The determination module is used to update the processing status information of the grouped data in the clearing task queue list according to the subtask execution status of the grouped data returned by the multiple servers to obtain the updated clearing task queue list; and determine the resource registration operation results of the multiple grouped data according to the updated clearing task queue list.
10. The device according to claim 9, characterized in that The device also includes a return module, which is used to regularly query the updated clearing task queue list at a preset time interval; when it is determined according to the updated clearing task queue list that the resource registration operation results of the multiple grouped data all indicate that the resource registration operation has been completed, return the task execution result of the target business data; The task execution result is used to indicate that the resource registration operation of the target business data has been completed.
11. The device according to claim 8, characterized in that The task processing message carries the maximum number of subtasks; the device also includes an execution module, which is used to lock multiple grouping information matching the maximum number of subtasks from the clearing task queue in parallel, generate corresponding registration subtasks for the grouping data corresponding to the multiple grouping information, assign each of the registration subtasks to each thread in the thread pool of the server, and execute each of the threads; Each of the threads corresponds to each of the registered subtasks one by one.
12. The device according to claim 8, characterized in that The target business data includes account-type business data and resource-type business data; the device also includes an acquisition module, which is used to obtain the resource registration operation result for the account-type business data when it is detected that all the business data uploaded by the multiple resource transaction channel terminals have been received; the grouping module is also used to group the resource-type business data in response to a resource registration request for the resource-type business data to obtain multiple grouped data when the resource registration operation result for the account-type business data indicates that the resource registration operation has been completed.
13. The device according to claim 8, characterized in that The grouping module is used to obtain business data corresponding to at least two business types in the target business data; group the business data corresponding to each of the business types in turn according to a preset business type processing order to obtain grouped business data corresponding to each of the business types; and use the grouped business data corresponding to each of the business types as the multiple grouped data; wherein the business type processing order is the execution steps of each of the business types.
14. The device according to any one of claims 8 to 13, characterized in that The device further comprises a return module, which is used to generate confirmation files corresponding to the multiple resource transaction channel ends when the resource registration operation results of the business data uploaded by the multiple resource transaction channel ends all indicate that the resource registration operation has been completed; The confirmation file is returned to the corresponding resource transaction channel end; the confirmation file is used to confirm that the resource transaction channel end is allowed to start the process of uploading business data next time.
15. 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 7 are implemented.
16. 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 7 are implemented.
17. 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 7 are implemented.
Citation Information
Cited By
Multi-level derivation engine analysis method and system for AI work card audio text
CN119903173A
Data processing method based on multiple data sources, computer equipment and storage medium
CN120849145A
Data processing methods based on multiple data sources, computer equipment, and storage media.
CN120849145B
User tag calculation method and system, electronic equipment and storage medium
CN121636868A
Method and device for chunk operation service and non-transitory computer-readable storage medium
TWI936859B