Unlock instant, AI-driven research and patent intelligence for your innovation.

A transactional task processing method and device

A task processing, transaction-based technology, applied in special data processing applications, database updates, structured data retrieval, etc., can solve problems such as dependence on business data, slow execution, and difficulty in using database lock mechanisms.

Active Publication Date: 2020-08-25
ADVANCED NEW TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the database lock mechanism is heavily dependent on the business data of the database itself. If there is no business data suitable as a database lock in the database, the database lock mechanism will be difficult to use
In addition, after the transactional task obtains the database lock, if the execution of the transactional task is very slow, it will cause a long wait for other transactional tasks

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A transactional task processing method and device
  • A transactional task processing method and device
  • A transactional task processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] Embodiment 1 provides a method for processing transactional tasks in the system. The specific flow chart of the method is shown in figure 1 shown, including the following steps:

[0050] Step 101: Receive the current transactional task.

[0051]The distributed system receives the current transactional tasks. In a distributed system, when a computer needs to perform a series of indivisible operations on the database, it needs to send tasks to the distributed system. Here, the whole composed of a series of indivisible operations is called a current transactional task, and the current transactional task refers to a transactional task that processes the database.

[0052] There are a large number of transactional tasks in Alipay. The distributed system executes these tasks regularly according to the set time rules. According to the set time rules, when the time to execute a certain task comes, the distributed system will start the task. The processing flow of the task. ...

Embodiment 2

[0071] Embodiment 2 provides a transactional task processing method for processing transactional tasks. The specific flow chart of the method is shown in figure 2 shown, including the following steps:

[0072] Step 201: Receive the current transactional task.

[0073] Step 202: Query the status attribute of the lock object of the database corresponding to the current transactional task according to the current transactional task, if the status attribute is displayed as completed, then execute step 2021, if the status attribute is displayed as running, then execute Step 2022.

[0074] The lock object may include a task identification attribute, a status attribute, a start time attribute and a timeout threshold attribute, the status attribute is used to display the running state of the lock object, and the start time attribute is used to record when the current transactional task is executed The time, the timeout threshold attribute is used to set the maximum time available ...

Embodiment 3

[0082] In Embodiment 2, it is mentioned that the current transactional task is submitted according to the execution status. In fact, before submitting the current transactional task, the embodiment may also include judging whether the execution time of the current transactional task is greater than the value of the timeout threshold attribute. Therefore, Embodiment 3 of the present application is constituted. Compared with Embodiment 2, Embodiment 3 of the present application has the same steps except step 203 . Reference attached image 3 , step 203 of Embodiment 2 is changed in this embodiment to:

[0083] Step 3031: Determine whether the execution time of the current transactional task is greater than the value of the timeout threshold attribute, if yes, execute step 3032, otherwise execute step 3033.

[0084] Step 3032: Roll back the current transactional task.

[0085] Step 3033: Submit the current transactional task.

[0086] When the execution of the current transact...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a transactional task processing method and device. The method comprises the following steps: receiving a current transactional task; inquiring a state attribute of a lock object of a database corresponding to the current transactional task according to the current transactional task, and if the state attribute indicates finish, executing the current transactional task, and modifying the state attribute to running, wherein the lock object includes a state attribute of a transactional task execution state; and submitting the current transactional task according to a current transactional task execution condition. In the embodiment of the invention, the problem of concurrent execution of transactional tasks is solved by the lock object during processing of the transactional tasks. The lock object is independent of business data in the database, so that the problem that a database lock mechanism depends on the business data of the database in the prior art is solved.

Description

technical field [0001] The present application relates to the technical field of computer task processing, in particular to a method and device for transactional task processing. Background technique [0002] With the development of computer information technology, more and more transactional tasks appear in distributed systems. A transactional task performs a series of operations on the database, and these operations are taken as an inseparable whole, either all of them are executed, or none of them are executed. When multiple transactional tasks are executed concurrently, errors may occur in the operation results of the database. For example, while transactional task A performs ten plus 1 operations on the database and obtains the operation results, transactional task B performs ten minus 1 operations on the database, which may cause transactional task B to A gets the wrong result. [0003] In order to solve the problem of concurrent execution of multiple transactional ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/23
CPCG06F16/2308
Inventor 季荣姿
Owner ADVANCED NEW TECH CO LTD