CN108132835A - Task requests processing method, device and system based on multi-process - Google Patents
Task requests processing method, device and system based on multi-process Download PDFInfo
- Publication number
- CN108132835A CN108132835A CN201711469723.6A CN201711469723A CN108132835A CN 108132835 A CN108132835 A CN 108132835A CN 201711469723 A CN201711469723 A CN 201711469723A CN 108132835 A CN108132835 A CN 108132835A
- Authority
- CN
- China
- Prior art keywords
- subprocess
- task requests
- pond
- target
- host process
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5011—Pool
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5018—Thread allocation
Abstract
The embodiment of the present invention provides a kind of task requests processing method based on multi-process,Device and system,After the task requests that called side transmission is received by host process,According to the calculation amount or type of service of task requests,Determine the corresponding target subprocess pond of task requests,So as to,Avoid the process of the small calculation amount of process blocking of intensive,The busy condition of each subprocess in target subprocess pond,By the way of load balancing,Distribute target subprocess processing task requests,So as to,Cause the load balancing between multiple subprocess in each process pool,Improve treatment effeciency,Target subprocess is after task requests processing is completed,Handling result is returned into host process,I.e.,It is carried out by the interaction between the subprocess and called side in each subprocess pond by host process,So that session is kept,Improve the reliability of business processing.
Description
Technical field
The present embodiments relate to computer technology more particularly to a kind of task requests processing method based on multi-process,
Device and system.
Background technology
With the rapid development of computer technology, multi-process has obtained extensively because of the advantages of it can improve task treatment effeciency
General application.
In the prior art, after process manager receives the task requests of called side, using polling algorithm or at random
The process of the algorithm allocation processing task requests.
However, using the method for the prior art, the load imbalance between multi-process.
Invention content
The embodiment of the present invention provides a kind of task requests processing method, device and system based on multi-process, existing to solve
There is in technology the problem of load imbalance between multi-process.
In a first aspect, the embodiment of the present invention provides a kind of task requests processing method based on multi-process, applied to mostly into
Thread management system, the multi-process management system include host process and multiple subprocess ponds, including at least in each subprocess pond
One subprocess, the method includes:
The host process receives the task requests that called side is sent;
The host process determines the corresponding target of the task requests according to the calculation amount or type of service of task requests
Subprocess pond, the target subprocess pond are one in the multiple subprocess pond;
The busy condition of each subprocess of the host process in the target subprocess pond, using the side of load balancing
Formula, distribution target subprocess handle the task requests;
The host process receives the handling result for the task requests that the target subprocess returns.
Optionally, the busy condition of each subprocess of the host process in the target subprocess pond, using load
Balanced mode after distribution target subprocess handles the task requests, further includes:
By the busy condition of the target subprocess labeled as busy;
After the host process receives the handling result for the task requests that the target subprocess returns, further include:
The busy condition of the target subprocess is changed to the free time by the host process.
Optionally, the host process determines the task requests pair according to the calculation amount or type of service of task requests
Before the target subprocess pond answered, further include:
The host process creates the multiple subprocess pond according to calculation amount or type of service.
Optionally, the host process determines the task requests pair according to the calculation amount or type of service of task requests
The target subprocess pond answered, including:
The host process is corresponding with the multiple subprocess pond according to the calculation amount or type of service of the task requests
Calculation amount or type of service process matching, determine the subprocess pond to match for corresponding target of the task requests into
Cheng Chi.
Second aspect, the embodiment of the present invention provide a kind of task requests processing unit based on multi-process, applied to mostly into
Thread management system, the multi-process management system include host process and multiple subprocess ponds, including at least in each subprocess pond
One subprocess, described device include:
Receiving module, for receiving the task requests of called side transmission;
Processing module for the calculation amount or type of service according to task requests, determines that the task requests are corresponding
Target subprocess pond, the target subprocess pond are one in the multiple subprocess pond;
The processing module is additionally operable to the busy condition of each subprocess in the target subprocess pond, using negative
Balanced mode is carried, distribution target subprocess handles the task requests;
The receiving module is additionally operable to receive the handling result for the task requests that the target subprocess returns.
Optionally, the processing module is additionally operable to the busy condition of each subprocess in the target subprocess pond,
By the way of load balancing, after distribution target subprocess handles the task requests, by the busy of the target subprocess
Status indication is busy;
The processing module is additionally operable to the receiving module and receives the task requests that the target subprocess returns
After handling result, the busy condition of the target subprocess is changed to the free time.
Optionally, the processing module is additionally operable to
The multiple subprocess pond is created according to calculation amount or type of service.
Optionally, the processing module is specifically used for calculation amount or type of service according to the task requests, with institute
The corresponding calculation amount in multiple subprocess ponds or the matching of type of service process are stated, it is the task to determine the subprocess pond to match
Ask corresponding target subprocess pond.
The third aspect, the embodiment of the present invention provide a kind of multi-process management system, including:
Host process and multiple subprocess ponds include at least one subprocess in each subprocess pond;
The host process is used to perform first aspect any one of them method;
The subprocess is used to receive the task requests that the host process is sent, to task requests process processing, and
The handling result of the task requests is sent to the host process.
5th aspect, the embodiment of the present invention provide a kind of electronic equipment, including:Memory, for storing program instruction;
Processor, for calling and performing the program instruction in the memory, to realize described in any one of first aspect
The task requests processing method based on multi-process.
6th aspect, the embodiment of the present invention provide a kind of readable storage medium storing program for executing, meter are stored in the readable storage medium storing program for executing
Calculation machine program, when at least one processor of the task requests processing unit based on multi-process performs the computer program,
Task requests processing based on multi-process performs task requests processing method of the first aspect any one of them based on multi-process.
Task requests processing method, device and system provided in an embodiment of the present invention based on multi-process, pass through host process
After receiving the task requests that called side is sent, according to the calculation amount or type of service of task requests, task requests pair are determined
The target subprocess pond answered, the busy condition of each subprocess in target subprocess pond, by the way of load balancing, point
Task requests are handled with target subprocess, target subprocess returns to handling result after task requests processing is completed
Host process by the calculation amount or type of service thus according to task requests, determines the corresponding target subprocess pond of task requests,
So as to avoid the process of the small calculation amount of process blocking of intensive, also, selected in this target process pond using load balancing
Target subprocess is selected to the processing of task requests process, thus so that the load between multiple subprocess in each process pool is equal
Weighing apparatus, improve treatment effeciency, also, the interaction between the subprocess and called side for passing through each subprocess pond by host process into
Row so that session is kept, and improves the reliability of business processing.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also
To obtain other attached drawings according to these attached drawings.
Fig. 1 is the schematic diagram that a kind of multi-process provided in an embodiment of the present invention manages system;
Fig. 2 is a kind of flow diagram of the task requests processing method of multi-process provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the task requests processing method of another multi-process provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of the task processing method of another multi-process provided in an embodiment of the present invention;
Fig. 5 provides a kind of structure diagram of the task requests processing unit based on multi-process for the embodiment of the present invention;
Fig. 6 provides the structure diagram of another task requests processing unit based on multi-process for the embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work
Embodiment shall fall within the protection scope of the present invention.
Term " first ", " second ", " third " " in description and claims of this specification and above-mentioned attached drawing
The (if present)s such as four " are the objects for distinguishing similar, and specific sequence or precedence are described without being used for.It should manage
The data that solution uses in this way can be interchanged in the appropriate case, so that the embodiment of the present invention described herein for example can be to remove
Sequence other than those for illustrating or describing herein is implemented.In addition, term " comprising " and " having " and theirs is any
Deformation, it is intended that cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, production
Product or equipment are not necessarily limited to those steps or unit clearly listed, but may include not listing clearly or for this
The intrinsic other steps of processes, method, product or equipment or unit a bit.
The embodiment of the present invention creates multiple subprocess ponds according to calculation amount or type of service, is sent out when calling direction host process
After sending task requests, host process determines the corresponding target of task requests according to the calculation amount or type of service of task requests
Subprocess pond, so as to avoid the process of the small calculation amount of process blocking of intensive;And further, according to target subprocess
The busy condition of each subprocess in pond, by the way of load balancing, distribution target subprocess processing task requests, so as to,
Cause the load balancing between multiple subprocess in each process pool, improve treatment effeciency;And it will appoint in target subprocess
Business request processing complete after, handling result is returned into host process, due to each subprocess pond subprocess with called side
Between interaction all carried out by host process so that session is kept, and improves the reliability of business processing.
Technical scheme of the present invention is described in detail with specifically embodiment below.These specific implementations below
Example can be combined with each other, and the same or similar concept or process may be repeated no more in some embodiments.
Fig. 1 is the schematic diagram that a kind of multi-process provided in an embodiment of the present invention manages system, as shown in Figure 1, the multi-process
Management system includes:Host process and multiple subprocess ponds, process is shown by taking two sub- process pools as an example in Fig. 1, respectively son into
Cheng Chi 1 and subprocess pond 2, wherein, one or more subprocess can be included in each subprocess pond, in each subprocess pond
Comprising the number of subprocess can be the same or different, in this regard, the embodiment of the present invention is not limited, with every height in Fig. 1
Comprising showing for 2 subprocess in process pool, respectively subprocess 1 and subprocess 2.
Each subprocess pond in Fig. 1 can be according to calculation amount or type of service process creation.By taking calculation amount as an example, son into
The calculation amount of Cheng Chi 1 corresponds to first interval, and the calculation amount in subprocess pond 2 corresponds to each in second interval, that is, subprocess pond 1
For handling task requests of the task amount in first interval, each subprocess in subprocess 2 exists subprocess for handling task amount
The task requests of second interval, wherein, the size in each section can be divided according to practical application scene, in this regard, the present invention is implemented
Example is not limited.By taking type of service as an example, the type of service in subprocess pond 1 corresponds to type of service 1, the service class in subprocess pond 2
Type corresponds to type of service 2, it is, each subprocess in subprocess pond 1 is for task of the processing business type for type of service 1
It asks, each subprocess in subprocess pond 2 is for the task requests that processing business type is type of service 2, each subprocess pond
Multiple types of service can also be corresponded to, the number and corresponding specific service class of the corresponding type of service in each subprocess pond
Type can be divided according to practical application scene, in this regard, the embodiment of the present invention is not limited.It in addition to this, can also be by calculation amount
It is combined with type of service and classifies to sub- process pool, such as:The calculation amount in subprocess pond 1 corresponds to first interval, service class
Type corresponds to subprocess in type of service 1, that is, subprocess pond 1 for computational processing in first interval, and type of service
Task requests for type of service 1.
Host process in embodiment illustrated in fig. 1 is used to perform the technical solution of following Fig. 2~Fig. 4 either method embodiments,
Subprocess in subprocess pond is used to receive the task requests that the host process is sent, to task requests process processing, and
The handling result of the task requests is sent to the host process.
Fig. 2 is a kind of flow diagram of the task requests processing method of multi-process provided in an embodiment of the present invention, is applied
In multi-process management system shown in FIG. 1, the method for the present embodiment is as shown in Figure 2:
S201:Host process receives the task requests that called side is sent.
S203:Host process determines the corresponding mesh of the task requests according to the calculation amount or type of service of task requests
Mark subprocess pond.
Wherein, target subprocess pond manages one in multiple subprocess ponds of system for multi-process.
A kind of possible realization method, can be according to uniform resource locator (the Uniform Resource of task requests
Locator, URL) determine the calculation amount or type of service of task requests.
In multi-process management system shown in FIG. 1, each subprocess pond has corresponding calculation amount or type of service;
Therefore, it can be determined from multiple subprocess ponds corresponding with task requests according to calculation amount or type of service
Subprocess pond is as target subprocess pond.
Such as:With reference to Fig. 1, task requests 1 are determined from URL is N with calculation amount, and N is in first interval, therefore, son
The calculation amount of process pool 1 corresponds to first interval, hence, it can be determined that process pool 1 is the target subprocess pond of task requests 1.
Again for example:With reference to Fig. 1, the type of service of task requests 2 is type of service 2, and the type of service in subprocess pond 2 corresponds to
Type of service 2, hence, it can be determined that process pool 2 is the target process pond of task requests 2.
S205:The busy condition of each subprocess of the host process in the target subprocess pond, using load balancing
Mode, distribution target subprocess handle the task requests.
Wherein, the busy condition that host process can determine each subprocess by including but not limited to be implemented as described below mode.
A kind of possible realization method, host process can monitor each subprocess in each subprocess pond in real time by monitor
Busy condition.
Alternatively possible realization method, each process start to process task and processing that host process can be in each subprocess pond
At the time point of completion task, mark the busy condition of each subprocess, and store the busy condition of each subprocess, by searching for side
Formula determines the busy condition of each subprocess.
According to the busy condition of each subprocess, by the way of load balancing, when task requests usually being distributed to the free time
Between apart from the longest subprocess of current time.
Task requests can be passed to target subprocess, and monitor handling result by host process by IPC.
S207:Host process receives the handling result for the task requests that the target subprocess returns.
After target subprocess completes task requests processing, handling result is returned into host process;Host process again will place
Reason result returns to called side.
The present embodiment, after the task requests that called side is sent are received by host process, according to the calculation amount of task requests
Or type of service, determine the corresponding target subprocess pond of task requests, each subprocess in target subprocess pond does
Commonplace state, by the way of load balancing, distribution target subprocess processing task requests, target subprocess is at by task requests
After reason is completed, handling result is returned into host process, by the calculation amount or type of service thus according to task requests, is determined
The corresponding target subprocess pond of task requests, so as to, avoid the process of the small calculation amount of process blocking of intensive, also,
Using load balancing selection target subprocess to the processing of task requests process in this target process pond, thus so that each process
The load balancing between multiple subprocess in pond improves treatment effeciency, also, passes through the subprocess and tune in each subprocess pond
It is all carried out with the interaction between side by host process so that session is kept, and improves the reliability of business processing.
Flow diagrams of the Fig. 3 for the task requests processing method of another multi-process provided in an embodiment of the present invention, Fig. 3
It is on the basis of embodiment shown in Fig. 2, further, after S205, further includes:S206.After S207, further include
S208, as shown in Figure 3.
S201:Host process receives the task requests that called side is sent.
S203:Host process determines the corresponding mesh of the task requests according to the calculation amount or type of service of task requests
Mark subprocess pond.
S205:The busy condition of each subprocess of the host process in the target subprocess pond, using load balancing
Mode, distribution target subprocess handle the task requests.
Wherein, it is described in detail in S201~S205 embodiments shown in Figure 2, details are not described herein again.
S206:Host process is by the busy condition of the target subprocess labeled as busy.
S207:Host process receives the handling result for the task requests that the target subprocess returns.
Wherein, it is described in detail in S207 embodiments shown in Figure 2, details are not described herein again.
S208:The busy condition of the target subprocess is changed to the free time by host process.
Wherein, a kind of possible realization method, host process can be recorded by the modes such as table or bitmap (bitmap)
The busy condition of each subprocess, wherein, the mode of table is as shown in table 1:
Table 1
Subprocess is numbered | Busy condition |
The subprocess 1 in subprocess pond 1 | It is busy |
The subprocess 2 in subprocess pond 1 | It is idle |
For example each bit of the mode of bitmap corresponds to a subprocess, and bit value represents busy for 1, and bit value is represented for 0
Free time, such as:The bitmap in subprocess pond 1 is " 01 ", and the subprocess 1 for representing subprocess pond 1 is free time, the son in subprocess pond 1
Process 2 is busy.
For host process to the maintenance mode of the busy condition of each subprocess, the embodiment of the present invention is not limited.
The present embodiment, by the label of the busy condition to target subprocess, convenient for host process using load balancing into
During the distribution of row subprocess, distribution more rationally.
Fig. 4 be another multi-process provided in an embodiment of the present invention task processing method flow diagram, Fig. 4 be
On the basis of Fig. 2 or embodiment illustrated in fig. 3, further, before S203, further include, as shown in Figure 4:
S201:Host process receives the task requests that called side is sent.
S202:Host process creates the multiple subprocess pond according to calculation amount or type of service.
Wherein, calculation amount either type of service can by count multiple tasks ask calculation amount or type of service into
Row determines.
S203:Host process determines the corresponding mesh of the task requests according to the calculation amount or type of service of task requests
Mark subprocess pond.
Correspondingly, a kind of possible realization method of S203:Host process is according to the calculation amount or industry of the task requests
Service type, calculation amount corresponding with the multiple subprocess pond or the matching of type of service process, determine the subprocess to match
Pond is the corresponding target subprocess pond of the task requests.
S205:The busy condition of each subprocess of the host process in the target subprocess pond, using load balancing
Mode, distribution target subprocess handle the task requests.
S206:Host process is by the busy condition of the target subprocess labeled as busy.
S207:Host process receives the handling result for the task requests that the target subprocess returns.
S208:The busy condition of the target subprocess is changed to the free time by host process.
Wherein, S201, S203, S205, S206, S207, S208 be referring to the detailed description in Fig. 2 or embodiment illustrated in fig. 3,
Details are not described herein again.
The present embodiment creates multiple subprocess ponds by host process according to calculation amount or type of service, so as to so that it is main
Process can determine task requests pair after task requests are received according to the calculation amount or type of service of task requests
The target subprocess pond answered, so as to avoid the process of the small calculation amount of process blocking of intensive.
Fig. 5 provides a kind of structure diagram of the task requests processing unit based on multi-process for the embodiment of the present invention, should
Device is applied to multi-process shown in FIG. 1 and manages system, which includes:Receiving module 501 and processing module 502, wherein, it connects
Receive the task requests that module 501 is used to receive called side transmission;Processing module 502 be used for according to the calculation amounts of task requests or
Type of service, determines the corresponding target subprocess pond of the task requests, and the target subprocess pond is the multiple subprocess
One in pond;The processing module 502 is additionally operable to the busy condition of each subprocess in the target subprocess pond, adopts
With the mode of load balancing, distribution target subprocess handles the task requests;The receiving module 501 is additionally operable to described in reception
The handling result for the task requests that target subprocess returns.
The device of the present embodiment accordingly can be used for performing the technical solution of embodiment of the method shown in Fig. 2, realization principle
Similar, details are not described herein again.
The present embodiment, after the task requests that called side is sent are received by receiving module, processing module please according to task
The calculation amount or type of service asked determine the corresponding target subprocess pond of task requests, each in target subprocess pond
The busy condition of subprocess, by the way of load balancing, distribution target subprocess processing task requests, target subprocess is being incited somebody to action
After task requests processing is completed, handling result is returned into receiving module, since processing module is the meter according to task requests
Calculation amount or type of service determine the corresponding target subprocess pond of task requests, so as to which the process blocking for avoiding intensive is small
The process of calculation amount, also, processing module please to task using load balancing selection target subprocess in this target process pond
Process is asked to handle, so as to so that the load balancing between multiple subprocess in each process pool improves treatment effeciency.
The embodiment of the present invention also provides a kind of task requests processing unit based on multi-process, embodiment shown in Fig. 5
On the basis of, processing module 502 is additionally operable to the busy condition of each subprocess in the target subprocess pond, equal using load
After distribution target subprocess handles the task requests, the busy condition of the target subprocess is labeled as the mode of weighing apparatus
It is busy;The processing module 502 is additionally operable to the receiving module and receives the task requests that the target subprocess returns
After handling result, the busy condition of the target subprocess is changed to the free time.
The device of the present embodiment accordingly can be used for performing the technical solution of embodiment of the method shown in Fig. 3, realize former
Reason, details are not described herein again.
The present embodiment, by processing module to the label of the busy condition of target subprocess, convenient for host process using negative
Carry it is balanced carry out subprocess distribution when, distribution more rationally.
The embodiment of the present invention also provides a kind of task requests processing unit based on multi-process, in above device embodiment
On the basis of, the processing module 502 is additionally operable to create the multiple subprocess pond according to calculation amount or type of service.Accordingly
Ground, processing module 502 is specifically used for calculation amount or type of service according to the task requests, with the multiple subprocess pond
Corresponding calculation amount or the matching of type of service process, it is the corresponding target of the task requests to determine the subprocess pond to match
Subprocess pond.
The device of the present embodiment accordingly can be used for performing the technical solution of embodiment of the method shown in Fig. 4, realization principle
Similar, details are not described herein again.
The present embodiment creates multiple subprocess ponds by processing module according to calculation amount or type of service, so as to so that
For receiving module after task requests are received, processing module can be according to the calculation amount or type of service of task requests, really
The corresponding target subprocess pond of task requests is determined, so as to avoid the process of the small calculation amount of process blocking of intensive.
It can be according to task requests processing unit of the above method example based on multi-process in each device embodiment of the present invention
Carry out the division of function module, for example, can correspond to each function divides each function module, can also by two or two with
On function be integrated in a processing module.The form that hardware had both may be used in above-mentioned integrated module is realized, can also be adopted
It is realized with the form of software function module.It should be noted that be to the division of module in various embodiments of the present invention it is schematical,
Only a kind of division of logic function, can there is other dividing mode in actual implementation.
Fig. 6 provides the structure diagram of another task requests processing unit based on multi-process for the embodiment of the present invention,
Including:Memory 61 and processor 62, wherein, memory 61, for storing program instruction, which can be that flash (dodges
It deposits).Processor 62, for calling and performing the program instruction in memory, with realize Fig. 2~Fig. 4 it is any shown in based on more
Each step in the task requests processing method of process.The specific associated description that may refer in previous methods embodiment.
Optionally, memory 61 is either independent or memory 61 is integrated with processor 62.
The embodiment of the present invention also provides a kind of electronic equipment, the electronic equipment be used for perform figure Fig. 2~Fig. 4 it is any shown in
Each step in task requests processing method based on multi-process.
The present invention also provides a kind of readable storage medium storing program for executing, computer program is stored in readable storage medium storing program for executing, when based on more
When at least one processor of the task requests processing unit of process performs the computer program, the task requests based on multi-process
Processing unit performs any methods of Fig. 2~Fig. 4.
The present invention also provides a kind of program product, which includes computer program, which is stored in
In readable storage medium storing program for executing.At least one processor of task requests processing unit based on multi-process can be from readable storage medium storing program for executing
The computer program is read, at least one processor performs the computer program and the task requests based on multi-process is caused to handle dress
Put any methods of implementation Fig. 2~Fig. 4.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Aforementioned program can be stored in a computer read/write memory medium.The journey
Sequence when being executed, performs the step of including above-mentioned each method embodiment;And aforementioned storage medium includes:ROM, RAM, magnetic disc or
The various media that can store program code such as person's CD.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe is described in detail the present invention with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according to
Can so modify to the technical solution recorded in foregoing embodiments either to which part or all technical features into
Row equivalent replacement;And these modifications or replacement, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (11)
1. a kind of task requests processing method based on multi-process, which is characterized in that system is managed applied to multi-process, it is described more
Process management system includes host process and multiple subprocess ponds, at least one subprocess, the side being included in each subprocess pond
Method includes:
The host process receives the task requests that called side is sent;
The host process according to the calculation amount or type of service of task requests, determine corresponding target of the task requests into
Cheng Chi, the target subprocess pond are one in the multiple subprocess pond;
The busy condition of each subprocess of the host process in the target subprocess pond, by the way of load balancing,
It distributes target subprocess and handles the task requests;
The host process receives the handling result for the task requests that the target subprocess returns.
2. according to the method described in claim 1, it is characterized in that, the host process is each in the target subprocess pond
The busy condition of subprocess by the way of load balancing, after distribution target subprocess handles the task requests, also wraps
It includes:
The host process is by the busy condition of the target subprocess labeled as busy;
After the host process receives the handling result for the task requests that the target subprocess returns, further include:
The busy condition of the target subprocess is changed to the free time by the host process.
3. the method according to right will go to 1 or 2, which is characterized in that the host process according to the calculation amounts of task requests or
Person's type of service before determining the corresponding target subprocess pond of the task requests, further includes:
The host process creates the multiple subprocess pond according to calculation amount or type of service.
4. according to the method described in claim 3, it is characterized in that, the host process is according to the calculation amount or industry of task requests
Service type determines the corresponding target subprocess pond of the task requests, including:
The host process is according to the calculation amount or type of service of the task requests, meter corresponding with the multiple subprocess pond
Calculation amount or the matching of type of service process, it is the corresponding target subprocess of the task requests to determine the subprocess pond to match
Pond.
5. a kind of task requests processing unit based on multi-process, which is characterized in that system is managed applied to multi-process, it is described more
Process management system includes host process and multiple subprocess ponds, at least one subprocess, the dress being included in each subprocess pond
Put including:
Receiving module, for receiving the task requests of called side transmission;
Processing module for the calculation amount or type of service according to task requests, determines the corresponding target of the task requests
Subprocess pond, the target subprocess pond are one in the multiple subprocess pond;
The processing module is additionally operable to the busy condition of each subprocess in the target subprocess pond, equal using load
The mode of weighing apparatus, distribution target subprocess handle the task requests;
The receiving module is additionally operable to receive the handling result for the task requests that the target subprocess returns.
6. device according to claim 5, which is characterized in that the processing module is additionally operable to according to the target subprocess
The busy condition of each subprocess in pond, by the way of load balancing, distribution target subprocess handle the task requests it
Afterwards, by the busy condition of the target subprocess labeled as busy;
The processing module is additionally operable to the processing that the receiving module receives the task requests that the target subprocess returns
As a result after, the busy condition of the target subprocess is changed to the free time.
7. the device according to right will go to 5 or 6, which is characterized in that the processing module be additionally operable to according to calculation amount or
Type of service creates the multiple subprocess pond.
8. device according to claim 7, which is characterized in that the processing module is specifically used for according to the task requests
Calculation amount either type of service calculation amount corresponding with the multiple subprocess pond or type of service process matching, determine
The subprocess pond to match is the corresponding target subprocess pond of the task requests.
9. a kind of multi-process manages system, which is characterized in that including:
Host process and multiple subprocess ponds include at least one subprocess in each subprocess pond;
The host process is for execution such as Claims 1 to 4 any one of them method;
The subprocess is used to receive the task requests that the host process is sent, to task requests process processing, and by institute
The handling result for stating task requests is sent to the host process.
10. a kind of electronic equipment, which is characterized in that including:Memory, for storing program instruction;
Processor, for calling and performing the program instruction in the memory, to realize described in any one of Claims 1 to 4
The task requests processing method based on multi-process.
11. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program in the readable storage medium storing program for executing, when based on
When at least one processor of the task requests processing unit of multi-process performs the computer program, the task based on multi-process
Request processing perform claim requirement task requests processing method of 1~4 any one of them based on multi-process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711469723.6A CN108132835A (en) | 2017-12-29 | 2017-12-29 | Task requests processing method, device and system based on multi-process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711469723.6A CN108132835A (en) | 2017-12-29 | 2017-12-29 | Task requests processing method, device and system based on multi-process |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108132835A true CN108132835A (en) | 2018-06-08 |
Family
ID=62393998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711469723.6A Pending CN108132835A (en) | 2017-12-29 | 2017-12-29 | Task requests processing method, device and system based on multi-process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108132835A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109271240A (en) * | 2018-08-05 | 2019-01-25 | 温州职业技术学院 | A kind of process scheduling method based on multicore processing |
CN109327550A (en) * | 2018-11-30 | 2019-02-12 | 网宿科技股份有限公司 | A kind of distribution method of access request, device, storage medium and computer equipment |
CN109460292A (en) * | 2018-10-11 | 2019-03-12 | 东南大学 | Computing resource selection method based on calculation amount difference in wireless cloud computing system |
CN110119267A (en) * | 2019-05-14 | 2019-08-13 | 重庆八戒电子商务有限公司 | The performance improvement method and device of a kind of pair of relationship programming |
CN111176801A (en) * | 2019-07-17 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Multi-process management method, device, equipment and storage medium |
CN111858041A (en) * | 2020-07-10 | 2020-10-30 | 中国联合网络通信集团有限公司 | Data processing method and server |
CN112104679A (en) * | 2019-06-17 | 2020-12-18 | 北京京东尚科信息技术有限公司 | Method, apparatus, device and medium for processing hypertext transfer protocol request |
CN112363847A (en) * | 2020-10-23 | 2021-02-12 | 苏宁金融科技(南京)有限公司 | Automatic identification method and system for license document |
CN112905313A (en) * | 2021-01-21 | 2021-06-04 | 深圳市元征科技股份有限公司 | Task processing method and device and electronic equipment |
CN113296848A (en) * | 2021-06-22 | 2021-08-24 | 中国农业银行股份有限公司 | Service processing method and device |
CN113487900A (en) * | 2021-07-06 | 2021-10-08 | 北京邮电大学 | Asynchronous road information extraction system for satellite images and control method thereof |
CN113938527A (en) * | 2021-08-31 | 2022-01-14 | 阿里巴巴(中国)有限公司 | Extension processing method of API gateway, computing equipment and storage medium |
CN116173495A (en) * | 2023-02-09 | 2023-05-30 | 广州延利网络科技有限公司 | Game progress distribution control method and device, electronic equipment and storage medium |
CN113938527B (en) * | 2021-08-31 | 2024-04-26 | 阿里巴巴(中国)有限公司 | Extension processing method of API gateway, computing device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043675A (en) * | 2010-12-06 | 2011-05-04 | 北京华证普惠信息股份有限公司 | Thread pool management method based on task quantity of task processing request |
CN105763634A (en) * | 2016-04-14 | 2016-07-13 | 北京思特奇信息技术股份有限公司 | Service realization method and device based on TCP long connection |
CN105912386A (en) * | 2016-05-03 | 2016-08-31 | 深圳市永兴元科技有限公司 | Thread management method and system |
US20160301623A1 (en) * | 2011-12-05 | 2016-10-13 | Amazon Technologies, Inc. | Queued workload service in a multi tenant environment |
CN106095585A (en) * | 2016-06-22 | 2016-11-09 | 中国建设银行股份有限公司 | Task requests processing method, device and enterprise information system |
CN106506389A (en) * | 2016-10-19 | 2017-03-15 | 广州华多网络科技有限公司 | Network request asynchronous processing method and device |
-
2017
- 2017-12-29 CN CN201711469723.6A patent/CN108132835A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043675A (en) * | 2010-12-06 | 2011-05-04 | 北京华证普惠信息股份有限公司 | Thread pool management method based on task quantity of task processing request |
US20160301623A1 (en) * | 2011-12-05 | 2016-10-13 | Amazon Technologies, Inc. | Queued workload service in a multi tenant environment |
CN105763634A (en) * | 2016-04-14 | 2016-07-13 | 北京思特奇信息技术股份有限公司 | Service realization method and device based on TCP long connection |
CN105912386A (en) * | 2016-05-03 | 2016-08-31 | 深圳市永兴元科技有限公司 | Thread management method and system |
CN106095585A (en) * | 2016-06-22 | 2016-11-09 | 中国建设银行股份有限公司 | Task requests processing method, device and enterprise information system |
CN106506389A (en) * | 2016-10-19 | 2017-03-15 | 广州华多网络科技有限公司 | Network request asynchronous processing method and device |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109271240A (en) * | 2018-08-05 | 2019-01-25 | 温州职业技术学院 | A kind of process scheduling method based on multicore processing |
CN109460292A (en) * | 2018-10-11 | 2019-03-12 | 东南大学 | Computing resource selection method based on calculation amount difference in wireless cloud computing system |
CN109327550B (en) * | 2018-11-30 | 2022-02-18 | 网宿科技股份有限公司 | Access request distribution method and device, storage medium and computer equipment |
CN109327550A (en) * | 2018-11-30 | 2019-02-12 | 网宿科技股份有限公司 | A kind of distribution method of access request, device, storage medium and computer equipment |
CN110119267A (en) * | 2019-05-14 | 2019-08-13 | 重庆八戒电子商务有限公司 | The performance improvement method and device of a kind of pair of relationship programming |
CN112104679B (en) * | 2019-06-17 | 2024-04-16 | 北京京东尚科信息技术有限公司 | Method, apparatus, device and medium for processing hypertext transfer protocol request |
CN112104679A (en) * | 2019-06-17 | 2020-12-18 | 北京京东尚科信息技术有限公司 | Method, apparatus, device and medium for processing hypertext transfer protocol request |
CN111176801A (en) * | 2019-07-17 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Multi-process management method, device, equipment and storage medium |
CN111176801B (en) * | 2019-07-17 | 2024-04-12 | 腾讯科技(深圳)有限公司 | Multi-process management method, device, equipment and storage medium |
CN111858041B (en) * | 2020-07-10 | 2023-06-30 | 中国联合网络通信集团有限公司 | Data processing method and server |
CN111858041A (en) * | 2020-07-10 | 2020-10-30 | 中国联合网络通信集团有限公司 | Data processing method and server |
CN112363847A (en) * | 2020-10-23 | 2021-02-12 | 苏宁金融科技(南京)有限公司 | Automatic identification method and system for license document |
CN112905313A (en) * | 2021-01-21 | 2021-06-04 | 深圳市元征科技股份有限公司 | Task processing method and device and electronic equipment |
CN113296848A (en) * | 2021-06-22 | 2021-08-24 | 中国农业银行股份有限公司 | Service processing method and device |
CN113487900A (en) * | 2021-07-06 | 2021-10-08 | 北京邮电大学 | Asynchronous road information extraction system for satellite images and control method thereof |
CN113938527A (en) * | 2021-08-31 | 2022-01-14 | 阿里巴巴(中国)有限公司 | Extension processing method of API gateway, computing equipment and storage medium |
CN113938527B (en) * | 2021-08-31 | 2024-04-26 | 阿里巴巴(中国)有限公司 | Extension processing method of API gateway, computing device and storage medium |
CN116173495A (en) * | 2023-02-09 | 2023-05-30 | 广州延利网络科技有限公司 | Game progress distribution control method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108132835A (en) | Task requests processing method, device and system based on multi-process | |
CN112346859B (en) | Resource scheduling method and device, electronic equipment and storage medium | |
CN109582455A (en) | Multithreading task processing method, device and storage medium | |
CN110162388A (en) | A kind of method for scheduling task, system and terminal device | |
CN105912399A (en) | Task processing method, device and system | |
CN108846632A (en) | Thread processing method and device | |
CN106254144A (en) | Fault location platform, Fault Locating Method and device | |
CN106529682A (en) | Method and apparatus for processing deep learning task in big-data cluster | |
CN107153573A (en) | Distributed task scheduling treating method and apparatus | |
CN106980571A (en) | The construction method and equipment of a kind of test use cases | |
CN106325756A (en) | Data storage and data computation methods and devices | |
CN108241531A (en) | A kind of method and apparatus for distributing resource for virtual machine in the cluster | |
CN109324890A (en) | Method for managing resource, device and computer readable storage medium | |
CN108681481A (en) | The processing method and processing device of service request | |
CN109784791A (en) | Order allocation method and device | |
CN105786619A (en) | Virtual machine distribution method and device | |
CN114462849A (en) | Task balanced distribution method and task balanced distribution device | |
CN107357640B (en) | Request processing method and device for multi-thread database and electronic equipment | |
CN107704322A (en) | Ask distribution method and device | |
CN110750517A (en) | Data processing method, device and equipment of local storage engine system | |
CN109740115A (en) | A kind of method, device and equipment for realizing matrix multiplication operation | |
CN116069480B (en) | Processor and computing device | |
CN104184685B (en) | Data center resource distribution method, apparatus and system | |
CN106850822A (en) | Load-balancing method, equipment and distributed system | |
CN107634978A (en) | A kind of resource regulating method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180608 |