CN109814994A - A kind of method and terminal of dynamic dispatching thread pool - Google Patents

A kind of method and terminal of dynamic dispatching thread pool Download PDF

Info

Publication number
CN109814994A
CN109814994A CN201910003889.1A CN201910003889A CN109814994A CN 109814994 A CN109814994 A CN 109814994A CN 201910003889 A CN201910003889 A CN 201910003889A CN 109814994 A CN109814994 A CN 109814994A
Authority
CN
China
Prior art keywords
thread pool
thread
business interface
pool
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910003889.1A
Other languages
Chinese (zh)
Other versions
CN109814994B (en
Inventor
刘德建
林伟
郭玉湖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianquan Educational Technology Ltd
Original Assignee
Fujian Tianquan Educational Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianquan Educational Technology Ltd filed Critical Fujian Tianquan Educational Technology Ltd
Priority to CN201910003889.1A priority Critical patent/CN109814994B/en
Publication of CN109814994A publication Critical patent/CN109814994A/en
Application granted granted Critical
Publication of CN109814994B publication Critical patent/CN109814994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention provides the method and terminal of a kind of dynamic dispatching thread pool, by presetting multiple thread pools, each thread pool has the thread of different number, calculates the calling frequency of a business interface, according to calling frequency dynamic scheduling and the matched thread pool of the business interface;Can dynamic dispatching thread pool corresponding with business interface, avoid the problem that business interface and thread pool are mutually bound and lead to thread pool free time and congestion, optimize thread Pooled resources, to realize rationally efficiently scheduling thread pond.

Description

A kind of method and terminal of dynamic dispatching thread pool
Technical field
The present invention relates to computer software fields more particularly to a kind of methods and terminal of dynamic dispatching thread pool.
Background technique
Currently, a procedural item possesses a variety of different business functions, there may be according to the difference of business function A variety of different business interfaces, for example there are the big business interface of amount of access, time-consuming more business interface or delay are frequent Business interface, when underlying services infrastructure service such as database, network or IO there is a situation where interface response it is slower when, can account for It goes to handle with a large amount of thread, if request amount at this time will lead to greatly other interface requests blockings, delay or can not ring very much The problem of answering.
In view of the above problems, the prior art is usually to distribute business interface into different thread pools, each type Business interface is only capable of running in corresponding thread pool, will not occupy other when the blocking of the business interface thread of some thread pool The resource of thread pool is to avoid the thread operation for influencing other thread pools;But the creation of these thread pools is usually that program is prior It writes, procedural item one, which starts, is created that fixed thread pool, i.e. the corresponding thread pool of business interface is fixed Binding relationship, it is empty when will result in its corresponding thread pool in this way for the unstable business interface of some access Idle and congestion, to can not be rationally efficiently called to thread pool.
Summary of the invention
The technical problems to be solved by the present invention are: providing the method and terminal of a kind of dynamic dispatching thread pool, Neng Goushi Referring now to the dynamic dispatching of the corresponding thread pool of business interface, reasonable efficiently scheduling thread pond.
In order to solve the above-mentioned technical problem, a kind of technical solution that the present invention uses are as follows:
A kind of method of dynamic dispatching thread pool, comprising steps of
S1, multiple thread pools are preset, each thread pool has the thread of different number;
S2, the calling frequency for calculating a business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
In order to solve the above-mentioned technical problem, the another technical solution that the present invention uses are as follows:
A kind of terminal of dynamic dispatching thread pool, including memory, processor and storage on a memory and can handled The computer program run on device, the processor perform the steps of when executing the computer program
S1, multiple thread pools are preset, each thread pool has the thread of different number;
S2, the calling frequency for calculating a business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
The beneficial effects of the present invention are: by presetting multiple thread pools, each thread pool has the thread of different number, The calling frequency for calculating a business interface, according to calling frequency dynamic scheduling and the matched thread pool of the business interface; Can dynamic dispatching thread pool corresponding with business interface, avoid business interface and thread pool from mutually binding and cause thread pool empty The problem of not busy and congestion, thread Pooled resources are optimized, to realize reasonable efficiently scheduling thread pond.
Detailed description of the invention
Fig. 1 is a kind of method flow diagram of dynamic dispatching thread pool of the embodiment of the present invention;
Fig. 2 is a kind of terminal structure schematic diagram of dynamic dispatching thread pool of the embodiment of the present invention;
Fig. 3 is that a kind of method of dynamic dispatching thread pool of the embodiment of the present invention is applied to the data friendship of concrete application scene Mutually figure;
Label declaration:
1, the terminal of dynamic dispatching thread pool;2, memory;3, processor.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached Figure is explained.
The most critical design of the present invention is: corresponding to the thread of number of threads according to the calling frequency adaptation of business interface Efficiently scheduling thread pond is realized rationally in pond.
Please refer to Fig. 1, a kind of method of dynamic dispatching thread pool, comprising steps of
S1, multiple thread pools are preset, each thread pool has the thread of different number;
S2, the calling frequency for calculating a business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
As can be seen from the above description, the beneficial effects of the present invention are: by presetting multiple thread pools, each thread pool has The thread of different number calculates the calling frequency of a business interface, is dispatched according to the calling frequency dynamic and is connect with the business The matched thread pool of mouth;Can dynamic dispatching thread pool corresponding with business interface, avoid business interface and thread pool from mutually tying up The problem of determining and leading to thread pool free time and congestion, optimizes thread Pooled resources, to realize reasonable efficiently scheduling thread pond.
Further, the step S2 further include:
The type for determining the business interface determines the preferential of the business interface according to the type of the business interface Grade;
The step S3 includes:
The interface grade of the business interface is determined according to the priority of the business interface and calling frequency;
According to the level dynamic dispatchings such as interface thread pool corresponding with the business interface.
Seen from the above description, since the priority of different types of business interface is different, comprehensively consider industry The priority of business interface determines interface grade with frequency is called, and according to the corresponding thread pool of the level dynamic dispatchings such as interface, improves The reasonability of the scheduling and comprehensive.
Further, the calling frequency that a business interface is calculated in the S2 includes:
The call number of the business interface within a preset period of time is counted, according to the preset time period and call number Calculate the calling frequency of the business interface;
The interface grade of the business interface is determined in the S3 according to the priority of the business interface and calling frequency Include:
It calculates the priority of the business interface and calls the product of frequency, the business interface is determined according to the product Interface grade.
Seen from the above description, the industry is calculated by counting the call number of the business interface within a preset period of time The calling frequency of business interface, and the priority by calculating business interface determines interface grade with the product of frequency is called, because This obtained described interface grade is scientific high.
Further, the step S1 further include:
One thread pool configuration information table corresponding with the multiple thread pool, the thread pool configuration information table packet are set Include thread pool unique identification field and thread pool threads digital section;
Dynamic dispatching described in the step S3 includes: with the matched thread pool of the business interface
S31, determination and the matched Thread Count of the business interface;
S32, determined according to the Thread Count and thread pool threads digital section from the thread pool configuration information table it is matched Thread pool unique identification field dispatches corresponding thread pool according to the thread pool unique identification field.
Seen from the above description, the business interface is dispatched by the unique identification field of thread pool configuration information table and is corresponded to Thread pool, improve the accuracy that dynamic dispatching corresponds to thread pool.
Further, the thread pool configuration information table further includes thread pool minimum Thread Count field and thread pool max line Number of passes field;
Before the step S32 further include:
According to the Thread Count and the judgement of thread pool minimum Thread Count field and thread pool maximum thread field Thread pool configuration information table whether there is matched thread pool unique identification field;
If so, thening follow the steps S32, otherwise, step S33 is executed;
S33, increase new with the matched thread pool of the Thread Count, and increase and institute in the thread pool configuration information table The corresponding record of new thread pool is stated, corresponding thread is dispatched according to the thread pool unique identification field of the new thread pool Pond;
Or thread pool is repartitioned, new each thread pool is generated, and update the thread pool configuration information The corresponding record of table, in new each thread pool comprising with the matched thread pool of the Thread Count, according to the thread The thread pool unique identification field of the matched thread pool of number dispatches corresponding thread pool;
Or corresponding thread is dispatched according to thread pool unique identification field preset in the thread pool configuration information table Pond;
Or prompt mistake.
Seen from the above description, when not finding the thread pool with current business Interface Matching, an adaptation can be created Thread pool or recombinated to obtain the thread pool an of adaptation to existing thread pool or preset a fixed thread pool, When not finding matched thread pool, the thread pool of the fixation is directly matched it to, or directly report an error, improved Carry out the flexibility of dynamic dispatching thread pool.
Referring to figure 2., a kind of terminal of dynamic dispatching thread pool, including memory, processor and it is stored in described deposit On reservoir and the computer program that can run on the processor, the processor realized when executing the computer program with Lower step:
S1, multiple thread pools are preset, each thread pool has the thread of different number;
S2, the calling frequency for calculating a business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
As can be seen from the above description, the beneficial effects of the present invention are: by presetting multiple thread pools, each thread pool has The thread of different number calculates the calling frequency of a business interface, is dispatched according to the calling frequency dynamic and is connect with the business The matched thread pool of mouth;Can dynamic dispatching thread pool corresponding with business interface, avoid business interface and thread pool from mutually tying up The problem of determining and leading to thread pool free time and congestion, optimizes thread Pooled resources, to realize reasonable efficiently scheduling thread pond.
Further, the step S2 further include:
The type for determining the business interface determines the preferential of the business interface according to the type of the business interface Grade;
The step S3 includes:
The interface grade of the business interface is determined according to the priority of the business interface and calling frequency;
According to the level dynamic dispatchings such as interface thread pool corresponding with the business interface.
Seen from the above description, since the priority of different types of business interface is different, comprehensively consider industry The priority of business interface determines interface grade with frequency is called, and according to the corresponding thread pool of the level dynamic dispatchings such as interface, improves The reasonability of the scheduling and comprehensive.
Further, the calling frequency that a business interface is calculated in the S2 includes:
The call number of the business interface within a preset period of time is counted, according to the preset time period and call number Calculate the calling frequency of the business interface;
The interface grade of the business interface is determined in the S3 according to the priority of the business interface and calling frequency Include:
It calculates the priority of the business interface and calls the product of frequency, the business interface is determined according to the product Interface grade.
Seen from the above description, the industry is calculated by counting the call number of the business interface within a preset period of time The calling frequency of business interface, and the priority by calculating business interface determines interface grade with the product of frequency is called, because This obtained described interface grade is scientific high.
Further, the step S1 further include:
One thread pool configuration information table corresponding with the multiple thread pool, the thread pool configuration information table packet are set Include thread pool unique identification field and thread pool threads digital section;
Dynamic dispatching described in the step S3 includes: with the matched thread pool of the business interface
S31, determination and the matched Thread Count of the business interface;
S32, determined according to the Thread Count and thread pool threads digital section from the thread pool configuration information table it is matched Thread pool unique identification field dispatches corresponding thread pool according to the thread pool unique identification field.
Seen from the above description, the business interface is dispatched by the unique identification field of thread pool configuration information table and is corresponded to Thread pool, improve the accuracy that dynamic dispatching corresponds to thread pool.
Further, the thread pool configuration information table further includes thread pool minimum Thread Count field and thread pool max line Number of passes field;
Before the step S32 further include:
According to the Thread Count and the judgement of thread pool minimum Thread Count field and thread pool maximum thread field Thread pool configuration information table whether there is matched thread pool unique identification field;
If so, thening follow the steps S32, otherwise, step S33 is executed;
S33, increase new with the matched thread pool of the Thread Count, and increase and institute in the thread pool configuration information table The corresponding record of new thread pool is stated, corresponding thread is dispatched according to the thread pool unique identification field of the new thread pool Pond;
Or thread pool is repartitioned, new each thread pool is generated, and update the thread pool configuration information The corresponding record of table, in new each thread pool comprising with the matched thread pool of the Thread Count, according to the thread The thread pool unique identification field of the matched thread pool of number dispatches corresponding thread pool;
Or corresponding thread is dispatched according to thread pool unique identification field preset in the thread pool configuration information table Pond;
Or prompt mistake.
Seen from the above description, when not finding the thread pool with current business Interface Matching, an adaptation can be created Thread pool or recombinated to obtain the thread pool an of adaptation to existing thread pool or preset a fixed thread pool, When not finding matched thread pool, the thread pool of the fixation is directly matched it to, or directly report an error, improved Carry out the flexibility of dynamic dispatching thread pool.
Embodiment one
Please refer to Fig. 1, a kind of method of dynamic dispatching thread pool, comprising steps of
S1, multiple thread pools are preset, each thread pool has the thread of different number;
Wherein, the S1 further include: one thread pool configuration information table corresponding with the multiple thread pool of setting, it is described Thread pool configuration information table includes thread pool unique identification field and thread pool threads digital section;
Specifically, per thread pond corresponds to a record in the thread pool information table, every record includes thread pool The relevant fields such as unique identification field, thread pool threads digital section;
S2, the calling frequency for calculating a business interface;
Wherein, the S2 further include: the type for determining the business interface determines institute according to the type of the business interface State the priority of business interface;
Wherein, the type of the determining business interface specifically: divide when to the business interface in an application program When class, it can be classified according to the amount of access information of business interface, time-consuming information, operation delay information, determine business interface Type;
Wherein, the calling frequency of one business interface of calculating includes:
The call number of the business interface within a preset period of time is counted, according to the preset time period and call number Calculate the calling frequency of the business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
Wherein, the thread pool can provide real-time synchronization according to the request of the business interface and return and asynchronous return two Kind mode returns to implementing result, and when the business interface needs to return the implementing result of thread pool in real time, the thread pool is then It is synchronous to return to implementing result, otherwise, the asynchronous return implementing result of thread pool;
Wherein, the S3 includes: the priority according to the business interface and frequency is called to determine the business interface Interface grade;
According to the level dynamic dispatchings such as interface thread pool corresponding with the business interface;
Wherein, the interface grade packet of the business interface is determined according to the priority of the business interface and calling frequency It includes:
It calculates the priority of the business interface and calls the product of frequency, the business interface is determined according to the product Interface grade;
Wherein, each interface grade has a threshold range, when the priority and calling for calculating the business interface When the product of frequency, the threshold range of interface grade belonging to the value of the product is judged, so that it is determined that the business interface Physical interface grade;Specifically, the call number of each business interface within a preset time is counted respectively, to calculate every The calling frequency of a business interface within a preset time, final computation rule are as follows: S value=interface priority * interface calls frequency, Then the S value of each interface counted is divided into different interface grades, S value in business interface to the range where S value It is biggish, it is able to use the more thread pool of resource, S value is lesser then to use the lesser thread pool of resource, thus further thin Change and optimize the use of thread Pooled resources.
Wherein, the dynamic dispatching includes: with the matched thread pool of the business interface
S31, determination and the matched Thread Count of the business interface;
Wherein, the thread pool configuration information table further includes thread pool minimum Thread Count field and thread pool maximum thread Field;
According to the Thread Count and the judgement of thread pool minimum Thread Count field and thread pool maximum thread field Thread pool configuration information table whether there is matched thread pool unique identification field;
If so, thening follow the steps S32;
S32, determined according to the Thread Count and thread pool threads digital section from the thread pool configuration information table it is matched Thread pool unique identification field dispatches corresponding thread pool according to the thread pool unique identification field;
In addition, the field of the thread pool configuration information table can determine according to actual needs, for example can also include Handle time-out time field and cache the queue field etc. of asynchronous task, such as the more business interface of amount of access, setting compared with Small processing time-out time field, biggish thread pool threads digital section and the biggish queue field for caching asynchronous task is come excellent Change thread Pooled resources.
Embodiment two
Please refer to Fig. 1 and Fig. 3, the difference between this embodiment and the first embodiment lies in, in the S31 according to the Thread Count and Thread pool minimum Thread Count field and thread pool maximum thread field judge that the thread pool configuration information table whether there is Matched thread pool unique identification field further include:
If it is not, thening follow the steps S33;
S33, increase new with the matched thread pool of the Thread Count, and increase and institute in the thread pool configuration information table The corresponding record of new thread pool is stated, corresponding thread is dispatched according to the thread pool unique identification field of the new thread pool Pond;
Or thread pool is repartitioned, new each thread pool is generated, and update the thread pool configuration information The corresponding record of table, in new each thread pool comprising with the matched thread pool of the Thread Count, according to the thread The thread pool unique identification field of the matched thread pool of number dispatches corresponding thread pool;
Or corresponding thread is dispatched according to thread pool unique identification field preset in the thread pool configuration information table Pond;
Or prompt mistake.
The above method is applied in concrete application scene, a certain business of client call A business interface processing, A business Interface sends message informing to counting procedure, and the interface that counting procedure calculates A business interface calls frequency, and is connect according to A business The type of service of mouth determines interface priority, calls frequency and interface priority to obtain the interface etc. of A business interface according to interface Grade, the interface grade is sent in redis cluster, and then inquiry is from the thread pool configuration information table of redis cluster It is no to there is thread pool unique identification field corresponding with the interface grade of A business interface;
If it exists, then corresponding thread pool is dispatched according to the thread pool unique identification field;
If it does not exist, then increase new thread pool, and increase and the new thread in the thread pool configuration information table The corresponding record in pond dispatches corresponding thread pool according to the thread pool unique identification field of the new thread pool;
Or thread pool is repartitioned, new each thread pool is generated, and update the thread pool configuration information The corresponding record of table, according to thread corresponding with the thread pool unique identification field scheduling of the matched thread pool of the Thread Count Pond;
Or corresponding thread is dispatched according to thread pool unique identification field preset in the thread pool configuration information table Pond is provided with the corresponding unique identification field of thread pool of default in advance, when A business interface is looked into thread pool configuration information table The thread pool of default is used when asking less than corresponding thread pool unique identification field;
Or prompt mistake.
Embodiment two
Referring to figure 2., a kind of terminal 1 of dynamic dispatching thread pool, including memory 2, processor 3 and it is stored in memory On 2 and the computer program that can run on processor 3, the processor 3 realize embodiment when executing the computer program Step in one.
In conclusion the method and terminal of a kind of dynamic dispatching thread pool provided by the invention, by presetting multiple threads Pond, each thread pool have the thread of different number, and calling frequency and the basic business interface classification for calculating a business interface are true Stationary interface priority, according to calling frequency and interface priority to determine interface grade, according to the interface grade of the business interface Dynamic dispatching and the matched thread pool of the business interface;It, can be with when not finding the thread pool with current business Interface Matching The thread pool of a newly-built adaptation is recombinated to obtain the thread pool an of adaptation or one default to existing thread pool Fixed thread pool directly matches it to the thread pool of the fixation when not finding matched thread pool, or directly into Row report an error, therefore can not only dynamic dispatching thread pool corresponding with business interface, avoid business interface and thread pool from mutually tying up The problem of determining and leading to thread pool free time and congestion optimizes thread Pooled resources, realizes rationally efficiently scheduling thread pond, and Also improve the flexibility of dynamic dispatching thread pool.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include In scope of patent protection of the invention.

Claims (10)

1. a kind of method of dynamic dispatching thread pool, which is characterized in that comprising steps of
S1, multiple thread pools are preset, each thread pool has the thread of different number;
S2, the calling frequency for calculating a business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
2. the method for dynamic dispatching thread pool according to claim 1, which is characterized in that the step S2 further include:
The type for determining the business interface determines the priority of the business interface according to the type of the business interface;
The step S3 includes:
The interface grade of the business interface is determined according to the priority of the business interface and calling frequency;
According to the level dynamic dispatchings such as interface thread pool corresponding with the business interface.
3. the method for dynamic dispatching thread pool according to claim 2, which is characterized in that calculate a business in the S2 and connect Mouthful calling frequency include:
The call number of the business interface within a preset period of time is counted, is calculated according to the preset time period and call number The calling frequency of the business interface;
Include: according to the priority of the business interface and the interface grade for calling frequency to determine the business interface in the S3
It calculates the priority of the business interface and calls the product of frequency, connecing for the business interface is determined according to the product Mouth grade.
4. the method for dynamic dispatching thread pool according to any one of claim 1 to 3, which is characterized in that the step S1 further include:
One thread pool configuration information table corresponding with the multiple thread pool is set, and the thread pool configuration information table includes line Cheng Chi unique identification field and thread pool threads digital section;
Dynamic dispatching described in the step S3 includes: with the matched thread pool of the business interface
S31, determination and the matched Thread Count of the business interface;
S32, matched thread is determined from the thread pool configuration information table according to the Thread Count and thread pool threads digital section Pond unique identification field dispatches corresponding thread pool according to the thread pool unique identification field.
5. the method for dynamic dispatching thread pool according to claim 4, which is characterized in that the thread pool configuration information table It further include thread pool minimum Thread Count field and thread pool maximum thread field;
Before the step S32 further include:
The thread is judged according to the Thread Count and thread pool minimum Thread Count field and thread pool maximum thread field Pond configuration information table whether there is matched thread pool unique identification field;
If so, thening follow the steps S32, otherwise, step S33 is executed;
S33, increase it is new with the matched thread pool of the Thread Count, and the thread pool configuration information table increase with it is described new The corresponding record of thread pool, corresponding thread pool is dispatched according to the thread pool unique identification field of the new thread pool;
Or thread pool is repartitioned, new each thread pool is generated, and update the thread pool configuration information table pair The record answered, in new each thread pool comprising with the matched thread pool of the Thread Count, according to the Thread Count The thread pool unique identification field for the thread pool matched dispatches corresponding thread pool;
Or corresponding thread pool is dispatched according to thread pool unique identification field preset in the thread pool configuration information table;
Or prompt mistake.
6. a kind of terminal of dynamic dispatching thread pool, including memory, processor and storage are on a memory and can be in processor The computer program of upper operation, which is characterized in that the processor performs the steps of when executing the computer program
S1, multiple thread pools are preset, each thread pool has the thread of different number;
S2, the calling frequency for calculating a business interface;
S3, it is dispatched and the matched thread pool of the business interface according to the calling frequency dynamic.
7. the terminal of dynamic dispatching thread pool according to claim 6, which is characterized in that the step S2 further include:
The type for determining the business interface determines the priority of the business interface according to the type of the business interface;
The step S3 includes:
The interface grade of the business interface is determined according to the priority of the business interface and calling frequency;
According to the level dynamic dispatchings such as interface thread pool corresponding with the business interface.
8. the terminal of dynamic dispatching thread pool according to claim 7, which is characterized in that calculate a business in the S2 and connect Mouthful calling frequency include:
The call number of the business interface within a preset period of time is counted, is calculated according to the preset time period and call number The calling frequency of the business interface;
Include: according to the priority of the business interface and the interface grade for calling frequency to determine the business interface in the S3
It calculates the priority of the business interface and calls the product of frequency, connecing for the business interface is determined according to the product Mouth grade.
9. the terminal of dynamic dispatching thread pool according to any one of claim 6 to 8, which is characterized in that the step S1 further include:
One thread pool configuration information table corresponding with the multiple thread pool is set, and the thread pool configuration information table includes line Cheng Chi unique identification field and thread pool threads digital section;
Dynamic dispatching described in the step S3 includes: with the matched thread pool of the business interface
S31, determination and the matched Thread Count of the business interface;
S32, matched thread is determined from the thread pool configuration information table according to the Thread Count and thread pool threads digital section Pond unique identification field dispatches corresponding thread pool according to the thread pool unique identification field.
10. the terminal of dynamic dispatching thread pool according to claim 9, which is characterized in that the thread pool configuration information Table further includes thread pool minimum Thread Count field and thread pool maximum thread field;
Before the step S32 further include:
The thread is judged according to the Thread Count and thread pool minimum Thread Count field and thread pool maximum thread field Pond configuration information table whether there is matched thread pool unique identification field;
If so, thening follow the steps S32, otherwise, step S33 is executed;
S33, increase it is new with the matched thread pool of the Thread Count, and the thread pool configuration information table increase with it is described new The corresponding record of thread pool, corresponding thread pool is dispatched according to the thread pool unique identification field of the new thread pool;
Or thread pool is repartitioned, new each thread pool is generated, and update the thread pool configuration information table pair The record answered, in new each thread pool comprising with the matched thread pool of the Thread Count, according to the Thread Count The thread pool unique identification field for the thread pool matched dispatches corresponding thread pool;
Or corresponding thread pool is dispatched according to thread pool unique identification field preset in the thread pool configuration information table;
Or prompt mistake.
CN201910003889.1A 2019-01-03 2019-01-03 Method and terminal for dynamically scheduling thread pool Active CN109814994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910003889.1A CN109814994B (en) 2019-01-03 2019-01-03 Method and terminal for dynamically scheduling thread pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910003889.1A CN109814994B (en) 2019-01-03 2019-01-03 Method and terminal for dynamically scheduling thread pool

Publications (2)

Publication Number Publication Date
CN109814994A true CN109814994A (en) 2019-05-28
CN109814994B CN109814994B (en) 2021-10-08

Family

ID=66603792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910003889.1A Active CN109814994B (en) 2019-01-03 2019-01-03 Method and terminal for dynamically scheduling thread pool

Country Status (1)

Country Link
CN (1) CN109814994B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413390A (en) * 2019-07-24 2019-11-05 深圳市盟天科技有限公司 Thread task processing method, device, server and storage medium
CN111209099A (en) * 2019-12-31 2020-05-29 苏州浪潮智能科技有限公司 Multi-thread pool scheduling method and scheduling terminal based on ganesha service
CN111897643A (en) * 2020-08-05 2020-11-06 深圳鼎盛电脑科技有限公司 Thread pool configuration system, method, device and storage medium
CN112634887A (en) * 2020-12-08 2021-04-09 北京梧桐车联科技有限责任公司 Voice mode control method, device and system
CN113254181A (en) * 2021-06-07 2021-08-13 中汽创智科技有限公司 Self-adaptive scheduling method and system
CN113742084A (en) * 2021-09-13 2021-12-03 城云科技(中国)有限公司 Method and apparatus for allocating computing resources based on interface characteristics
CN114124835A (en) * 2021-11-22 2022-03-01 招商局金融科技有限公司 Interface-based data transmission method, device, equipment and medium
CN114995996A (en) * 2022-04-26 2022-09-02 支付宝(杭州)信息技术有限公司 Method for generating configuration information of thread pool, task processing method and device
CN115348321A (en) * 2022-08-12 2022-11-15 中国建设银行股份有限公司 Data acquisition method based on flow control and related device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095590A (en) * 2016-07-21 2016-11-09 联动优势科技有限公司 A kind of method for allocating tasks based on thread pool and device
US20160350157A1 (en) * 2015-05-29 2016-12-01 Red Hat, Inc. Dynamic thread pool management
CN106802826A (en) * 2016-12-23 2017-06-06 中国银联股份有限公司 A kind of method for processing business and device based on thread pool
CN107341050A (en) * 2016-04-28 2017-11-10 北京京东尚科信息技术有限公司 Service processing method and device based on dynamic thread pool
CN107632889A (en) * 2017-06-28 2018-01-26 努比亚技术有限公司 A kind of method, equipment and computer-readable recording medium for realizing service degradation
US9910711B1 (en) * 2017-07-17 2018-03-06 Tmaxsoft. Co., Ltd. Method and computing device for managing size of thread pool dynamically
CN108255607A (en) * 2018-01-08 2018-07-06 武汉斗鱼网络科技有限公司 Task processing method, device, electric terminal and readable storage medium storing program for executing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350157A1 (en) * 2015-05-29 2016-12-01 Red Hat, Inc. Dynamic thread pool management
CN107341050A (en) * 2016-04-28 2017-11-10 北京京东尚科信息技术有限公司 Service processing method and device based on dynamic thread pool
CN106095590A (en) * 2016-07-21 2016-11-09 联动优势科技有限公司 A kind of method for allocating tasks based on thread pool and device
CN106802826A (en) * 2016-12-23 2017-06-06 中国银联股份有限公司 A kind of method for processing business and device based on thread pool
CN107632889A (en) * 2017-06-28 2018-01-26 努比亚技术有限公司 A kind of method, equipment and computer-readable recording medium for realizing service degradation
US9910711B1 (en) * 2017-07-17 2018-03-06 Tmaxsoft. Co., Ltd. Method and computing device for managing size of thread pool dynamically
CN108255607A (en) * 2018-01-08 2018-07-06 武汉斗鱼网络科技有限公司 Task processing method, device, electric terminal and readable storage medium storing program for executing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413390A (en) * 2019-07-24 2019-11-05 深圳市盟天科技有限公司 Thread task processing method, device, server and storage medium
CN111209099A (en) * 2019-12-31 2020-05-29 苏州浪潮智能科技有限公司 Multi-thread pool scheduling method and scheduling terminal based on ganesha service
CN111209099B (en) * 2019-12-31 2022-07-08 苏州浪潮智能科技有限公司 Multi-thread pool scheduling method and scheduling terminal based on ganesha service
CN111897643A (en) * 2020-08-05 2020-11-06 深圳鼎盛电脑科技有限公司 Thread pool configuration system, method, device and storage medium
CN112634887B (en) * 2020-12-08 2024-01-23 北京梧桐车联科技有限责任公司 Voice mode control method, device and system
CN112634887A (en) * 2020-12-08 2021-04-09 北京梧桐车联科技有限责任公司 Voice mode control method, device and system
CN113254181A (en) * 2021-06-07 2021-08-13 中汽创智科技有限公司 Self-adaptive scheduling method and system
CN113254181B (en) * 2021-06-07 2022-03-18 中汽创智科技有限公司 Self-adaptive scheduling method and system
CN113742084A (en) * 2021-09-13 2021-12-03 城云科技(中国)有限公司 Method and apparatus for allocating computing resources based on interface characteristics
CN114124835A (en) * 2021-11-22 2022-03-01 招商局金融科技有限公司 Interface-based data transmission method, device, equipment and medium
CN114995996A (en) * 2022-04-26 2022-09-02 支付宝(杭州)信息技术有限公司 Method for generating configuration information of thread pool, task processing method and device
CN115348321A (en) * 2022-08-12 2022-11-15 中国建设银行股份有限公司 Data acquisition method based on flow control and related device
CN115348321B (en) * 2022-08-12 2024-04-26 中国建设银行股份有限公司 Data acquisition method and related device based on flow control

Also Published As

Publication number Publication date
CN109814994B (en) 2021-10-08

Similar Documents

Publication Publication Date Title
CN109814994A (en) A kind of method and terminal of dynamic dispatching thread pool
US11882242B2 (en) System and method for a work distribution service
US7200219B1 (en) Dynamically allocating server resources to competing classes of work based upon achievement of service goals
CN111131639A (en) Customer service seat allocation method, customer service seat allocation device, server and storage medium
CN110308980A (en) Batch processing method, device, equipment and the storage medium of data
CN107819797B (en) Access request processing method and device
US20090175279A1 (en) Method and device for providing qos control capability for a presence server and system thereof
CN109327540A (en) Electronic device, server load balancing method and storage medium
CN104657207B (en) Dispatching method, service server and the scheduling system of remote authorization request
CN103927225A (en) Multi-core framework Internet information processing and optimizing method
CN107426274A (en) The method and system of service application and monitoring analysis scheduling based on sequential
CN108897626A (en) Resource scheduling method and server
CN105763595A (en) Method of improving data processing efficiency and server
WO2020000668A1 (en) Server cluster-based task execution method and server
US20140223436A1 (en) Method, apparatus, and system for providing and using a scheduling delta queue
CN111988478A (en) Incoming call management method, device, server and storage medium
CN111985786A (en) Agent-based task allocation method and device, computer equipment and storage medium
CN108681481A (en) The processing method and processing device of service request
CN101114984A (en) Multithreading network load control method
WO2017114180A1 (en) Component logical threads quantity adjustment method and device
CN105049372A (en) Method of expanding message middleware throughput and system thereof
CN110716800A (en) Task scheduling method and device, storage medium and electronic equipment
CN106534312B (en) A kind of service request selection of facing mobile apparatus and dispatching method
US10979359B1 (en) Polling resource management system
Feigin Analysis of customer patience in a bank call center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant