CN110096352A - Process management method, device and computer readable storage medium - Google Patents

Process management method, device and computer readable storage medium Download PDF

Info

Publication number
CN110096352A
CN110096352A CN201910351999.7A CN201910351999A CN110096352A CN 110096352 A CN110096352 A CN 110096352A CN 201910351999 A CN201910351999 A CN 201910351999A CN 110096352 A CN110096352 A CN 110096352A
Authority
CN
China
Prior art keywords
interface
grade
service
time
processed
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
CN201910351999.7A
Other languages
Chinese (zh)
Other versions
CN110096352B (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.)
Tencent Technology Shanghai Co Ltd
Original Assignee
Tencent Technology Shanghai Co 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 Tencent Technology Shanghai Co Ltd filed Critical Tencent Technology Shanghai Co Ltd
Priority to CN201910351999.7A priority Critical patent/CN110096352B/en
Publication of CN110096352A publication Critical patent/CN110096352A/en
Application granted granted Critical
Publication of CN110096352B publication Critical patent/CN110096352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the present application discloses a kind of process management method, device and computer readable storage medium, and wherein method includes: to obtain the time to be processed of first interface;When the time to be processed being greater than the time threshold of the first interface, first grade of service of the first interface is obtained;Second grade of service of second interface is obtained, the second interface is the interface in server in addition to the first interface;When second grade of service is less than first grade of service, corresponding first process of the second interface is distributed into the first interface.Using the application, the utilization rate of process can be improved.

Description

Process management method, device and computer readable storage medium
Technical field
This application involves field of computer technology, a kind of process management method, device and computer-readable have been related generally to Storage medium.
Background technique
With the continuous development of information technology, especially in logical layer, the interface for handling different business logic becomes background service It obtains more and more.In the limited situation of resource, how managing process, be those skilled in the art to improve the utilization rate of server Member's technical problem urgently to be resolved.
Summary of the invention
The embodiment of the present application provides a kind of process management method, device and computer readable storage medium, can be used for mentioning The utilization rate of high process.
In a first aspect, the embodiment of the present application provides a kind of process management method, comprising:
Obtain the time to be processed of first interface;
When the time to be processed being greater than the time threshold of the first interface, the first industry of the first interface is obtained Business grade;
Obtain second interface second grade of service, the second interface be server in addition to the first interface Interface;
When second grade of service is less than first grade of service, by corresponding first process of the second interface Distribute to the first interface.
Second aspect, the embodiment of the present application provide a kind of management of process device, comprising:
Acquiring unit, for obtaining the time to be processed of first interface;It is greater than described first in the time to be processed to connect When the time threshold of mouth, first grade of service of the first interface is obtained;Second grade of service of second interface is obtained, it is described Second interface is the interface in server in addition to the first interface;
Administrative unit is used for when second grade of service is less than first grade of service, by the second interface Corresponding first process distributes to the first interface.
The third aspect, the embodiment of the present application provide another management of process device, and the management of process device includes processing Device, communication interface and memory, wherein the memory stores computer program, and the computer program includes program instruction, The processor is configured for calling described program instruction, executes method described in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program includes program instruction, and described program instruction is when by management of process device The management of process device is set to execute method described in first aspect when execution.
Using the embodiment of the present application, when the time to be processed of first interface being greater than the time threshold of first interface, obtain Second grade of service of the second interface in first grade of service and server of first interface in addition to first interface.? When two grades of service are less than first grade of service, corresponding first process of second interface is distributed into first interface.In this way, passing through Time to be processed and the grade of service have adjusted the corresponding process number of interface, to improve the utilization rate of process.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the network architecture schematic diagram using the embodiment of the present application;
Fig. 2A is a kind of schematic diagram of a scenario of transmission interface call request provided by the embodiments of the present application;
Fig. 2 B is a kind of schematic diagram of a scenario of response interface call request provided by the embodiments of the present application;
Fig. 3 is a kind of flow diagram of process management method provided by the embodiments of the present application;
Fig. 4 is the flow diagram of another process management method provided by the embodiments of the present application;
Fig. 5 is the flow diagram of another process management method provided by the embodiments of the present application;
Fig. 6 is a kind of logical construction schematic diagram of management of process device provided by the embodiments of the present application;
Fig. 7 is a kind of entity structure schematic diagram of management of process device provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Referring to Figure 1, Fig. 1 is the network architecture schematic diagram using the embodiment of the present application.The network architecture schematic diagram includes Server 101, user terminal 102 and user 103.It should be noted that each in network architecture schematic diagram shown in FIG. 1 sets Standby quantity and form does not constitute the restriction to the embodiment of the present application for illustrating.
Wherein, user terminal 102 can be personal computer shown in FIG. 1 (personal computer, PC), notes This computer or smart phone can also be all-in-one machine, palm PC, tablet computer (pad), smart television playback terminal, vehicle-mounted The electronic equipments such as terminal or portable devices.PC end user terminal, such as all-in-one machine etc., operating system may include but unlimited In linux system, Unix system, Windows serial system (such as Windows xp, 7 Windows etc.), Mac OS system X Operating systems such as (operating systems of Apple Computers).Mobile end user terminal, such as smart phone etc., operating system can wrap Include but be not limited to the operating systems such as Android system, IOS (operating system of iPhone), Window system.
Server 101 is similar with general computer architecture, including processor, hard disk, memory, system bus etc., is used for Service is provided for user terminal 102.The server 101 can run on individual equipment, can also run on multiple compositions Cluster, it is not limited here.
User 103 can be the user of practical operation user terminal 102, be also possible to developer.User 103 can be right User terminal 102 is input operation instruction, and is correspondingly operated with controlling the execution of user terminal 102.
Application program can be installed and be run to user terminal 102 in the embodiment of the present application, and server 101 is used to be user The application program that terminal 102 is installed provides application service.Wherein, application program can be multimedia application, page browsing is answered With, instant messaging application, game application etc., it is not limited here.
In the embodiment of the present application, interface is the encapsulation function that user terminal 102 submits call request to server 101. Different interfaces may include payment, inquiry, setting, upload, downloading, brush for handling different types of service, type of service Newly, play etc., it is not limited here.Process is that have the program of certain standalone feature about the primary fortune on some data acquisition system Row activity is the individual that system carries out Resource Distribution and Schedule.
In the embodiment of the present application, the process that server 101 can be included distributes to each interface, then in server 101 when receiving the call request for target interface, and the process by distributing to target interface handles the call request.It can manage The treatment effeciency of call request can be improved by the call request of specified process processing specified interface in solution.
For example, in the scene of multimedia application, first interface is for handling searching service, and second interface is for locating Broadcasting business is managed, third interface is for handling downloading service.As shown in Figure 2 A, server 101 includes first interface corresponding the The corresponding Second processing module of one interface processing module, second interface and the corresponding third interface processing module of third interface.? When user terminal 102 (take the mobile phone as an example and be illustrated) runs the multimedia application, user 103 inputs in the multimedia application For the search instruction of target audio.User terminal 102 receives the search instruction, sends to server 101 and connects for first The call request of mouth.I.e. first interface processing module responds the call request, by the processing in first interface processing module into Journey, which handles the searching request, can be obtained corresponding search result.As shown in Figure 2 B, first interface processing module is to user terminal 102 Obtained search result is sent, user terminal 102 shows the search result.
In certain embodiments, server 101 can retain idle process, that is, be not yet assigned to the process of either interface.The sky When not busy process can be used for too long interface response time or response failure, which is distributed to by server 101.
The embodiment of the present application provides a kind of process management method, device and computer readable storage medium, and process can be improved Utilization rate.
The management of process device of the embodiment of the present application can be the application program on server, for in server into Journey is managed.
The detailed process of process management method provided by the embodiments of the present application is further illustrated below.
Referring to Fig. 3, Fig. 3 is a kind of flow diagram of process management method disclosed by the embodiments of the present invention.Such as Fig. 3 institute Show, this method may include step 301-304, and above-mentioned steps 301-304 can be filled by the management of process in server or server Set execution.Wherein:
301: obtaining the time to be processed of first interface.
In the embodiment of the present application, without limitation for first interface, can be following processing payment, inquiry, setting, on One of the types of service such as biography, downloading, refreshing, broadcasting interface.Time to be processed refers to that first interface is completed current call and asked Seek corresponding processing time span.
In a kind of possible embodiment, step 301 specifically includes following steps S11-S13.
S11, processed first request amount of the corresponding treatment progress of first interface in preset period of time is obtained, and obtained pre- If the operating status for the treatment of progress in the period.
Wherein, preset period of time can be access peak period, is also possible to access offpeak period, can also be any operative Period etc., it is not limited here.First request amount refers to the corresponding treatment progress of first interface, processed in preset period of time The quantity of call request.
Operating status refers in preset period of time, the fortune of server when the corresponding treatment progress of first interface executes call request Market condition.Operating status may include the execution duration of server system, EMS memory occupation, memory peak value, central processing unit (Central Processing Unit, CPU) utilization rate, graphics processor (Graphics Processing Unit, GPU) Utilization rate etc., it is not limited here.
Method of the application for obtaining operating status without limitation, is asked for example, executing duration and can be executed to call by process Difference between the deadline and time started asked obtains.It is completed for another example EMS memory occupation can execute call request by process When server using memory size and execute call request start when using between memory size difference obtain, or It is obtained according to the free memory size in implementation procedure or using the average value between memory size.In another example memory peak value can By according to the free memory size in implementation procedure or maximum value acquisition between use memory size etc..
S12, the treatment effeciency that first interface is obtained according to the first request amount and operating status.
Wherein, treatment effeciency refers to the quantity for the call request that first interface can be handled within the unit time.The application couple Without limitation in the method for obtaining treatment effeciency according to the first request amount and operating status, operating status can be given a mark to obtain The evaluation of estimate for the treatment of progress in preset period of time, the quotient that the first request amount is obtained divided by preset period of time is as single in preset period of time The quantity of position time processed call request, assesses to obtain treatment effeciency the quotient further according to evaluation of estimate.Namely It says, the load level of the processing quantity of the corresponding treatment progress of first interface in preset period of time and server is subjected to COMPREHENSIVE CALCULATING Obtain operational efficiency.In this way, the accuracy for obtaining treatment effeciency can be improved.
S13, the time to be processed that first interface is obtained according to corresponding second request amount of first interface and treatment effeciency.
Wherein, the second request amount refers to the quantity for the call request that current first interface receives.The application can be by second The quotient that request amount is obtained divided by treatment effeciency is as the time to be processed.
It is appreciated that obtaining the place of first interface by the first request amount and operating status in above-mentioned steps S11-S13 Efficiency is managed, the time to be processed of first interface is obtained further according to the treatment effeciency of the second request amount and first interface.In this way, can mention Height obtains the accuracy of time to be processed.
In the embodiment of the present application, the execution of step 301 may include following three kinds of embodiments.
The first embodiment, receive client transmission be directed to first interface call request when, execution step 301。
It is appreciated that server receive client transmission be directed to first interface call request when, acquisition first The time to be processed of interface can determine whether to need to increase with the deadline of the corresponding treatment progress of the current first interface of determination Add treatment progress.If so, the speed of response of the interface can be improved after the treatment progress for increasing the interface.
Second of embodiment executes step 301 when preset duration reaches.
Wherein, preset duration is without limitation.It is appreciated that obtaining the to be processed of first interface when preset duration reaches Time.That is, timing the deadline of the treatment progress of first interface is monitored, with judge whether need increase or Reduce treatment progress.If so, redistributing the corresponding process of interface, the utilization rate of process can be improved.
The third embodiment executes step 301 when first grade of service of first interface is greater than grade threshold.
In the embodiment of the present application, when server is run, process, i.e. priority processing are distributed according to the height of the grade of service The call request of the high interface of the grade of service.First grade of service is used to describe the priority of first interface processing call request.
In a kind of possible embodiment, the type of service of first interface is obtained;First interface is obtained according to type of service First grade of service.
Wherein, type of service is as previously described, it may include payment, inquiry, setting, upload, downloading, refresh, play etc..It can be with Understanding, different interfaces corresponds to different types of service, such as: the type of service of first interface is searching service, second interface Type of service be broadcasting business, the type of service of third interface is downloading service.
The description form of the application grade of service without limitation, can be used number and be described, and number is bigger, indicate business Higher grade.The grade of service can be obtained according to the relationship of type of service and time.Such as, if it needs to complete in real time to correspond to Multiple time dimensions such as real-time, response time.Therefore, the corresponding evaluation of estimate of each time dimension, then root can be obtained respectively It is weighted to obtain business score according to the corresponding evaluation of estimate of each time dimension and preset weights, then by the business score pair The accuracy for obtaining the grade of service can be improved in first grade of service of the grade of service answered as the first interface.
As an example it is assumed that it is real-time and response time, downloading service difference that multiple time dimensions, which include time dimension, Evaluation of estimate corresponding with real-time and response time is 0.6,0.7, and payment transaction is corresponding with real-time and response time respectively Evaluation of estimate is 0.9,0.9.If real-time and the corresponding preset weights of response time are respectively 0.5,0.5, downloading service is corresponding Business score be 0.65, the corresponding business score of payment transaction be 0.5.Referring again to table 1, it is known that the corresponding business of downloading service Grade is 2, and the corresponding grade of service of payment transaction is 3.
Table 1
Business score The grade of service
[0,0.4) 1
[0.4,0.7) 2
[0.7,1] 3
In this embodiment, first grade of service that first interface is obtained according to the type of service of first interface, can be improved Obtain the accuracy of the grade of service.
The application for grade threshold without limitation.It is appreciated that in the third embodiment, in first grade of service When greater than grade threshold, the time to be processed of first interface is obtained.In this way, the higher interface of the grade of service can preferentially be determined whether It needs to increase treatment progress, if so, the speed of response of the interface can be improved after the treatment progress for increasing the interface.
It should be noted that above-mentioned three kinds of embodiments do not constitute the restriction to the embodiment of the present application, in practical application, Step 301 can also be executed using other embodiments.
302, when the time to be processed being greater than the time threshold of first interface, first grade of service of first interface is obtained.
Wherein, the description that can refer to the third embodiment in step 301 for the method for obtaining first grade of service, This is repeated no more.
The application for first interface time threshold without limitation, can be obtained according to pre-set data form It takes.As shown in table 2, the time threshold of first interface is 1 minute, and the time threshold of second interface is 2 minutes, third interface when Between threshold value be 5 minutes.By table 1 it is found that the time threshold of first interface is 1 minute.
Table 2
Interface Time threshold
First interface 1 minute
Second interface 2 minutes
Third interface 5 minutes
In a kind of possible embodiment, the time threshold of first interface is determined according to first grade of service.
In this embodiment, can be according to the high low setting time threshold of the grade of service, i.e. the grade of service is higher, and time threshold is got over It is small.For example, it is assumed that the corresponding grade of service of downloading service is 2, the corresponding grade of service of payment transaction is 3.Therefore, industry will be downloaded Corresponding time threshold of being engaged in is set as 2 minutes, sets the corresponding time threshold of payment transaction to 10 seconds.
In this embodiment, the time threshold that first interface is determined according to first grade of service of first interface, can be improved The accuracy of time threshold is determined, convenient for improving the validity of management of process.
303, second grade of service of second interface is obtained.
And first interface in the embodiment of the present application, second interface is interface in addition to first interface in server, i.e., Handle the interface of different service types.The third embodiment party in step 301 can refer to for the method for obtaining second grade of service The description of formula, details are not described herein.It should be noted that the quantity of second interface can be multiple.
304, when second grade of service is less than first grade of service, corresponding first process of second interface is distributed to One interface.
In the embodiment of the present application, the first process can be the idle process of second interface, or second interface pair The process of less task amount is distributed in the treatment progress answered, it is not limited here.It should be noted that first process can be Corresponding treatment progress in multiple second interfaces.
In a kind of possible embodiment, the method for determining first interface may include following steps S21-S22.
S21, the increase number of processes that first interface is determined according to time to be processed and time threshold.
Wherein, increase the quantity that number of processes is the first process, that is, be reassigned to the number of the treatment progress of first interface Amount.Time to be processed without limitation, can be obtained quotient divided by time threshold by method of the application for determining increase number of processes Value.If the quotient is integer, using the quotient as target ratio.It, can be by the quotient using four houses five if the quotient is decimal Enter, or directly obtain target ratio into one, which is subtracted 1, then treatment progress corresponding with first interface into Number of passes amount, which is multiplied to obtain, increases number of processes.
For example, the time to be processed of first interface is 2 minutes, time threshold is 1 minute, number of processes is 5, then Quotient is 2, target ratio 2, and increasing number of processes is 5.
It is appreciated that according between time to be processed and time threshold ratio and first interface it is corresponding handle into The process data of journey, which determines, increases number of processes, and the accuracy for determining and increasing number of processes can be improved.
S22, the first process is determined according to the priority and increase number of processes of second interface.
Wherein, for priority for describing the corresponding allocation order of second interface, the lower second interface of priority is easier really It is set to the first process.In a kind of possible embodiment, the method for obtaining the priority of second interface may include following steps S220-S222。
S220, the corresponding idle process quantity of second interface is obtained;
Wherein, idle process quantity is the quantity of the idle process in second interface.
S221, the distance between second interface and first interface are obtained.
Wherein, the distance between second interface and first interface are for describing to distribute to the corresponding process of second interface the The complexity of one interface.The distance between second interface and first interface may include the phase between second interface and first interface Like the physical distance between value and the corresponding interface processing module of second interface and the corresponding interface processing module of first interface Deng.Wherein, similar value can be obtained according to the similar value of the corresponding grade of service of two interfaces.
The application can first obtain similar value and the corresponding interface of second interface between second interface and first interface Manage the physical distance between module and the corresponding interface processing module of first interface.It is corresponding further according to similar value and physical distance Preset weights are weighted to obtain the distance between second interface and first interface with the similar value and physical distance, can Improve the accuracy for obtaining distance.
S222, the priority according to idle process quantity and apart from acquisition second interface.
It is appreciated that in step S220-S222, idle process quantity can indicate the idle degrees of second interface, second The distance between interface and first interface can indicate the complexity that the corresponding process of second interface is distributed to first interface.Cause This, obtains second interface according to the corresponding idle process quantity of second interface and the distance between second interface and first interface The accuracy for obtaining priority can be improved in priority.
The application is for determining the first process according to the priority of second interface and the increase number of processes of first interface The process of the lower second interface of priority without limitation, first can be distributed to first interface by method, if priority lower The quantity of the corresponding treatment progress of two interfaces, which is greater than, increases number of processes, then terminates to distribute.Otherwise, reallocation current priority compared with The process of low second interface is to first interface.
The method for determining the first process can also will increase number of processes according to priority and carry out pro rate.For example, Assuming that including three second interfaces in server, wherein the priority of three second interfaces is respectively 1,2,3, and three second connect The corresponding number of processes of each second interface is 5,4,5 in mouthful.It, can will be in three second interfaces if increasing number of processes is 6 Three treatment progress in second interface that priority is 1 are as the first process, by priority in three second interfaces is 2 the Two treatment progress in two interfaces are as the first process, one in second interface for being 3 by priority in three second interfaces A treatment progress is as the first process.
It is appreciated that in step S21-S22, according to the time to be processed of first interface and time threshold determine this first The increase number of processes of interface, priority and increase number of processes further according to second interface determine the first process.In this way, can mention Height determines the accuracy of the first process.After determining the first process, the first process is distributed into first interface.In this way, can mention The accuracy of high process distribution, convenient for improving the operational efficiency of server.
In process management method as shown in Figure 3, the time of first interface is greater than in the time to be processed of first interface When threshold value, the second industry of the second interface in first grade of service and server of first interface in addition to first interface is obtained Business grade.When second grade of service is less than first grade of service, corresponding first process of second interface is distributed to first and is connect Mouthful.In this way, the corresponding process number of interface is had adjusted by time to be processed and the grade of service, to improve the utilization of process Rate.
Referring to Fig. 4, Fig. 4 is the flow diagram of another process management method disclosed by the embodiments of the present invention.Such as Fig. 4 Shown, this method may include step 401-403, and above-mentioned steps 401-403 can be by the management of process in server or server Device executes.Wherein:
401, the time to be processed of first interface is obtained.
Wherein, step 401 can refer to the description of step 301, and details are not described herein.
402, when the time to be processed being less than or equal to the time threshold of first interface, the first business of first interface is obtained Grade.
Wherein, first grade of service for obtaining first interface can refer to the description of the third embodiment in step 301, This is repeated no more.It is appreciated that indicating the first interface when duration to be processed is less than or equal to the time threshold of first interface Corresponding treatment progress can request in complete call in the time threshold of first interface, then do not need newly-increased treatment progress to first Interface.
403, when first grade of service is less than or equal to grade threshold, corresponding second process of release first interface.
Wherein, grade threshold can refer to the description of the third embodiment in step 301, and details are not described herein.In this Shen Please be in embodiment, the second process can be the idle process in first interface, be also possible to the corresponding treatment progress of first interface The process of the middle less task amount of distribution, it is not limited here.It should be noted that second process can be it is multiple handle into Journey.
In a kind of possible embodiment, is determined according to time to be processed and time threshold and reduce number of processes;According to The priority of each treatment progress and reduction number of processes determine the second process in one interface.
Wherein, the quantity that number of processes is the second process is reduced.The application is for determining the method for reduction number of processes not It limits, the time to be processed can be obtained quotient divided by time threshold.By the number of processes of the corresponding treatment progress of first interface Target value is obtained divided by the quotient, if the target value is decimal, which is reduced number of processes.
For example, the time to be processed of first interface is 0.5 minute, time threshold is 1 minute, number of processes is 5, Then quotient is 0.5, target value 2.5, and reducing number of processes is 2.
It is appreciated that according between time to be processed and time threshold ratio and first interface it is corresponding handle into The process data of journey, which determines, reduces number of processes, and the accuracy for determining and reducing number of processes can be improved.
Method of the application for obtaining the priority of each treatment progress in first interface without limitation, can obtain each The process list and treatment effeciency for the treatment of progress are imitated according to the quantity of the unfinished call request in process list and processing Rate determines corresponding priority.Such as: first interface includes the first treatment progress, second processing process and third treatment progress. Wherein, the process list of the first treatment progress includes 3 unfinished call requests, and treatment effeciency is processing 1 per minute.Second The process list for the treatment of progress includes 2 unfinished call requests, and treatment effeciency is processing 1 per minute.Third treatment progress Process list include 0 unfinished call request, treatment effeciency be per minute processing 2.Therefore, the first processing is calculated The priority of process, second processing process and third treatment progress is respectively 1,3,5.
In this embodiment, determined according to the time to be processed of first interface and time threshold the reduction of the first interface into Number of passes amount determines first interface corresponding second with number of processes is reduced further according to the priority for the treatment of progress each in first interface Process.In this way, the accuracy of process distribution can be improved, convenient for improving the operational efficiency of server.
In process management method as shown in Figure 4, it is less than or equal to first interface in the time to be processed of first interface Time threshold when, obtain first grade of service of first interface.When first grade of service is less than or equal to grade threshold, release Put corresponding second process of first interface.In this way, the corresponding process number of interface is reduced by time to be processed and the grade of service, Then the process of release can be distributed to other interfaces by server, or as standby process for client call, be conducive to improve The utilization rate of process.
Referring to Fig. 5, Fig. 5 is the flow diagram of another process management method disclosed by the embodiments of the present invention.Such as Fig. 5 Shown, this method may include step 501-504, and above-mentioned steps 501-504 can be by the management of process in server or server Device executes.Wherein:
501, the processing capacity of first interface is obtained.
Wherein, the description of first interface can refer to the description of step 301, and details are not described herein.Processing capacity refers to first The quantity of the current desired treatment progress of interface.It should be noted that the step 501 can also refer to three kinds of implementations of step 301 Mode is performed.
In a kind of possible embodiment, step 501 specifically includes following steps S31-S33.
S31, processed first request amount of the corresponding treatment progress of first interface in preset period of time is obtained, and obtained pre- If the operating status for the treatment of progress in the period.
S32, the treatment effeciency that first interface is obtained according to the first request amount and operating status.
Wherein, step S31-S32 can refer to the description of step S11-S12, and details are not described herein.
S33, first interface is obtained according to corresponding second request amount of first interface and process list and treatment effeciency Processing capacity.
Wherein, the second request amount refers to the quantity for the call request that current first interface receives.Process list is for retouching The corresponding completed call request of first interface distribution condition corresponding with unfinished call request is stated, is arranged by the process The completeness of the corresponding treatment progress of first interface known to table.
In step S33, the corresponding unfinished tune of first interface can be obtained according to the corresponding process list of first interface With the quantity of request, then between the quantity and the second request amount and value is calculated, the quotient that this and value are obtained divided by treatment effeciency Value is used as processing capacity.
It is appreciated that obtaining the place of first interface by the first request amount and operating status in above-mentioned steps S31-S33 Efficiency is managed, the processing capacity of first interface is obtained further according to the treatment effeciency of the second request amount, process list and first interface.Such as This, can be improved the accuracy for obtaining processing capacity.
502, when processing capacity is greater than the capacity threshold of first interface, first grade of service of first interface is obtained.
Wherein, first grade of service for obtaining first interface can refer to the description of the third embodiment in step 301, This is repeated no more.The capacity threshold of first interface can be the quantity of the currently contained treatment progress of the first interface, can also To be default capacitance corresponding with first grade of service, wherein first grade of service is higher, and capacity threshold is bigger, does not do herein It limits.
503, second grade of service of second interface is obtained.
In the embodiment of the present application, second interface is the interface in server in addition to first interface.Step 503 can refer to The description of step 303, details are not described herein.
504, when second grade of service is less than first grade of service, corresponding first process of second interface is distributed to One interface.
Wherein, step 504 can refer to the description of step 304, and details are not described herein.
In process management method as shown in Figure 5, it is greater than the capacity threshold of first interface in the processing capacity of first interface When value, the second business of the second interface in first grade of service and server of first interface in addition to first interface is obtained Grade.When second grade of service is less than first grade of service, corresponding first process of second interface is distributed into first interface. In this way, the corresponding process number of interface is had adjusted by processing capacity and the grade of service, to improve the utilization rate of process.
In a kind of possible embodiment, before first grade of service for obtaining first interface, following step can also carry out It is rapid: to obtain the processing evaluation of estimate of first interface;When handling processing threshold value of the evaluation of estimate less than the first process, executes and obtain first The step of first grade of service of interface.
Wherein, processing evaluation of estimate is used to describe the processing status of the first process.In the embodiment of the present application, first is obtained to connect The processing evaluation of estimate of mouth may include following two embodiment.
The first embodiment obtains processing evaluation of estimate according to treatment effeciency.
Wherein, treatment effeciency refers to the quantity for the call request that first interface can be handled within the unit time, and can embody should The disposition of the corresponding treatment progress of first interface.It is appreciated that in the first embodiment, it is corresponding to obtain treatment effeciency Processing evaluation of estimate, can be improved obtain processing evaluation of estimate accuracy.
Second of embodiment obtains the first difference between time to be processed and time threshold, and obtains processing and hold The second difference between amount and capacity threshold;Processing evaluation of estimate is obtained according to the first difference, the second difference and treatment effeciency.
It is appreciated that the first difference, the second difference and treatment effeciency can embody the corresponding treatment progress of the first interface Disposition.In the second embodiment, processing evaluation of estimate is obtained by the first difference, the second difference and treatment effeciency, It can further improve the accuracy for obtaining processing evaluation of estimate.
It should be noted that above two embodiment does not constitute the restriction to the embodiment of the present application, in practical application, The step of first grade of service for obtaining first interface can also be executed using other embodiments.
It is appreciated that by implementing the embodiment, in processing threshold value of the processing evaluation of estimate less than the first process, by industry The corresponding process of interface for the grade of service that business grade is less than first interface distributes to the first interface.In this way, comprehensively considering The processing evaluation of estimate of one process has adjusted the corresponding process number of interface by processing evaluation of estimate and the grade of service, further increases The utilization rate of process.
It is above-mentioned to illustrate the method for the embodiment of the present application, the device of the embodiment of the present application is provided below.
Fig. 6 is please referred to, Fig. 6 is a kind of structural schematic diagram of management of process device provided by the embodiments of the present application, such as Fig. 6 institute Show, above-mentioned apparatus 600, comprising:
Acquiring unit 601 is used to obtain the time to be processed of first interface;It is greater than described first in the time to be processed When the time threshold of interface, first grade of service of the first interface is obtained;Obtain second grade of service of second interface, institute Stating second interface is the interface in server in addition to the first interface;
Administrative unit 602 is used to connect when second grade of service is less than first grade of service by described second Corresponding first process of mouth distributes to the first interface.
In a possible example, the acquiring unit 601 be specifically used for according to the time to be processed and it is described when Between threshold value determine the increase number of processes of the first interface;According to the priority of the second interface and the increase process number Measure first process that determines;First process is distributed into the first interface.
In a possible example, the acquiring unit 601 be also used to obtain the second interface it is corresponding it is idle into Number of passes amount;Obtain the distance between the second interface and the first interface;According to the idle process quantity and it is described away from From the priority for obtaining the second interface.
In a possible example, it is corresponding that the acquiring unit 601 is specifically used for obtaining first interface in preset period of time Processed first request amount for the treatment of progress, and obtain the operating status of the treatment progress in the preset period of time;Root The treatment effeciency of the first interface is obtained according to first request amount and the operating status;It is corresponding according to the first interface The second request amount and the treatment effeciency obtain time to be processed of the first interface.
In a possible example, the acquiring unit 601 is specifically used for obtaining the type of service of the first interface; First grade of service of the first interface is obtained according to the type of service.
In a possible example, described device 600 further include:
Call unit 603 be used for receive client transmission be directed to first interface call request when, or presetting When duration reaches, or when first grade of service is greater than grade threshold, the acquiring unit 601 is called to execute the acquisition first The step of time to be processed of interface.
In a possible example, the administrative unit 602 is also used to be less than or equal to institute in the time to be processed It states time threshold, and when first grade of service is less than or equal to the grade threshold, it is corresponding to discharge the first interface Second process.
In a possible example, the acquiring unit 601 is also used to obtain the processing capacity of the first interface;? When the processing capacity is greater than the capacity threshold of the first interface, the step of the time to be processed for obtaining first interface is executed Suddenly.
In a possible example, the acquiring unit 601 is specifically used for according to the first interface corresponding second Request amount and process list and the treatment effeciency obtain the processing capacity of first interface.
In a possible example, the acquiring unit 601 is also used to obtain the processing evaluation of estimate of the first interface; When the processing evaluation of estimate is less than the processing threshold value of first process, the time to be processed for obtaining first interface is executed The step of.
In a possible example, the acquiring unit 601 is specifically used for obtaining the place according to the treatment effeciency Manage evaluation of estimate.
In a possible example, the acquiring unit 601 be specifically used for obtaining time to be processed and it is described when Between the first difference between threshold value, and obtain the second difference between the processing capacity and the capacity threshold;According to institute It states the first difference, second difference and the treatment effeciency and obtains the processing evaluation of estimate.
The function of management of process device in preceding method embodiment may be implemented in the management of process device, management of process dress Setting each unit execution detailed process may refer to the execution step of information processing unit in preceding method embodiment, herein not It is repeating.
Fig. 7 is please referred to, Fig. 7 is a kind of entity structure schematic diagram of management of process device provided by the embodiments of the present application, should Management of process device 700 includes processor 701, communication interface 702 and memory 703.It processor 701, communication interface 702 and deposits Reservoir 703 can be connected with each other by bus 704, can also be connected otherwise.Acquiring unit 601 shown in fig. 6, The correlation function that administrative unit 602 and call unit 603 are realized can be realized by one or more processors 701.
Wherein, processor 701 include be one or more processors, for example including one or more central processing units, In the case that processor 701 is a CPU, which can be monokaryon CPU, be also possible to multi-core CPU.It applies in the application reality It applies in example, processor 701 realizes Fig. 3, Fig. 4 and embodiment shown in fig. 5 for controlling management of process device.
Communication interface 702 is for realizing the communication between the equipment such as user terminal.
Memory 703 include but is not limited to be random access memory (random access memory, RAM), it is read-only Memory (read-only memory, ROM), Erasable Programmable Read Only Memory EPROM (erasable programmable Read only memory, EPROM) or portable read-only memory (compact disc read-only memory, CD- ROM), the memory 703 is for storing dependent instruction and data.
In the embodiment of the present application, the memory 703 stores computer program, and the computer program includes that program refers to It enables, the processor 701 is configured for calling described program instruction, and above procedure includes the finger for executing following steps It enables:
Obtain the time to be processed of first interface;
When the time to be processed being greater than the time threshold of the first interface, the first industry of the first interface is obtained Business grade;
Obtain second interface second grade of service, the second interface be server in addition to the first interface Interface;
When second grade of service is less than first grade of service, by corresponding first process of the second interface Distribute to the first interface.
Using the embodiment of the present application, the corresponding process number of interface is had adjusted by time to be processed and the grade of service, thus Improve the utilization rate of process.
In a possible example, corresponding first process of the second interface is distributed to described first connects described In terms of mouthful, the instruction in described program is specifically used for executing following operation:
The increase number of processes of the first interface is determined according to the time to be processed and the time threshold;
The first process is determined according to the priority of the second interface and the increase number of processes;
First process is distributed into the first interface.
In a possible example, the instruction in described program is also used to execute following operation:
Obtain the corresponding idle process quantity of the second interface;
Obtain the distance between the second interface and the first interface;
The priority of the second interface is obtained according to the idle process quantity and the distance.
Finger in a possible example, in terms of the time to be processed for obtaining first interface, in described program It enables and is specifically used for executing following operation:
Processed first request amount of the corresponding treatment progress of first interface in preset period of time is obtained, and is obtained described pre- If the operating status of the treatment progress in the period;
The treatment effeciency of the first interface is obtained according to first request amount and the operating status;
According to corresponding second request amount of the first interface and the treatment effeciency obtain the first interface wait locate Manage the time.
In a possible example, in terms of first grade of service for obtaining first interface, in described program Instruction is specifically used for executing following operation:
Obtain the type of service of the first interface;
First grade of service of the first interface is obtained according to the type of service.
Finger in a possible example, before the time to be processed for obtaining first interface, in described program Order is also used to execute following operation:
Receive client transmission be directed to first interface call request when, or preset duration arrival when, or First grade of service be greater than grade threshold when, execute it is described obtain first interface time to be processed the step of.
In a possible example, the instruction in described program is also used to execute following operation:
It is less than or equal to the time threshold in the time to be processed, and first grade of service is less than or equal to institute When stating grade threshold, corresponding second process of the first interface is discharged.
Finger in a possible example, before the time to be processed for obtaining first interface, in described program Order is also used to execute following operation:
Obtain the processing capacity of the first interface;
The processing capacity be greater than the first interface capacity threshold when, execute it is described obtain first interface wait locate The step of managing the time.
In a possible example, in terms of the processing capacity for obtaining the first interface, in described program Instruction is specifically used for executing following operation:
First is obtained according to corresponding second request amount of the first interface and process list and the treatment effeciency to connect The processing capacity of mouth.
Finger in a possible example, before the time to be processed for obtaining first interface, in described program Order is also used to execute following operation:
Obtain the processing evaluation of estimate of the first interface;
It is described processing evaluation of estimate be less than first process processing threshold value when, execute it is described obtain first interface to The step of handling the time.
In a possible example, in terms of the processing evaluation of estimate for obtaining the first interface, in described program Instruction be specifically used for executing following operation:
The processing evaluation of estimate is obtained according to the treatment effeciency.
In a possible example, in terms of the processing evaluation of estimate for obtaining the first interface, in described program Instruction be specifically used for executing following operation:
Obtain the first difference between the time to be processed and the time threshold, and obtain the processing capacity and The second difference between the capacity threshold;
The processing evaluation of estimate is obtained according to first difference, second difference and the treatment effeciency.
The embodiment of the present application also provides a kind of computer readable storage medium, which has meter Calculation machine program, the computer program include program instruction, which makes management of process when being executed by management of process device Device executes above method embodiment.
It should be noted that for simple description, therefore, it is stated as a systems for each embodiment of the method above-mentioned The combination of actions of column, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described, because For according to the present invention, certain some step can be performed in other orders or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily this hair Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in some embodiment Part, reference can be made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory It may include: flash disk, ROM, RAM, disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, to sum up, the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of process management method characterized by comprising
Obtain the time to be processed of first interface;
When the time to be processed being greater than the time threshold of the first interface, first business of the first interface etc. is obtained Grade;
Second grade of service of second interface is obtained, the second interface is connecing in addition to the first interface in server Mouthful;
When second grade of service is less than first grade of service, corresponding first process of the second interface is distributed To the first interface.
2. the method according to claim 1, wherein described distribute corresponding first process of the second interface To the first interface, comprising:
The increase number of processes of the first interface is determined according to the time to be processed and the time threshold;
The first process is determined according to the priority of the second interface and the increase number of processes;
First process is distributed into the first interface.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Obtain the corresponding idle process quantity of the second interface;
Obtain the distance between the second interface and the first interface;
The priority of the second interface is obtained according to the idle process quantity and the distance.
4. method according to claim 1-3, which is characterized in that it is described obtain first interface it is to be processed when Between, comprising:
When obtaining processed first request amount of the corresponding treatment progress of first interface in preset period of time, and obtaining described default The operating status of the treatment progress in section;
The treatment effeciency of the first interface is obtained according to first request amount and the operating status;
According to corresponding second request amount of the first interface and the treatment effeciency obtain the first interface it is to be processed when Between.
5. method according to claim 1-3, which is characterized in that first business etc. for obtaining first interface Grade, comprising:
Obtain the type of service of the first interface;
First grade of service of the first interface is obtained according to the type of service.
6. method according to claim 1-3, which is characterized in that it is described obtain first interface it is to be processed when Between before, the method also includes:
When receiving the call request for being directed to first interface of client transmission, or in preset duration arrival, or first The grade of service be greater than grade threshold when, execute it is described obtain first interface time to be processed the step of.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
It is less than or equal to the time threshold in the time to be processed, and first grade of service is less than or equal to described etc. When grade threshold value, corresponding second process of the first interface is discharged.
8. a kind of management of process device characterized by comprising
Acquiring unit, for obtaining the time to be processed of first interface;It is greater than the first interface in the time to be processed When time threshold, first grade of service of the first interface is obtained;Second grade of service of acquisition second interface, described second Interface is the interface in server in addition to the first interface;
Administrative unit, for when second grade of service is less than first grade of service, the second interface to be corresponded to The first process distribute to the first interface.
9. a kind of management of process device, which is characterized in that including processor, communication interface and memory, wherein the memory Computer program is stored, the computer program includes program instruction, and the processor is configured for that described program is called to refer to It enables, executes the method according to claim 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program include program instruction, and described program instruction makes the process pipe when being executed by management of process device Reason device executes the method according to claim 1 to 7.
CN201910351999.7A 2019-04-28 2019-04-28 Process management method, device and computer readable storage medium Active CN110096352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910351999.7A CN110096352B (en) 2019-04-28 2019-04-28 Process management method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910351999.7A CN110096352B (en) 2019-04-28 2019-04-28 Process management method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110096352A true CN110096352A (en) 2019-08-06
CN110096352B CN110096352B (en) 2023-03-31

Family

ID=67446274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910351999.7A Active CN110096352B (en) 2019-04-28 2019-04-28 Process management method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110096352B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080363A (en) * 2022-08-23 2022-09-20 中国中金财富证券有限公司 System capacity evaluation method and device based on service log
CN115495312A (en) * 2022-09-27 2022-12-20 北京百度网讯科技有限公司 Service request processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101946472A (en) * 2008-01-10 2011-01-12 苹果公司 Apparatus and methods for network resource allocation
AU2011244901A1 (en) * 2004-06-24 2011-11-24 X2M Connect Limited Client processor device
CN107534981A (en) * 2015-04-23 2018-01-02 瑞典爱立信有限公司 Resource re-allocation
CN109561134A (en) * 2018-10-26 2019-04-02 平安科技(深圳)有限公司 Electronic device, distributed type assemblies service distribution method and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2011244901A1 (en) * 2004-06-24 2011-11-24 X2M Connect Limited Client processor device
CN101946472A (en) * 2008-01-10 2011-01-12 苹果公司 Apparatus and methods for network resource allocation
CN107534981A (en) * 2015-04-23 2018-01-02 瑞典爱立信有限公司 Resource re-allocation
CN109561134A (en) * 2018-10-26 2019-04-02 平安科技(深圳)有限公司 Electronic device, distributed type assemblies service distribution method and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080363A (en) * 2022-08-23 2022-09-20 中国中金财富证券有限公司 System capacity evaluation method and device based on service log
CN115080363B (en) * 2022-08-23 2022-11-15 中国中金财富证券有限公司 System capacity evaluation method and device based on service log
CN115495312A (en) * 2022-09-27 2022-12-20 北京百度网讯科技有限公司 Service request processing method and device
CN115495312B (en) * 2022-09-27 2023-07-18 北京百度网讯科技有限公司 Service request processing method and device

Also Published As

Publication number Publication date
CN110096352B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN110032447B (en) Method and apparatus for allocating resources
US10348582B1 (en) Providing an instance availability estimate
CN108564269B (en) Distribution task allocation method and device, electronic equipment and computer storage medium
CN106453146B (en) Method, system, device and readable storage medium for allocating private cloud computing resources
CN110138883B (en) Hybrid cloud resource allocation method and device
CN109873868A (en) A kind of computing capability sharing method, system and relevant device
CN110636388A (en) Service request distribution method, system, electronic equipment and storage medium
CN108241535B (en) Resource management method and device and server equipment
CN107343023A (en) Resource allocation methods, device and electronic equipment in a kind of Mesos management cluster
CN110096352A (en) Process management method, device and computer readable storage medium
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
WO2022110796A1 (en) Cloud service request responding method and apparatus, electronic device, and storage medium
CN104239519A (en) Information recommendation method and related equipment and system
CN111988388B (en) Flow distribution method, device, electronic equipment and storage medium
CN109104480A (en) A kind of processing method and processing device of network request
CN111190910B (en) Method and device for processing quota resources, electronic equipment and readable storage medium
CN105511959A (en) Method and device for distributing virtual resource
CN108153494A (en) A kind of I/O request processing method and processing device
CN109426561A (en) A kind of task processing method, device and equipment
CN108572869B (en) Physical host selection method, device, equipment and readable storage medium
CN110347502A (en) Load equilibration scheduling method, device and the electronic equipment of cloud host server
CN113918344A (en) Resource demand allocation method, device, equipment and computer readable medium
WO2017133421A1 (en) Method and device for sharing resources among multiple tenants
CN108399117A (en) A kind of processor occupancy display methods and device
CN113504988A (en) Control method, system, medium and device for system computing power resource scheduling

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