Transaction processing methods, apparatus, electronic devices and computer-readable storage media

By prioritizing the target execution time over the original time in batch processing tasks and executing the target processing process, the flexibility and efficiency issues of batch processing tasks are resolved, enabling the correction of historical transactions and user-defined scheduling.

CN113971074BActive Publication Date: 2025-10-31BEIJING PACTERA JINXIN TECH LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111107677.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-22
Publication Date
2025-10-31
Estimated Expiration
2041-10-31

AI Technical Summary

Technical Problem

In existing technologies, the execution time of batch processing tasks is taken from the system's time server, which means that when a transaction execution fails, it is impossible to re-execute historical transactions, resulting in poor flexibility and an inability to correct erroneous execution results.

Method used

By obtaining the execution parameters of the transaction to be executed, the target execution time of the target processing process is determined, making its priority higher than the original execution time, and the target processing process is executed based on the target execution time, including matching the processing result data with the target result data and correcting abnormal results.

Benefits of technology

It improves the execution efficiency and flexibility of transaction processing, reduces dependence on server time, and allows users to schedule transactions according to their own needs, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971074B_ABST
    Figure CN113971074B_ABST
Patent Text Reader

Abstract

This application provides a transaction processing method, apparatus, electronic device, and storage medium, relating to the field of computer technology. The method includes: obtaining execution parameters of a transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein the target processing process indicates the logical operation of the transaction to be executed; determining the target execution time of the target processing process; wherein the priority of the target execution time is higher than the priority of the original execution time; and executing the logical operation indicated by the target processing process based on the target execution time. This application effectively improves the execution efficiency and flexibility of transaction processing.
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 more specifically, to a transaction processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the development of the internet and computer data processing technology, more and more systems require batch processing tasks. Specifically, a batch processing task, also known as a batch execution task, refers to a series of programs executed on a computer without human intervention. Batch processing tasks require no manual interaction; all input data is pre-set in the program or command-line parameters.

[0003] Batch processing tasks are typically executed on a scheduled basis. For example, in the financial industry, the calculation of fund asset returns might involve retrieving all fund assets at a fixed time, such as 6 AM every day, calculating the daily and cumulative returns for each asset from the previous day, and then writing the results into a designated database.

[0004] In existing technologies, the execution time of batch processing tasks is generally taken from the system's time server. For completed historical transactions, when an abnormality is found in the execution of the transaction, since the execution time point has passed, the user cannot re-execute the historical transaction to update the execution result, resulting in the inability to correct the erroneous execution result. This leads to the problem that transaction processing relies too much on the time server and has poor flexibility. Summary of the Invention

[0005] This application provides a transaction processing method, apparatus, electronic device, and computer-readable storage medium, which can solve the problem of poor flexibility in transaction processing. The technical solution is as follows:

[0006] According to one aspect of the embodiments of this application, a transaction processing method is provided, the method comprising:

[0007] Obtain the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed;

[0008] Determine the target execution time for the target processing process; where the priority of the target execution time is higher than the priority of the original execution time.

[0009] Logical operations are performed based on the target processing time indication.

[0010] Optionally, when the original execution time is before the target execution time, the above transaction processing method further includes:

[0011] Retrieve the processing results of completed transactions executed at the original execution time;

[0012] Match the processed data with the target results data obtained by the transaction that has been correctly executed;

[0013] When the difference between the processed result data and the target result data is greater than a preset threshold, the completed transaction is designated as a pending transaction.

[0014] Optionally, the above transaction processing method further includes:

[0015] Obtain the execution result data of the target processing process at the time of target execution;

[0016] Replace the processing result data with the execution result data;

[0017] Mark the status of the pending transaction as completed.

[0018] Optionally, when the original execution time is after the target execution time, a preset test transaction is taken as the transaction to be executed. The above-mentioned logical operation based on the target execution time to execute the target processing process instruction includes:

[0019] Determine the execution result data of the target processing process at the target execution time, and use the execution result data as the test result of the test transaction.

[0020] Optionally, determining the target execution time of the target processing process includes:

[0021] Generate indication information based on the user's triggering actions;

[0022] The target execution time of the target processing process is determined based on the instruction information.

[0023] Optionally, the triggering action of the aforementioned user includes at least one of the following:

[0024] Inputting time information using the preset input controls;

[0025] Clicking on a component that selects a preset time.

[0026] Optionally, the above-mentioned tasks to be executed are batch processing tasks.

[0027] According to another aspect of the embodiments of this application, a transaction processing apparatus is provided, the apparatus comprising:

[0028] The acquisition module is used to acquire the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed;

[0029] The determination module is used to determine the target execution time of the target processing process; wherein, the priority of the target execution time is higher than the priority of the original execution time;

[0030] The execution module is used to perform logical operations based on the target processing time indicated by the target execution process.

[0031] Optionally, when the original execution time is before the target execution time, the apparatus further includes a transaction determination module, used for:

[0032] Retrieve the processing results of completed transactions executed at the original execution time;

[0033] Match the processed data with the target results data obtained by the transaction that has been correctly executed;

[0034] When the difference between the processed result data and the target result data is greater than a preset threshold, the completed transaction is designated as a pending transaction.

[0035] Optionally, the device further includes a result processing module for:

[0036] Obtain the execution result data of the target processing process at the time of target execution;

[0037] Replace the processing result data with the execution result data;

[0038] Mark the status of the pending transaction as completed.

[0039] Optionally, when the original execution time is after the target execution time, a preset test transaction is used as the transaction to be executed. The above execution module is used for:

[0040] Determine the execution result data of the target processing process at the target execution time, and use the execution result data as the test result of the test transaction.

[0041] Optionally, the above-mentioned determining module is used for:

[0042] Generate indication information based on the user's triggering actions;

[0043] The target execution time of the target processing process is determined based on the instruction information.

[0044] Optionally, the aforementioned determining module is further configured to:

[0045] The triggering actions of the aforementioned users include at least one of the following:

[0046] Inputting time information using the preset input controls;

[0047] Clicking on a component that selects a preset time.

[0048] Optionally, the above-mentioned tasks to be executed are batch processing tasks.

[0049] According to another aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising:

[0050] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method shown in the first aspect of the embodiments of this application.

[0051] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method shown in the first aspect of the embodiments of this application.

[0052] According to one aspect of the present application, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps of the method shown in the first aspect of the present application.

[0053] The beneficial effects of the technical solutions provided in this application are:

[0054] This application embodiment determines the target execution time of the target processing process and sets the priority of the target execution time to be higher than the original execution time of the target processing process, so that the transaction to be executed is executed according to the target execution time. This application embodiment can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, which effectively improves the execution efficiency and flexibility of transaction processing. At the same time, this application embodiment reduces the dependence on server time during transaction processing, and users can schedule transactions according to their own needs, thus improving the user experience. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0056] Figure 1 This is a schematic diagram illustrating an application scenario of a transaction processing method provided in an embodiment of this application;

[0057] Figure 2 A flowchart illustrating a transaction processing method provided in an embodiment of this application;

[0058] Figure 3 This is a flowchart illustrating the matching result data in a transaction processing method provided in an embodiment of this application.

[0059] Figure 4 This is a list of processing result data in a transaction processing method provided in an embodiment of this application;

[0060] Figure 5 This is a list of other processing result data in a transaction processing method provided in an embodiment of this application;

[0061] Figure 6 A flowchart illustrating an example transaction processing method provided in this application embodiment.

[0062] Figure 7 This is a schematic diagram of the structure of a transaction processing device provided in an embodiment of this application;

[0063] Figure 8 This is a schematic diagram of the structure of a transaction processing electronic device provided in an embodiment of this application. Detailed Implementation

[0064] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0065] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” indicates implementation as “A,” or implementation as “A,” or implementation as “A and B.”

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0067] With the development of internet and computer data processing technologies, more and more systems require batch processing tasks. For example, in financial industry information management systems, the processing logic of common batch processing tasks is associated with time nodes, including triggering daily, weekly, monthly, quarterly, and annual data calculation tasks, and handling daily data synchronization between systems. These tasks share the common characteristic of being triggered by system time. Typically, during task scheduling, the current time is used to make corresponding business logic judgments, which then serve as input parameters for logical operations.

[0068] Existing technologies often encounter data object errors when processing batch tasks. Once an error is detected, it is impossible to revert to the previous time and allow the historical task to be executed again based on the updated data. This results in transaction processing being overly reliant on the time server and lacking flexibility.

[0069] The transaction processing method, apparatus, electronic device, and computer-readable storage medium provided in this application are intended to solve the above-mentioned technical problems of the prior art.

[0070] This application provides a transaction processing method, which can be implemented by a terminal or a server. The terminal or server involved in this application can execute the processing of transactions to be executed according to a target execution time, thereby reducing the dependence of transaction processing on server time and effectively improving the execution efficiency and flexibility of transaction processing.

[0071] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0072] like Figure 1 As shown, the transaction processing method of this application can be applied to... Figure 1 In the scenario shown, specifically, server 101 can first obtain the target processing process and target execution time of the specified transaction to be executed from terminal 102, and then execute the target processing process based on the target execution time to obtain the corresponding execution result data; the priority of the target execution time is higher than the priority of the original execution time corresponding to the target processing process, thereby improving the execution efficiency of the transaction to be executed.

[0073] Figure 1 In the scenario shown, the above transaction processing method can be performed on the server; in other scenarios, it can also be performed on the terminal.

[0074] Those skilled in the art will understand that the “terminal” used herein can be a mobile phone, tablet computer, PDA (Personal Digital Assistant), MID (Mobile Internet Device), etc.; and the “server” can be implemented using a standalone server or a server cluster composed of multiple servers.

[0075] This application provides a transaction processing method, such as... Figure 2 As shown, the method includes:

[0076] S201, Obtain the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed.

[0077] The transaction to be executed can contain multiple subtasks, and each subtask can correspond to an original execution time and processing process.

[0078] Specifically, the terminal or server used for transaction processing can obtain the execution parameters of the transaction to be executed through the task scheduler. The task scheduler can be used to schedule the task nodes and execution status of the transaction to be executed.

[0079] The task scheduler can employ a distributed task scheduling framework. A distributed task scheduling framework is primarily designed to coordinate multiple nodes processing the same task, preventing data from being processed repeatedly. The processing methods can be mainly divided into "preemptive" and "cooperative allocation," improving the efficiency of batch task processing by distributing the processing of large batches of tasks among the nodes in the cluster. Different processing methods have different task focuses.

[0080] The "preemptive" processing method means that the data of a single task cannot be processed collaboratively by other nodes. Therefore, the preemptive task processing method is generally used for scenarios with a small amount of data and a large number of tasks. The "cooperative allocation" processing method means that the data to be processed by a single task can be evenly distributed to multiple JVMs (Java Virtual Machines) for processing, thereby improving the parallel processing capability of the data.

[0081] In this embodiment, a task scheduler can be built based on Quartz (an open-source job scheduling framework written entirely in Java) to execute pending transactions. The Quartz cluster stores tasks in a database. By accessing the database, a single node acquires the subtasks to be executed in a preemptive manner, thus completing the execution of the subtasks within the pending transaction. Quartz can implement relatively complex scheduling functions, such as execution on the 1st of each month, execution every Friday morning, or execution every three hours, and also supports distributed scheduling.

[0082] In this embodiment, a batch processing task is used as an example for specific explanation. The task to be executed can be a batch processing task that saves files periodically, and it includes N subtasks X. The original execution time t corresponding to subtask X can be 7:00 AM every day. The processing of subtask X can involve performing the following activity: System S retrieves video file A from a specified storage path. t And perform the corresponding logical operation f(A) t ).

[0083] S202, determine the target execution time of the target processing process; wherein, the priority of the target execution time is higher than the priority of the original execution time.

[0084] Specifically, the target execution time of the target processing process can be determined based on the received user instructions.

[0085] In this embodiment of the application, the instruction information may be input by the user based on external devices such as a mouse, keyboard, or touch screen, and is used to indicate the target execution time specified by the user.

[0086] Specifically, the interface elements corresponding to the images or text identifiers of the tasks to be processed and the target processing process can be displayed on a preset interactive interface. Then, based on the user's triggering operation, indication information is generated to determine the target execution time of the target process. The specific user operation process will be described in detail below.

[0087] S203, logical operation based on the target execution time to execute the target processing process indication.

[0088] Specifically, the logical operation indicated by the target processing process can be executed at the specified target execution time; wherein, the target execution time can be before or after the original execution time, and no specific restriction is made in this embodiment.

[0089] When the target execution time is before the original execution time, transactions that need to be predicted or tested can be designated as pending execution transactions; when the target execution time is after the original execution time, transactions that encountered execution errors at the original execution time can be designated as pending execution transactions. The specific execution process will be described in detail below.

[0090] In some implementations, the example of a batch processing task being executed is provided. This task can be a batch processing task that periodically saves files, and it includes N subtasks X. The original execution time t for subtask X can be 7:00 AM every day. The processing of subtask X can involve performing the following activity: System S retrieves video file A from a specified storage path. t And perform the corresponding logical operation f(A) t When the original execution time t1 corresponding to the target processing process is 07:00 on May 1, 2021, and the target execution time T is determined to be 20:00 on May 31, 2021, then at the target execution time T, the following activity is performed: System S retrieves the video file from the execution storage path. And perform the corresponding logical operations.

[0091] This application embodiment determines the target execution time of the target processing process and sets the priority of the target execution time to be higher than the original execution time of the target processing process, so that the transaction to be executed is executed according to the target execution time. This application embodiment can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, which effectively improves the execution efficiency and flexibility of transaction processing. At the same time, this application embodiment reduces the dependence on server time during transaction processing, and users can schedule transactions according to their own needs, thus improving the user experience.

[0092] This application provides one possible implementation method, such as... Figure 3 As shown, when the original execution time is before the target execution time, the above transaction processing method also includes:

[0093] (1) Obtain the processing result data of completed transactions executed at the original execution time.

[0094] Among them, a completed transaction can be a transaction whose task status is completed; when a pending transaction is completed at the original execution time, its pending task status will change to completed.

[0095] Specifically, the terminal or server used for transaction processing can obtain the aforementioned processing result data based on the verification process. The verification process is used to obtain processing result data based on the processing progress of completed transactions.

[0096] In this embodiment of the application, a batch processing task of a completed transaction is used as an example for specific description. In some implementations, the transaction can be a batch processing task of saving a specified data file. The activity performed by the processing process corresponding to the above transaction is as follows: S1 system saves the file data collected in real time on the day to the specified storage path at 7:00 a.m. every day; therefore, the following task can be performed based on the verification process: find the data file in the specified storage path and output a list including the timestamp and attribute information of the data file, and use the list as the processing result data of the completed transaction.

[0097] In other implementations, the transaction can be a batch processing task to obtain a specified data file. The activities performed by the processing process corresponding to the above transaction set are as follows: the S2 system retrieves the data file for the day from the specified storage path at 7:30 a.m. every day, and sends an acknowledgment message for the data file to the database after retrieving the data file. Therefore, the following tasks can be performed based on the verification process: search for the acknowledgment message in the database. The acknowledgment message may also include the corresponding file tag and time tag, and the found acknowledgment message is used as the processing result data of the completed transaction.

[0098] (2) Match the processing result data with the target result data obtained by the transaction that has been correctly executed.

[0099] Specifically, the terminal or server used for transaction processing can first obtain the target processing result from a preset database, then match the above processing result data with the target result data, and calculate the difference between the processing result data and the target result data.

[0100] In this embodiment, the difference can be calculated based on the memory size occupied by the processed result data and the target result data, or it can be calculated based on the specific values ​​of the processed result data and the target result data. Matching can be performed on a portion of the processed result data and the target result data, or it can be performed on all of the processed result data and the target result data; no specific limitations are imposed in this embodiment.

[0101] In this embodiment, a completed transaction is used as an example of a batch processing task. In some implementations, this transaction can be a batch processing task that saves a specified data file. The activity performed by the processing process corresponding to the transaction is as follows: System S1 saves the file data collected in real time that day to a specified storage path at 7:00 AM every day; therefore, the following task can be performed based on the verification process: find the data file in the specified storage path and output a list including the timestamp and attribute information of the data file, and use this list as the processing result data of the completed transaction, such as... Figure 4 The table shown is an example.

[0102] The target result data can include the timestamp of the data file, the target file size, and the target file type. Matching can be performed based on the file size and type in the target result data against the file size and type in the processed result data. For example, in practical applications, the file type and size corresponding to May 1, 2021, can be retrieved from the processed result data and matched against the target file type and size corresponding to May 1, 2021, in the target processed result. If the file type matches the target file type, but the file size differs from the target file size, the difference between the file size and the target file size can be used as the difference between the processed result data and the target result data.

[0103] In other implementations, the transaction can be a batch processing task for retrieving a specified data file. The activity performed by the processing process corresponding to the above transaction set is as follows: the S2 system retrieves the data file for the day from the specified storage path at 7:30 AM every day, and sends an acknowledgment message for the data file to the database after retrieval. Therefore, the following task can be performed based on the verification process: searching for the acknowledgment message in the database. This acknowledgment message may also include a corresponding timestamp, which can characterize the time when the database actually received the acknowledgment message. The found acknowledgment message can be used as the processing result data of the completed transaction. Figure 5 As shown, the processing result data from May 1 to May 15, 2021, can include the time stamp and file tag of the confirmation message, and the total number of confirmation messages is 15; the total number of confirmation messages in the target processing result is also 15, and the target time stamp is 7:30 am every day. The time stamp in the processing result data can be matched with the corresponding target time stamp to calculate the time difference between the two.

[0104] (3) When the difference between the processing result data and the target result data is greater than a preset threshold, the completed transaction is regarded as a transaction to be executed.

[0105] In this embodiment of the application, a batch processing task of a completed transaction is used as an example for specific description. In some implementations, the transaction can be a batch processing task of saving a specified data file. The activity performed by the processing process corresponding to the above transaction is as follows: S1 system saves the file data collected in real time on the day to the specified storage path at 7:00 a.m. every day; therefore, the following task can be performed based on the verification process: find the data file in the specified storage path and output a list including the timestamp and attribute information of the data file, and use the list as the processing result data of the completed transaction.

[0106] like Figure 4The table shown indicates that the target result data may include the timestamp of the data file, the target file size, and the target file type. Matching can be performed based on the file size and type in the target result data against the file size and type in the processed result data. For example, in practical applications, the file type and size corresponding to May 1, 2021, can be retrieved from the processed result data and matched against the target file type and size corresponding to May 1, 2021, in the target processing result.

[0107] When the file type matches the target file type, but the file size differs, the difference between the file size and the target file size can be used as the difference between the processed result data and the target result data. A threshold can be set based on the actual application. If the file size is smaller than the target file size, and the difference is greater than a preset threshold, it indicates that the file obtained on May 1, 2021, may be incomplete. In this case, the processing process executed at 7:00 AM on May 1, 2021, corresponding to the processing result, is taken as the target processing process, and the completed transactions corresponding to that processing process are taken as pending transactions.

[0108] When the matching file type matches the target file type, the threshold can be set to 0. When the matching file type does not match the target file type, the file type can be used as the difference between the processing result data and the target result data. If the difference is greater than the preset threshold, the processing process executed at 7:00 AM on May 1, 2021, corresponding to the processing result, will be used as the target processing process, and the completed transactions corresponding to the processing process will be used as pending transactions.

[0109] In other implementations, the transaction can be a batch processing task for retrieving a specified data file. The activity performed by the processing process corresponding to the above transaction set is as follows: the S2 system retrieves the data file for the day from the specified storage path at 7:30 AM every day, and sends an acknowledgment message for the data file to the database after retrieval. Therefore, the following task can be performed based on the verification process: searching for the acknowledgment message in the database. This acknowledgment message may also include a corresponding timestamp, which can characterize the time when the database actually received the acknowledgment message. The found acknowledgment message can be used as the processing result data of the completed transaction. Figure 5As shown, the processing result data from May 1st to May 15th, 2021, can include the timestamps and file tags of confirmation messages, and the total number of confirmation messages is 15. The total number of confirmation messages in the target processing result is also 15, with the target timestamp being 7:30 AM each day. The timestamps in the processing result data can be matched with the corresponding target timestamps to calculate the time difference between the two. For example, if the timestamp in the processing result data is 10:00 AM on May 1st, 2021, and the corresponding target timestamp is 7:30 AM on May 1st, 2021, the time difference is 2.5 hours, which is greater than the preset threshold of 0.5 hours. This indicates that the time to obtain the file data is too long or the confirmation message is abnormally delayed. In this case, the processing process executed at 7:30 AM on May 1st, 2021, corresponding to the processing result, can be taken as the target processing process, and the completed transactions corresponding to the processing process can be taken as pending transactions.

[0110] In the embodiments of this application, the execution status of a transaction can be changed in real time according to the matching relationship between the processing result data and the target result data, so that users can track the status of the transaction in a timely manner, facilitate the subsequent correction and updating of abnormal processing result data, and improve the user experience.

[0111] This application provides a possible implementation method, and the above transaction processing method further includes:

[0112] (1) Obtain the execution result data of the target processing process at the target execution time.

[0113] Specifically, after the terminal or server used for transaction processing executes the target processing process in the transaction to be executed at the target execution time, it can obtain the execution result data corresponding to the target processing process at this time.

[0114] (2) Replace the processing result data with the execution result data.

[0115] Specifically, the historical processing result data obtained when the target process was executed at the original execution time can be deleted, and the above processing result data can be replaced with the new execution result data obtained when the target process was executed at the target execution time, so as to correct the abnormal results of the target process.

[0116] (3) Mark the status of the pending transaction as completed.

[0117] Specifically, after correcting any abnormal results in the target processing process, the pending status of the transaction can be updated to the completed status.

[0118] Furthermore, users can continue to perform the result data matching step for transactions with a completed status until the obtained execution result data matches the target result data. The matching relationship can indicate that the two result data are consistent or the difference between them is less than a preset threshold, so as to indicate that no abnormality occurred in the execution of the transaction.

[0119] In this embodiment, a batch processing task of a completed transaction is used as an example for specific explanation. This transaction can be a batch processing task to obtain a specified data file. The activity performed by the processing process corresponding to the above transaction set is as follows: the S2 system retrieves the data file for the day from the specified storage path at 7:30 AM every day, and sends a confirmation message for the data file to the database after retrieval. Therefore, the following task can be performed based on the verification process: searching for the confirmation message in the database. This confirmation message can also include a corresponding timestamp, which can characterize the time when the database actually receives the confirmation message. The found confirmation message can be used as the processing result data of the completed transaction. Figure 5 As shown, the processing result data from May 1st to May 15th, 2021, can include the timestamps and file tags of confirmation messages, and the total number of confirmation messages is 15. The total number of confirmation messages in the target processing result is also 15, with the target timestamp being 7:30 AM each day. The timestamps in the processing result data can be matched with the corresponding target timestamps to calculate the time difference between the two. For example, if the timestamp in the processing result data is 10:00 AM on May 1st, 2021, and the corresponding target timestamp is 7:30 AM on May 1st, 2021, then the time difference is 2.5 hours, which is greater than the preset threshold of 0.5 hours. This indicates that the time to obtain the file data is too long or the confirmation message is abnormally delayed. In this case, the processing process executed at 7:30 AM on May 1st, 2021, corresponding to the processing result, can be taken as the target processing process, and the completed transactions corresponding to the processing process can be taken as pending transactions. The current time can be used as the target execution time, and the target processing process corresponding to May 1, 2021 can be re-executed based on the target execution time to obtain the execution result data. The execution result data can then replace the original historical processing result data corresponding to May 1, 2021, so that abnormal result data can be corrected and the status of the pending transaction can be changed to the completed status.

[0120] In the embodiments of this application, completed transactions with erroneous processing results can be treated as pending transactions for re-execution and error correction. Users can re-execute historical completed transactions based on a custom target execution time, eliminating the dependence of transaction execution on the system's time server in the prior art, improving the flexibility of transaction execution, and meeting users' needs to correct historical execution result data.

[0121] This application provides a possible implementation method where, when the original execution time is after the target execution time, a preset test transaction is used as the transaction to be executed. The logical operation of executing the target processing process indication based on the target execution time in step S203 includes:

[0122] Determine the execution result data of the target processing process at the target execution time, and use the execution result data as the test result of the test transaction.

[0123] In this embodiment of the application, when the transaction to be executed is a test transaction, since the original execution time corresponding to the processing process has not yet arrived, the corresponding processing process can be executed in advance based on the target execution time input by the user to obtain the execution result data of the transaction to be executed; the execution result data can be used as the test result of the test transaction so that the user can analyze and verify the transaction to be executed based on the test result.

[0124] This application embodiment provides a possible implementation method, wherein determining the target execution time of the target processing process in step S202 above includes:

[0125] (1) Generate indication information based on the user's trigger operation.

[0126] The instruction information can be input by the user using external devices such as a mouse, keyboard, or touchscreen, and is used to indicate the execution time of the target specified by the user.

[0127] Specifically, the interface element components corresponding to the image or text identifiers of the transaction to be processed and the target processing process can be displayed on the preset interactive interface. Then, based on the user's trigger operation, indication information is generated to determine the target execution time of the target execution process.

[0128] This application provides a possible implementation method, wherein the user's triggering operation includes at least one of the following:

[0129] Inputting time information using the preset input controls;

[0130] Clicking on a component that selects a preset time.

[0131] (2) Determine the target execution time of the target processing process based on the instruction information.

[0132] In some implementations, the text labels of each processing process included in the transaction to be processed can be presented as a list component in a preset interactive interface. In response to the user's click operation on the target processing process, a time input control will pop up in the interactive interface. In response to the time information entered by the user in the time input control, such as 2021-05-01 20:00, the target execution time is determined.

[0133] This application provides a possible implementation method in which the above-mentioned transaction to be executed is a batch processing task.

[0134] To better understand the resource management methods of the target system described above, the following section will combine... Figure 6 A detailed example of a transaction processing method according to this application is provided, including the following steps:

[0135] S601, obtain the processing result data of the completed transaction executed at the original execution time.

[0136] Among them, completed transactions can be batch processing tasks with a task status of completed.

[0137] S602, match the processing result data with the target result data obtained by the transaction that has been correctly executed, and calculate the difference between the processing result data and the target result data.

[0138] Specifically, the terminal or server used for transaction processing can first obtain the target processing result from a preset database.

[0139] S603, when the difference between the processed result data and the target result data is greater than a preset threshold, the completed transaction is treated as a pending transaction.

[0140] S604, obtain the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed.

[0141] Specifically, the terminal or server used for transaction processing can obtain the execution parameters of the transaction to be executed through the task scheduler. The task scheduler can be used to schedule the task nodes and execution status of the transaction to be executed.

[0142] S605, determine the target execution time of the target processing process; wherein, the priority of the target execution time is higher than the priority of the original execution time.

[0143] Specifically, the target execution time of the target processing process can be determined based on the received user instructions.

[0144] In this embodiment of the application, the instruction information may be input by the user based on external devices such as a mouse, keyboard, or touch screen, and is used to indicate the target execution time specified by the user.

[0145] S606, a logical operation based on the target execution time to execute the target processing process indication.

[0146] Specifically, the logical operations indicated by the target processing process can be executed at the specified target execution time; wherein, the target execution time can be after the original execution time.

[0147] S607, obtain the execution result data of the target processing process at the target execution time, and replace the processing result data with the execution result data.

[0148] Specifically, the historical processing result data obtained when the target process was executed at the original execution time can be deleted, and the above processing result data can be updated with the new execution result data obtained when the target process was executed at the target execution time, so as to correct the abnormal results of the target process.

[0149] S608 marks the status of the pending transaction as completed.

[0150] Specifically, after correcting any abnormal results in the target processing process, the pending status of the transaction can be updated to the completed status.

[0151] Furthermore, users can continue to perform the result data matching step for transactions with a completed status until the obtained execution result data matches the target result data. The matching relationship can indicate that the two result data are consistent or the difference between them is less than a preset threshold, so as to indicate that no abnormality occurred in the execution of the transaction.

[0152] This application embodiment determines the target execution time of the target processing process and sets the priority of the target execution time to be higher than the original execution time of the target processing process, so that the transaction to be executed is executed according to the target execution time. This application embodiment can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, which effectively improves the execution efficiency and flexibility of transaction processing. At the same time, this application embodiment reduces the dependence on server time during transaction processing, and users can schedule transactions according to their own needs, thus improving the user experience.

[0153] This application provides a transaction processing apparatus, such as... Figure 7 As shown, the transaction processing device 70 may include: an acquisition module 701, a determination module 702, and an execution module 703;

[0154] The acquisition module 701 is used to acquire the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed;

[0155] The determination module 702 is used to determine the target execution time of the target processing process; wherein the priority of the target execution time is higher than the priority of the original execution time.

[0156] The execution module 703 is used to perform logical operations on the target processing process indication based on the target execution time.

[0157] This application embodiment provides a possible implementation where, when the original execution time is before the target execution time, the device may further include a transaction determination module 702, which can be used for:

[0158] Retrieve the processing results of completed transactions executed at the original execution time;

[0159] Match the processed data with the target results data obtained by the transaction that has been correctly executed;

[0160] When the difference between the processed result data and the target result data is greater than a preset threshold, the completed transaction is designated as a pending transaction.

[0161] This application provides a possible implementation, and the apparatus may further include a result processing module, used for:

[0162] Obtain the execution result data of the target processing process at the time of target execution;

[0163] Replace the processing result data with the execution result data;

[0164] Mark the status of the pending transaction as completed.

[0165] This application embodiment provides a possible implementation method where, when the original execution time is after the target execution time, a preset test transaction is used as the transaction to be executed. The aforementioned execution module 703 can be used for:

[0166] Determine the execution result data of the target processing process at the target execution time, and use the execution result data as the test result of the test transaction.

[0167] This application embodiment provides a possible implementation method, wherein the above-mentioned determining module 702 can be used for:

[0168] Generate indication information based on the user's triggering actions;

[0169] The target execution time of the target processing process is determined based on the instruction information.

[0170] This application embodiment provides a possible implementation, wherein the aforementioned determining module 702 can also be used for:

[0171] The triggering actions of the aforementioned users include at least one of the following:

[0172] Inputting time information using the preset input controls;

[0173] Clicking on a component that selects a preset time.

[0174] This application provides a possible implementation method in which the above-mentioned transaction to be executed can be a batch processing task.

[0175] This application embodiment determines the target execution time of the target processing process and sets the priority of the target execution time to be higher than the original execution time of the target processing process, so that the transaction to be executed is executed according to the target execution time. This application embodiment can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, which effectively improves the execution efficiency and flexibility of transaction processing. At the same time, this application embodiment reduces the dependence on server time during transaction processing, and users can schedule transactions according to their own needs, thus improving the user experience.

[0176] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0177] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of a transaction processing method. Compared with the prior art, this application achieves the following: by determining the target execution time of the target processing process and setting the priority of the target execution time higher than the original execution time of the target processing process, the transaction to be executed is executed according to the target execution time. This application can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, effectively improving the execution efficiency and flexibility of transaction processing. At the same time, this application reduces the dependence on server time during transaction processing, allowing users to schedule transactions according to their own needs, thus improving the user experience.

[0178] In one alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8The illustrated electronic device 80 includes a processor 801 and a memory 803. The processor 801 and the memory 803 are connected, for example, via a bus 802. Optionally, the electronic device 800 may further include a transceiver 804, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 804 is not limited to one type, and the structure of the electronic device 800 does not constitute a limitation on the embodiments of this application.

[0179] Processor 801 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 801 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0180] Bus 802 may include a pathway for transmitting information between the aforementioned components. Bus 802 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 802 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0181] The memory 803 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0182] The memory 803 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 801. The processor 801 is used to execute the computer programs stored in the memory 803 to implement the steps shown in the foregoing method embodiments.

[0183] Electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, and tablets, as well as fixed terminals such as digital TVs and desktop computers.

[0184] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.

[0185] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the following actions:

[0186] Obtain the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed;

[0187] Determine the target execution time for the target processing process; where the priority of the target execution time is higher than the priority of the original execution time.

[0188] Logical operations are performed based on the target processing time indication.

[0189] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0190] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A transaction processing method, characterized in that, The method includes: Obtain the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed; The target execution time of the target processing process is determined; wherein the target execution time is preset by the user, the priority of the target execution time is higher than the priority of the original execution time, if the target execution time is before the original execution time, the transaction to be executed is a preset test transaction, and if the target execution time is after the original execution time, the transaction to be executed is a transaction that has an execution error at the original execution time; The logical operation indicated by the target processing process is executed based on the target execution time.

2. The transaction processing method according to claim 1, characterized in that, When the original execution time is before the target execution time, the transaction processing method further includes: Obtain the processing result data of the completed transactions executed at the original execution time; The processing result data is matched with the target result data obtained by the completed transaction, which represents the correct execution of the transaction; When the difference between the processing result data and the target result data is greater than a preset threshold, the completed transaction is designated as a pending transaction.

3. The transaction processing method according to claim 2, characterized in that, The transaction processing method further includes: Obtain the execution result data of the target processing process at the target execution time; Replace the processing result data with the execution result data; The status of the pending transaction is marked as completed.

4. The transaction processing method according to claim 1, characterized in that, When the original execution time is after the target execution time, a preset test transaction is taken as the transaction to be executed. The logical operation indicated by the target processing process based on the target execution time includes: The execution result data of the target processing process at the target execution time is determined, and the execution result data is used as the test result of the test transaction.

5. The transaction processing method according to claim 1, characterized in that, Determining the target execution time of the target processing process includes: Generate instruction information based on the user's triggering actions; The target execution time of the target processing process is determined based on the instruction information.

6. The transaction processing method according to claim 5, characterized in that, The user's triggering action includes at least one of the following: Inputting time information using the preset input controls; Clicking on a component selected based on a preset time.

7. The transaction processing method according to claim 1, characterized in that, The pending transactions are batch processing tasks.

8. A transaction processing apparatus, characterized in that, include: The acquisition module is used to acquire the execution parameters of the transaction to be executed; the execution parameters include the target processing process of the transaction to be executed and the original execution time corresponding to the target processing process; wherein, the target processing process indicates the logical operation of the transaction to be executed; The determination module is used to determine the target execution time of the target processing process; wherein the target execution time is preset by the user, the priority of the target execution time is higher than the priority of the original execution time, if the target execution time is before the original execution time, the transaction to be executed is a preset test transaction, and if the target execution time is after the original execution time, the transaction to be executed is a transaction that has encountered an execution error at the original execution time; An execution module is used to perform the logical operations indicated by the target processing process based on the target execution time.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the transaction processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Task processing method and apparatus, and electronic device

    CN108804215A