CN113971074A - Transaction processing method and device, electronic equipment and computer readable storage medium - Google Patents

Transaction processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113971074A
CN113971074A CN202111107677.1A CN202111107677A CN113971074A CN 113971074 A CN113971074 A CN 113971074A CN 202111107677 A CN202111107677 A CN 202111107677A CN 113971074 A CN113971074 A CN 113971074A
Authority
CN
China
Prior art keywords
target
transaction
execution time
executed
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111107677.1A
Other languages
Chinese (zh)
Inventor
张德超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202111107677.1A priority Critical patent/CN113971074A/en
Publication of CN113971074A publication Critical patent/CN113971074A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a transaction processing method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring an execution parameter of a transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of a transaction to be executed; determining target execution time of a target processing process; the priority of the target execution time is higher than that of the original execution time; and executing the logic operation instructed by the target processing progress based on the target execution time. The embodiment of the application effectively improves the execution efficiency and the flexibility of transaction processing.

Description

Transaction processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a transaction processing method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of internet and computer data processing technologies, more and more systems are required to perform batch processing tasks. Specifically, a batch job is also called a batch job, which refers to a job that executes a series of programs on a computer without human intervention. The batch processing task needs no manual interaction, and all input data is preset in a program or command line parameter.
Batch tasks are typically executed periodically. For example, in the profit calculation of fund assets in the financial industry, yesterday daily profits, cumulative profits and the like of each asset are calculated by acquiring all fund assets according to a fixed period, such as 6 am every day, and then the calculation results are written into a designated database.
In the prior art, the execution time of the batch processing task is generally taken from a time server of the system, and for the completed historical transaction, when the execution of the transaction is found to be abnormal, because the execution time point is passed, a user cannot execute the historical transaction again to update the execution result, which results in that the error execution result cannot be corrected, and the problem that the transaction processing is too dependent on the time server and the flexibility is poor exists.
Disclosure of Invention
The embodiment of the application provides a transaction processing method and device, electronic equipment and a computer readable storage medium, which can solve the problem of poor transaction processing flexibility. The technical scheme is as follows:
according to an aspect of an embodiment of the present application, there is provided a transaction processing method, including:
acquiring an execution parameter of a transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of a transaction to be executed;
determining target execution time of a target processing process; the priority of the target execution time is higher than that of the original execution time;
and executing the logic operation instructed by the target processing progress based on the target execution time.
Optionally, when the original execution time is before the target execution time, the transaction processing method further includes:
acquiring processing result data of a completed transaction executed at an original execution time;
matching the processing result data with target result data obtained by representing the completed transaction which is correctly executed;
and when the difference value of the processing result data and the target result data is larger than a preset threshold value, taking the completed transaction as a transaction to be executed.
Optionally, the transaction processing method further includes:
acquiring execution result data executed by a target processing process at a target execution time;
replacing the processing result data with the execution result data;
the state of the transaction to be executed is marked as completed.
Optionally, when the original execution time is after the target execution time, taking a preset test transaction as a to-be-executed transaction, where the executing the logical operation indicated by the target processing process based on the target execution time includes:
and determining the execution result data executed by the target processing process at the target execution time, and taking the execution result data as the test result of the test transaction.
Optionally, the determining the target execution time of the target processing process includes:
generating indication information based on a trigger operation of a user;
and determining the target execution time of the target processing progress according to the indication information.
Optionally, the triggering operation of the user includes at least one of:
inputting operation on time information in a preset input control;
and selecting the clicking operation of the component according to the preset time.
Optionally, the transaction to be executed is a batch processing task.
According to another aspect of the embodiments of the present application, there is provided a transaction processing apparatus, including:
the acquisition module is used for acquiring the execution parameters of the transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of a transaction to be executed;
the determining module is used for determining the target execution time of the target processing progress; the priority of the target execution time is higher than that of the original execution time;
and the execution module is used for executing the logic operation indicated by the target processing process based on the target execution time.
Optionally, when the original execution time is before the target execution time, the apparatus further includes a transaction determination module, configured to:
acquiring processing result data of a completed transaction executed at an original execution time;
matching the processing result data with target result data obtained by representing the completed transaction which is correctly executed;
and when the difference value of the processing result data and the target result data is larger than a preset threshold value, taking the completed transaction as a transaction to be executed.
Optionally, the apparatus further comprises a result processing module, configured to:
acquiring execution result data executed by a target processing process at a target execution time;
replacing the processing result data with the execution result data;
the state of the transaction to be executed is marked as completed.
Optionally, when the original execution time is after the target execution time, taking a preset test transaction as a to-be-executed transaction, where the execution module is configured to:
and determining the execution result data executed by the target processing process at the target execution time, and taking the execution result data as the test result of the test transaction.
Optionally, the determining module is configured to:
generating indication information based on a trigger operation of a user;
and determining the target execution time of the target processing progress according to the indication information.
Optionally, the determining module is further configured to:
the user trigger operation comprises at least one of the following:
inputting operation on time information in a preset input control;
and selecting the clicking operation of the component according to the preset time.
Optionally, the transaction to be executed is a batch processing task.
According to another aspect of an embodiment of the present application, there is provided an electronic apparatus including:
the device comprises a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to realize the steps of the method shown in the first aspect of the embodiment of the application.
According to a further aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as set forth in the first aspect of embodiments of the present application.
According to an aspect of embodiments of the present application, there is provided a computer program product comprising a computer program that, when executed by a processor, performs the steps of the method illustrated in the first aspect of embodiments of the present application.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
the method comprises the steps that the target execution time of the target processing process is determined, and the priority of the target execution time is higher than the original execution time of the target processing process, so that the to-be-executed transaction executes the corresponding target processing process according to the target execution time; the method and the device can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, and effectively improve the execution efficiency and the flexibility of the transaction processing; meanwhile, the method and the device reduce the degree of dependence on the server time in the transaction processing process, and users can schedule transactions based on self requirements, so that the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic view of an application scenario of a transaction processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a transaction processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of matching result data in a transaction processing method according to an embodiment of the present application;
fig. 4 is a list of processing result data in a transaction processing method according to an embodiment of the present application;
fig. 5 is a list of another processing result data in a transaction processing method according to an embodiment of the present application;
fig. 6 is a flowchart illustrating an exemplary transaction processing method according to an embodiment of the present application
Fig. 7 is a schematic structural diagram of a transaction processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a transaction electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the embodiments set forth below in connection with the drawings are exemplary descriptions for explaining technical solutions of the embodiments of the present application, and do not limit the technical solutions of the embodiments of the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the terms "comprises" and/or "comprising," when used in this specification in connection with embodiments of the present application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, as embodied in the art. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates at least one of the items defined by the term, e.g., "a and/or B" indicates either an implementation as "a", or an implementation as "a and B".
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
With the development of internet and computer data processing technologies, more and more systems are required to perform batch processing tasks. For example, in a financial information management system, the processing logic of common batch processing tasks are all associated with time nodes, including triggering daily, weekly, monthly, quarterly, annual data computation tasks, handling daily inter-system data synchronization, and so forth. The common point of these tasks is triggered by system time, and usually, when a task is scheduled, corresponding business logic judgment is performed on the current time, so as to perform logic operation as an input parameter of task logic.
In the prior art, when batch processing tasks are processed, data object errors often occur when historical tasks are executed, the historical tasks cannot be executed against updated data again after errors are found, and the problems that transaction processing depends too much on a time server and flexibility is poor exist.
The application provides a transaction processing method, a transaction processing device, an electronic device and a computer-readable storage medium, which aim to solve the above technical problems in the prior art.
The embodiment of the application provides a transaction processing method, which can be realized by a terminal or a server. The terminal or the server related to the embodiment of the application can execute the processing process of the transaction to be executed according to the target execution time, so that the technical scheme of the embodiment of the application can reduce the degree of dependence on the server time in the transaction processing process, and the effect of effectively improving the execution efficiency and the flexibility of the transaction processing is achieved.
The technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application will be described below through descriptions of several exemplary embodiments. It should be noted that the following embodiments may be referred to, referred to or combined with each other, and the description of the same terms, similar features, similar implementation steps and the like in different embodiments is not repeated.
As shown in fig. 1, the transaction processing method of the present application may be applied to the scenario shown in fig. 1, specifically, the server 101 may first obtain a target processing process and a target execution time of a specified transaction to be executed from the terminal 102, and then execute the target processing process based on the target execution time to obtain corresponding execution result data; the priority of the target execution time is higher than that of the original execution time corresponding to the target processing progress, so that the execution efficiency of the transaction to be executed is improved.
In the scenario shown in fig. 1, the transaction processing method may be performed in the server, or in another scenario, may be performed in the terminal.
Those skilled in the art will understand that the "terminal" used herein may be a Mobile phone, a tablet computer, a PDA (Personal Digital Assistant), an MID (Mobile Internet Device), etc.; a "server" may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
An embodiment of the present application provides a transaction processing method, as shown in fig. 2, the method includes:
s201, acquiring an execution parameter of a transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of the transaction to be executed.
The to-be-executed transaction may include a plurality of subtasks, and each subtask may correspond to an original execution time and a processing procedure.
Specifically, a terminal or a server for performing transaction processing may obtain an execution parameter of a transaction to be executed through a task scheduler, where the task scheduler may be configured to schedule a task node and an execution state of the transaction to be executed.
Wherein, the task scheduler can adopt a distributed task scheduling framework. The distributed task scheduling framework is mainly used for coordinating a plurality of nodes to process the same task and avoiding data from being processed repeatedly, the processing mode can be divided into a preemptive mode and a cooperative allocation mode, the processing of a large batch of tasks is shared by the nodes of the cluster, and the processing efficiency of the batch tasks is improved. The emphasis points of tasks of different processing modes are different;
the processing mode of the preemptive mode is as follows: data of a single task cannot be processed cooperatively by other nodes, so that a preemptive task processing mode is generally used for processing scenes with small data volume and more tasks; the processing mode of the "cooperative allocation type" is as follows: the processing can equally divide the data processed by a single task into a plurality of JVMs (Java Virtual machines) for processing, thereby improving the parallel processing capability of the data.
In the embodiment of the present application, a task scheduler can be built based on Quartz (an open source job scheduling framework written entirely in Java) to execute the transaction to be executed. The Quartz cluster stores the tasks in the database, acquires the subtasks to be executed by the unique node in a preemptive mode by accessing the database, and completes the execution of the subtasks in the to-be-executed transaction. Quartz can implement more complex scheduling functions such as one-number-per-month execution, five-morning-per-week execution, every three hours execution, etc., and also supports distributed scheduling.
In the embodiment of the present application, a case that the transaction to be executed is a batch processing task is specifically described. The to-be-executed transaction can be a batch processing task for saving files regularly, and the to-be-executed transaction comprises N subtasks X. The original execution time t for the sub-task X may be 7 am every day. The processing of subtask X may be to perform the following activities: system S obtains video file A from appointed storage pathtAnd perform the corresponding logical operation f (A)t)。
S202, determining target execution time of a target processing progress; wherein the target execution time has a higher priority than the original execution time.
Specifically, the target execution time of the target processing process may be determined based on the received instruction information of the user.
In the embodiment of the present application, the indication information may be input by a user based on an external device such as a mouse, a keyboard, a touch screen, and the like, and is used for indicating a target execution time specified by the user.
Specifically, the interface element component corresponding to the image or text identifier of the to-be-processed transaction and the target processing process may be displayed on a preset interactive interface, and then the indication information may be generated based on a trigger operation of the user, so as to determine the target execution time of the target execution process. The specific operation procedure of the user will be described in detail below.
S203, based on the target execution time, the logic operation instructed by the target processing progress is executed.
Specifically, the logical operation indicated by the target processing process may be executed at a specified target execution time; the target execution time may be before the original execution time or after the original execution time, and is not limited in this embodiment.
When the target execution time is before the original execution time, the transaction needing prediction or test can be used as the transaction to be executed; when the target execution time is after the original execution time, the transaction with the execution error occurring at the original execution time can be regarded as the transaction to be executed. The specific implementation will be described in detail below.
In some embodiments, the transaction to be executed is a batch processing task. The to-be-executed transaction can be a batch processing task for saving files regularly, and the to-be-executed transaction comprises N subtasks X. The original execution time t for the sub-task X may be 7 am every day. The processing of subtask X may be to perform the following activities: system S obtains video file A from appointed storage pathtAnd perform the corresponding logical operation f (A)t). When the target processing process corresponds to the original execution time t1At 2021 year 5 month 1 day 07: 00, and the target execution time T is determined to be 20 at 2021 year 5 month 31 day: 00, then at target execution time T, the following activities are executed: system S obtains video files from execution storage path
Figure BDA0003273106840000091
And perform corresponding logical operations
Figure BDA0003273106840000092
The method comprises the steps that the target execution time of the target processing process is determined, and the priority of the target execution time is higher than the original execution time of the target processing process, so that the to-be-executed transaction executes the corresponding target processing process according to the target execution time; the method and the device can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, and effectively improve the execution efficiency and the flexibility of the transaction processing; meanwhile, the method and the device reduce the degree of dependence on the server time in the transaction processing process, and users can schedule transactions based on self requirements, so that the user experience is improved.
A possible implementation manner is provided in the embodiment of the present application, as shown in fig. 3, when the original execution time is before the target execution time, the transaction processing method further includes:
(1) processing result data of completed transactions executed at the original execution time is acquired.
Wherein, the completed transaction may be a transaction whose task state is completed; when the transaction to be executed is executed completely at the original execution time, the task state to be executed is changed into a finished state.
Specifically, the terminal or the server for performing the transaction may obtain the processing result data based on the verification process. The verification process is used for acquiring processing result data according to the processing process of the completed transaction.
In this embodiment of the present application, a completed transaction is taken as an example of a batch processing task, and in some embodiments, the transaction may be a batch processing task that stores a specified data file, where the activities executed by the processing process corresponding to the transaction are: the S1 system stores the file data collected in real time in the same day to the appointed storage path seven am each day; the following tasks may thus be performed based on the authentication process: and searching the data file from the designated storage path, outputting a list comprising the time mark and the attribute information of the data file, and taking the list as the processing result data of the completed transaction.
In other embodiments, the transaction may be a batch processing task that acquires a specified data file, and the activities performed by the processing processes corresponding to the transaction set are: the S2 system acquires the data file of the current day from the appointed storage path in half a morning every day, and sends a confirmation message aiming at the data file to the database after acquiring the data file; the following tasks may thus be performed based on the authentication process: and searching the confirmation message from the database, wherein the confirmation message can also comprise the corresponding file label and the time label, and the searched confirmation message is used as the processing result data of the completed transaction.
(2) And matching the processing result data with target result data obtained by representing the completed transaction which is correctly executed.
Specifically, the terminal or the server for performing the transaction may first obtain a target processing result from a preset database, then match the processing result data with the target result data, and calculate a difference between the processing result data and the target result data.
In the embodiment of the present application, the difference may be calculated based on the memory size occupied by the processing result data and the target result data, or may be calculated based on the specific numerical value of the processing result data and the target result data. Some data in the processing result data and the target result data may be taken for matching, and all data of the processing result data and the target result data may also be matched, which is not specifically limited in the embodiment of the present application.
In this embodiment of the present application, a completed transaction is taken as an example of a batch processing task, and in some embodiments, the transaction may be a batch processing task that stores a specified data file, where the activities executed by the processing process corresponding to the transaction are: the S1 system stores the file data collected in real time in the same day to the appointed storage path seven am each day; the following tasks may thus be performed based on the authentication process: the data file is looked up from the specified storage path, and a list including the time stamp and attribute information of the data file is output as the processing result data of the completed transaction, such as the table shown in fig. 4.
And the target result data may include a time stamp of the data file, a target file size, and a target file type. The matching may be based on the file size and file type in the target result data versus the file size and type in the process result data. For example, in practical applications, the file type and file size corresponding to 2021 year 5 month 1 day may be taken from the processing result data, and matched with the target file type and target file size corresponding to 2021 year 5 month 1 day in the target processing result. When the file type is consistent with the target file type but the file size is inconsistent with the target file size, the difference between the file size and the target file size may be used as the difference between the processing result data and the target result data.
In other embodiments, the transaction may be a batch processing task that acquires a specified data file, and the activities performed by the processing processes corresponding to the transaction set are: the S2 system acquires the data file of the current day from the appointed storage path in half a morning every day, and sends a confirmation message aiming at the data file to the database after acquiring the data file; the following tasks may thus be performed based on the authentication process: and searching the confirmation message from the database, wherein the confirmation message can also comprise a corresponding time tag, the time tag can represent the time when the confirmation message is actually received by the database, and the searched confirmation message can be used as the processing result data of the completed transaction. As shown in fig. 5, the processing result data during the period of 5 month 1 to 5 month 15 days in 2021 may include a time tag and a file tag of the confirmation message, and the total number of the confirmation messages is 15; the total number of the acknowledgement messages in the target processing result is also 15, the target time tag is 7 am and half a day, and the time difference between the time tag in the processing result data and the corresponding target time tag can be calculated based on matching.
(3) And when the difference value of the processing result data and the target result data is larger than a preset threshold value, taking the completed transaction as a transaction to be executed.
In this embodiment of the present application, a completed transaction is taken as an example of a batch processing task, and in some embodiments, the transaction may be a batch processing task that stores a specified data file, where the activities executed by the processing process corresponding to the transaction are: the S1 system stores the file data collected in real time in the same day to the appointed storage path seven am each day; the following tasks may thus be performed based on the authentication process: and searching the data file from the designated storage path, outputting a list comprising the time mark and the attribute information of the data file, and taking the list as the processing result data of the completed transaction.
As shown in the table of FIG. 4, the target result data may include a time stamp of the data file, a target file size, and a target file type. The matching may be based on the file size and file type in the target result data versus the file size and type in the process result data. For example, in practical applications, the file type and file size corresponding to 2021 year 5 month 1 day may be taken from the processing result data, and matched with the target file type and target file size corresponding to 2021 year 5 month 1 day in the target processing result.
When the file type is consistent with the target file type but the file size is inconsistent with the target file size, the difference between the file size and the target file size may be used as the difference between the processing result data and the target result data. A threshold may be set according to actual application, and when the size of the file is smaller than the size of the target file and a difference between the size of the file and the size of the target file is larger than a preset threshold, the file acquired at 5 month 1 of 2021 may be represented as incomplete, a processing process executed at 7 points of 5 month 1 of 2021 corresponding to a processing result is taken as a target processing process, and a completed transaction corresponding to the processing process is taken as a to-be-executed transaction.
When the file type is matched to the target file type, the threshold may be set to 0. When the matched file type is inconsistent with the target file type, the file type can be used as a difference value between the processing result data and the target result data, and the difference value is greater than a preset threshold value, a processing process executed at 7 points of 5, 1 and 1 month in 2021 corresponding to the processing result is used as a target processing process, and a completed transaction corresponding to the processing process is used as a transaction to be executed.
In other embodiments, the transaction may be a batch processing task that acquires a specified data file, and the activities performed by the processing processes corresponding to the transaction set are: the S2 system acquires the data file of the current day from the appointed storage path in half a morning every day, and sends a confirmation message aiming at the data file to the database after acquiring the data file; the following tasks may thus be performed based on the authentication process: and searching the confirmation message from the database, wherein the confirmation message can also comprise a corresponding time tag, the time tag can represent the time when the confirmation message is actually received by the database, and the searched confirmation message can be used as the processing result data of the completed transaction. As shown in fig. 5, the processing result data during the period of 5 month 1 to 5 month 15 days in 2021 may include a time tag and a file tag of the confirmation message, and the total number of the confirmation messages is 15; the total number of acknowledgement messages in the target processing result is also 15, and the target time stamp is 7 a.m. each day: and 30, calculating the time difference between the time tag in the processing result data and the corresponding target time tag based on matching. For example, the time stamp in the processing result data is 2021-5-1-10: 00, and the corresponding target time tags 2021-5-1-7: and 30, if the time difference value between the two is 2.5 hours and is greater than the preset threshold value of 0.5 hour, the fact that the time for acquiring the file data is too long or the confirmation message is abnormally delayed is known. In this case, the processing result may be represented by a value of 7/5/1/2021: and the processing process executed by the 30 is taken as a target processing process, and the completed transaction corresponding to the processing process is taken as a to-be-executed transaction.
In the embodiment of the application, the execution state of the transaction can be changed in real time according to the matching relation between the processing result data and the target result data, so that a user can track the state of the transaction in time, the abnormal processing result data can be corrected and updated conveniently in the follow-up process, and the user experience is improved.
A possible implementation manner is provided in the embodiment of the present application, and the transaction processing method further includes:
(1) and acquiring execution result data executed by the target processing process at the target execution time.
Specifically, after the terminal or the server for performing the transaction executes the target processing process in the to-be-executed transaction at the target execution time, the execution result data corresponding to the target processing process at this time may be obtained.
(2) The processing result data is replaced with the execution result data.
Specifically, the historical processing result data obtained by executing the target processing process at the original execution time may be deleted, and the processing result data may be replaced with new execution result data obtained by executing the target process at the target execution time, so as to correct the abnormal result of the target processing process.
(3) The state of the transaction to be executed is marked as completed.
Specifically, after the exception result of the target processing process is corrected, the to-be-executed state of the transaction may be updated to the completed state.
Further, the user may further continue to perform the step of matching the result data for the completed transaction until the obtained execution result data and the target result data are in a matching relationship, where the matching relationship may represent that the two result data are consistent or that the difference between the two result data is smaller than a preset threshold, so as to indicate that no abnormality occurs in the execution of the transaction.
In this embodiment, a completed transaction is taken as an example of a batch processing task, where the transaction may be a batch processing task for acquiring a specified data file, and the activities executed by the processing processes corresponding to the transaction set are as follows: the S2 system acquires the data file of the current day from the appointed storage path in half a morning every day, and sends a confirmation message aiming at the data file to the database after acquiring the data file; the following tasks may thus be performed based on the authentication process: and searching the confirmation message from the database, wherein the confirmation message can also comprise a corresponding time tag, the time tag can represent the time when the confirmation message is actually received by the database, and the searched confirmation message can be used as the processing result data of the completed transaction. As shown in fig. 5, the processing result data during the period of 5 month 1 to 5 month 15 days in 2021 may include a time tag and a file tag of the confirmation message, and the total number of the confirmation messages is 15; the total number of acknowledgement messages in the target processing result is also 15, and the target time stamp is 7 a.m. each day: and 30, calculating the time difference between the time tag in the processing result data and the corresponding target time tag based on matching. For example, the time stamp in the processing result data is 2021 year 5 month 1 month 10: 00, and the corresponding target time tags are 2021 year 5, month 1, day 7: and 30, if the time difference value between the two is 2.5 hours and is greater than the preset threshold value of 0.5 hour, the fact that the time for acquiring the file data is too long or the confirmation message is abnormally delayed is known. In this case, the processing result may be represented by a value of 7/5/1/2021: and the processing process executed by the 30 is taken as a target processing process, and the completed transaction corresponding to the processing process is taken as a to-be-executed transaction. The current time can be used as a target execution time, the target processing process corresponding to the 5 th, month and 1 st day of 2021 is re-executed based on the target execution time to obtain execution result data, and the execution result data is used for replacing the original historical processing result data corresponding to the 5 th, month and 1 st day of 2021, so that abnormal result data can be corrected, and the state of the transaction to be executed is changed into a finished state.
In the embodiment of the present application, a completed transaction with an error in a processing result may be used as a transaction to be executed, so as to re-execute the transaction and correct the error. The user can re-execute the historical completed transaction based on the self-defined target execution time, so that the dependence of transaction execution on a time server of the system in the prior art is eliminated, the flexibility of transaction execution is improved, and the requirement of the user on correction of historical execution result data is met.
In this embodiment, a possible implementation manner is provided, where after the original execution time is the target execution time, a preset test transaction is used as a to-be-executed transaction, and the executing of the logical operation indicated by the target processing process based on the target execution time in step S203 includes:
and determining the execution result data executed by the target processing process at the target execution time, and taking the execution result data as the test result of the test transaction.
In the embodiment of the application, when the transaction to be executed is a test transaction, because the original execution time corresponding to the processing process has not come yet, 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 may be used as a test result of the test transaction so that the user can analyze and verify the transaction to be executed based on the test result.
A possible implementation manner is provided in this embodiment of the present application, and the determining the target execution time of the target processing procedure in step S202 includes:
(1) and generating indication information based on the trigger operation of the user.
The indication information may be input by a user based on an external device such as a mouse, a keyboard, a touch screen, and the like, and is used for indicating a target execution time specified by the user.
Specifically, the interface element component corresponding to the image or text identifier of the to-be-processed transaction and the target processing process may be displayed on a preset interactive interface, and then the indication information may be generated based on a trigger operation of the user, so as to determine the target execution time of the target execution process.
The embodiment of the present application provides a possible implementation manner, where the triggering operation of the user includes at least one of:
inputting operation on time information in a preset input control;
and selecting the clicking operation of the component according to the preset time.
(2) And determining the target execution time of the target processing progress according to the indication information.
In some embodiments, the text identifiers of the processing processes included in the to-be-processed transaction may be presented in the form of a list component in a preset interactive interface, in response to a click operation of a user on a target processing process, a time input control pops up in the interactive interface, and in response to time information input by the user in the time input control, for example, 20/5/1/2021: 00, determining target execution time.
The embodiment of the application provides a possible implementation manner, and the to-be-executed transaction is a batch processing task.
In order to better understand the resource management method of the target system, an example of the transaction processing method of the present application is described in detail below with reference to fig. 6, which includes the following steps:
s601, acquiring the processing result data of the completed transaction executed at the original execution time.
Where a completed transaction may be a batch task whose task state is completed.
S602, matching the processing result data with the target result data obtained by representing the completed transaction, and calculating the difference value between the processing result data and the target result data.
Specifically, the terminal or the server for performing the transaction may first obtain the target processing result from the preset database.
And S603, when the difference value between the processing result data and the target result data is greater than a preset threshold value, taking the completed transaction as a transaction to be executed.
S604, obtaining the execution parameters of the transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of the transaction to be executed.
Specifically, a terminal or a server for performing transaction processing may obtain an execution parameter of a transaction to be executed through a task scheduler, where the task scheduler may be configured to schedule a task node and an execution state of the transaction to be executed.
S605, determining the target execution time of the target processing progress; wherein the target execution time has a higher priority than the original execution time.
Specifically, the target execution time of the target processing process may be determined based on the received instruction information of the user.
In the embodiment of the present application, the indication information may be input by a user based on an external device such as a mouse, a keyboard, a touch screen, and the like, and is used for indicating a target execution time specified by the user.
S606, the logical operation instructed by the target processing procedure is executed based on the target execution time.
Specifically, the logical operation indicated by the target processing process may be executed at a specified target execution time; wherein the target execution time may be after the original execution time.
S607, acquiring the execution result data executed by the target processing progress at the target execution time, and replacing the processing result data with the execution result data.
Specifically, the historical processing result data obtained by executing the target processing process at the original execution time may be deleted, and the processing result data may be updated with the new execution result data obtained by executing the target process at the target execution time, so as to correct the abnormal result of the target processing process.
S608, the state of the transaction to be executed is marked as completed.
Specifically, after the exception result of the target processing process is corrected, the to-be-executed state of the transaction may be updated to the completed state.
Further, the user may further continue to perform the step of matching the result data for the completed transaction until the obtained execution result data and the target result data are in a matching relationship, where the matching relationship may represent that the two result data are consistent or that the difference between the two result data is smaller than a preset threshold, so as to indicate that no abnormality occurs in the execution of the transaction.
The method comprises the steps that the target execution time of the target processing process is determined, and the priority of the target execution time is higher than the original execution time of the target processing process, so that the to-be-executed transaction executes the corresponding target processing process according to the target execution time; the method and the device can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, and effectively improve the execution efficiency and the flexibility of the transaction processing; meanwhile, the method and the device reduce the degree of dependence on the server time in the transaction processing process, and users can schedule transactions based on self requirements, so that the user experience is improved.
An embodiment of the present application provides a transaction processing apparatus, as shown in fig. 7, the transaction processing apparatus 70 may include: an acquisition module 701, a determination module 702 and an execution module 703;
the acquiring module 701 is configured to acquire an execution parameter of a transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of a transaction to be executed;
a determining module 702, configured to determine a target execution time of a target processing process; the priority of the target execution time is higher than that of the original execution time;
the executing module 703 is configured to execute the logical operation indicated by the target processing process based on the target execution time.
In an embodiment of the present application, a possible implementation manner is provided, and when the original execution time is before the target execution time, the apparatus may further include a transaction determining module 702, which may be configured to:
acquiring processing result data of a completed transaction executed at an original execution time;
matching the processing result data with target result data obtained by representing the completed transaction which is correctly executed;
and when the difference value of the processing result data and the target result data is larger than a preset threshold value, taking the completed transaction as a transaction to be executed.
The embodiment of the present application provides a possible implementation manner, and the apparatus may further include a result processing module, configured to:
acquiring execution result data executed by a target processing process at a target execution time;
replacing the processing result data with the execution result data;
the state of the transaction to be executed is marked as completed.
In this embodiment, a possible implementation manner is provided, when an original execution time is after a target execution time, a preset test transaction is used as a to-be-executed transaction, and the execution module 703 may be configured to:
and determining the execution result data executed by the target processing process at the target execution time, and taking the execution result data as the test result of the test transaction.
In an embodiment of the present application, a possible implementation manner is provided, and the determining module 702 may be configured to:
generating indication information based on a trigger operation of a user;
and determining the target execution time of the target processing progress according to the indication information.
In an embodiment of the present application, a possible implementation manner is provided, and the determining module 702 may be further configured to:
the user trigger operation comprises at least one of the following:
inputting operation on time information in a preset input control;
and selecting the clicking operation of the component according to the preset time.
The embodiment of the present application provides a possible implementation manner, and the to-be-executed transaction may be a batch processing task.
The method comprises the steps that the target execution time of the target processing process is determined, and the priority of the target execution time is higher than the original execution time of the target processing process, so that the to-be-executed transaction executes the corresponding target processing process according to the target execution time; the method and the device can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, and effectively improve the execution efficiency and the flexibility of the transaction processing; meanwhile, the method and the device reduce the degree of dependence on the server time in the transaction processing process, and users can schedule transactions based on self requirements, so that the user experience is improved.
The apparatus of the embodiment of the present application may execute the method provided by the embodiment of the present application, and the implementation principle is similar, the actions executed by the modules in the apparatus of the embodiments of the present application correspond to the steps in the method of the embodiments of the present application, and for the detailed functional description of the modules of the apparatus, reference may be specifically made to the description in the corresponding method shown in the foregoing, and details are not repeated here.
The embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the transaction processing method, and compared with the prior art, the method can implement: the method comprises the steps that the target execution time of the target processing process is determined, and the priority of the target execution time is higher than the original execution time of the target processing process, so that the to-be-executed transaction executes the corresponding target processing process according to the target execution time; the method and the device can realize the execution of the processing process of the transaction to be executed based on the specified target execution time, and effectively improve the execution efficiency and the flexibility of the transaction processing; meanwhile, the method and the device reduce the degree of dependence on the server time in the transaction processing process, and users can schedule transactions based on self requirements, so that the user experience is improved.
In an alternative embodiment, an electronic device is provided, as shown in fig. 8, the electronic device 80 shown in fig. 8 comprising: a processor 801 and a memory 803. Wherein the processor 801 is coupled to a memory 803, such as via a bus 802. Optionally, the electronic device 800 may further include a transceiver 804, and the transceiver 804 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data. It should be noted that the transceiver 804 is not limited to one in practical applications, and the structure of the electronic device 800 is not limited to the embodiment of the present application.
The 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 device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 801 may also be a combination of computing functions, e.g., comprising one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 802 may include a path that transfers information between the above components. The bus 802 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 802 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
The Memory 803 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer, without limitation.
The memory 803 is used for storing computer programs for executing the embodiments of the present application, and is controlled by the processor 801 to execute the computer programs. The processor 801 is adapted to execute computer programs stored in the memory 803 to implement the steps shown in the foregoing method embodiments.
Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, notebook computers, PADs, etc. and fixed terminals such as digital TVs, desktop computers, etc.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when being executed by a processor, the computer program may implement the steps and corresponding contents of the foregoing method embodiments.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device realizes the following when executed:
acquiring an execution parameter of a transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of a transaction to be executed;
determining target execution time of a target processing process; the priority of the target execution time is higher than that of the original execution time;
and executing the logic operation instructed by the target processing progress based on the target execution time.
It should be understood that, although each operation step is indicated by an arrow in the flowchart of the embodiment of the present application, the implementation order of the steps is not limited to the order indicated by the arrow. In some implementation scenarios of the embodiments of the present application, the implementation steps in the flowcharts may be performed in other sequences as desired, unless explicitly stated otherwise herein. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on an actual implementation scenario. Some or all of these sub-steps or stages may be performed at the same time, or each of these sub-steps or stages may be performed at different times, respectively. In a scenario where execution times are different, an execution sequence of the sub-steps or the phases may be flexibly configured according to requirements, which is not limited in the embodiment of the present application.
The foregoing is only an optional implementation manner of a part of implementation scenarios in this application, and it should be noted that, for those skilled in the art, other similar implementation means based on the technical idea of this application are also within the protection scope of the embodiments of this application without departing from the technical idea of this application.

Claims (10)

1. A method of transaction processing, the method comprising:
acquiring an execution parameter of a transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of the transaction to be executed;
determining a target execution time of the target processing progress; wherein the target execution time has a higher priority than the original execution time;
and executing the logic operation indicated by the target processing progress based on the target execution time.
2. The transaction processing method according to claim 1, wherein when the original execution time is before the target execution time, the transaction processing method further comprises:
acquiring processing result data of the completed transaction executed at the original execution time;
matching the processing result data with target result data obtained by representing that the completed transaction is correctly executed;
and when the difference value of the processing result data and the target result data is larger than a preset threshold value, taking the completed transaction as a transaction to be executed.
3. The transaction processing method of claim 2, further comprising:
acquiring execution result data executed by the target processing process at the target execution time;
replacing the processing result data with the execution result data;
and marking the state of the transaction to be executed as completed.
4. The transaction processing method according to claim 1, wherein when the original execution time is after the target execution time, a preset test transaction is taken as the to-be-executed transaction, and the executing the logical operation indicated by the target processing process based on the target execution time comprises:
and determining execution result data executed by the target processing process at the target execution time, and taking the execution result data as a test result of the test transaction.
5. A transaction processing method according to claim 1, wherein said determining a target execution time of the target processing process comprises:
generating indication information based on a trigger operation of a user;
and determining the target execution time of the target processing progress according to the indication information.
6. A transaction processing method according to claim 5, wherein the user's trigger operation comprises at least one of:
inputting operation on time information in a preset input control;
and selecting the clicking operation of the component according to the preset time.
7. The transaction processing method according to claim 1, wherein the transaction to be executed is a batch processing task.
8. A transaction processing apparatus, comprising:
the acquisition module is used for acquiring the execution parameters of the transaction to be executed; the execution parameters comprise a target processing process of the transaction to be executed and an original execution time corresponding to the target processing process; wherein the target processing process indicates a logical operation of the transaction to be executed;
the determining module is used for determining the target execution time of the target processing progress; wherein the target execution time has a higher priority than the original execution time;
and the execution module is used for executing the logical operation 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 on the memory, wherein the processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the transaction processing method according to any one of claims 1 to 7.
CN202111107677.1A 2021-09-22 2021-09-22 Transaction processing method and device, electronic equipment and computer readable storage medium Pending CN113971074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111107677.1A CN113971074A (en) 2021-09-22 2021-09-22 Transaction processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111107677.1A CN113971074A (en) 2021-09-22 2021-09-22 Transaction processing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113971074A true CN113971074A (en) 2022-01-25

Family

ID=79586710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111107677.1A Pending CN113971074A (en) 2021-09-22 2021-09-22 Transaction processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113971074A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117252309A (en) * 2023-11-15 2023-12-19 青岛海信信息科技股份有限公司 Automatic timing execution method for office business process

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117252309A (en) * 2023-11-15 2023-12-19 青岛海信信息科技股份有限公司 Automatic timing execution method for office business process
CN117252309B (en) * 2023-11-15 2024-02-13 青岛海信信息科技股份有限公司 Automatic timing execution method for office business process

Similar Documents

Publication Publication Date Title
CN111080243A (en) Service processing method, device, system, electronic equipment and storage medium
CN109117141B (en) Method, device, electronic equipment and computer readable storage medium for simplifying programming
CN107016029B (en) Method, device and system for processing service data
CN107273104B (en) Processing method and device for configuration data structure
CN110297955B (en) Information query method, device, equipment and medium
CN107643904A (en) Code submits detection method, device, medium and the electronic equipment of daily record
CN112631751A (en) Task scheduling method and device, computer equipment and storage medium
CN113971074A (en) Transaction processing method and device, electronic equipment and computer readable storage medium
US11341197B2 (en) Recommendation system based on adjustable virtual indicium
CN110352405B (en) Computer-readable medium, computing system, method, and electronic device
CN111191999A (en) Product research and development management method and device, computer equipment and storage medium
US20150170068A1 (en) Determining analysis recommendations based on data analysis context
CN116226078A (en) Data migration method, device, equipment and storage medium
CN112308440B (en) Work order processing method, device, computer equipment and computer readable storage medium
CN109150993B (en) Method for obtaining network request tangent plane, terminal device and storage medium
US20140244539A1 (en) Business process management, configuration and execution
JP2023507688A (en) edge table representation of the process
CN112785230A (en) Warehouse entry list generation method and system, computer equipment and storage medium
CN111832735B (en) Method and system for performing a machine learning process based on templates
US10140154B2 (en) Workload scheduling automation utility
CN114202217A (en) CAD drawing processing method and device, storage medium and processor
CN117762392A (en) Data processing method, device, equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN113568890A (en) Data migration method and device, electronic equipment and computer readable storage medium
CN112613845A (en) Task allocation processing method and device and workflow system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination