Script issuing scheduling method based on time wheel

A scheduling method and time wheel technology, applied in the field of data structures, can solve the problems of wasting cpu resources, task delay, inaccurate task execution time, etc., and achieve the effect of improving time accuracy, speeding up search speed, and punctual task execution.

Pending Publication Date: 2021-12-07
CHENGDU DBAPP SECURITY
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] 1. If a large number of scheduling tasks use their own scheduler to manage the life cycle of the task, it will waste cpu resources and be very inefficient, and there will often be delays in task execution
[0004] 2. Use third-party components to complete task scheduling, some third-party components cannot fully meet the needs, and some large and comprehensive third-party components will consume some unnecessary resources
[0005] 3. In general, for simple tasks, use the timer to check every 1 second, and each time you need to tra...

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
  • Script issuing scheduling method based on time wheel
  • Script issuing scheduling method based on time wheel
  • Script issuing scheduling method based on time wheel

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] A method for dispatching scripts based on a time wheel in this embodiment, such as figure 1 As shown, the data structure of the time wheel is used to simplify the scheduling time complexity of scheduled tasks and periodic tasks, so as to achieve efficient scheduling of tasks and reduce system resource overhead. The execution is more punctual, and the call time error of high-priority tasks is reduced. Take the bastion host as an example. As a security device, the bastion host has some scheduled and periodic tasks, such as regularly detecting asset status, regularly collecting asset resource status, and periodically executing scripts and other tasks. And most of these tasks are periodic tasks, and there are some scheduled tasks, the longest period of which will not exceed one year. If you use third-party components to complete task scheduling, some third-party components cannot fully meet the requirements, and some large and comprehensive third-party components will cons...

Embodiment 2

[0051] This embodiment is further optimized on the basis of Embodiment 1. Using the bastion machine as an example, the maximum execution period of the bastion machine is year, so the maximum disk of the time wheel is the month hand wheel, and the weekly cycle is also a common requirement, so a total of Second, minute, hour, day, week, month 6 types of wheels, and the day wheel due to the size of the month and leap year, so there will be 4 day wheels, the size is 28, 29, 30, 31, a total of 11 time settings wheel. Other parts of this embodiment are the same as those of Embodiment 1, so details are not repeated here.

Embodiment 3

[0053] This embodiment is further optimized on the basis of the above-mentioned embodiment 2. Taking the bastion host as an example, the common tasks in the bastion host are mainly divided into two categories, one is a timing task, which does not need to be executed after one execution, and the other The class is a periodic task, which is executed every cycle. Other parts of this embodiment are the same as those of Embodiment 1 or 2 above, so details are not repeated here.

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 data structures, and discloses a script issuing scheduling method based on a time wheel. The method comprises the following steps: S1, receiving a scheduling task through the time wheel; S2, splitting the scheduling task into task queues according to time, and distributing the task queues into time slots corresponding to a time wheel; S3, storing the task queue into a time slot through a preset priority heap; S4, presetting a time wheel execution rule, and executing the task queue stored in the time wheel according to the time wheel execution rule. A time wheel is used as a scheduling basic data structure, a priority heap is added, and accurate scheduling of tasks is completed with small expenditure.

Description

technical field [0001] The present invention relates to the technical field of data structures, specifically, a method for dispatching scripts based on a time wheel, which is used to optimize the dispatching strategy for dispatching scripts. The data structure of the time wheel is used to reduce the scheduling of dispatching scripts, so that tasks The execution is more punctual, the complexity of task implementation is smaller, and the resource overhead in task execution is reduced. Background technique [0002] There are often some scheduling tasks in security software, most of which are timing and periodic tasks, such as timing detection of asset status, timing collection of asset resource status, and periodic execution of scripts. Take the bastion host as an example. As a security software, the bastion host has some scheduling tasks, most of which are periodic tasks, and some scheduled tasks, the longest period of which will not exceed one year. If there are a large numb...

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
IPC IPC(8): G06F9/48
CPCG06F9/4881
Inventor 邹忻江范渊吴永越郑学新刘韬
Owner CHENGDU DBAPP SECURITY
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