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

Method and device for calculating optimal number of threads

A thread count and thread count technology, applied in the field of optimal thread count calculation methods and devices, can solve problems such as process blockage and unreasonable use of resources, and achieve the effects of improving efficiency, reducing time-consuming conversion, and reducing running time

Active Publication Date: 2020-08-28
重庆市通信建设有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When processing the conversion, you can perform single-threaded processing for each step or manually add the number of threads, but the complexity of the steps will lead to unreasonable resource usage, and complex steps will block the entire process.

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
  • Method and device for calculating optimal number of threads
  • Method and device for calculating optimal number of threads
  • Method and device for calculating optimal number of threads

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0038] This embodiment provides a method for calculating the optimal number of threads, through the thread loss c of each step i , a single thread takes time t i In relation to the total time-consuming T of the steps, the optimal number of threads for each step is calculated to minimize the total time-consuming T of each step, thereby reducing the time-consuming conversion.

[0039] see figure 2 , figure 2 A flow chart of the method for obtaining the optimal number of threads provided by this embodiment is shown. The method for obtaining the optimal number of threads includes steps S10-S30.

[0040] Step S10: Obtain the time-consuming step t of the single-threaded operation of each step i .

[0041] Run each step single-threaded, run each step of the entire transformation, set each step to run in single-threaded mode. Record the start time of each step and the end time of each step, and obtain the step time t of each step according to the start time and end time of eac...

no. 2 example

[0070] This embodiment provides an apparatus 200 for obtaining the optimal number of threads, which is applied to the electronic device and used to implement the method for obtaining the optimal number of threads described in the first embodiment.

[0071] It should be noted that the basic principle of the device 200 for obtaining the optimal number of threads provided in this embodiment is roughly the same as the method for obtaining the optimal number of threads provided in the first embodiment. Please refer to the relevant content in the first embodiment for detailed description.

[0072] see Figure 4 , Figure 4 A schematic diagram of functional modules of the apparatus 200 for calculating the optimal number of threads provided by this embodiment is shown.

[0073] The device 200 for obtaining the optimal number of threads includes an obtaining module 210 and a obtaining module 220 .

[0074] Wherein, the obtaining module 210 is used to obtain the thread switching loss...

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 method and a device for obtaining an optimal number of threads, which relate to the technical field of data processing. The method is applied to optimizing the number of threads. The method includes: obtaining the thread switching loss ci of each step; and according to the relationship of the thread loss ci of each step, the time consumption ti of a single thread and the total time consumption T of steps, the optimal number ni of threads of each step is obtained by calculation. According to the relationship of the thread loss ci of each step, the timeconsumption ti of a single thread and the total time consumption T of steps, the optimal number of threads of each step is obtained, so that the number of threads can be automatically allocated, therunning time of each step is shortened, the conversion time is shortened, and the efficiency is improved.

Description

technical field [0001] The present invention relates to the technical field of data processing, in particular to a method and device for calculating an optimal number of threads. Background technique [0002] Existing technologies include multiple conversion processes during data processing. Each conversion process includes multiple steps. The steps are generally executed sequentially through certain logic. Each step will enable a separate thread by default, and each step runs simultaneously. , if a part of the data is processed in the first step, it will be directly passed to the next step for processing. When processing the conversion, you can perform single-threaded processing for each step or manually add the number of threads, but the complexity of the steps will lead to unreasonable resource usage, and complex steps will block the entire process. Contents of the invention [0003] In view of this, the purpose of the embodiments of the present invention is to provide...

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
CPCG06F9/5061G06F2209/5018
Inventor 何晓晔熊皓辉何山袁术鑫
Owner 重庆市通信建设有限公司
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