CN109814994B - Method and terminal for dynamically scheduling thread pool - Google Patents

Method and terminal for dynamically scheduling thread pool Download PDF

Info

Publication number
CN109814994B
CN109814994B CN201910003889.1A CN201910003889A CN109814994B CN 109814994 B CN109814994 B CN 109814994B CN 201910003889 A CN201910003889 A CN 201910003889A CN 109814994 B CN109814994 B CN 109814994B
Authority
CN
China
Prior art keywords
thread
thread pool
service interface
pool
pools
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.)
Active
Application number
CN201910003889.1A
Other languages
Chinese (zh)
Other versions
CN109814994A (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

Images

Landscapes

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

Abstract

The invention provides a method and a terminal for dynamically scheduling thread pools.A plurality of thread pools are preset, each thread pool has different numbers of threads, the calling frequency of a service interface is calculated, and the thread pool matched with the service interface is dynamically scheduled according to the calling frequency; the thread pool corresponding to the service interface can be dynamically scheduled, the problems that the thread pool is idle and jammed due to the mutual binding of the service interface and the thread pool are avoided, the thread pool resources are optimized, and therefore the thread pool can be scheduled reasonably and efficiently.

Description

Method and terminal for dynamically scheduling thread pool
Technical Field
The invention relates to the field of computer software, in particular to a method and a terminal for dynamically scheduling a thread pool.
Background
At present, a program project has a plurality of different business functions, and there may be various business interfaces according to the difference of the business functions, for example, there are business interfaces with large access amount, business interfaces consuming more time, or business interfaces with frequent delay, when the interface response of the underlying service basic service such as a database, a network, or an IO is slow, a large number of threads are occupied for processing, and if the request amount is large at this time, the problem of blocking, delay, or no response of other interface requests may be caused.
For the above problems, in the prior art, service interfaces are generally allocated into different thread pools, each type of service interface can only run in a corresponding thread pool, and when a service interface thread of a certain thread pool is blocked, resources of other thread pools are not occupied so as to avoid affecting the running of threads of other thread pools; however, the thread pools are usually created by writing programs in advance, and a fixed thread pool is created as soon as a program item is started, that is, a service interface and a thread pool corresponding to the service interface are in a fixed binding relationship, so that for some service interfaces with unstable access, the corresponding thread pool is blocked when the thread pool is idle, and the thread pool cannot be called reasonably and efficiently.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method and the terminal for dynamically scheduling the thread pool can realize dynamic scheduling of the thread pool corresponding to the service interface and reasonably and efficiently schedule the thread pool.
In order to solve the technical problems, the invention adopts a technical scheme that:
a method for dynamically scheduling thread pools, comprising the steps of:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
s2, calculating the calling frequency of a service interface;
and S3, dynamically scheduling the thread pool matched with the service interface according to the calling frequency.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a terminal for dynamically scheduling a thread pool, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
s2, calculating the calling frequency of a service interface;
and S3, dynamically scheduling the thread pool matched with the service interface according to the calling frequency.
The invention has the beneficial effects that: the method comprises the steps that a plurality of thread pools are preset, each thread pool is provided with threads with different numbers, the calling frequency of a service interface is calculated, and the thread pool matched with the service interface is dynamically scheduled according to the calling frequency; the thread pool corresponding to the service interface can be dynamically scheduled, the problems that the thread pool is idle and jammed due to the mutual binding of the service interface and the thread pool are avoided, the thread pool resources are optimized, and therefore the thread pool can be scheduled reasonably and efficiently.
Drawings
FIG. 1 is a flowchart of a method for dynamically scheduling thread pools according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a terminal structure of a dynamic scheduling thread pool according to an embodiment of the present invention;
fig. 3 is a data interaction diagram of a method for dynamically scheduling a thread pool applied to a specific application scenario according to an embodiment of the present invention;
description of reference numerals:
1. dynamically scheduling terminals of the thread pool; 2. a memory; 3. a processor.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: and the thread pool corresponding to the number of the threads is adapted according to the calling frequency of the service interface, so that the thread pool is reasonably and efficiently scheduled.
Referring to fig. 1, a method for dynamically scheduling a thread pool includes the steps of:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
s2, calculating the calling frequency of a service interface;
and S3, dynamically scheduling the thread pool matched with the service interface according to the calling frequency.
From the above description, the beneficial effects of the present invention are: the method comprises the steps that a plurality of thread pools are preset, each thread pool is provided with threads with different numbers, the calling frequency of a service interface is calculated, and the thread pool matched with the service interface is dynamically scheduled according to the calling frequency; the thread pool corresponding to the service interface can be dynamically scheduled, the problems that the thread pool is idle and jammed due to the mutual binding of the service interface and the thread pool are avoided, the thread pool resources are optimized, and therefore the thread pool can be scheduled reasonably and efficiently.
Further, the step S2 further includes:
determining the type of the service interface, and determining the priority of the service interface according to the type of the service interface;
the step S3 includes:
determining the interface grade of the service interface according to the priority and the calling frequency of the service interface;
and dynamically scheduling a thread pool corresponding to the service interface according to the interface grade.
It can be known from the above description that, because the priorities of different types of service interfaces are different, the priorities and the calling frequencies of the service interfaces are comprehensively considered to determine the interface levels, and the corresponding thread pools are dynamically scheduled according to the interface levels, so that the rationality and comprehensiveness of the scheduling are improved.
Further, the calculating a calling frequency of a service interface in S2 includes:
counting the calling times of the service interface in a preset time period, and calculating the calling frequency of the service interface according to the preset time period and the calling times;
determining the interface level of the service interface according to the priority and the calling frequency of the service interface in S3 includes:
and calculating the product of the priority of the service interface and the calling frequency, and determining the interface grade of the service interface according to the product.
As can be seen from the above description, the call frequency of the service interface is calculated by counting the call times of the service interface in a preset time period, and the interface level is determined by calculating the product of the priority of the service interface and the call frequency, so that the obtained interface level is high in scientificity.
Further, the step S1 further includes:
setting a thread pool configuration information table corresponding to the thread pools, wherein the thread pool configuration information table comprises a thread pool unique identification field and a thread pool thread number field;
the dynamically scheduling the thread pool matched with the service interface in step S3 includes:
s31, determining the thread number matched with the service interface;
and S32, determining the matched thread pool unique identification field from the thread pool configuration information table according to the thread number and thread number field of the thread pool, and scheduling the corresponding thread pool according to the thread pool unique identification field.
According to the description, the service interface schedules the corresponding thread pool through the unique identification field of the thread pool configuration information table, so that the accuracy of dynamically scheduling the corresponding thread pool is improved.
Further, the thread pool configuration information table further comprises a thread pool minimum thread number field and a thread pool maximum thread number field;
the step S32 is preceded by:
judging whether the thread pool configuration information table has a matched thread pool unique identification field or not according to the thread number, the thread pool minimum thread number field and the thread pool maximum thread number field;
if so, go to step S32, otherwise, go to step S33;
s33, adding a new thread pool matched with the thread number, adding a record corresponding to the new thread pool in the thread pool configuration information table, and scheduling the corresponding thread pool according to the unique identification field of the thread pool of the new thread pool;
or the thread pools are divided again to generate new thread pools, records corresponding to the thread pool configuration information table are updated, the new thread pools comprise thread pools matched with the thread number, and the corresponding thread pools are dispatched according to the thread pool unique identification fields of the thread pools matched with the thread number;
or scheduling the corresponding thread pool according to the unique identification field of the thread pool preset in the thread pool configuration information table;
or to prompt an error.
It can be known from the above description that, when a thread pool matched with the current service interface is not found, an adaptive thread pool can be newly created, or the existing thread pool can be recombined to obtain an adaptive thread pool, or a fixed thread pool is preset, and when a matched thread pool is not found, the matched thread pool is directly matched with the fixed thread pool, or an error is directly reported, so that the flexibility of dynamically scheduling the thread pool is improved.
Referring to fig. 2, a terminal for dynamically scheduling a thread pool includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
s2, calculating the calling frequency of a service interface;
and S3, dynamically scheduling the thread pool matched with the service interface according to the calling frequency.
From the above description, the beneficial effects of the present invention are: the method comprises the steps that a plurality of thread pools are preset, each thread pool is provided with threads with different numbers, the calling frequency of a service interface is calculated, and the thread pool matched with the service interface is dynamically scheduled according to the calling frequency; the thread pool corresponding to the service interface can be dynamically scheduled, the problems that the thread pool is idle and jammed due to the mutual binding of the service interface and the thread pool are avoided, the thread pool resources are optimized, and therefore the thread pool can be scheduled reasonably and efficiently.
Further, the step S2 further includes:
determining the type of the service interface, and determining the priority of the service interface according to the type of the service interface;
the step S3 includes:
determining the interface grade of the service interface according to the priority and the calling frequency of the service interface;
and dynamically scheduling a thread pool corresponding to the service interface according to the interface grade.
It can be known from the above description that, because the priorities of different types of service interfaces are different, the priorities and the calling frequencies of the service interfaces are comprehensively considered to determine the interface levels, and the corresponding thread pools are dynamically scheduled according to the interface levels, so that the rationality and comprehensiveness of the scheduling are improved.
Further, the calculating a calling frequency of a service interface in S2 includes:
counting the calling times of the service interface in a preset time period, and calculating the calling frequency of the service interface according to the preset time period and the calling times;
determining the interface level of the service interface according to the priority and the calling frequency of the service interface in S3 includes:
and calculating the product of the priority of the service interface and the calling frequency, and determining the interface grade of the service interface according to the product.
As can be seen from the above description, the call frequency of the service interface is calculated by counting the call times of the service interface in a preset time period, and the interface level is determined by calculating the product of the priority of the service interface and the call frequency, so that the obtained interface level is high in scientificity.
Further, the step S1 further includes:
setting a thread pool configuration information table corresponding to the thread pools, wherein the thread pool configuration information table comprises a thread pool unique identification field and a thread pool thread number field;
the dynamically scheduling the thread pool matched with the service interface in step S3 includes:
s31, determining the thread number matched with the service interface;
and S32, determining the matched thread pool unique identification field from the thread pool configuration information table according to the thread number and thread number field of the thread pool, and scheduling the corresponding thread pool according to the thread pool unique identification field.
According to the description, the service interface schedules the corresponding thread pool through the unique identification field of the thread pool configuration information table, so that the accuracy of dynamically scheduling the corresponding thread pool is improved.
Further, the thread pool configuration information table further comprises a thread pool minimum thread number field and a thread pool maximum thread number field;
the step S32 is preceded by:
judging whether the thread pool configuration information table has a matched thread pool unique identification field or not according to the thread number, the thread pool minimum thread number field and the thread pool maximum thread number field;
if so, go to step S32, otherwise, go to step S33;
s33, adding a new thread pool matched with the thread number, adding a record corresponding to the new thread pool in the thread pool configuration information table, and scheduling the corresponding thread pool according to the unique identification field of the thread pool of the new thread pool;
or the thread pools are divided again to generate new thread pools, records corresponding to the thread pool configuration information table are updated, the new thread pools comprise thread pools matched with the thread number, and the corresponding thread pools are dispatched according to the thread pool unique identification fields of the thread pools matched with the thread number;
or scheduling the corresponding thread pool according to the unique identification field of the thread pool preset in the thread pool configuration information table;
or to prompt an error.
It can be known from the above description that, when a thread pool matched with the current service interface is not found, an adaptive thread pool can be newly created, or the existing thread pool can be recombined to obtain an adaptive thread pool, or a fixed thread pool is preset, and when a matched thread pool is not found, the matched thread pool is directly matched with the fixed thread pool, or an error is directly reported, so that the flexibility of dynamically scheduling the thread pool is improved.
Example one
Referring to fig. 1, a method for dynamically scheduling a thread pool includes the steps of:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
wherein the S1 further includes: setting a thread pool configuration information table corresponding to the thread pools, wherein the thread pool configuration information table comprises a thread pool unique identification field and a thread pool thread number field;
specifically, each thread pool corresponds to a record in the thread pool information table, and each record comprises a thread pool unique identification field, a thread pool thread digital field and other related fields;
s2, calculating the calling frequency of a service interface;
wherein the S2 further includes: determining the type of the service interface, and determining the priority of the service interface according to the type of the service interface;
wherein, the determining the type of the service interface specifically includes: when classifying the service interfaces in an application program, the type of the service interfaces can be determined according to the access amount information, the time consumption information and the operation delay information of the service interfaces;
wherein calculating the call frequency of a service interface comprises:
counting the calling times of the service interface in a preset time period, and calculating the calling frequency of the service interface according to the preset time period and the calling times;
and S3, dynamically scheduling the thread pool matched with the service interface according to the calling frequency.
The thread pool can provide two modes of real-time synchronous return and asynchronous return to return an execution result according to the request of the service interface, when the service interface needs to return the execution result of the thread pool in real time, the thread pool synchronously returns the execution result, otherwise, the thread pool asynchronously returns the execution result;
wherein the S3 includes: determining the interface grade of the service interface according to the priority and the calling frequency of the service interface;
dynamically scheduling a thread pool corresponding to the service interface according to the interface grade;
determining the interface level of the service interface according to the priority and the calling frequency of the service interface comprises the following steps:
calculating the product of the priority and the calling frequency of the service interface, and determining the interface grade of the service interface according to the product;
when the product of the priority of the service interface and the calling frequency is calculated, the threshold range of the interface level to which the value of the product belongs is judged, so that the specific interface level of the service interface is determined; specifically, the number of calls of each service interface in the preset time is respectively counted, so that the call frequency of each service interface in the preset time is calculated, and the final calculation rule is as follows: and (3) counting the S value of each interface, dividing the range of the S value into different interface grades, wherein the larger S value in the service interface can use a thread pool with more resources, and the smaller S value can use a thread pool with less resources, so that the use of the thread pool resources is further refined and optimized.
Wherein the dynamically scheduling the thread pool matched with the service interface comprises:
s31, determining the thread number matched with the service interface;
the thread pool configuration information table further comprises a thread pool minimum thread number field and a thread pool maximum thread number field;
judging whether the thread pool configuration information table has a matched thread pool unique identification field or not according to the thread number, the thread pool minimum thread number field and the thread pool maximum thread number field;
if yes, go to step S32;
s32, determining a matched thread pool unique identification field from the thread pool configuration information table according to the thread number and thread number field of the thread pool, and scheduling the corresponding thread pool according to the thread pool unique identification field;
in addition, the fields of the thread pool configuration information table may be determined according to actual requirements, for example, the fields may further include a processing timeout time field and a queue field for caching the asynchronous task, and for example, for a service interface with a large access amount, a smaller processing timeout time field, a larger thread pool thread number field, and a larger queue field for caching the asynchronous task are set to optimize the thread pool resources.
Example two
Referring to fig. 1 and fig. 3, the difference between the present embodiment and the first embodiment is that, in the step S31, determining whether the thread pool configuration information table has a matching thread pool unique identifier field according to the thread number, the thread pool minimum thread number field, and the thread pool maximum thread number field further includes:
if not, go to step S33;
s33, adding a new thread pool matched with the thread number, adding a record corresponding to the new thread pool in the thread pool configuration information table, and scheduling the corresponding thread pool according to the unique identification field of the thread pool of the new thread pool;
or the thread pools are divided again to generate new thread pools, records corresponding to the thread pool configuration information table are updated, the new thread pools comprise thread pools matched with the thread number, and the corresponding thread pools are dispatched according to the thread pool unique identification fields of the thread pools matched with the thread number;
or scheduling the corresponding thread pool according to the unique identification field of the thread pool preset in the thread pool configuration information table;
or to prompt an error.
Applying the method to a specific application scene, calling an A service interface by a client to process a certain service, sending a message notification to a counting program by the A service interface, calculating interface calling frequency of the A service interface by the counting program, determining interface priority according to the service type of the A service interface, obtaining the interface level of the A service interface according to the interface calling frequency and the interface priority, sending the interface level to a redis cluster, and then inquiring whether a thread pool unique identification field corresponding to the interface level of the A service interface exists in a thread pool configuration information table of the redis cluster;
if yes, scheduling the corresponding thread pool according to the unique identification field of the thread pool;
if the unique identification field of the thread pool of the new thread pool does not exist, adding a new thread pool, adding a record corresponding to the new thread pool in the thread pool configuration information table, and scheduling the corresponding thread pool according to the unique identification field of the thread pool of the new thread pool;
or the thread pools are divided again to generate new thread pools, records corresponding to the thread pool configuration information table are updated, and the corresponding thread pools are dispatched according to the thread pool unique identification fields of the thread pools matched with the thread number;
or scheduling the corresponding thread pool according to the unique identification field of the thread pool preset in the thread pool configuration information table, namely, pre-configuring the unique identification field corresponding to the default thread pool in the thread pool configuration information table, and using the default thread pool when the service interface A cannot inquire the corresponding unique identification field of the thread pool;
or to prompt an error.
Example two
Referring to fig. 2, a terminal 1 for dynamically scheduling a thread pool includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, wherein the processor 3 implements the steps of the first embodiment when executing the computer program.
In summary, according to the method and the terminal for dynamically scheduling thread pools provided by the present invention, a plurality of thread pools are preset, each thread pool has a different number of threads, the calling frequency and the basic service interface category of a service interface are calculated to determine the interface priority, the interface level is determined according to the calling frequency and the interface priority, and the thread pool matched with the service interface is dynamically scheduled according to the interface level of the service interface; when a thread pool matched with the current service interface is not found, an adaptive thread pool can be newly built or the existing thread pool is recombined to obtain an adaptive thread pool or a fixed thread pool is preset, and when the matched thread pool is not found, the adaptive thread pool is directly matched with the fixed thread pool or error reporting is directly carried out, so that the thread pool corresponding to the service interface can be dynamically scheduled, the problem that the thread pool is idle and jammed due to the fact that the service interface and the thread pool are bound with each other is avoided, the thread pool resource is optimized, the thread pool is reasonably and efficiently scheduled, and the flexibility of the dynamically scheduled thread pool is improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (6)

1. A method for dynamically scheduling thread pools, comprising the steps of:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
s2, calculating the calling frequency of a service interface;
s3, dynamically scheduling a thread pool matched with the service interface according to the calling frequency;
the step S1 further includes:
setting a thread pool configuration information table corresponding to the thread pools, wherein the thread pool configuration information table comprises a thread pool unique identification field and a thread pool thread number field;
the dynamically scheduling the thread pool matched with the service interface in step S3 includes:
s31, determining the thread number matched with the service interface;
s32, determining a matched thread pool unique identification field from the thread pool configuration information table according to the thread number and thread number field of the thread pool, and scheduling the corresponding thread pool according to the thread pool unique identification field;
the thread pool configuration information table further comprises a thread pool minimum thread number field and a thread pool maximum thread number field;
the step S32 is preceded by:
judging whether the thread pool configuration information table has a matched thread pool unique identification field or not according to the thread number, the thread pool minimum thread number field and the thread pool maximum thread number field;
if so, go to step S32, otherwise, go to step S33;
s33, adding a new thread pool matched with the thread number, adding a record corresponding to the new thread pool in the thread pool configuration information table, and scheduling the corresponding thread pool according to the unique identification field of the thread pool of the new thread pool;
or the thread pools are divided again to generate new thread pools, records corresponding to the thread pool configuration information table are updated, the new thread pools comprise thread pools matched with the thread number, and the corresponding thread pools are dispatched according to the thread pool unique identification fields of the thread pools matched with the thread number;
or scheduling the corresponding thread pool according to the unique identification field of the thread pool preset in the thread pool configuration information table;
or to prompt an error.
2. The method for dynamically scheduling thread pool according to claim 1, wherein said step S2 further comprises:
determining the type of the service interface, and determining the priority of the service interface according to the type of the service interface;
the step S3 includes:
determining the interface grade of the service interface according to the priority and the calling frequency of the service interface;
and dynamically scheduling a thread pool corresponding to the service interface according to the interface grade.
3. The method according to claim 2, wherein the step of calculating the calling frequency of a service interface in S2 comprises:
counting the calling times of the service interface in a preset time period, and calculating the calling frequency of the service interface according to the preset time period and the calling times;
determining the interface level of the service interface according to the priority and the calling frequency of the service interface in S3 includes:
and calculating the product of the priority of the service interface and the calling frequency, and determining the interface grade of the service interface according to the product.
4. A terminal for dynamically scheduling a thread pool, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of:
s1, presetting a plurality of thread pools, wherein each thread pool is provided with different numbers of threads;
s2, calculating the calling frequency of a service interface;
s3, dynamically scheduling a thread pool matched with the service interface according to the calling frequency;
the step S1 further includes:
setting a thread pool configuration information table corresponding to the thread pools, wherein the thread pool configuration information table comprises a thread pool unique identification field and a thread pool thread number field;
the dynamically scheduling the thread pool matched with the service interface in step S3 includes:
s31, determining the thread number matched with the service interface;
s32, determining a matched thread pool unique identification field from the thread pool configuration information table according to the thread number and thread number field of the thread pool, and scheduling the corresponding thread pool according to the thread pool unique identification field;
the thread pool configuration information table further comprises a thread pool minimum thread number field and a thread pool maximum thread number field;
the step S32 is preceded by:
judging whether the thread pool configuration information table has a matched thread pool unique identification field or not according to the thread number, the thread pool minimum thread number field and the thread pool maximum thread number field;
if so, go to step S32, otherwise, go to step S33;
s33, adding a new thread pool matched with the thread number, adding a record corresponding to the new thread pool in the thread pool configuration information table, and scheduling the corresponding thread pool according to the unique identification field of the thread pool of the new thread pool;
or the thread pools are divided again to generate new thread pools, records corresponding to the thread pool configuration information table are updated, the new thread pools comprise thread pools matched with the thread number, and the corresponding thread pools are dispatched according to the thread pool unique identification fields of the thread pools matched with the thread number;
or scheduling the corresponding thread pool according to the unique identification field of the thread pool preset in the thread pool configuration information table;
or to prompt an error.
5. The terminal for dynamically scheduling thread pools according to claim 4, wherein the step S2 further comprises:
determining the type of the service interface, and determining the priority of the service interface according to the type of the service interface;
the step S3 includes:
determining the interface grade of the service interface according to the priority and the calling frequency of the service interface;
and dynamically scheduling a thread pool corresponding to the service interface according to the interface grade.
6. The terminal for dynamically scheduling thread pools according to claim 5, wherein the calculating of the calling frequency of a service interface in S2 comprises:
counting the calling times of the service interface in a preset time period, and calculating the calling frequency of the service interface according to the preset time period and the calling times;
determining the interface level of the service interface according to the priority and the calling frequency of the service interface in S3 includes:
and calculating the product of the priority of the service interface and the calling frequency, and determining the interface grade of the service interface according to the product.
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 CN109814994A (en) 2019-05-28
CN109814994B true 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)

Families Citing this family (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
CN111209099B (en) * 2019-12-31 2022-07-08 苏州浪潮智能科技有限公司 Multi-thread pool scheduling method and scheduling terminal based on ganesha service
CN111897643B (en) * 2020-08-05 2024-07-02 深圳鼎盛电脑科技有限公司 Thread pool configuration system, method, device and storage medium
CN112634887B (en) * 2020-12-08 2024-01-23 北京梧桐车联科技有限责任公司 Voice mode control method, device 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
CN115348321B (en) * 2022-08-12 2024-04-26 中国建设银行股份有限公司 Data acquisition method and related device based on flow control

Citations (6)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10061619B2 (en) * 2015-05-29 2018-08-28 Red Hat, Inc. Thread pool management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN109814994A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109814994B (en) Method and terminal for dynamically scheduling thread pool
CN110489447B (en) Data query method and device, computer equipment and storage medium
WO2020211579A1 (en) Processing method, device and system for distributed bulk processing system
WO2020181813A1 (en) Task scheduling method based on data processing and related device
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
EP3468121B1 (en) Adaptive resource allocation method and apparatus
CN107729139B (en) Method and device for concurrently acquiring resources
CN110990138B (en) Resource scheduling method, device, server and storage medium
CN109995669B (en) Distributed current limiting method, device, equipment and readable storage medium
CN111338791A (en) Method, device and equipment for scheduling cluster queue resources and storage medium
US20030088660A1 (en) Techniques for load distribution processing for call centers and other processing systems
CN112162865A (en) Server scheduling method and device and server
CN105159736B (en) A kind of construction method for the SaaS software deployment schemes for supporting performance evaluation
CN111625331A (en) Task scheduling method, device, platform, server and storage medium
CN111240864A (en) Asynchronous task processing method, device, equipment and computer readable storage medium
CN111210340A (en) Automatic task processing method and device, server and storage medium
CN110489227A (en) A kind of resource allocation methods, device, computer equipment and storage medium
CN111913784A (en) Task scheduling method and device, network element and storage medium
EP3667495A1 (en) Task scheduling method, apparatus and device, and storage medium
CN110912949A (en) Method and device for submitting sites
US11474868B1 (en) Sharded polling system
US10979359B1 (en) Polling resource management system
CN114090268B (en) Container management method and container management system
CN106648874B (en) Processing method and device for batch tasks
CN114816703A (en) Task processing method, device, equipment and medium

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