Method and device for processing delay task

A technology for processing delays and tasks, applied in the field of task processing, can solve the problems of inaccurate execution time of delayed tasks, lag in the execution time of delayed tasks, and low execution efficiency, so as to achieve less resource occupation, improve system complexity, and increase system complexity. The effect of a large time span

Pending Publication Date: 2022-04-08
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in the implementation scheme based on scheduled task scanning database, the scheduled task is executed according to a certain period, and the execution time of the delayed task will be relatively delayed, resulting in inaccurate execution time of the delayed task, and the full table scan must be performed every time. The efficiency is low, and during the period when the delayed task is not scanned, the CPU is in an idling state, resulting in a waste of 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
  • Method and device for processing delay task

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention will be further described in detail below in conjunction with specific embodiments. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.

[0044] A preferred embodiment is given below:

[0045] Such as figure 1 As shown, a method for processing delayed tasks in this embodiment adopts a multi-layer time wheel, and the underlying data structure of a layer of time wheel is a circular array, and each position in the array represents a slot in the time wheel, so The slot is used to store delayed tasks;

[0046]The time wheel also includes a time pointer, and the time pointer...

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 relates to the technical field of task processing, in particular to a method for processing a delay task, which adopts a multi-layer time wheel, the bottom layer data structure of one layer of time wheel is an annular array, each position in the array represents a slot in the time wheel, and the slot is used for storing the delay task; the time wheel further comprises a time pointer, the time pointer points to a slot in the time wheel, the time pointer continuously moves along the time wheel according to a certain time period as time goes on, and when the time pointer points to a certain slot, it is indicated that the delay task in the slot is expired, and the delay task needs to be taken out for execution; the multiple layers of time wheels are distributed in a clock mode, the inner layer of time wheel rotates by a circle, the outer layer of time wheel rotates by a grid, the time wheels extend outwards in sequence, and then the span of the time wheels is increased. Compared with the prior art, a large number of delay tasks can be undertaken, other components do not need to be introduced, and the system complexity cannot be improved and resource waste cannot be caused.

Description

technical field [0001] The invention relates to the technical field of task processing, and specifically provides a method and device for processing delayed tasks. Background technique [0002] With the development of Internet technology, in multiple business fields based on the Internet, due to the complexity of the contract fulfillment process and the long fulfillment cycle, there are more and more application scenarios for delayed tasks. For example, after the order is submitted, if the payment is not successful after the specified payment time, the order needs to be canceled. For example, after the order is completed, if the evaluation is timely after the specified evaluation time, then the default evaluation information is set for the order. For another example, after the virtual network resources such as coupons are activated, if they are not used beyond the specified usage time, they will be automatically invalidated. [0003] At present, for such business needs, in ...

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
Inventor 李光志张滨
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products