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

Distribution method and device for scan task

A scanning task and distribution method technology, which is applied in the field of scanning task distribution, can solve the problems of unsatisfactory scanning efficiency, slow scanning speed, and inability to make full use of multi-core central processing units, so as to avoid thread synchronization overhead and improve scanning efficiency Effect

Active Publication Date: 2015-04-15
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, for the single-threaded scanning method, only one scanning task can be performed at the same time, and the advantages of the multi-core central processing unit (CPU) cannot be fully utilized, so the scanning speed is slow and the scanning efficiency is low
For the multi-threaded scanning method, although the multi-threaded method is adopted, the task allocation is not done well, which may cause some threads to perform more or time-consuming tasks, while other threads end early In fact, the task does not take full advantage of multi-threading, so the scanning efficiency is not satisfactory

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
  • Distribution method and device for scan task
  • Distribution method and device for scan task
  • Distribution method and device for scan task

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0021] figure 1 It is a flowchart of a method for allocating scanning tasks according to an embodiment of the present invention.

[0022] like figure 1 As shown, the method includes:

[0023] Step 101: Create a thread pool, which contains n threads, where n is a natural number.

[0024] Here, a thread pool is created first, wherein preferably there are multiple (at least two) threads in the thread pool. The thread pool is a form of multi-thread processing. During the processing, tasks are added to the task queue. After the thread is created, the thread is first started and the thread specifically executes the tasks in the task queue.

[0025] Preferably, the number of threads in the thread pool is consistent with the number of logical cores of the central proc...

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 embodiment of the invention provides a distribution method and a device for a scan task. The method comprises the steps of: establishing a thread pool which comprises n threads, wherein n is a natural number; establishing a scan task total queue and dividing the scan task total queue into n sub task queues, wherein each sub task queue corresponds to a thread; and distributing the scan task in a scan task total queue to n sub task queues uniformly. According to the embodiment of the invention, the scan task is uniformly distributed through the application thread technology, thereby avoiding the thread synchronization overhead when a sub task queue is accessed by multithreads and improving the scanning efficiency.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of computer management, and more specifically, to a method and device for allocating scanning tasks. Background technique [0002] With the continuous upgrading of computer hardware and software systems, the current development trend of computer science is developing in many aspects such as miniaturization, networking and intelligence. [0003] In computer applications, it usually involves the allocation and processing of various scanning tasks. At present, computer processing scanning task distribution methods mainly include a single-threaded method and a multi-threaded method. In the single-thread mode, the computer scans a single scanning point one by one in a single-threaded manner; in the multi-threaded mode, the computer simultaneously scans multiple scanning points in a multi-threaded manner. [0004] However, for the single-threaded scanning method, only one scanning task ...

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/50
Inventor 董涛付立群李瑞金海峰
Owner TENCENT TECH (SHENZHEN) CO LTD