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

Multi-thread task processing method and device and storage medium

A task processing and multi-threading technology, applied in the computer field, can solve problems such as high resource occupancy rate and poor business performance, and achieve the effects of increasing concurrency, reducing single-transaction delay, and high allocation efficiency

Active Publication Date: 2019-04-05
HUNDSUN TECH
View PDF6 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the shortcomings of poor business performance and high resource occupation rate in the prior art, the present invention provides a multi-thread task processing method, device and storage medium

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 processing method and device and storage medium
  • Multi-thread task processing method and device and storage medium
  • Multi-thread task processing method and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0082] The system concurrently processes 10 business A and 20 business B. A is the No. 1 level task, and B is the No. 2 level task.

[0083] The multi-thread framework allows users to configure the maximum number of thread pools occupied by different levels of business. A single No. 1 business can allocate up to 10 threads, and a single No. 2 business can allocate up to 20 threads.

[0084] Through the above configuration, it can be determined that the maximum number of threads in the thread pool of the current framework=12*10+20*20=520.

[0085] The thread pool is processing a business, and confirms that the business belongs to the No. 1 level business, and the current number of the business, such as number 7.

[0086] The business is split into multiple subtasks in the execution process, and each time a subtask is split, the subtask is added to the task queue numbered 7.

[0087] If the number of threads currently processing the task queue numbered 7 does not exceed 10, try...

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 computers, and discloses a multi-thread task processing method and device and a storage medium, and the method comprises the steps: initializing and creating a thread pool and a thread pool management thread; Generating a queue number corresponding to the service number; Reading the service attribute and the subtask of the service; And adding the sub-tasks into the corresponding queues according to the service attributes. Multiple services can be processed in parallel, it is guaranteed that processing of all the services does not interfere with one another, the thread utilization rate is high, and it can be guaranteed as much as possible that subtasks are added; Meanwhile, it is guaranteed that a large number of idle threads do not exist in the wrecker thread pool and occupy a large number of system resources.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a multi-thread task processing method, device and storage medium. Background technique [0002] In many programming designs nowadays, multi-threading is widely used. For a system that supports concurrent processing of a limited number of businesses, each business can be split into multiple tasks. In order to improve system processing capabilities, a limited number of businesses can be processed concurrently by multi-threading. In order to improve the performance of the business, multiple tasks can also be divided into multi-threaded processing. Generally, there are two methods: (1) Multiple tasks split by a business, each time a task is added, a thread is created to process the task, and the task Release the thread after processing; (2) Create a thread pool with limited threads. When a business splits multiple tasks, each time a task is added, the task is added to the t...

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/4843G06F2209/5011
Inventor 黄成陈静朱金奇石忠杰周冬生戴英花王佳孙泳勇
Owner HUNDSUN TECH
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