Movatterモバイル変換


[0]ホーム

URL:


CN110096344A - Task management method, system, server cluster and computer-readable medium - Google Patents

Task management method, system, server cluster and computer-readable medium
Download PDF

Info

Publication number
CN110096344A
CN110096344ACN201810088229.3ACN201810088229ACN110096344ACN 110096344 ACN110096344 ACN 110096344ACN 201810088229 ACN201810088229 ACN 201810088229ACN 110096344 ACN110096344 ACN 110096344A
Authority
CN
China
Prior art keywords
task
waiting task
waiting
module
priority
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
CN201810088229.3A
Other languages
Chinese (zh)
Other versions
CN110096344B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN201810088229.3ApriorityCriticalpatent/CN110096344B/en
Publication of CN110096344ApublicationCriticalpatent/CN110096344A/en
Application grantedgrantedCritical
Publication of CN110096344BpublicationCriticalpatent/CN110096344B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Present disclose provides a kind of task management methods, including, obtain waiting task, and the waiting task is stored in waiting task set, waiting task in the waiting task set is added in priority query according to priority orders, the waiting task in the priority query is transferred to message queue in a manner of speed limit, the waiting task is distributed to task processing unit by the message queue, and the waiting task is handled by the task processing unit.In addition, the disclosure additionally provides a kind of task management system, server cluster and computer-readable medium.

Description

Task management method, system, server cluster and computer-readable medium
Technical field
This disclosure relates to Internet technical field, more particularly, to a kind of task management method, system, server setGroup and computer-readable medium.
Background technique
Task execution frame popular at present has: when as elastic-job, LTS task schedule frame (LightTask Schedule), spring cloud task, can complete the execution of task, but all excessively complicated, external rely onIt is more, and cannot very flexible customized Random Task executing rule.
Summary of the invention
In view of this, present disclose provides a kind of task management method, system, server cluster and computer-readable JieMatter.
An aspect of this disclosure provides a kind of task management method, including, obtain waiting task, and will it is described toProcessing task is stored in waiting task set, and the waiting task in the waiting task set is suitable according to prioritySequence is added in priority query, and the waiting task in the priority query is transferred to message queue in a manner of speed limit,The waiting task is distributed to task processing unit by the message queue, and is handled by the task processing unitThe waiting task.
According to the embodiment of the present disclosure, the waiting task by the waiting task set is according to priority ordersBeing added in priority query includes that, by the preset time cycle, will meet the to be processed of condition in the waiting task setPriority query is added according to priority orders in task, wherein the waiting task for meeting condition includes following at least oneKind, the task of not processed mistake in waiting task set, or once executed the task of failure but not up to maximum reattempt times.
According to the embodiment of the present disclosure, the waiting task is executed repeatedly, it is described will be in the waiting task setWaiting task is added in priority query according to priority orders, in the consistent feelings of the priority of multiple waiting tasksUnder condition, according to the time sequencing of the execution time once executed before the multiple waiting task, by the multiple to be processedBusiness be added priority query in, wherein the preceding execution time once executed earlier waiting task prior to preceding primary executionExecute time later waiting task.
It is described to be transferred to the waiting task in the priority query in a manner of speed limit according to the embodiment of the present disclosureMessage queue includes obtaining waiting task by first thread pond, wherein the first thread pond has configuration information, instituteIt states the speed that configuration information obtains waiting task for limiting the first thread pond, including Thread Count, obtains every time wait locateAt least one of the quantity of reason task or time of having a rest, and obtained the first thread pond by the second thread poolWaiting task is transferred to message queue.
According to the embodiment of the present disclosure, the task processing unit handles the waiting task and includes, and determines described wait locateThe task status of reason task identifies, and in the case where task status mark shows that the task is in available mode,Handle the waiting task.
It is described to show that the task is in the feelings of executable state in task status mark according to the embodiment of the present disclosureUnder condition, handling the waiting task includes, and shows the case where task is in available mode in task status markUnder, the state for modifying the waiting task is down state, and handles the waiting task.
According to the embodiment of the present disclosure, the method also includes inciting somebody to action after the down state continues the first preset timeThe task status mark is revised as available mode, wherein first preset time is not less than the place of the waiting taskManage the time.
According to the embodiment of the present disclosure, the method also includes after the waiting task is handled successfully, by the taskStatus indicator is revised as down state, and continues the second preset time.
According to the embodiment of the present disclosure, the method also includes after the waiting task processing failure, by the taskStatus indicator is revised as available mode.
According to the embodiment of the present disclosure, the method also includes showing the status information of the waiting task set, describedAt least one of the status information of message queue or the task status identification information.
According to the embodiment of the present disclosure, the method also includes in response to control instruction, specified waiting task is sentTo task processing unit, the task processing unit is made to handle the specified waiting task.
The embodiment of the present disclosure another aspect provides a kind of task management system, including obtain module, processing module,Speed limit module, distribution module and execution module.Module is obtained, for obtaining waiting task, and by the waiting taskIt is stored in waiting task set.Processing module, for by the waiting task in the waiting task set according to excellentFirst grade sequence is added in priority query.Speed limit module, for will be to be processed in the priority query in a manner of speed limitTask is transferred to message queue.Distribution module, for the waiting task to be distributed at task by the message queueManage unit.Execution module, for handling the waiting task by the task processing unit.
According to the embodiment of the present disclosure, the processing module includes the first processing submodule, for pressing the preset time cycle,Priority query is added according to priority orders in the waiting task for meeting condition in the waiting task set, whereinThe waiting task for meeting condition comprises at least one of the following, the task of not processed mistake in waiting task set, orPerson once executes the task of failure but not up to maximum reattempt times.
According to the embodiment of the present disclosure, the waiting task is executed repeatedly, and the processing module includes second processing submoduleBlock, under the priority unanimous circumstances of multiple waiting tasks, according to once being executed before the multiple waiting taskExecution the time time sequencing, will the multiple waiting task be added priority query in, wherein it is preceding once execute holdThe row time earlier waiting task prior to it is preceding once execute execute time later waiting task.
According to the embodiment of the present disclosure, the speed limit module includes speed limit submodule and transfer submodule.Speed limit submodule is usedWaiting task is obtained in passing through first thread pond, wherein the first thread pond has configuration information, and the configuration information is usedIn the speed for limiting the first thread pond acquisition waiting task, including Thread Count, each quantity for obtaining waiting taskOr at least one of time of having a rest.Submodule is shifted, for obtain the first thread pond by the second thread poolWaiting task is transferred to message queue.
According to the embodiment of the present disclosure, the execution module includes determining that submodule and third handle submodule.Determine submoduleBlock, for determining that the task status of the waiting task identifies.Third handles submodule, for identifying in the task statusIn the case where showing that the task is in available mode, the waiting task is handled.
According to the embodiment of the present disclosure, the third processing submodule is used to show the task in task status markIn the case where available mode, the state for modifying the waiting task is down state, and handles described to be processedBusiness.
According to the embodiment of the present disclosure, the system also includes the first mark modules, for continuing in the down stateAfter first preset time, task status mark is revised as available mode, wherein first preset time is not less than instituteState the processing time of waiting task.
According to the embodiment of the present disclosure, the system also includes the second mark modules, in waiting task processingAfter success, task status mark is revised as down state, and continue the second preset time.
According to the embodiment of the present disclosure, the system also includes third mark modules, in waiting task processingAfter failure, task status mark is revised as available mode.
According to the embodiment of the present disclosure, the system also includes display modules, described for showing following at least one informationThe status information of waiting task set, the status information of the message queue or the task status identification information.
According to the embodiment of the present disclosure, the system also includes control module, in response to control instruction, by it is specified toProcessing task is sent to task processing unit, and the task processing unit is made to handle the specified waiting task.
Another aspect of the present disclosure provides a kind of server cluster, including, one or more processors and one orMultiple storage devices, for storing one or more programs, wherein when one or more of programs are one or more ofWhen processor executes, so that the method that one or more of processors execute above-mentioned any one.
Another aspect of the present disclosure provides a kind of computer-readable medium, is stored thereon with executable instruction, the fingerProcessor is set to execute above-mentioned any one method when order is executed by processor.
Another aspect of the present disclosure provides a kind of computer program, and the computer program, which includes that computer is executable, to be referred toIt enables, described instruction is when executed for realizing the method for above-mentioned any one.
In accordance with an embodiment of the present disclosure, when this method is used to handle the uncertain task generated, there is business structureSimply, the advantage that risk is controllable, scalability and operability are good.This method only needs to can be realized using simple assemblies.Due toThe all unified persistence of task data is in waiting task set, favorable expandability, and can easily adjust waiting taskPriority and task status.Meanwhile speed limit processing task reduces system operation risk.
Detailed description of the invention
By referring to the drawings to the description of the embodiment of the present disclosure, the above-mentioned and other purposes of the disclosure, feature andAdvantage will be apparent from, in the accompanying drawings:
Fig. 1 diagrammatically illustrates the signal of the system architecture of the task management system and method according to the embodiment of the present disclosureFigure;
Fig. 2 diagrammatically illustrates the flow chart of the task management method according to the embodiment of the present disclosure;
Fig. 3 diagrammatically illustrate according to the embodiment of the present disclosure in a manner of speed limit by the priority query wait locateReason task is transferred to the flow chart of message queue;
Fig. 4 diagrammatically illustrates the process that the waiting task is handled according to the task processing unit of the embodiment of the present disclosureFigure;
Fig. 5, which is diagrammatically illustrated, handles the waiting task according to the task processing unit of another embodiment of the disclosureFlow chart;
Fig. 6 diagrammatically illustrates the block diagram of the task management system according to the embodiment of the present disclosure;
Fig. 7 diagrammatically illustrates the block diagram of the processing module according to the embodiment of the present disclosure;
Fig. 8 diagrammatically illustrates the block diagram of the speed limit module according to the embodiment of the present disclosure;
Fig. 9 diagrammatically illustrates the block diagram of the execution module according to the embodiment of the present disclosure;
Figure 10 diagrammatically illustrates the block diagram of the task management system according to another embodiment of the disclosure;And
Figure 11 diagrammatically illustrates the department of computer science according to the embodiment of the present disclosure for realizing task management system and methodThe block diagram of system.
Specific embodiment
Hereinafter, will be described with reference to the accompanying drawings embodiment of the disclosure.However, it should be understood that these descriptions are only exemplary, and it is not intended to limit the scope of the present disclosure.In addition, in the following description, descriptions of well-known structures and technologies are omitted, withAvoid unnecessarily obscuring the concept of the disclosure.
Term as used herein is not intended to limit the disclosure just for the sake of description specific embodiment.It uses hereinThe terms "include", "comprise" etc. show the presence of the feature, step, operation and/or component, but it is not excluded that in the presence ofOr add other one or more features, step, operation or component.
There are all terms (including technical and scientific term) as used herein those skilled in the art to be generally understoodMeaning, unless otherwise defined.It should be noted that term used herein should be interpreted that with consistent with the context of this specificationMeaning, without that should be explained with idealization or excessively mechanical mode.
It, in general should be according to this using statement as " at least one in A, B and C etc. " is similar toField technical staff is generally understood the meaning of the statement to make an explanation (for example, " system at least one in A, B and C "Should include but is not limited to individually with A, individually with B, individually with C, with A and B, with A and C, have B and C, and/orSystem etc. with A, B, C).Using statement as " at least one in A, B or C etc. " is similar to, generally comeSaying be generally understood the meaning of the statement according to those skilled in the art to make an explanation (for example, " having in A, B or C at leastOne system " should include but is not limited to individually with A, individually with B, individually with C, with A and B, have A and C, haveB and C, and/or the system with A, B, C etc.).It should also be understood by those skilled in the art that substantially arbitrarily indicating two or moreThe adversative conjunction and/or phrase of optional project shall be construed as either in specification, claims or attached drawingA possibility that giving including one of these projects, either one or two projects of these projects.For example, phrase " A or B " shouldA possibility that being understood to include " A " or " B " or " A and B ".
Embodiment of the disclosure provides a kind of task management method, and this method is used to handle uncertain generatedWhen business, have the advantages that business structure is simple, risk is controllable, scalability and operability are good.This method is only needed using simpleComponent can be realized.Since all unified persistence of task data is in waiting task set, favorable expandability, and can be easilyAdjust the priority and task status of waiting task.Meanwhile speed limit processing task reduces system operation risk.
Fig. 1 diagrammatically illustrates the signal of the system architecture of the task management system and method according to the embodiment of the present disclosureFigure.It should be noted that being only the example that can apply the application scenarios of the embodiment of the present disclosure shown in Fig. 1, to help this fieldTechnical staff understands the technology contents of the disclosure, but be not meant to the embodiment of the present disclosure may not be usable for other equipment, system,Environment or scene.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network according to this embodiment104 and server 105.Network 104 between terminal device 101,102,103 and server 105 to provide communication linkMedium.Network 104 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send outSend message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 101,102,103(merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packetInclude but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services, such as utilize terminal device 101,102,103 to userThe website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to the use receivedThe data such as family request analyze etc. processing, and by processing result (such as according to user's request or the webpage of generation, believeBreath or data etc.) feed back to terminal device.
It should be noted that task management method provided by the embodiment of the present disclosure can generally be executed by server 105.Correspondingly, task management system provided by the embodiment of the present disclosure generally can be set in server 105.The embodiment of the present disclosureProvided task management method can also by be different from server 105 and can with terminal device 101,102,103 and/or clothesThe server or server cluster that business device 105 communicates execute.Correspondingly, task management system provided by the embodiment of the present disclosureIt can be set in the service that is different from server 105 and can be communicated with terminal device 101,102,103 and/or server 105In device or server cluster.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization needIt wants, can have any number of terminal device, network and server.
Fig. 2 diagrammatically illustrates the flow chart of the task management method according to the embodiment of the present disclosure.
As shown in Fig. 2, this method includes operation S210~S250.
In operation S210, waiting task is obtained, and the waiting task is stored in waiting task set.
In operation S220, priority is added according to priority orders in the waiting task in the waiting task setIn queue.
In operation S230, the waiting task in the priority query is transferred to message queue in a manner of speed limit.
In operation S240, the waiting task is distributed to by task processing unit by the message queue.
In operation S250, the waiting task is handled by the task processing unit.
When this method is used to handle the uncertain task generated, have business structure is simple, risk controllably, scalabilityThe good advantage with operability.This method only needs to can be realized using simple assemblies.Due to all unified persistence of task dataIn waiting task set, favorable expandability, and can easily adjust the priority and task status of waiting task.TogetherWhen, speed limit processing task reduces system operation risk.
According to the embodiment of the present disclosure, in operation S210, the acquisition waiting task, such as can be by with the taskThe waiting task that the associated other systems of management system are sent, is also possible to the needing to repeat of the task, periodically automaticallyWaiting task is added.The waiting task is stored in waiting task set, which for example may be usedTo be stored in relationship/non-relational database, caching, in distributed data system etc..
According to the embodiment of the present disclosure, in operation S220, the waiting task by the waiting task set is pressedBeing added in priority query according to priority orders includes that, by the preset time cycle, will meet in the waiting task setPriority query is added according to priority orders in the waiting task of condition, wherein the waiting task packet for meeting conditionFollowing at least one is included, the task of not processed mistake in waiting task set, or once executed failure but not up to maximum weightTry the task of number.For example, the task in waiting task set described in periodic scanning, the task for the condition that meets is added preferentialGrade queue.It according to the embodiment of the present disclosure, can be identified with reference to task status described below, if task status mark shows thisTask is unavailable, then the task is unsatisfactory for condition, is not added into priority query.
According to the embodiment of the present disclosure, each task has priority data, and it is preferential that this is preferentially added in the high task of priorityIn grade queue, to guarantee first to complete vital task.
According to the embodiment of the present disclosure, the waiting task is executed repeatedly, it is described will be in the waiting task setWaiting task is added in priority query according to priority orders, in the consistent feelings of the priority of multiple waiting tasksUnder condition, according to the time sequencing of the execution time once executed before the multiple waiting task, by the multiple to be processedBusiness be added priority query in, wherein the preceding execution time once executed earlier waiting task prior to preceding primary executionExecute time later waiting task.For example, certain tasks are periodically executed, such as executed per hour once, at thoseWhen partial task in business has same priority, it can be determined that once executed before each task with same-priorityTime, preceding primary relatively first carrying out for task first carry out it relatively in this execution.
According to the embodiment of the present disclosure, in operation S230, by be processed in the priority query in a manner of speed limitBusiness is transferred to message queue, is illustrated below with reference to embodiment illustrated in Figure 3.
Fig. 3 diagrammatically illustrate according to the embodiment of the present disclosure in a manner of speed limit by the priority query wait locateReason task is transferred to the flow chart of message queue.
As shown in figure 3, this method includes operation S310~S320.
In operation S310, waiting task is obtained by first thread pond, wherein the first thread pond, which has, matches confidenceBreath, the configuration information are used to limit the speed that the first thread pond obtains waiting task, including Thread Count, acquisition every timeAt least one of the quantity of waiting task or time of having a rest.Wherein, the time of having a rest includes that two acquisitions are to be processedInterval time between task.
In operation S320, the waiting task that the first thread pond obtains is transferred to by message team by the second thread poolColumn.
This method can effectively limiting processing speed, block message queue will not, reduce system operation risk.Pass throughTwo thread pool control task treatment processes, so that crawl task and the process decoupling for being sent to message queue, enhance systemControllability and scalability.
Referring back to Fig. 2.It will be described to be processed by the message queue in operation S240 according to the embodiment of the present disclosureTask is distributed to task processing unit.According to the embodiment of the present disclosure, task management system may include multiple tasks processing unit,In the task of distribution, system can determine idle task processing unit from multiple tasks processing unit, and will be to be processedTask is distributed to those idle task processing units.
According to the embodiment of the present disclosure, in operation S250, the waiting task is handled by the task processing unit.BelowOperation S250 is illustrated in conjunction with Fig. 4 and embodiment illustrated in Figure 5.
Fig. 4 diagrammatically illustrates the process that the waiting task is handled according to the task processing unit of the embodiment of the present disclosureFigure.
As shown in figure 4, this method includes operation S410~S420.
In operation S410, the task status mark of the waiting task is determined.It, can will not according to the embodiment of the present disclosureOne identification information of available task is loaded into a public space, so that all parts of system can access the information,To determine whether the task is in available mode.For example, when the identification information of a certain task is not present in the public space, tableThe bright task is in available mode, when there are when the identification information of a certain task, show the task in not in the public spaceAvailable mode.According to the embodiment of the present disclosure, which for example can be the memory of computer, alternatively, when the task is handledWhen system is set including distributed system, which can be the distributed memory etc. of the distributed system.
Institute is handled in the case where task status mark shows that the task is in available mode in operation S420State waiting task.
This method can be convenient the state of mark task, and can be used in showing user, facilitate user query and debugging.
Fig. 5, which is diagrammatically illustrated, handles the waiting task according to the task processing unit of another embodiment of the disclosureFlow chart.
As shown in figure 5, this method includes operation S510~S590.
In operation S510, task processing unit is in idle condition.
In operation S520, task processing unit receives waiting task.According to the embodiment of the present disclosure, the waiting taskThe waiting task that can be message queue distribution is also possible to the specified to be processed of control instruction input by user publicationTask.The method of the embodiment of the present disclosure further includes that specified waiting task is sent to task processing in response to control instructionUnit makes the task processing unit handle the specified waiting task.This method provides specified for being immediately performedThe interface of task can be by control instruction by the waiting task so that when needing to be immediately performed a certain waiting taskIt is sent to an idle task processing unit, the task processing unit is made to handle the specified waiting task.
In operation S530, judge whether the waiting task is in available mode, if the waiting task is in availableState then executes operation S540, otherwise ignores the task, returns to operation S510, and waiting receives new task.According to the disclosureEmbodiment can be identified by judging the task status of the task, judge whether the waiting task is in available mode.
In operation S540, the state for modifying the waiting task is down state, and handles the waiting task.The behaviourMake to result in waste of resources to avoid the same task of other task processing units processing.Wherein, which can holdContinuous first preset time, first preset time are not less than the processing time of the waiting task.
In operation S550, judge whether task runs succeeded, if task execution success, jumps to operation S560, otherwiseExecute operation S570.
In operation S560, the state for modifying the waiting task is down state, and continues the second preset time.It shouldOperation can be used for limiting same task and execute in the second later preset time, not reproducible execution.Status modifier is completeCheng Hou, the task are disposed, and return to operation S210, which returns to idle state, wait and receive new appointBusiness.
In operation S570, the state for modifying waiting task is available mode.The operation is for allowing the task by againIt executes, when re-executing, records number of retries.
In operation S580, judge whether number of retries is more than threshold value, in the case where number of retries is more than the threshold value, executesS590 is operated, operation S210 is otherwise returned, the task processing unit is made to return to idle state, waiting receives new task.
In operation S590, prompt is issued.According to the embodiment of the present disclosure, such as it can show a prompt information or issue one and mentionShow sound, to prompt user's task execution to fail and reach maximum reattempt times, the mistake is debugged convenient for user.
According to the embodiment of the present disclosure, the method also includes showing the status information of the waiting task set, describedAt least one of the status information of message queue or the task status identification information.This method is described wait locate by storageSet of tasks is managed into database, so that user checks the state of waiting task set, including collection to be processed in which can be convenientThe quantity of waiting task in conjunction and the details of each waiting task etc..Similarly, the state letter of message queueThe information of waiting task in breath such as message queue, task status identification information are called and are shown in which can be convenient, and are madeThe operating status in the task management system can be checked in real time by obtaining user.
Fig. 6 diagrammatically illustrates the block diagram of the task management system 600 according to the embodiment of the present disclosure.
As shown in fig. 6, the task management system 600 includes obtaining module 610, processing module 620, speed limit module 630, dividingSend out module 640 and execution module 650.
Module 610 is obtained, such as executes the operation S210 described above with reference to Fig. 2, for obtaining waiting task, and willThe waiting task is stored in waiting task set.
Processing module 620, such as the operation S220 described above with reference to Fig. 2 is executed, it is used for the waiting task collectionWaiting task in conjunction is added in priority query according to priority orders.
Speed limit module 630, such as execute the operation S230 that describe above with reference to Fig. 2, in a manner of speed limit will described inWaiting task in priority query is transferred to message queue.
Distribution module 640, such as the operation S240 described above with reference to Fig. 2 is executed, it will for passing through the message queueThe waiting task is distributed to task processing unit.
Execution module 650, such as the operation S250 described above with reference to Fig. 2 is executed, for by the task processing unitHandle the waiting task.
Fig. 7 diagrammatically illustrates the block diagram of the processing module 620 according to the embodiment of the present disclosure.
As shown in fig. 7, the processing module 620 may include in the first processing submodule 710 or second processing submodule 720At least one.
First processing submodule 710 will meet condition in the waiting task set for pressing the preset time cycleWaiting task according to priority orders be added priority query, wherein the waiting task for meeting condition include withLower at least one, the task of not processed mistake in waiting task set, or once executed failure but not up to maximum retries timeSeveral tasks.
Second processing submodule 720, under the priority unanimous circumstances of multiple waiting tasks, according to described morePriority query is added in the multiple waiting task by the time sequencing of the execution time once executed before a waiting taskIn, wherein the preceding execution time once executed, waiting task was later prior to the preceding execution time once executed earlierWaiting task.
Fig. 8 diagrammatically illustrates the block diagram of the speed limit module 630 according to the embodiment of the present disclosure.
As shown in figure 8, the speed limit module 630 includes speed limit submodule 810 and transfer submodule 820.
Speed limit submodule 810, such as the operation S310 described above with reference to Fig. 3 is executed, for being obtained by first thread pondTake waiting task, wherein the first thread pond has configuration information, and the configuration information is for limiting the first threadPond obtain waiting task speed, including Thread Count, every time obtain waiting task quantity or in the time of having a rest extremelyFew one kind.
Submodule 820 is shifted, such as executes the operation S320 described above with reference to Fig. 3, it will for passing through the second thread poolThe waiting task that the first thread pond obtains is transferred to message queue.
Fig. 9 diagrammatically illustrates the block diagram of the execution module 650 according to the embodiment of the present disclosure.
As shown in figure 9, the execution module 650 includes determining that submodule 910 and third handle submodule 920.
It determines submodule 910, such as executes the operation S410 described above with reference to Fig. 4, for determining described to be processedThe task status of business identifies.
Third handles submodule 920, such as executes the operation S420 described above with reference to Fig. 4, in the task shapeIn the case that state mark shows that the task is in available mode, the waiting task is handled.
According to the embodiment of the present disclosure, the third processing submodule 920 is used to show in task status mark describedIn the case that task is in available mode, the state for modifying the waiting task is down state, and is handled described wait locateReason task.
Figure 10 diagrammatically illustrates the block diagram of the task management system 1000 according to another embodiment of the disclosure.
As shown in Figure 10, which can also include the first label on the basis of previous embodimentIn module 1010, the second mark module 1020, third mark module 1030, display module 1040 or control module 1050It is at least one.
First mark module 1010, for after the down state continues the first preset time, by the task shapeState mark is revised as available mode, wherein first preset time is not less than the processing time of the waiting task.
Second mark module 1020, such as the operation S580 described above with reference to Fig. 5 is executed, at described to be processedAfter business is handled successfully, task status mark is revised as down state, and continue the second preset time.
Third mark module 1030, such as the operation S590 described above with reference to Fig. 5 is executed, at described to be processedAfter processing failure of being engaged in, task status mark is revised as available mode.
Display module 1040, for showing following at least one information, the status information of the waiting task set, instituteState message queue status information or the task status identification information.
Control module 1050, in response to control instruction, specified waiting task to be sent to task processing unit,The task processing unit is set to handle the specified waiting task.
It is understood that above-mentioned module may be incorporated in a module and realize or any one module thereinMultiple modules can be split into.Alternatively, at least partly function of one or more modules in these modules can be with otherAt least partly function of module combines, and realizes in a module.According to an embodiment of the invention, in above-mentioned module extremelyFew one can at least be implemented partly as hardware circuit, such as field programmable gate array (FPGA), programmable logic battle array(PLA), system on chip, the system on substrate, the system in encapsulation, specific integrated circuit (ASIC) are arranged, or can be to circuitThe hardware such as any other rational method that is integrated or encapsulating or firmware are carried out to realize, or with software, hardware and firmware threeThe appropriately combined of kind of implementation is realized.Alternatively, at least one of above-mentioned module can at least be implemented partly as countingCalculation machine program module can execute the function of corresponding module when the program is run by computer.
Figure 11 diagrammatically illustrates the department of computer science according to the embodiment of the present disclosure for realizing task management system and methodThe block diagram of system.Computer system shown in Figure 11 is only an example, should not function and use to the embodiment of the present disclosureRange band carrys out any restrictions.
As shown in figure 11, server or server set can be implemented as according to the computer system of the embodiment of the present disclosure 1100Group, including at least one processor 1101 can be according to the program being stored in read-only memory (ROM) 1102 or from depositingIt stores up the program that part 1108 is loaded into random access storage device (RAM) 1103 and executes various movements appropriate and processing.PlaceReason device 1101 for example may include general purpose microprocessor (such as CPU), instruction set processor and/or related chip group and/or speciallyWith microprocessor (for example, specific integrated circuit (ASIC)), etc..Processor 1101 can also include the plate for caching purposesCarry memory.Processor 1101 may include for executing the method stream according to the embodiment of the present disclosure for referring to Fig. 2~Fig. 5 descriptionSingle treatment unit either multiple processing units of the different movements of journey.
In RAM 1103, it is stored with system 1100 and operates required various programs and data.Processor 1101,ROM1102 and RAM 1103 is connected with each other by bus 1104.Processor 1101 is by executing ROM 1102 and/or RAMProgram in 1103 executes the various operations above with reference to Fig. 2~Fig. 5 method according to the embodiment of the present disclosure described.It needsNote that described program also can store in one or more memories in addition to ROM 1102 and RAM 1103.Processor1101 can also be retouched to execute above with reference to Fig. 2~Fig. 5 by executing the program being stored in one or more of memoriesThe various operations for the method according to the embodiment of the present disclosure stated.
In accordance with an embodiment of the present disclosure, system 1100 can also include input/output (I/0) interface 1105, input/output(I/0) interface 1105 is also connected to bus 1104.System 1100 can also include being connected in lower component of I/0 interface 1105It is one or more: the importation 1106 including keyboard, mouse etc.;Including such as cathode-ray tube (CRT), liquid crystal displayAnd the output par, c 1107 of loudspeaker etc. (LCD) etc.;Storage section 1108 including hard disk etc.;And including such as LAN card,The communications portion 1109 of the network interface card of modem etc..Communications portion 1109 executes logical via the network of such as internetLetter processing.Driver 1110 is also connected to I/O interface 1105 as needed.Detachable media 1111, such as disk, CD, magneticCD, semiconductor memory etc. are mounted on as needed on driver 1110, in order to from the computer program read thereonIt is mounted into storage section 1108 as needed.
In accordance with an embodiment of the present disclosure, it may be implemented as computer software journey above with reference to the method for flow chart descriptionSequence.For example, embodiment of the disclosure includes a kind of computer program product comprising carry meter on a computer-readable mediumCalculation machine program, the computer program include the program code for method shown in execution flow chart.In such embodiments,The computer program can be downloaded and installed from network by communications portion 1109, and/or from 1111 quilt of detachable mediaInstallation.When the computer program is executed by processor 1101, the above-mentioned function of limiting in the system of the embodiment of the present disclosure is executed.In accordance with an embodiment of the present disclosure, system as described above, unit, module, unit etc. can pass through computer program moduleTo realize.
It should be noted that computer-readable medium shown in the disclosure can be computer-readable signal media or meterCalculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but notBe limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.MeterThe more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wiresTaking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storageDevice (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journeyThe tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at thisIn open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimitedIn electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer canAny computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used forBy the use of instruction execution system, device or device or program in connection.Include on computer-readable mediumProgram code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentionedAny appropriate combination.In accordance with an embodiment of the present disclosure, computer-readable medium may include above-described ROM 1102And/or one or more memories other than RAM 1103 and/or ROM 1102 and RAM 1103.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journeyThe architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generationA part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or moreExecutable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in boxThe function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practicalOn can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wantsIt is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute ruleThe dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instructionIt closes to realize.
As on the other hand, the disclosure additionally provides a kind of computer-readable medium, which can beIncluded in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculatingMachine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makesObtain the various operations for the method according to the embodiment of the present disclosure that the equipment is executed with reference to Fig. 2~Fig. 5 description.
Embodiment of the disclosure is described above.But the purpose that these embodiments are merely to illustrate that, andIt is not intended to limit the scope of the present disclosure.Although respectively describing each embodiment above, but it is not intended that each realityUse cannot be advantageously combined by applying the measure in example.The scope of the present disclosure is defined by the appended claims and the equivalents thereof.It does not take offFrom the scope of the present disclosure, those skilled in the art can make a variety of alternatives and modifications, these alternatives and modifications should all fall in thisWithin scope of disclosure.

Claims (20)

CN201810088229.3A2018-01-292018-01-29Task management method, system, server cluster and computer readable mediumActiveCN110096344B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810088229.3ACN110096344B (en)2018-01-292018-01-29Task management method, system, server cluster and computer readable medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810088229.3ACN110096344B (en)2018-01-292018-01-29Task management method, system, server cluster and computer readable medium

Publications (2)

Publication NumberPublication Date
CN110096344Atrue CN110096344A (en)2019-08-06
CN110096344B CN110096344B (en)2024-09-20

Family

ID=67441893

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810088229.3AActiveCN110096344B (en)2018-01-292018-01-29Task management method, system, server cluster and computer readable medium

Country Status (1)

CountryLink
CN (1)CN110096344B (en)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110728455A (en)*2019-10-172020-01-24京东数字科技控股有限公司Service processing method, service processing device, storage medium and electronic equipment
CN111179097A (en)*2019-11-282020-05-19泰康保险集团股份有限公司Method and device for warranty correction, electronic equipment and storage medium
CN111858011A (en)*2020-07-312020-10-30深圳大普微电子科技有限公司 A multi-data stream task processing method, device, device and storage medium
CN111857987A (en)*2020-06-192020-10-30苏州浪潮智能科技有限公司 A kind of abnormal task processing method and device based on ICM
CN112231108A (en)*2020-11-022021-01-15网易(杭州)网络有限公司 Task processing method, device, computer-readable storage medium, and server
CN112256458A (en)*2020-11-092021-01-22北京沃东天骏信息技术有限公司Message enqueuing method and device, electronic equipment and computer readable medium
CN112307046A (en)*2020-11-262021-02-02北京金堤征信服务有限公司Data acquisition method and device, computer readable storage medium and electronic equipment
CN112346829A (en)*2019-08-072021-02-09上海云盾信息技术有限公司Method and equipment for task scheduling
CN112379994A (en)*2021-01-072021-02-19武汉中原电子信息有限公司Multidimensional electricity data acquisition and scheduling method and system
CN112685156A (en)*2020-12-282021-04-20北京五八信息技术有限公司Task execution method and device, electronic equipment and computer readable medium
CN112764892A (en)*2019-10-212021-05-07伊姆西Ip控股有限责任公司Method, apparatus and computer program product for managing processes
CN112925623A (en)*2021-02-262021-06-08北京百度网讯科技有限公司Task processing method and device, electronic equipment and medium
CN112965799A (en)*2021-03-052021-06-15北京百度网讯科技有限公司Task state prompting method and device, electronic equipment and medium
CN113239921A (en)*2021-05-102021-08-10上海交大慧谷通用技术有限公司Task grading and distributing method and system for OCR (optical character recognition) service
CN113238861A (en)*2021-05-082021-08-10北京天空卫士网络安全技术有限公司Task execution method and device
CN113344375A (en)*2021-06-012021-09-03北京十一贝科技有限公司Task management method, device, electronic equipment and medium in insurance service process
CN113467906A (en)*2021-06-182021-10-01北京达佳互联信息技术有限公司Picture processing method, device, equipment and storage medium
CN113535420A (en)*2020-04-202021-10-22北京沃东天骏信息技术有限公司Message processing method and device
CN113760482A (en)*2020-06-222021-12-07北京沃东天骏信息技术有限公司Task processing method, device and system
CN114090208A (en)*2021-11-222022-02-25南方电网电力科技股份有限公司Task scheduling method and device for electric energy meter operating system
CN114896083A (en)*2022-05-052022-08-12青岛联众芯云科技有限公司Working method for accessing shared data of power system fusion terminal
CN115150030A (en)*2021-03-312022-10-04北京金山云网络技术有限公司Data processing method, device, electronic equipment, storage medium and system
CN115378142A (en)*2022-10-202022-11-22安徽华速达电子科技有限公司MQTT communication mode-based power load monitoring method and system
CN118051334A (en)*2024-02-242024-05-17珠海市芯动力科技有限公司Data processing method and related device
CN118963935A (en)*2024-07-182024-11-15中科腾龙信息技术有限公司 Task retry method, system, device, computer equipment, readable storage medium and program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20030236815A1 (en)*2002-06-202003-12-25International Business Machines CorporationApparatus and method of integrating a workload manager with a system task scheduler
CN101599027A (en)*2009-06-302009-12-09中兴通讯股份有限公司A kind of thread pool management method and system thereof
CN102253860A (en)*2011-07-132011-11-23深圳市万兴软件有限公司Asynchronous operation method and asynchronous operation management device
CN102377641A (en)*2010-08-112012-03-14高通创锐讯通讯科技(上海)有限公司Realization method for token bucket algorithm
CN103559082A (en)*2013-11-042014-02-05北京华胜天成科技股份有限公司Distributed task scheduling method, device and system based on queues
CN103870348A (en)*2012-12-142014-06-18中国电信股份有限公司Test method and system for concurrent user access
CN106802826A (en)*2016-12-232017-06-06中国银联股份有限公司A kind of method for processing business and device based on thread pool
CN106982268A (en)*2016-01-182017-07-25腾讯科技(北京)有限公司A kind of information processing method and server

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20030236815A1 (en)*2002-06-202003-12-25International Business Machines CorporationApparatus and method of integrating a workload manager with a system task scheduler
CN1469246A (en)*2002-06-202004-01-21�Ҵ���˾Apparatus and method for conducting load balance to multi-processor system
CN101599027A (en)*2009-06-302009-12-09中兴通讯股份有限公司A kind of thread pool management method and system thereof
WO2010145429A1 (en)*2009-06-302010-12-23中兴通讯股份有限公司Method and system for managing thread pool
CN102377641A (en)*2010-08-112012-03-14高通创锐讯通讯科技(上海)有限公司Realization method for token bucket algorithm
CN102253860A (en)*2011-07-132011-11-23深圳市万兴软件有限公司Asynchronous operation method and asynchronous operation management device
CN103870348A (en)*2012-12-142014-06-18中国电信股份有限公司Test method and system for concurrent user access
CN103559082A (en)*2013-11-042014-02-05北京华胜天成科技股份有限公司Distributed task scheduling method, device and system based on queues
CN106982268A (en)*2016-01-182017-07-25腾讯科技(北京)有限公司A kind of information processing method and server
CN106802826A (en)*2016-12-232017-06-06中国银联股份有限公司A kind of method for processing business and device based on thread pool

Cited By (36)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112346829B (en)*2019-08-072023-02-17上海云盾信息技术有限公司Method and equipment for task scheduling
CN112346829A (en)*2019-08-072021-02-09上海云盾信息技术有限公司Method and equipment for task scheduling
CN110728455A (en)*2019-10-172020-01-24京东数字科技控股有限公司Service processing method, service processing device, storage medium and electronic equipment
CN112764892A (en)*2019-10-212021-05-07伊姆西Ip控股有限责任公司Method, apparatus and computer program product for managing processes
CN111179097A (en)*2019-11-282020-05-19泰康保险集团股份有限公司Method and device for warranty correction, electronic equipment and storage medium
CN111179097B (en)*2019-11-282023-07-28泰康保险集团股份有限公司Method, device, electronic equipment and storage medium for modifying warranty
CN113535420A (en)*2020-04-202021-10-22北京沃东天骏信息技术有限公司Message processing method and device
CN111857987A (en)*2020-06-192020-10-30苏州浪潮智能科技有限公司 A kind of abnormal task processing method and device based on ICM
CN111857987B (en)*2020-06-192023-03-24苏州浪潮智能科技有限公司ICM-based abnormal task processing method and device
CN113760482A (en)*2020-06-222021-12-07北京沃东天骏信息技术有限公司Task processing method, device and system
CN111858011A (en)*2020-07-312020-10-30深圳大普微电子科技有限公司 A multi-data stream task processing method, device, device and storage medium
CN112231108A (en)*2020-11-022021-01-15网易(杭州)网络有限公司 Task processing method, device, computer-readable storage medium, and server
CN112256458A (en)*2020-11-092021-01-22北京沃东天骏信息技术有限公司Message enqueuing method and device, electronic equipment and computer readable medium
CN112307046A (en)*2020-11-262021-02-02北京金堤征信服务有限公司Data acquisition method and device, computer readable storage medium and electronic equipment
CN112685156A (en)*2020-12-282021-04-20北京五八信息技术有限公司Task execution method and device, electronic equipment and computer readable medium
CN112685156B (en)*2020-12-282025-01-28北京五八信息技术有限公司 Task execution method, device, electronic device and computer readable medium
CN112379994B (en)*2021-01-072021-04-20武汉中原电子信息有限公司Multidimensional electricity data acquisition and scheduling method and system
CN112379994A (en)*2021-01-072021-02-19武汉中原电子信息有限公司Multidimensional electricity data acquisition and scheduling method and system
CN112925623B (en)*2021-02-262024-05-07北京百度网讯科技有限公司Task processing method, device, electronic equipment and medium
CN112925623A (en)*2021-02-262021-06-08北京百度网讯科技有限公司Task processing method and device, electronic equipment and medium
CN112965799A (en)*2021-03-052021-06-15北京百度网讯科技有限公司Task state prompting method and device, electronic equipment and medium
CN112965799B (en)*2021-03-052023-08-18北京百度网讯科技有限公司 Prompt method, device, electronic device and medium for task state
CN115150030B (en)*2021-03-312024-02-06北京金山云网络技术有限公司Data processing method, device, electronic equipment, storage medium and system
CN115150030A (en)*2021-03-312022-10-04北京金山云网络技术有限公司Data processing method, device, electronic equipment, storage medium and system
CN113238861A (en)*2021-05-082021-08-10北京天空卫士网络安全技术有限公司Task execution method and device
CN113239921A (en)*2021-05-102021-08-10上海交大慧谷通用技术有限公司Task grading and distributing method and system for OCR (optical character recognition) service
CN113344375A (en)*2021-06-012021-09-03北京十一贝科技有限公司Task management method, device, electronic equipment and medium in insurance service process
CN113467906B (en)*2021-06-182024-05-17北京达佳互联信息技术有限公司Picture processing method, device, equipment and storage medium
CN113467906A (en)*2021-06-182021-10-01北京达佳互联信息技术有限公司Picture processing method, device, equipment and storage medium
CN114090208B (en)*2021-11-222023-10-13南方电网电力科技股份有限公司Task scheduling method and device for electric energy meter operating system
CN114090208A (en)*2021-11-222022-02-25南方电网电力科技股份有限公司Task scheduling method and device for electric energy meter operating system
CN114896083A (en)*2022-05-052022-08-12青岛联众芯云科技有限公司Working method for accessing shared data of power system fusion terminal
CN115378142A (en)*2022-10-202022-11-22安徽华速达电子科技有限公司MQTT communication mode-based power load monitoring method and system
CN118051334A (en)*2024-02-242024-05-17珠海市芯动力科技有限公司Data processing method and related device
CN118051334B (en)*2024-02-242024-09-06珠海市芯动力科技有限公司Data processing method and related device
CN118963935A (en)*2024-07-182024-11-15中科腾龙信息技术有限公司 Task retry method, system, device, computer equipment, readable storage medium and program product

Also Published As

Publication numberPublication date
CN110096344B (en)2024-09-20

Similar Documents

PublicationPublication DateTitle
CN110096344A (en)Task management method, system, server cluster and computer-readable medium
US11210131B2 (en)Method and apparatus for assigning computing task
CN109523187A (en)Method for scheduling task, device and equipment
CN110443695A (en)Data processing method and its device, electronic equipment and medium
CN109308214A (en)Data task processing method and system
CN111263176B (en) Loading method, device, terminal, server and storage medium of live room page
CN110442608A (en)Information processing method, device, electronic equipment, medium and system
CN107844371A (en)Task processing method, system and electronic equipment
CN109992406A (en)The method and client that picture requesting method, response picture are requested
CN109241033A (en)The method and apparatus for creating real-time data warehouse
CN109981719A (en)Information processing method and its system, computer system and computer readable medium
CN108804295A (en)log information recording method and device
CN109961331A (en)Page processing method and its system, computer system and readable storage medium storing program for executing
CN109597810A (en)A kind of task cutting method, device, medium and electronic equipment
CN109743245A (en) Method and device for creating a group
CN109992177A (en)User interaction approach, system, electronic equipment and the computer media of electronic equipment
CN109002282A (en)A kind of method and apparatus for realizing animation effect in web page exploitation
CN109960212A (en)Task sending method and device
WO2025092611A1 (en)Information display method and apparatus, and electronic device and storage medium
CN108959636A (en)Data processing method, device, system, computer-readable medium
CN110457124A (en)For the processing method and its device of business thread, electronic equipment and medium
CN109522327A (en)Information generating method, device and system
CN109299124A (en)Method and apparatus for more new model
CN109614549B (en)Method and apparatus for pushed information
CN112784195A (en)Page data publishing method and system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp