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

Timer task automatic processing method and system

An automatic processing and task processing technology, applied in the computer field, can solve the problems of low utilization rate of system resources, low efficiency of Timer task processing, etc., and achieve the effect of improving utilization rate and concurrent processing ability

Active Publication Date: 2014-06-04
SHENZHEN TECHRISE ELECTRONICS
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the embodiments of the present invention is to provide a timer task automatic processing method and system, aiming to solve the problems of low efficiency of timer task processing and low utilization of system resources in the prior art

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
  • Timer task automatic processing method and system
  • Timer task automatic processing method and system
  • Timer task automatic processing method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] figure 1 The implementation flow of the timer task automatic processing method provided by Embodiment 1 of the present invention is shown, and the details are as follows:

[0026] In step S101, it is cyclically monitored whether a timer task enters the first preset queue.

[0027] In step S102, when it is detected that a timer task enters the first preset queue, the timer task is added to the second preset queue.

[0028] In the embodiment of the present invention, a queue is pre-established for storing timer tasks. The timer task can be a user-customized timing task, or a timing task generated by other application programs. There is no need to limit and invent here, and at the same time , to monitor the queue cyclically, so as to realize real-time discovery of user-defined timer tasks. When it is detected that a timer task enters the first preset queue, the timer task is added to the second preset queue, and the timer task is deleted from the first pre-queue.

[002...

Embodiment 2

[0037] In the embodiment of the present invention, the thread pool is used to execute the timer task, thereby preventing a large amount of system resource waste caused by frequent thread creation and destruction, so that more CPU time and memory can be used to process actual timer tasks (such as , commercial applications).

[0038] figure 2 The implementation flow of the timer task automatic processing method provided by Embodiment 2 of the present invention is shown, and the details are as follows:

[0039] In step S201, it is cyclically monitored whether there is a timer task entering in the first preset queue.

[0040] In step S202, when it is detected that a timer task enters the first preset queue, the timer task is added to the second preset queue.

[0041] In the embodiment of the present invention, a queue is pre-established for storing timer tasks. The timer task can be a user-customized timing task, or a timing task generated by other application programs. There i...

specific example

[0055] image 3 A specific example diagram of the timer task automatic processing method provided by Embodiment 3 of the present invention is shown, and the details are as follows:

[0056] In the embodiment of the present invention, the timer task automatic processing system includes three parts: a Web client, a server, and a database. The database can be used as a part of the server, or can be deployed independently. The query of failed tasks and the parameter configuration of timer tasks can be provided to users on the web client to facilitate the customization of user timer tasks; a thread pool for processing timer tasks and a thread pool for database access can be created on the server. DAO; the database is used to store timer-related data, for example: the first preset queue for storing user-defined timer tasks, the second preset queue for storing timer tasks entered from the first preset queue And a failed task queue for storing failed timer tasks in the thread pool. ...

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 is applicable to the technical field of computers, and provides a timer task automatic processing method and system. The method comprises the following steps: cyclically monitoring whether a timer task enters a first preset queue; when monitoring a timer task enters the first preset queue, adding the timer task to a second preset queue; cyclically monitoring whether a timer task enters the second preset queue; and when monitoring a timer task enters the second preset queue, calling a corresponding thread to process the timer task. The invention solves the problems of failure to implement timer task concurrent processing and low utilization ratio of system resources in the prior art, and processes the timer task by calling the corresponding thread, thereby enhancing the task concurrent processing capacity and further enhancing the utilization ratio of system resources.

Description

technical field [0001] The invention belongs to the technical field of computers, and in particular relates to a timer task automatic processing method and system. Background technique [0002] In an application system / application platform, a timer (Timer) is often used to complete periodic tasks or tasks to be executed at a specific time. For a platform or system that needs to support a large number of Timer tasks, Timer task management and execution determine the performance of the platform or system. In the prior art, the management and execution of the Timer task is mainly performed by means of a balanced heap, which takes a lot of time to adjust the balanced heap, and the system overhead is large. [0003] In response to this problem, Huawei Technologies Co., Ltd. filed an application for an invention patent with the application number 200510130535.1, in which a method for managing timer tasks was proposed, specifically: a method for managing Timer (timer) tasks was pr...

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): G06F9/48
Inventor 李坤保徐波肖海涛
Owner SHENZHEN TECHRISE ELECTRONICS