Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Task execution method and device based on database

A technology of task execution and database, applied in the field of communication, can solve the problems that cannot be adjusted dynamically, cannot be realized, etc., and achieve the effect of dynamically controlling the degree of concurrency

Inactive Publication Date: 2010-10-06
ZTE CORP
View PDF1 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, this method has the following disadvantages: in this method, parallel execution is realized between groups, but the subtasks in the group are still executed serially, and the execution of tasks with complex execution dependencies cannot be realized. For example, if a The predecessor task of task C is two parallel task A and task B, then this method cannot implement the data processing of task C after parallel execution of task A and task B; in addition, this method pre-groups, The execution sequence of each group of execution tasks is fixed, and the number of groups is fixed, that is to say, the concurrency of data processing is fixed and cannot be dynamically adjusted with hardware resources

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
  • Task execution method and device based on database
  • Task execution method and device based on database
  • Task execution method and device based on database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0048] image 3 It is a detailed structural block diagram of a device for implementing a database-based task execution method according to Embodiment 1 of the present invention. The device includes three parts: an input module, an execution module and an output module, wherein:

[0049] (1) The input module is used to accept the operations of inputting execution task data into the task table, inputting task dependency data into the task relationship table, and inputting locking purpose data into the task lock table. Preferably, the input module can also be used to generate a task group, specify a task group label, and use the task group label as a group identifier to realize data isolation for mixed execution.

[0050] Specifically, the execution task data includes the sequence number, task group, task name, task execution instruction, execution result status, etc.; task dependency data includes the sequence number, predecessor task name, follow-up task name, task group inform...

Embodiment 2

[0057] The following describes the database-based task execution method in conjunction with the structure of the database-based task execution device provided in Embodiment 1. The method includes the following steps:

[0058] Step 1, a database connection execution input module, the input module generates a task group, accepts the input of execution tasks and task relationship data, and generates four rows of records for locking for each task group.

[0059] Step 2, a database connection executes the execution module, specifically, such as Figure 4 As shown, each submodule in the execution module is executed in the following order:

[0060] 1) A database connection locks the entire record row of the query operation type of the task group;

[0061] 2) A database connection obtains an unexecuted task from the execution task data of the task group. The task meets the requirements that the operation error code is equal to -1, the number of errors is less than 5 times (configurab...

Embodiment 3

[0071] This embodiment describes a process in which a user implements a mixed relational operation through the database-based task execution device in a specific implementation process:

[0072] Step 1. Use the database client tool or application to connect to the database, execute the input module, input the execution task data, input task relationship data, or, the task data and task relationship data have been entered into the temporary table in advance, and only update the content of the temporary table to the task table and the task relationship table.

[0073] Step 2, use the database client tool or application to connect to the database, execute the interface function sp_set_loop of the execution module, the parameter is the name of the task group, and start an execution database connection.

[0074] In step 3, use the same method as step 2 to start other database connections to realize multi-task mixed execution.

[0075] It should be noted that in the above method, t...

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 invention discloses task execution method and device based on a database. The method comprises the steps of: adding database connection; acquiring a task to be executed from a task group by the database connection; judging whether previous tasks of the acquired task are all executed successfully or not; if so, executing the acquired task by the database connection; and if not, continuing to acquire tasks to be executed from the task group by the database connection. The invention can dynamically control the concurrency of data processing.

Description

technical field [0001] The present invention relates to the field of communications, in particular to a database-based task execution method and device. Background technique [0002] In the process of application software development, relational databases are often used to store and process data. In related technologies, each data processing task is usually performed serially in a database connection of the database. This processing method is inefficient in executing tasks, and when an error occurs in the task processing, all tasks need to be re-executed, and it is impossible to start from the point where the error occurred. Resume execution. [0003] For this reason, a method for parallel execution of multiple database tasks is proposed in the related art, which divides the data processing tasks into different groups, and the tasks belonging to different groups are executed in parallel, and the tasks in each group are independent of each other. This reduces dependencies b...

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 Applications(China)
IPC IPC(8): G06F9/48
CPCG06F9/4843
Inventor 马天俊
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products