Supercharge Your Innovation With Domain-Expert AI Agents!

Multi-thread task scheduling method and device, medium and electronic device

A task scheduling and multi-threading technology, applied in the computer field, can solve the problems of unclear overall system structure, increased labor costs of enterprises, chaotic and cumbersome codes, etc., so as to reduce the difficulty of maintenance, save labor costs, and enhance scalability. Effect

Inactive Publication Date: 2019-08-09
重庆八戒电子商务有限公司
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As a result, the task scheduling developed by developers affects system performance, and the code is easy to be confused and cumbersome, making the overall structure of the system unclear, and has a serious impact on the maintenance of subsequent personnel, which virtually increases the labor cost of the enterprise

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
  • Multi-thread task scheduling method and device, medium and electronic device
  • Multi-thread task scheduling method and device, medium and electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0050] Such as figure 1 As shown, according to the specific implementation manner of the present disclosure, in the first aspect, the present disclosure provides a multi-thread task scheduling method, including:

[0051] S1: Obtain the interface tasks provided by the business task class implementation framework;

[0052] S2: Create a framework instance, register and register a work task, the work task is to realize the interface task;

[0053] S3: Submit the work task to the framework instance, execute the work task on the framework instance, and put the execution result of the work task into a cache queue;

[0054] S4: Query the execution result through the cache queue.

[0055]Among them, the framework is a logical framework written by senior developers based on the overall business logic of the system, and junior developers only need to implement the function of a certain interface in the framework.

[0056] Optionally, executing the work task on the framework instance i...

Embodiment 2

[0074] Such as figure 2 As shown, according to the specific implementation manner of the present disclosure, in the second aspect, the present disclosure provides a multi-thread task scheduling device, including:

[0075] The obtaining unit 202 is used to obtain the external interface provided by the business task class implementation framework;

[0076] The new unit 204 is used to create a new framework instance, register and register a work task, and the work task is to realize the interface task;

[0077] an executing unit 206, configured to submit the work task to the framework instance, and execute the work task in the framework instance;

[0078] The query unit 208 is configured to query the execution result through the result queue.

[0079] Optionally, the execution unit is also used for:

[0080] caching the work tasks through a task queue;

[0081] The work task is taken out from the task queue, and the work task is executed in the thread pool.

[0082] Optiona...

Embodiment 3

[0097] This embodiment provides an electronic device, and the electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein,

[0098] The memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method steps described in the above embodiments.

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 provides a task scheduling method and device, a medium and an electronic device. The method comprises the steps of obtaining an interface task provided by a business task class implementation framework; creating a new frame instance, registering a work task and registering, the work task being to implement the interface task; submitting the work task to the frame instance, executingthe work task in the frame instance, and putting an execution result of the work task into a cache queue; and querying an execution result through the cache queue. According to the invention, the concurrent execution of different types of thread tasks is supported; a framework structure is compiled by the advanced developers, while a primary developer only needs to realize an interface provided bythe framework to realize the own service logic, so that the task concurrent execution can be realized, the development process of developers is greatly simplified, different levels of developers formdivision cooperation, the labor cost is saved for enterprises, meanwhile, the expandability of codes in the later period is enhanced, and the maintenance difficulty is greatly reduced.

Description

technical field [0001] The present disclosure relates to the technical field of computers, and in particular, to a multi-thread task scheduling method, device, medium and electronic equipment. Background technique [0002] With the development of software development technology, the demand for software functionality, stability, portability, and reusability increases, which greatly increases the difficulty, time cost, and economic cost of system development. And the business changes frequently, and the business logic is determined by the business rules formulated by the enterprise according to its own needs. [0003] Aiming at this situation, various technical solutions have been proposed in the prior art. Including process-oriented software development, object-oriented software development, component technology, etc. [0004] In the current software development of enterprises, there are many usage scenarios for concurrent task execution. Due to the uneven capabilities of 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
IPC IPC(8): G06F9/48
CPCG06F9/4881
Inventor 王杰
Owner 重庆八戒电子商务有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More