Task parallel processing method and device

A parallel processing and task technology, applied in the Internet field, can solve problems such as task execution speed reduction and resource waste, and achieve the effect of improving resource utilization and task processing speed

Active Publication Date: 2014-03-26
ALIBABA GRP HLDG LTD
View PDF4 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The present application provides a task parallel processing method and device to at least solve the resource problem caused by sp

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
  • Task parallel processing method and device
  • Task parallel processing method and device
  • Task parallel processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] figure 2 It is a schematic diagram of a preferred structure of the task parallel processing device 200 according to the embodiment of the present application. Preferably, the device in this embodiment is located on the server 102 or the client 104 .

[0036] preferred, such as figure 2 A preferred structural block diagram of the task parallel processing apparatus shown may include: a first determining unit 202 , a judging unit 204 , a second determining unit 206 , a first dividing unit 208 , and a processing unit 210 . These structures are described in detail below.

[0037] The first determining unit 202 is configured to determine the number M of tasks to be processed, where M is a positive integer;

[0038] The judging unit 204, coupled with the first determining unit 202, is used to judge whether the pending tasks can be divided into multiple pending task sets according to the number M, wherein each pending task set includes multiple pending tasks and each the s...

Embodiment 2

[0057] exist Figure 2-Figure 5 Based on the task parallel processing device shown, the present application provides a preferred task parallel processing method. Such as Figure 6 As shown, the method may include the following steps:

[0058] Step S602: Determine the number M of tasks to be processed, where M is a positive integer;

[0059] Step S604: Determine whether the pending tasks can be divided into multiple pending task sets according to the number M, wherein each pending task set includes multiple pending tasks with the same number;

[0060] That is, according to the number of tasks to be processed, it is determined whether it can be divided into multiple subtask sets on average. Taking the number of tasks 40 and 43 as an example, when the number of tasks is 40, it can be divided into 5 subtasks on average. There are 8 task sets in each set. However, when the number of tasks is 43, it can only be divided into 43 task sets on average, and each task set has only one ...

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 discloses a task parallel processing method and device. The method includes the steps that the number M of tasks to be processed is determined, wherein M is a positive integer; whether the tasks to be processed can be divided into multiple sets of tasks to be processed or not is judged according to the number M, wherein each set of tasks to be processed comprises multiple tasks to be processed, and the number of the tasks to be processed of all the sets is the same; first numerical values capable of dividing the tasks to be processed into the sets of tasks to be processed are determined according to the number M; the tasks to be processed are divided into the sets of the tasks to be processed, wherein each set of tasks to be processed includes the M/N tasks to be processed, wherein N is a positive integer and is one of the first numerical values; parallel processing is performed on the tasks to be processed in the sets of tasks to be processed. The task parallel processing method and device solve the technical problems that any integer is designated to split the tasks to be processed in the prior art, and consequently some of the tasks which can be evenly split are not evenly split, resources are wasted and the task executing speed is lowered.

Description

technical field [0001] The present application relates to the Internet field, in particular, to a task parallel processing method and device. Background technique [0002] At present, in order to improve the processing capability of the software, a concurrent processing process has been introduced. Simply put, one person does one thing, but now two or N people do one thing. In this way, theoretically speaking, the efficiency of task execution is increased by N times. For software programming, this kind of concurrent processing process is more common. Generally, this programming method is called multi-threaded programming, that is, the things originally processed by one thread are split into multiple threads for concurrent processing. [0003] For example, for loop operations of data structures such as Java arrays or List, it can be split into multiple threads for simultaneous processing. Assuming that there is a loop of a Java array of length X, this array can be split int...

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/38
Inventor 戴键阳
Owner ALIBABA GRP HLDG 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