Transaction processing method and device based on task chain

By using a task chain-based transaction processing method, multiple task chain nodes are configured to automate data task processing, solving the problems of low deployment efficiency and error susceptibility in existing technologies, and achieving efficient and automated data processing.

CN121233239APending Publication Date: 2025-12-30WENHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410779176.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

In existing technologies, data processing tasks are inefficient to deploy and prone to errors, making it impossible to effectively automate complex or intelligent data processing tasks.

Method used

A task chain-based transaction processing method is adopted. By defining the target transaction content, multiple task chain nodes are configured, and the task chain is executed to achieve automated transaction processing. In-depth analysis is performed in conjunction with the task chain processing mechanism to avoid manual operation. Task content is split and nested by task chain nodes to improve efficiency and quality.

Benefits of technology

It achieves efficient and automated data processing, reduces manual operations, captures the deep-level processing elements of target transactions, and improves the quality and efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233239A_ABST
    Figure CN121233239A_ABST
Patent Text Reader

Abstract

The invention provides a transaction processing method and device based on a task chain, which are used for meeting automatic transaction processing requirements before and during a transaction, and fusing a task chain processing mechanism on the basis of automatically deploying an autonomous execution strategy to realize automatic transaction processing, so that a target transaction is deeply analyzed, and the transaction processing efficiency is improved. According to the method, the task chain nodes are divided into different task chain nodes, and the different task chain nodes are embodied, so that manual operation is avoided as far as possible, deep processing elements of the target transaction can be captured, and the target transaction can be executed more efficiently and with high quality through the task contents divided and nested by the different task chain nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and specifically to a transaction processing method and apparatus based on task chains. Background Technology

[0002] Nowadays, many complex or intelligent data processing tasks are often completed autonomously by equipment. Behind this, technicians need to pre-deploy corresponding autonomous execution strategies on the equipment so that the equipment can then carry out specific automated data processing tasks according to the pre-deployed autonomous execution strategies.

[0003] In practice, automated data processing of equipment is often carried out in the form of tasks. The inventors of this application have found that the deployment of data processing tasks is usually configured manually by technicians, and the same applies to subsequent maintenance. This approach means that when faced with a large number of data processing tasks, it is easy to cause low deployment efficiency and errors. Summary of the Invention

[0004] This application provides a task chain-based transaction processing method and apparatus. Addressing the need for automated transaction processing before and during the transaction, it integrates a task chain processing mechanism on top of automated deployment and autonomous execution strategies to achieve automated transaction processing. This mechanism performs in-depth analysis of the target transaction and represents it through different task chain nodes. This minimizes the need for manual operation while also helping to capture the deep-seated processing elements of the target transaction. By using the task content split and nested by different task chain nodes, the target transaction can be executed more efficiently and with higher quality.

[0005] Firstly, this application provides a task chain-based transaction processing method, which includes:

[0006] Identify the target transaction to be processed through the task chain mechanism;

[0007] The transaction content of the target transaction is determined, and multiple task chain nodes are configured based on the transaction content to obtain a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, the content of the current task and the next task. The next node of the head node in the multiple task chain nodes is the node that needs to be executed first, and the content of the next task configured for the tail node in the multiple task chain nodes is empty.

[0008] A task chain consisting of multiple task chain nodes is executed to perform the target transaction and obtain the transaction processing result of the target transaction.

[0009] In conjunction with the first aspect of this application, in a first possible implementation of the first aspect of this application, multiple task chain nodes are configured based on the transaction content, including:

[0010] Based on the transaction content, multiple sub-tasks that need to be executed are determined;

[0011] Multiple subtasks are encapsulated separately to obtain multiple task chain nodes.

[0012] In conjunction with the first possible implementation of the first aspect of this application, in the second possible implementation of the first aspect of this application, multiple subtasks are encapsulated to obtain multiple task chain nodes, including:

[0013] Determine if there is a common target subtask among multiple subtasks;

[0014] If it exists, extract the target task chain node configured for the historical subtask from the historical task chain with the target task chain node configured for the historical subtask, or extract the target task chain node configured for the historical subtask stored separately.

[0015] Reuse the target task chain node configured in the historical subtask as the task chain node of the target subtask.

[0016] In conjunction with the first aspect of this application, in the third possible implementation of the first aspect of this application, the task chain composed of multiple task chain nodes is further configured with a context data transmission object. The context data transmission object includes a Map type data structure and also includes auxiliary attributes and methods. Executing the task chain composed of multiple task chain nodes to execute the target transaction includes:

[0017] A task chain consisting of multiple task chain nodes is executed to perform the target transaction. During the execution, data is transferred between tasks of different task chain nodes through a context data transfer object. Whenever corresponding data is generated, the task name of the current task chain node is stored as the key and the generated corresponding data is stored as the value in a Map data structure, so that subsequent tasks can retrieve it by the task name.

[0018] In conjunction with the first aspect of this application, in the fourth possible implementation of the first aspect of this application, the target transaction is specifically a paper extraction transaction, and the multiple task chain nodes include a metadata collection node, a text translation node, a file download node, a file translation node, a file storage node, and a node for storing all data;

[0019] The metadata collection node requests JSON-formatted metadata from the paper metadata API platform, stores the data after deserialization, and the content of the JSON-formatted metadata is a brief summary of the target paper, including the title, abstract and download URL.

[0020] The text translation node calls the text translation API to translate the content of JSON-formatted metadata and obtain the JSON-formatted translation;

[0021] The file download node downloads the PDF paper file of the target paper based on the download address URL, and uploads the PDF paper file to the cloud service server for storage, thus obtaining the file URL of the PDF paper file;

[0022] The document translation node calls the PDF translation API to translate PDF paper files and obtain PDF translation files in DOC format;

[0023] The storage file node converts the PDF translation file into a PDF and uploads the resulting PDF to the cloud service server for storage, obtaining the file URL of the PDF conversion result;

[0024] The system stores the file URLs of the PDF paper and the PDF conversion results at all data nodes, thus completing the storage of the target paper.

[0025] Secondly, this application provides a task chain-based transaction processing apparatus, which includes:

[0026] The determination unit is used to determine the target transaction to be processed through the task chain processing mechanism.

[0027] The configuration unit is used to determine the transaction content of the target transaction and configure multiple task chain nodes based on the transaction content to obtain a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, the content of the current task and the next task. The next node of the head node in the multiple task chain nodes is the node that needs to be executed first, and the content of the next task configured for the tail node in the multiple task chain nodes is empty.

[0028] An execution unit is used to execute a task chain consisting of multiple task chain nodes to execute the target transaction and obtain the transaction processing result of the target transaction.

[0029] In conjunction with the second aspect of this application, in a first possible implementation of the second aspect of this application, the configuration unit is specifically used for:

[0030] Based on the transaction content, multiple sub-tasks that need to be executed are determined;

[0031] Multiple subtasks are encapsulated separately to obtain multiple task chain nodes.

[0032] In conjunction with the first possible implementation of the second aspect of this application, in the second possible implementation of the second aspect of this application, the configuration unit is specifically used for:

[0033] Determine if there is a common target subtask among multiple subtasks;

[0034] If it exists, extract the target task chain node configured for the historical subtask from the historical task chain with the target task chain node configured for the historical subtask, or extract the target task chain node configured for the historical subtask stored separately.

[0035] Reuse the target task chain node configured in the historical subtask as the task chain node of the target subtask.

[0036] In conjunction with the second aspect of this application, in the third possible implementation of the second aspect of this application, the task chain composed of multiple task chain nodes is further configured with a context data transmission object. The context data transmission object includes a Map type data structure and also includes auxiliary attributes and methods, and an execution unit, specifically used for:

[0037] A task chain consisting of multiple task chain nodes is executed to perform the target transaction. During the execution, data is transferred between tasks of different task chain nodes through a context data transfer object. Whenever corresponding data is generated, the task name of the current task chain node is stored as the key and the generated corresponding data is stored as the value in a Map data structure, so that subsequent tasks can retrieve it by the task name.

[0038] In conjunction with the second aspect of this application, in the fourth possible implementation of the second aspect of this application, the target transaction is specifically a paper extraction transaction, and the multiple task chain nodes include a metadata collection node, a text translation node, a file download node, a file translation node, a file storage node, and a node for storing all data;

[0039] The metadata collection node requests JSON-formatted metadata from the paper metadata API platform, stores the data after deserialization, and the content of the JSON-formatted metadata is a brief summary of the target paper, including the title, abstract and download URL.

[0040] The text translation node calls the text translation API to translate the content of JSON-formatted metadata and obtain the JSON-formatted translation;

[0041] The file download node downloads the PDF paper file of the target paper based on the download address URL, and uploads the PDF paper file to the cloud service server for storage, thus obtaining the file URL of the PDF paper file;

[0042] The document translation node calls the PDF translation API to translate PDF paper files and obtain PDF translation files in DOC format;

[0043] The storage file node converts the PDF translation file into a PDF and uploads the resulting PDF to the cloud service server for storage, obtaining the file URL of the PDF conversion result;

[0044] The system stores the file URLs of the PDF paper and the PDF conversion results at all data nodes, thus completing the storage of the target paper.

[0045] Thirdly, this application provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor invokes the computer program in the memory, it executes the method provided by the first aspect of this application or any possible implementation of the first aspect of this application.

[0046] Fourthly, this application provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform the method provided in the first aspect of this application or any possible implementation thereof.

[0047] From the above, it can be concluded that this application has the following beneficial effects:

[0048] To address the need for automated transaction processing before and during the transaction, this application, after identifying the target transaction to be processed through a task chain mechanism, determines the transaction content of the target transaction and configures multiple task chain nodes based on the transaction content, resulting in a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, current task, and next task content. The next node after the head node in the multiple task chain nodes is the node that needs to be executed first, while the next task content configured for the tail node in the multiple task chain nodes is empty. Then, the task chain composed of multiple task chain nodes can be executed to execute the target transaction and obtain the transaction processing result of the target transaction. In this process, this application, based on the automated deployment and autonomous execution strategy to achieve automated transaction processing, also integrates a task chain processing mechanism to perform in-depth analysis of the target transaction and reflect it through different task chain nodes. In this way, while minimizing the need for manual operation, it also helps to capture the deep-seated processing elements of the target transaction. Thus, through the task content split and nested by different task chain nodes, the target transaction is executed more efficiently and with higher quality. Attached Figure Description

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

[0050] Figure 1 This is a flowchart illustrating a task chain-based transaction processing method according to this application.

[0051] Figure 2 A simplified task chain diagram illustrating a scenario for this application;

[0052] Figure 3 This is a schematic diagram illustrating one application scenario of this application;

[0053] Figure 4 This is a schematic diagram illustrating another application scenario of this application;

[0054] Figure 5 This is another scenario illustration illustrating the application of this application;

[0055] Figure 6 This is a schematic diagram of a transaction processing device based on task chaining according to this application.

[0056] Figure 7 This is a schematic diagram of one type of processing equipment used in this application. Detailed Implementation

[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0058] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved.

[0059] The module division described in this application is a logical division. In practical applications, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between modules may be electrical or other similar forms, none of which are limited in this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules. Some or all of the modules may be selected to achieve the purpose of the solution in this application according to actual needs.

[0060] Before introducing the task chain-based transaction processing method provided in this application, we will first introduce the background content involved in this application.

[0061] The task chain-based transaction processing method, apparatus, and computer-readable storage medium provided in this application can be applied to processing devices to meet the needs of automated transaction processing before and during the transaction. Based on the automated deployment and autonomous execution strategy to achieve automated transaction processing, it also integrates a task chain processing mechanism to perform in-depth analysis of the target transaction and represent it in the form of different task chain nodes. In this way, while minimizing the need for manual operation, it also helps to capture the deep-seated processing elements of the target transaction. Thus, through the task content split and nested by different task chain nodes, the target transaction is executed more efficiently and with higher quality.

[0062] The task chain-based transaction processing method mentioned in this application can be executed by a task chain-based transaction processing device, or by different types of processing devices such as servers, physical hosts, or user equipment (UE) that integrate the task chain-based transaction processing device. The task chain-based transaction processing device can be implemented in hardware or software. Specifically, the UE can be a smartphone, tablet, laptop, desktop computer, or personal digital assistant (PDA) or other terminal device. The processing devices can be configured in a device cluster.

[0063] It is easy to understand that the transaction processing involved in this application can be widely applied to different application scenarios and different devices. In other words, different application scenarios and different devices may involve the transaction processing focused on by this application. Therefore, the processing device that executes the task chain-based transaction processing method provided in this application, or the processing device that carries the application service corresponding to the task chain-based transaction processing method provided in this application, only needs to have the corresponding data processing capability. Its specific device type and device deployment form are quite flexible and can be flexibly deployed according to the actual situation. This application does not make specific limitations here.

[0064] The following section introduces the task chain-based transaction processing method provided in this application.

[0065] First, refer to Figure 1 , Figure 1 The diagram illustrates a flowchart of the task chain-based transaction processing method of this application. The task chain-based transaction processing method provided by this application may specifically include the following steps S101 to S103:

[0066] Step S101: Determine the target transaction to be processed through the task chain processing mechanism;

[0067] It is understood that this application can first identify or obtain the target transaction that is the object of processing in this application. The target transaction can also be understood as the target task, which is the processing matter that needs to be executed / implemented, and needs to be executed / implemented by configuring the corresponding autonomous execution strategy through this application.

[0068] The determination and processing of the target transaction can be done by the user manually entering it, by the device initiating it autonomously according to the corresponding transaction initiation strategy, or by other devices forwarding it for processing. The specific determination method can obviously be flexibly configured according to the application requirements in the actual situation. Considering that this is not the focus of this application, it will not be elaborated here.

[0069] As an example, a transaction input at a specific interface can be considered a target transaction that needs to be processed by the solution in this application. The device can then trigger a transaction processing event and complete its pre-processing and in-process transaction automatic processing through the solution in this application.

[0070] Step S102: Determine the transaction content of the target transaction, and configure multiple task chain nodes based on the transaction content to obtain a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, current task and next task content. The next node of the head node in the multiple task chain nodes is the first node to be executed, and the next task content configured for the tail node in the multiple task chain nodes is empty.

[0071] It is understood that this application configures a task chain processing mechanism for automatic transaction processing. When processing transactions, the task chain processing mechanism replaces the original single task with different partial task content corresponding to multiple task chain nodes (the task chain node is encapsulated from partial task content). Thus, before executing the target transaction, it is necessary to perform in-depth analysis of the target transaction and configure different task chain nodes based on its transaction content or parsed content for use in executing the target transaction.

[0072] The task chain nodes are not necessarily sequential links; there may be parallel execution links or nested links. This is affected by the specific content of the target transaction and will also be adjusted according to the in-depth analysis results of the target transaction. In this way, task chain nodes can be combined autonomously and flexibly to build the corresponding task chain.

[0073] It is understandable that the target transaction itself can be described by a corresponding business process configured by relevant personnel. Therefore, according to conventional thinking, the corresponding task chain nodes can be deployed according to the business process described by the target transaction itself. However, after in-depth analysis, in addition to uncovering processing elements that are not directly reflected in the simply described business process but can be supplemented by conventional processing methods, it is also possible to uncover processing elements that are difficult or even impossible for humans to detect. In this way, based on the business process described by the target transaction itself, the specific business process can be flexibly adjusted and the corresponding task chain nodes can be configured. This has the characteristics of highly concise and efficient task chain node deployment, which obviously helps to execute the target transaction more efficiently and with higher quality through the task content that is split and nested by different task chain nodes.

[0074] The configured task chain node is described with information about itself and its associated task chain nodes, specifically in three aspects: the node identifier, the current task (task chain node), and the next task (next task chain node). This concise description of the individual task chain nodes and their relationships allows the device to execute multiple task chains according to the corresponding processing logic, thereby achieving the goal of executing the target transaction.

[0075] Among them, such as Figure 2 As shown in the simplified task chain diagram of this application, in multiple task chain nodes, the head node (i.e. the first task chain node) itself does not need to perform any actual task processing, that is, the current task is empty (null). Correspondingly, the next node after the head node is the first node to be executed, and the content of the next task configured in the tail node (the last task chain node) is empty (null). That is, once the task of the current node is completed, the processing goal of the entire task chain is completed, and the result can be output.

[0076] Step S103: Execute the task chain consisting of multiple task chain nodes to execute the target transaction and obtain the transaction processing result of the target transaction.

[0077] Thus, after a task chain consisting of different task chain nodes adapted to the current target transaction is built, the task chain can be executed according to the task execution logic in the task chain, and the task chain node at the end of the task chain (usually one, but may be multiple, depending on the specific task chain node deployment) can output the corresponding transaction processing result.

[0078] At this point, it's easy to understand that it can store transaction processing results, display the content of transaction processing results, push transaction processing results, and continue to perform the next step of data processing based on the transaction processing results... Specifically, the specific data application processing based on the transaction processing results can be flexibly adjusted according to the pre-deployed data application processing strategy and the real-time deployed data application processing strategy. And these data application processing can be understood as belonging to the category of post-event processing.

[0079] Furthermore, it is worth noting that the data application processing mentioned here can also be incorporated into the last or last few task chain nodes in the task chain, which is also possible in practice.

[0080] from Figure 1As can be seen from the illustrated embodiment, in response to the need for automated transaction processing before and during the transaction, this application, after determining the target transaction to be processed through the task chain processing mechanism, determines the transaction content of the target transaction and configures multiple task chain nodes based on the transaction content, resulting in a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, current task, and next task content. The next node after the head node in the multiple task chain nodes is the node that needs to be executed first, while the next task content configured for the tail node in the multiple task chain nodes is empty. Then, the task chain composed of multiple task chain nodes can be executed to execute the target transaction and obtain the transaction processing result of the target transaction. In this process, this application, based on the automated deployment and autonomous execution strategy to achieve automated transaction processing, also integrates a task chain processing mechanism to perform in-depth analysis of the target transaction and reflects it through different task chain nodes. In this way, while minimizing the need for manual operation, it also helps to capture the deep-level processing elements of the target transaction. Thus, through the task content split and nested by different task chain nodes, the target transaction is executed more efficiently and with higher quality.

[0081] Continue with the above Figure 1 The steps of the illustrated embodiment and their possible implementation methods in practical applications are described in detail.

[0082] As an exemplary embodiment, in step S102, configuring multiple task chain nodes based on transaction content may specifically include:

[0083] Based on the transaction content, multiple sub-tasks that need to be executed are determined;

[0084] Multiple subtasks are encapsulated separately to obtain multiple task chain nodes.

[0085] As can be seen in this embodiment, this application specifically uses a clear subtask form to split the original target transaction (corresponding to a whole task). The subtasks can have a serial, parallel, or nested structure, which are combined to obtain a complete task. Then, based on the subtasks, the corresponding task chain nodes are encapsulated according to the configuration of the task chain nodes.

[0086] Furthermore, in the process of encapsulating task chain nodes, this application introduces a more efficient and convenient processing mechanism. Specifically, as another exemplary embodiment, the aforementioned encapsulation of multiple subtasks to obtain multiple task chain nodes may include:

[0087] Determine if there is a common target subtask among multiple subtasks;

[0088] If it exists, extract the target task chain node configured for the historical subtask from the historical task chain with the target task chain node configured for the historical subtask, or extract the target task chain node configured for the historical subtask stored separately.

[0089] Reuse the target task chain node configured in the historical subtask as the task chain node of the target subtask.

[0090] As can be seen in this embodiment, two implementation schemes are provided for reusing previous or existing task chain nodes. One is to search for available task chain nodes in the historical task chain, and the other is to search for available task chain nodes in the historical task chain nodes. This corresponds to two types of task chain node storage mechanisms. The first is obviously stored at the task chain granularity, and the second is stored at the task chain node granularity. This also reflects two levels of data backtracking requirements, providing more adaptable data backtracking processing for different situations.

[0091] Furthermore, it is understandable that, in reusing previous task chain node settings, there may also be reuse mechanisms for similar or equivalent task chain nodes. Similar to the above, the following may also be involved:

[0092] Determine if there is a target subtask that is similar to or equivalent to a historical subtask;

[0093] If it exists, extract the target task chain node configured for the historical subtask from the historical task chain with the target task chain node configured for the historical subtask, or extract the target task chain node configured for the historical subtask stored separately.

[0094] The target task chain nodes configured in the historical subtasks are reused and fine-tuned, or fine-tuned manually, to obtain the target subtask task chain nodes.

[0095] Here, fine-tuning usually refers to relatively simple adjustments, such as adjusting individual parameters or individual objects, which corresponds to the situation where subtasks are similar or equivalent.

[0096] In this way, the task chain node reuse mechanism can be used to complete the configuration of task chain nodes more quickly, ensuring the goal of efficient and high-quality task chain configuration.

[0097] Furthermore, focusing on the execution phase of the task chain, this application can further optimize the execution mechanism of the task chain in detail to promote better execution quality, including execution efficiency and storage structure.

[0098] For example, as another exemplary embodiment, the task chain composed of multiple task chain nodes in this application can also be configured with a context data transfer object. This context data transfer object includes a Map type data structure and also includes auxiliary attributes and methods (a term in programming, referring to replaceable, packaged code blocks). In this regard, in step S102, executing the task chain composed of multiple task chain nodes to execute the target transaction can specifically include:

[0099] A task chain consisting of multiple task chain nodes is executed to perform the target transaction. During the execution, data is transferred between tasks of different task chain nodes through a context data transfer object. Whenever corresponding data is generated, the task name of the current task chain node is stored as the key and the generated corresponding data is stored as the value in a Map data structure, so that subsequent tasks can retrieve it by the task name.

[0100] In layman's terms, the entire task chain is passed through parameters until the last task chain node, which is used for data transmission between different tasks. After each task is completed, if data is generated, the current task name can be used as the key (if there are duplicate task names, other unique identifiers (Identification, ID) can be used as the key), and the data can be stored as the value in the Map of the context data transmission object. If other tasks need to use the data generated by this task, they can directly obtain it by the task name.

[0101] A Map can be understood as a data structure used to store key-value pairs. Each key is unique, and the corresponding value can be quickly found using the key. It includes:

[0102] Key: A unique identifier used to retrieve data;

[0103] Value: The data content associated with the key;

[0104] Maps allow for the efficient addition, lookup, and deletion of key-value pairs, making them suitable for managing related information such as configuration settings and user data.

[0105] For example:

[0106] Map("getMetaDataTask":"Title: xxx, Author: xxx...")

[0107] getMetaDataTask is the task name, which is used as the key.

[0108] Title: xxx, Author: xxx... is the data obtained after the metadata retrieval task is executed, and it is used as the Value.

[0109] As an example, the Java code implementations of context transfer objects include:

[0110] public void execute(TaskContext context){

[0111]

[0112] Furthermore, using context-based object transfer eliminates the need to consider the different data types passed between tasks, and the key-value pairs in a Map are unordered.

[0113] In this way, by using context transfer objects to provide a data transfer path for the execution of task chains, the execution architecture of task chains can be effectively simplified, and the execution goals of task chains can be achieved with higher execution efficiency and lower execution cost.

[0114] Meanwhile, this application also provides a specific application example. Correspondingly, as another exemplary embodiment, the target transaction involved in this application can specifically be the paper extraction transaction. That is to say, the solution of this application can be used to automatically capture paper data to meet the needs for automatic storage of paper data.

[0115] refer to Figure 3 The illustration shows a scenario diagram of an application example of this application, and references Figure 4 The diagram illustrates another scenario of the application example of this application (the specific processing logic shown in the diagram is for reference only and is not entirely consistent with the processing logic below). Under the processing objective of paper crawling, the configured multiple task chain nodes can include metadata collection nodes, text translation nodes, file download nodes, file translation nodes, file storage nodes, and all data storage nodes. Specifically, they include:

[0116] The metadata collection node requests JSON-formatted metadata from the paper metadata API platform, stores the data after deserialization, and the content of the JSON-formatted metadata is a brief summary of the target paper, including the title, abstract and download URL.

[0117] The text translation node calls the text translation API to translate the content of JSON-formatted metadata and obtain the JSON-formatted translation;

[0118] The download file node downloads the PDF paper file of the target paper based on the download address URL, and uploads the PDF paper file to the cloud service server for storage, thus obtaining the file URL of the PDF paper file;

[0119] The document translation node calls the PDF translation API to translate PDF paper files and obtain PDF translation files in DOC format;

[0120] The storage file node converts the PDF translation file into a PDF and uploads the converted PDF result to the cloud service server. Figure 4 The instance content is stored in OSS, and the file URL of the PDF conversion result is obtained;

[0121] The system stores the file URLs of the PDF paper and the PDF conversion results at all data nodes, thus completing the storage of the target paper.

[0122] Among them, API stands for Application Programming Interface; JSON stands for JavaScript Object Notation; URL stands for Uniform Resource Locator; PDF stands for Portable Document Format; and DOC stands for Document, a file extension / file format.

[0123] It is easy to see that this embodiment involves the automatic crawling of foreign language papers (mainly English papers / documents in practice). It should be noted that this application does not simply configure the corresponding task chain according to the user operations involved in manually downloading papers in practice. Instead, it performs in-depth analysis and processing of the automatic paper crawling task and configures the above-mentioned six nodes (involving parallel links) and their task content to form the task chain involved in the automatic paper crawling of this application. Therefore, it has better practical value.

[0124] Furthermore, you can refer to Figure 5 The illustrated diagram shows another scenario of application examples of this application. It can be noted that... Figure 5 The six task chain nodes involved correspond to Figure 4The node chain does not involve text translation nodes, but rather the node chain involving file download nodes, file translation nodes, and file storage nodes. Furthermore, it's worth noting that this application's solution may also involve interface settings in certain situations or application environments, namely, the "Task interface execute(TaskContext taskcontext)" shown in the diagram. Specifically, for task chain nodes executing metadata collection tasks, the application of corresponding metadata collection interfaces may be involved, and the corresponding tasks may include:

[0125] Metadata Collection Task

[0126] execute(){

[0127] Functional logic for metadata collection

[0128] }

[0129] For a task chain node that performs a file download task, the corresponding tasks may include:

[0130] Download file Task

[0131] execute(){

[0132] The function logic for downloading files

[0133] }

[0134] The above is an introduction to the task chain-based transaction processing method provided in this application. To facilitate better implementation of the task chain-based transaction processing method provided in this application, this application also provides a task chain-based transaction processing device from the perspective of functional modules.

[0135] See Figure 6 , Figure 6 This is a schematic diagram of a task chain-based transaction processing device according to this application. In this application, the task chain-based transaction processing device 600 may specifically include the following structure:

[0136] The determining unit 601 is used to determine the target transaction to be processed through the task chain processing mechanism.

[0137] Configuration unit 602 is used to determine the transaction content of the target transaction and configure multiple task chain nodes based on the transaction content to obtain a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, current task and next task content. The next node of the head node in the multiple task chain nodes is the first node to be executed, and the next task content configured for the tail node in the multiple task chain nodes is empty.

[0138] The execution unit 603 is used to execute a task chain consisting of multiple task chain nodes to execute the target transaction and obtain the transaction processing result of the target transaction.

[0139] In one exemplary embodiment, the configuration unit 602 is specifically used for:

[0140] Based on the transaction content, multiple sub-tasks that need to be executed are determined;

[0141] Multiple subtasks are encapsulated separately to obtain multiple task chain nodes.

[0142] In yet another exemplary embodiment, the configuration unit 602 is specifically used for:

[0143] Determine if there is a common target subtask among multiple subtasks;

[0144] If it exists, extract the target task chain node configured for the historical subtask from the historical task chain with the target task chain node configured for the historical subtask, or extract the target task chain node configured for the historical subtask stored separately.

[0145] Reuse the target task chain node configured in the historical subtask as the task chain node of the target subtask.

[0146] In another exemplary embodiment, the task chain consisting of multiple task chain nodes is further configured with a context data transmission object. The context data transmission object includes a Map type data structure and also includes auxiliary attributes and methods. Execution unit 603 is specifically used for:

[0147] A task chain consisting of multiple task chain nodes is executed to perform the target transaction. During the execution, data is transferred between tasks of different task chain nodes through a context data transfer object. Whenever corresponding data is generated, the task name of the current task chain node is stored as the key and the generated corresponding data is stored as the value in a Map data structure, so that subsequent tasks can retrieve it by the task name.

[0148] In another exemplary embodiment, the target transaction is specifically a paper extraction transaction, and the multiple task chain nodes include a metadata collection node, a text translation node, a file download node, a file translation node, a file storage node, and a node for storing all data.

[0149] The metadata collection node requests JSON-formatted metadata from the paper metadata API platform, stores the data after deserialization, and the content of the JSON-formatted metadata is a brief summary of the target paper, including the title, abstract and download URL.

[0150] The text translation node calls the text translation API to translate the content of JSON-formatted metadata and obtain the JSON-formatted translation;

[0151] The file download node downloads the PDF paper file of the target paper based on the download address URL, and uploads the PDF paper file to the cloud service server for storage, thus obtaining the file URL of the PDF paper file;

[0152] The document translation node calls the PDF translation API to translate PDF paper files and obtain PDF translation files in DOC format;

[0153] The storage file node converts the PDF translation file into a PDF and uploads the resulting PDF to the cloud service server for storage, obtaining the file URL of the PDF conversion result;

[0154] The system stores the file URLs of the PDF paper and the PDF conversion results at all data nodes, thus completing the storage of the target paper.

[0155] This application also provides a processing device from a hardware architecture perspective, see [link / reference]. Figure 7 , Figure 7 This diagram illustrates a structural schematic of the processing device of this application. Specifically, the processing device may include a processor 701, a memory 702, and an input / output device 703. The processor 701 executes the computer program stored in the memory 702 to implement, for example... Figure 1 The corresponding steps of the task chain-based transaction processing method in the embodiment; or, when the processor 701 executes the computer program stored in the memory 702, it implements as follows: Figure 6 Corresponding to the functions of each unit in the embodiment, the memory 702 is used to store the functions executed by the processor 701 as described above. Figure 1 The computer program required for the task chain-based transaction processing method in the corresponding embodiment.

[0156] For example, a computer program may be divided into one or more modules / units, one or more of which are stored in memory 702 and executed by processor 701 to complete this application. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a computer device.

[0157] The processing device may include, but is not limited to, processor 701, memory 702, and input / output device 703. Those skilled in the art will understand that the illustrations are merely examples of the processing device and do not constitute a limitation on the processing device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the processing device may also include network access devices, buses, etc., and processor 701, memory 702, input / output device 703, etc., are connected via a bus.

[0158] The processor 701 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the processing device, connecting various parts of the device through various interfaces and lines.

[0159] The memory 702 can be used to store computer programs and / or modules. The processor 701 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 702 and by calling data stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the processing device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0160] When processor 701 executes a computer program stored in memory 702, it can specifically perform the following functions:

[0161] Identify the target transaction to be processed through the task chain mechanism;

[0162] The transaction content of the target transaction is determined, and multiple task chain nodes are configured based on the transaction content to obtain a task chain composed of multiple task chain nodes. Each task chain node is configured with a corresponding node identifier, the content of the current task and the next task. The next node of the head node in the multiple task chain nodes is the node that needs to be executed first, and the content of the next task configured for the tail node in the multiple task chain nodes is empty.

[0163] A task chain consisting of multiple task chain nodes is executed to perform the target transaction and obtain the transaction processing result of the target transaction.

[0164] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the task chain-based transaction processing device, processing equipment, and its corresponding units described above can be found in [reference needed]. Figure 1 The description of the task chain-based transaction processing method in the corresponding embodiment will not be repeated here.

[0165] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0166] Therefore, this application provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the present application. Figure 1 The steps of the task chain-based transaction processing method in the corresponding embodiment can be found in the following example. Figure 1 The description of the task chain-based transaction processing method in the corresponding embodiment will not be repeated here.

[0167] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0168] Because of the instructions stored in the computer-readable storage medium, the present application can be executed as described above. Figure 1 The steps of the task chain-based transaction processing method in the corresponding embodiment can therefore be implemented as described in this application. Figure 1 The beneficial effects that the task chain-based transaction processing method in the corresponding embodiment can achieve are detailed in the preceding description and will not be repeated here.

[0169] The above provides a detailed description of the task chain-based transaction processing method, apparatus, processing device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A transaction processing method based on a task chain, characterized by, The task chain-based transaction processing method comprises: determining a target transaction to be processed by a task chain processing mechanism; determining transaction content of the target transaction, and configuring a plurality of task chain nodes based on the transaction content to obtain a task chain composed of the plurality of task chain nodes, wherein each of the task chain nodes is configured with a corresponding node identifier, current task content, and next task content, the next node of a head node in the plurality of task chain nodes is a node that needs to be executed first, and the next task content configured for a tail node in the plurality of task chain nodes is empty; executing the task chain composed of the plurality of task chain nodes to execute the target transaction, and obtaining a transaction processing result of the target transaction.

2. The task chain based transaction processing method of claim 1, wherein, The configuring of the plurality of task chain nodes based on the transaction content comprises: determining a plurality of subtasks to be executed based on the transaction content; encapsulating the plurality of subtasks respectively to obtain the plurality of task chain nodes.

3. The task chain based transaction processing method of claim 2, wherein, The encapsulating of the plurality of subtasks respectively to obtain the plurality of task chain nodes comprises: determining whether there is a target subtask of a same historical subtask in the plurality of subtasks; if there is, extracting a target task chain node configured by the historical subtask from a historical task chain configured with the target task chain node of the historical subtask, or extracting a target task chain node configured by the historical subtask stored separately; multiplexing the target task chain node configured by the historical subtask as a task chain node of the target subtask.

4. The task chain based transaction processing method of claim 1, wherein, The task chain composed of the plurality of task chain nodes is further configured with a context data transmission object, the context data transmission object comprises a Map type data structure, the context data transmission object further comprises auxiliary attributes and methods, and the executing of the task chain composed of the plurality of task chain nodes to execute the target transaction comprises: executing the task chain composed of the plurality of task chain nodes to execute the target transaction, and performing data transmission between tasks of different task chain nodes through the context data transmission object in the execution process, wherein whenever corresponding data is generated, the task name of a current task chain node is stored as a key in the Map type data structure, and the generated corresponding data is stored as a value, for subsequent tasks to obtain through the task name.

5. The task chain based transaction processing method of claim 1, wherein, The target transaction is specifically a paper extraction transaction, and the plurality of task chain nodes comprise a metadata acquisition node, a text translation node, a download file node, a file translation node, a storage file node, and a storage all data node; the metadata acquisition node requests JSON format metadata from a paper metadata API platform, and stores the metadata in data after deserialization, wherein the content of the JSON format metadata is specifically a brief content of a target paper including a title, an abstract, and a download address URL; the text translation node calls a text translation API to translate the content of the JSON format metadata, and obtains a JSON format translation; The download file node downloads a PDF paper file of the target paper based on the download address URL, and uploads the PDF paper file to a cloud service server for storage, to obtain a file URL of the PDF paper file; The file translation node calls a PDF translation API to translate the PDF paper file, and obtains a PDF translation file in DOC format; The storage file node converts the PDF translation file into PDF, and uploads the obtained PDF conversion result to the cloud service server for storage, to obtain a file URL of the PDF conversion result; The storage all data node stores the file URL of the PDF paper file and the file URL of the PDF conversion result, to complete storage of the target paper.

6. A transaction processing apparatus based on a task chain, characterized by comprising: The task chain-based transaction processing apparatus comprises: A determination unit configured to determine a target transaction to be processed by a task chain processing mechanism; A configuration unit configured to determine transaction content of the target transaction, and configure a plurality of task chain nodes based on the transaction content to obtain a task chain composed of the plurality of task chain nodes, wherein each of the task chain nodes is configured with a corresponding node identifier, current task content, and next task content, a next node of a head node in the plurality of task chain nodes is a node that needs to be executed first, and the next task content configured for a tail node in the plurality of task chain nodes is empty; An execution unit configured to execute the task chain composed of the plurality of task chain nodes to execute the target transaction, and obtain a transaction processing result of the target transaction.

7. The task chain based transaction processing device according to claim 6, wherein, The configuration unit is specifically configured to: Determine a plurality of subtasks to be executed based on the transaction content; Encapsulate the plurality of subtasks respectively to obtain the plurality of task chain nodes.

8. The task chain based transaction processing apparatus according to claim 7, wherein The configuration unit is specifically configured to: Judge whether there is a target subtask of a same historical subtask in the plurality of subtasks; If there is, extract a target task chain node configured by the historical subtask from a historical task chain in which the target task chain node configured by the historical subtask is stored, or extract a target task chain node configured by the historical subtask stored separately; Reuse the target task chain node configured by the historical subtask as a task chain node of the target subtask.

9. The task chain based transaction processing device according to claim 6, wherein, The task chain composed of the plurality of task chain nodes is further configured with a context data transmission object, the context data transmission object includes a Map type data structure, and the context data transmission object further includes auxiliary attributes and methods, and the execution unit is specifically configured to: Execute the task chain composed of the plurality of task chain nodes to execute the target transaction, and perform data transmission between tasks of different task chain nodes through the context data transmission object in the execution process, wherein each time corresponding data is generated, a task name of a current task chain node is stored as a key in the Map type data structure, and the corresponding data generated is stored as a value, for subsequent tasks to acquire through the task name.

10. The task chain based transaction processing device according to claim 6, wherein, The target transaction is a paper extraction transaction, and the plurality of task chain nodes include a metadata collection node, a text translation node, a download file node, a file translation node, a storage file node, and a storage all data node; The metadata collection node requests JSON format metadata from a paper metadata API platform, and stores the metadata after deserialization, wherein the content of the JSON format metadata is specifically the brief content of the target paper including a title, an abstract, and a download address URL; The text translation node calls a text translation API to translate the content of the JSON format metadata, and obtains a JSON format translation; The download file node downloads a PDF paper file of the target paper based on the download address URL, uploads the PDF paper file to a cloud service server for storage, and obtains a file URL of the PDF paper file; The file translation node calls a PDF translation API to translate the PDF paper file, and obtains a PDF translation file in DOC format; The storage file node converts the PDF translation file into PDF, uploads the obtained PDF conversion result to the cloud service server for storage, and obtains a file URL of the PDF conversion result; The storage all data node stores the file URL of the PDF paper file and the file URL of the PDF conversion result, and completes the storage of the target paper.