CN106250254A - A kind of task processing method and system - Google Patents

A kind of task processing method and system Download PDF

Info

Publication number
CN106250254A
CN106250254A CN201610578726.2A CN201610578726A CN106250254A CN 106250254 A CN106250254 A CN 106250254A CN 201610578726 A CN201610578726 A CN 201610578726A CN 106250254 A CN106250254 A CN 106250254A
Authority
CN
China
Prior art keywords
node
task
message
scheduled operation
processes
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
CN201610578726.2A
Other languages
Chinese (zh)
Other versions
CN106250254B (en
Inventor
陈煜东
张金栋
李斌
刘鑫
曾君亮
黄奕坤
林浩杰
陈佩意
黄荣坚
王旻
李德铠
李力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610578726.2A priority Critical patent/CN106250254B/en
Publication of CN106250254A publication Critical patent/CN106250254A/en
Application granted granted Critical
Publication of CN106250254B publication Critical patent/CN106250254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present invention provides a kind of task processing method and system, wherein, described method includes: n-th processes node obtains the n-th task process message from message channel, and perform the n-th scheduled operation according to described n-th task process message, send feedback message according to the execution result of the n-th scheduled operation to described message channel;When described n-th scheduled operation performs correct, (n+1)th processes node obtains the (n+1)th task process message formed based on described feedback message from described message channel, and performs the (n+1)th scheduled operation according to described (n+1)th task process message;Wherein, described (n+1)th next running node that node is described n-th process node is processed;Described n-th scheduled operation and described (n+1)th scheduled operation are the response operation responding same task requests;Described n is the positive integer less than N;Described N is the total number processing node responding described task requests.

Description

A kind of task processing method and system
Technical field
The present invention relates to field of computer technology, be specifically related to a kind of task processing method and system.
Background technology
More existing include the system that multiple subsystem is mutual, it is common that the execution from the beginning to the end of process, respectively Between individual node is that the context by program calls mutually alternately.But, if a certain during execution task When node performs occur abnormal, system will be unable to obtain abnormal information.During mission failure, data cannot rollback completely;It addition, by Cannot be carried out decoupling between each node, the upgrading of some station code necessarily affects the execution of this task.
Summary of the invention
In view of this, embodiment of the present invention expectation provides a kind of task processing method and system, at least can solve above-mentioned asking One of topic.
The technical scheme is that and be achieved in that:
Embodiments provide a kind of task processing method, be applied to include message channel and connect with message channel In the task processing system of the multiple process nodes connect, described method includes:
N-th processes node obtains the n-th task process message from message channel, and holds according to described n-th task process message Row the n-th scheduled operation, sends feedback message according to the execution result of the n-th scheduled operation to described message channel;Wherein, described N scheduled operation is the described n-th one or more pre-stator operation processing that node performs;
When described n-th scheduled operation performs correct, (n+1)th processes node obtains based on described from described message channel The (n+1)th task that feedback message is formed processes message, and performs the (n+1)th scheduled operation according to described (n+1)th task process message;
Wherein, described (n+1)th next running node that node is described n-th process node is processed;Described n-th scheduled operation It is the response operation responding same task requests with described (n+1)th scheduled operation;Described n is the positive integer less than N;Described N is Respond the total number processing node of described task requests;
When described n-th scheduled operation performs mistake, abnormality processing node obtains based on described from described message channel The abnormal task that feedback message is formed processes message, and processes message execution abnormality processing operation according to described abnormal task.
Embodiments providing a kind of task processing system, described system includes:
Message channel, is used for transmitting message;
N-th processes node, is connected with described message channel, processes message for obtaining the n-th task from described message channel, And process message according to described n-th task and perform the n-th scheduled operation, according to the execution result of the n-th scheduled operation to described message Passage sends feedback message;Wherein, described n-th scheduled operation is the described n-th one or more pre-stator processing that node performs Operation;
(n+1)th processes node, is connected with described message channel, for when described n-th scheduled operation performs correct, from institute State message channel obtains based on described feedback message formed (n+1)th task process message, and according to described (n+1)th task at Reason message performs the (n+1)th scheduled operation;Wherein, described (n+1)th scheduled operation be described (n+1)th process node perform one or Multiple pre-stator operation;Wherein, described (n+1)th next running node that node is described n-th process node is processed;Described n-th Scheduled operation and described (n+1)th scheduled operation are the response operation responding same task requests;Described n is the positive integer less than N; Described N is the total number processing node responding described task requests;
Abnormality processing node, is connected with described message channel, for when described n-th scheduled operation performs mistake, from institute State and message channel obtains the abnormal task process message formed based on described feedback message, and process according to described abnormal task Message performs abnormality processing operation.
Use technical scheme described in the embodiment of the present invention, as the n-th process node and n-th responding same task requests + 1 processes node, and described n-th process node and (n+1)th processes node only need to obtain task process message from message channel, so Process message according to obtaining from message channel of task afterwards and perform corresponding scheduled operation, and perform corresponding to message channel feedback The execution result of scheduled operation, it is not necessary to n-th processes node directly processes node to (n+1)th and sends task and process message, also without Need the n-th process node and (n+1)th to process node mutually to call.Process at node and (n+1)th relative in prior art n-th Reason node is called mutually by the context of program, for system cannot obtain abnormal information when an error occurs, and this Shen Please introduce abnormality processing node be responsible for process anomalous event, due between different disposal node be by message channel transmission disappear Breath rather than processed node by one and be directly given to next process node;The most when an error occurs, this abnormality processing joint Point can obtain the process message of two transmission processed between node from message channel, carries out error analysis;At least solve The system caused because of the close coupling between different disposal node in prior art cannot obtain abnormal information problem.
Accompanying drawing explanation
The task processing method that Fig. 1 provides for the embodiment of the present invention realize schematic flow sheet;
Fig. 2 performs a kind of schematic diagram of a certain task requests for three process nodes that the embodiment of the present invention provides;
A kind of schematic diagram delivering task process message to each process node that Fig. 3 provides for the embodiment of the present invention;
The another kind of schematic diagram delivering task process message to each process node that Fig. 4 provides for the embodiment of the present invention;
Fig. 5 performs the another kind of schematic diagram of a certain task requests for three process nodes that the embodiment of the present invention provides;
Fig. 6 performs the one of the abnormality processing operation of a certain task requests for three process nodes that the embodiment of the present invention provides Plant schematic diagram;
A kind of schematic diagram of the query task implementation status that Fig. 7 embodiment of the present invention provides;
The another kind of schematic diagram of the query task implementation status that Fig. 8 embodiment of the present invention provides;
Fig. 9 processes the signal of message for each task of processing node of debugging node standby that the embodiment of the present invention provides Figure;
The composition structural representation of the task processing system that Figure 10 provides for the embodiment of the present invention;
Figure 11 is for realizing an optional hardware configuration of the server of task processing system in the embodiment of the present invention Schematic diagram;
A kind of hardware architecture diagram of the task processing system that Figure 12 provides for the embodiment of the present invention;
The O&M process structure figure of a kind of task processing system that Figure 13 provides for the embodiment of the present invention.
Detailed description of the invention
The technical solution of the present invention is further elaborated with specific embodiment below in conjunction with the accompanying drawings.
Embodiment one
The embodiment of the present invention provides a kind of task processing method, and described method can be applicable to server side, as it is shown in figure 1, Described method specifically includes that
Step 101: n-th process node from message channel obtain n-th task process message, and according to described n-th task at Reason message performs the n-th scheduled operation, sends feedback message according to the execution result of the n-th scheduled operation to described message channel.
Wherein, described n is the positive integer less than N;Described N is the total number processing node responding a certain task requests.
Wherein, described n-th task process message includes described n-th process node for holding needed for responding a certain task requests The operation gone and the parameter performing described operation correspondence.
Here, the described required operation performed refers to that a certain task requests is required to be performed described n-th process node in order to respond Step.Described parameter refers to that the n-th process node is to respond the required parameter used in step performed of a certain task requests;Its In, described parameter can include the result of the described n-th upper process node processing node.
Such as, the described required content performed includes: the n-th scheduled operation;Described n-th scheduled operation please for responding this task The response operation asked.
Wherein, described n-th scheduled operation is the described n-th one or more pre-stator operation processing that node performs.
It is to say, described n-th process node support performs at least one pre-stator operation, when described n-th processes node When performing different pre-stator operation, different functions can be realized.
For example, having 2 and process node, each process node all can perform multiple pre-stator operation.1st processes joint Point can support two pre-stator operation of S1, S2;Wherein, the pre-stator operation of S1 is for obtaining log-on message, and the pre-stator operation of S2 is root Determine whether to enter certain account system according to authenticating result;2nd processes node and can support two pre-stator operation of S3, S4; Wherein, the pre-stator operation of S3, for authenticate log-on message, returns authenticating result;The pre-stator operation of S4 is for setting up account with close The corresponding relation of code.So, when receiving the task requests of a login account, the 1st processes node and performs the predetermined behaviour of S1 Make, i.e. obtain log-on message;2nd processes node performs S3 scheduled operation, i.e. authenticates described log-on message;2nd processes Node performs S3 scheduled operation, i.e. authenticates described log-on message, returns authenticating result;It is pre-that 3rd process node performs S2 Fixed operation, i.e. determines whether to enter certain account system according to authenticating result.So far, process at node and the 2nd by the 1st Reason node performs corresponding pre-stator operation, can complete this task requests.
In the present embodiment, described message channel processes message for storing each task of processing node, is additionally operable to receive Each processes the feedback message of node.Such as, described message channel includes the various transmission channel such as message queue, data/address bus. Preferably, described message channel includes that message queue, described message queue are the appearances preserving message in the transmitting procedure of message Device.
In an optional embodiment, described message channel includes many sub-message channels, each process node correspondence one Individual sub-message channel, each process node all can obtain from corresponding sub-message channel task process message, and to The sub-message channel of its correspondence sends feedback message;The plurality of sub-message channel is all connected with a total message channel, institute State total message channel and take out feedback message from each sub-message channel, and distribute also to each sub-message channel based on feedback message Transmission task processes message.So, it is separate due to each sub-message channel, it is simple to each process node identification and obtaining Take corresponding task and process message.
Step 102: when described n-th scheduled operation performs correct, (n+1)th processes node obtains from described message channel The (n+1)th task formed based on described feedback message processes message, and processes message execution (n+1)th according to described (n+1)th task Scheduled operation.
Wherein, described (n+1)th scheduled operation is the described (n+1)th one or more pre-stator operation processing that node performs.
Wherein, described (n+1)th next process node that node is described n-th process node is processed;Described n-th scheduled operation It is the response operation responding same task requests with described (n+1)th scheduled operation.
For example, a certain task requests needs A to process node, B processes node, C processes node and worked in coordination with.Each Processing the function achieved by node different, such as, A processes node can perform tri-kinds of scheduled operations of A1, A2, A3, and different is pre- Calmly operate the response results brought different;B processes node can perform tetra-kinds of scheduled operations of B1, B2, B3, B4, and different is predetermined The response results that operation is brought is different;C processes node can perform tri-kinds of scheduled operations of C1, C2, C3, different scheduled operation institutes The response results brought is different.
During as in figure 2 it is shown, perform a certain task requests, A processes node to be needed to perform A3 scheduled operation, and B processes node and needs B2 scheduled operation to be performed, C processes node to be needed to perform C1 scheduled operation;And execution sequence is A3 scheduled operation, the predetermined behaviour of B2 Work, C1 scheduled operation.Therefore, A processes node and obtains A task process message from message channel, when A process node execution A3 is pre- When the execution result of fixed operation is for performing correct, B process node obtains B task from message channel and processes message, when B processes joint Point perform B2 scheduled operation execution result for perform correct time, C process node obtains from message channel C task process disappear Breath, when C processes the execution result of node execution C1 scheduled operation for performing correct, described task requests has performed.
The most for example, task requests 1 needs to use the A process node shown in Fig. 2, B processes node, C processes node, and Need A to process node and perform A3 scheduled operation, need B to process node and perform B2 scheduled operation, need C process node to perform C1 pre- Fixed operation;Task requests 4 needs to use the A process node shown in Fig. 2, B processes node, and it is pre-to need A to process node execution A2 Fixed operation, needs B to process node and performs B1 scheduled operation;If perform task requests 1, A processes node and performs A3 scheduled operation Performing correct, B processes node execution B2 scheduled operation and performs correct, and now C processes node and is in upgrade status, task requests 1 Temporarily cannot complete, and now, owing to processing message by message channel distribution task, can continue after a period of time at C Manage node or process node transmission task process message to standby C.While performing task 1, by message channel at A Reason node distributes the task process message performing A2 scheduled operation, after A process node distribution execution A2 scheduled operation is correct, to B processes node distribution and performs the task process message of B1 scheduled operation.Obviously, the execution of task requests 1 is not constituted performing to appoint The impact of business request 2.
In an optional embodiment, the described execution result according to the n-th scheduled operation sends anti-to described message channel After feedback message, described method also includes:
Control node and judge whether the execution result of described n-th scheduled operation performs correctly based on described feedback message, its In, described feedback message includes the execution result of the n-th scheduled operation;
When described n-th scheduled operation performs correct, task based on described task requests processes inventory to described message Passage sends the (n+1)th task formed based on described feedback message and processes message.
Wherein, described feedback message includes the execution result of described n-th scheduled operation.
Wherein, described (n+1)th task processes message and includes being processed, by described (n+1)th, the (n+1)th scheduled operation that node performs, It is that described control node task based access control process inventory determines that described (n+1)th task processes message.
Wherein, described task processes the N number of described process node that inventory includes performing described task requests, and N number of institute State the execution sequence processing the scheduled operation that node performs.
During as it is shown on figure 3, system receives task requests, formulated task process by controlling node according to described task requests Inventory, and process message based on described task process inventory to each process node distribution task, receive what each process node returned Feedback message;
It is to say, judged that the n-th process node performs the execution result of the n-th scheduled operation and whether performs by controlling node Correctly, described n-th node is processed without its execution result is judged.N-th processes node only needs to process from the n-th task to disappear Breath obtains its scheduled operation to be performed and its execution parameter to be returned, it is not necessary to be concerned about that whom next node come by Operation.
In another optional embodiment, described method also includes:
Described n-th processes node judges whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs correct, then according to the execution result of the n-th scheduled operation to described message channel Feedback first kind message;Wherein, described first kind message includes that described n-th processes the execution result of node, described n-th process joint Point processes node identification and the described task process inventory of the (n+1)th process node that inventory determines according to task;Wherein, institute Task of stating process that inventory includes performing involved by described task requests each process the node identification of node, and described each Process the execution sequence between node and scheduled operation.
As shown in Figure 4, when system receives task requests, formulated task process by controlling node according to described task requests Inventory, by described task process inventory by first process node in message channel transmission to task process inventory, afterwards, The task that the first kind message processing node feeding back by first processes node directly as the next one processes message, by described Message channel sends the next process node specified to first process node, and by that analogy, described control node is without root Determine that the next task of processing node processes message according to the feedback information of each process node.
It is to say, processed node by n-th to judge whether the n-th process node performs the execution result of the n-th scheduled operation Performing correct, according to task process inventory, described n-th processes node determines that the next one processes whom node is, and specify the first kind Message sends to the (n+1)th process node determined by it, and described control node only need to process, according to described n-th, the throwing that node be specified Pass the first kind message after object will encapsulate, task will process message by message channel sending to the (n+1)th process node.
Step 103: when described n-th scheduled operation performs mistake, abnormality processing node obtains from described message channel The abnormal task formed based on described feedback message processes message, and processes message execution abnormality processing according to described abnormal task Operation.
So, process, by a special node that processes, the task requests that execution is abnormal, it is possible to abnormal to processing in time Task requests process.The task requests that execution is abnormal is processed, it is possible to find in time by a special node that processes Perform abnormal problem, also can make reply in time according to this problem.Such as, described abnormality processing node will appear from the place of problem Reason task corresponding to node processes message and processes message by message channel transmission to another standby this task that is able to carry out Process node, so, when the execution result of this standby process node is correct, additionally it is possible to continue executing with this task requests, should Because of middle a certain link, task requests will not occur that mistake stops.
For example, task requests 1, task requests 2 are required to use that the A shown in Fig. 2 processes node, B processes node, C Process node;And it being required to B process node execution B2 scheduled operation, during if performing task requests 1, it is pre-that B processes node execution B2 Fixed operation occurs abnormal, if the data of clean-up task request 1 generation not in time, then affects the implementation progress of task requests 2.And adopt Message is processed, owing in time data produced by task requests 1 being carried out with abnormality processing node special disposal abnormal task Process, the execution of task requests 2 will not be caused big impact.
The most for example, task requests 1 needs to use the A process node shown in Fig. 2, B processes node, C processes node, and Need A to process node and perform A3 scheduled operation, need B to process node and perform B2 scheduled operation, need C process node to perform C1 pre- Fixed operation;During if performing task requests 1, B processes node and performs B2 scheduled operation and occur abnormal, then abnormality processing node can be by Notification message passage processes node to standby B ' and sends task process message, and notice B ' processes node and performs B2 scheduled operation, So, when the execution result that B ' processes node execution B2 scheduled operation is correct, C processes node and can continue to perform the predetermined behaviour of C1 Make, so, task requests 1 will be caused to continue executing with because B processes the execution result mistake of node.
Here, described step 102 and described step 103 are coordination.I.e. after step 101, if when described n-th makes a reservation for When operation performs correct, perform step 102;If when described n-th scheduled operation performs mistake, performing step 103.
In an optional embodiment, the described execution result according to the n-th scheduled operation sends anti-to described message channel After feedback message, described method also includes:
Control node and judge whether the execution result of described n-th scheduled operation performs correctly based on described feedback message, its In, described feedback message includes the execution result of the n-th scheduled operation;
When described n-th scheduled operation performs mistake, control the abnormality processing node in node notice system, by exception Reason node task based access control process inventory sends, to described message channel, the abnormal task process formed based on described feedback message and disappears Breath;Wherein, described task processes the N number of described process node that inventory includes performing described task requests, and N number of described process The execution sequence of the scheduled operation that node performs.
In another optional embodiment, described method also includes:
Described n-th processes node judges whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs occur abnormal, then according to the execution result of the n-th scheduled operation to described message Passage feedback Equations of The Second Kind message;Wherein, described Equations of The Second Kind message includes that described n-th processes the execution result of node, at described n-th Abnormality processing node and described task that reason node determines process inventory;
The abnormality processing node determined by described n-th process node processes inventory to described message channel based on described task Send the abnormal task formed based on described Equations of The Second Kind message and process message.
Here, the abnormality processing node in system can be multiple.
When continuing to perform a certain task requests, A processes node to be needed to perform A3 scheduled operation, and B processes node to be needed to hold Row B2 scheduled operation, C processes node to be needed to perform C1 scheduled operation;And execution sequence is A3 scheduled operation, B2 scheduled operation, C1 Illustrate as a example by scheduled operation.As it is shown in figure 5, A processes node obtains A task process message from message channel, when A process When node performs the execution result of A3 scheduled operation for performing correct, B process node obtains the process of B task from message channel and disappears Breath, when B processes the execution result of node execution B2 scheduled operation for performing correct, C processes node and obtains C from message channel Task processes message, and when C processes the execution result of node execution C1 scheduled operation for performing mistake, abnormality processing node is from institute State message channel obtains and process, based on C, the abnormal task process message that the feedback message of node is formed, and according to described exception Task processes message and performs abnormality processing operation.
In one embodiment, the described abnormal task formed based on described feedback message processes message, including:
Determine each process node needing to perform abnormality processing operation and the order performing abnormality processing.
Such as, described abnormality processing operates, including: produced data will delete during performing described task requests Remove.
So, when reusing same memory space, it is simple to when performing other task requests or re-execute described During task requests, the current task requests performed is interfered by the produced data relevant to described task requests before.
For another example, described abnormality processing operates, including: perform rolling back action.
Here, described rolling back action refers to return to program or data the behavior of last correct status.
When continuing to perform a certain task requests, A processes node to be needed to perform A3 scheduled operation, and B processes node to be needed to hold Row B2 scheduled operation, C processes node to be needed to perform C1 scheduled operation;And execution sequence is A3 scheduled operation, B2 scheduled operation, C1 Illustrate as a example by scheduled operation.Performing the execution result of A3 scheduled operation for execution correctly when A processes node, B processes node The execution result performing B2 scheduled operation is correct for performing, and C processes node and performs the execution result of C1 scheduled operation for perform mistake Mistaking, abnormality processing node obtains from described message channel and processes at the abnormal task of feedback message formation of node based on C Reason message, and process message execution rolling back action operation according to described abnormal task, abnormality processing node is from described message channel Middle acquisition processes, based on C, the abnormal task process message that the feedback message of node is formed, and disappears according to the process of described abnormal task Breath performs abnormality processing operation, and wherein, described abnormal task processes message and includes: C processes node to be needed to perform E1 scheduled operation, B processes node to be needed to perform E1 scheduled operation, and A processes node to be needed to perform E1 scheduled operation;And execution sequence is that C processes joint Point, B process node, A processes node, and wherein, described E1 scheduled operation represents rolling back action;Make a reservation for when C processes node execution E1 During end of operation, it is complete that B processes node execution E1 scheduled operation, when A process node execution E1 scheduled operation is complete, for this The rolling back action of business request completes.
In an optional embodiment, the order of described execution abnormality processing is: occur different with the current task requests that performs Normal process node is starting point, enters according to the inverted order mode of each execution sequence processing node of task requests described in executed Row sequence.
For example, as shown in Figure 6, abnormality processing node obtains from described message channel and processes the anti-of node based on C The abnormal task that feedback message is formed processes message, and according to the process message execution abnormality processing operation of described abnormal task, wherein, Described abnormal task processes message and includes: C processes node to be needed to perform E1 scheduled operation, and B processes node needs execution E1 to make a reservation for Operation, A processes node to be needed to perform E1 scheduled operation;And execution sequence is that C processes node, B processes node, A processes node.As Shown in Fig. 6, C processes node and obtains C abnormal task process message from message channel, performs E1 scheduled operation when C processes node Time complete, B processes node and obtains B abnormal task process message from message channel, when B process node execution E1 scheduled operation is complete Bi Shi, A process node and obtain A abnormal task process message from message channel, when A process node execution E1 scheduled operation is complete Time, the abnormality processing for this task requests has operated.
In such scheme, alternatively, described method also includes:
The result of each process node is sent to storage device, is stored in the described process knot of described storage device Really, for responding the inquiry request of the execution inquiring about described task requests.
In such scheme, alternatively, described method also includes:
When system receives task requests, control node and estimated described task requests required time;
When required time is more than or equal to preset time threshold, for sending the client distribution task of described task requests Identification code;Wherein, described task identification code, for inquiring about the result of described task requests.
So, when the task requests required time completing client transmission is longer, can be that this client distributes one Business identification code, reminds this client can inquire about the execution feelings of this task requests after how long according to this task identification code Condition.
Certainly, in a detailed description of the invention, when required time is less than preset time threshold, not for sending described task The client distribution task identification code of request.
Or, in a detailed description of the invention, for sending the client distribution task identification code of described task requests, but not Described task identification code is sent to described client.
In one embodiment, described method also includes:
The inquiry request that detection client sends;
Respond described inquiry request, send execution state according to the result of storage in described storage device to client Information.
In a detailed description of the invention, the inquiry request that described detection client sends, including: storage device is from client Receive the inquiry request carrying described task identification code.Correspondingly, the described inquiry request of described response, from described storage device Middle acquisition result, including: described storage device, according to described task identification code, is inquired about corresponding with described task identification code Result.Here, described storage device storage has the corresponding relation of task identification code and result.
As it is shown in fig. 7, client M sends the inquiry request about task requests 1 to storage device, storage device receives After inquiry request, from storage device, inquire about the result corresponding with client M task identification code, and return to client M Described execution state information.
So, need not be inquired about by third party, client can directly interact with storage device inquiry, passes through task The result that identification code is asked from storage device query task, facilitates client query, improves query task and performs result Convenience.
In another detailed description of the invention, the inquiry request that described detection client sends, including: predetermined interface is from client End receives the inquiry request of the identification information carrying client.Correspondingly, the described inquiry request of described response, from described storage Equipment obtains result, including: inquire about the result corresponding with described identification information, and return institute to described client State execution state information.Here, described storage device storage has the corresponding relation of client identification information and result.
As shown in Figure 8, customer end A sends the inquiry request about task requests 1 to predetermined interface, and predetermined interface receives After inquiry request, from storage device, inquire about the result corresponding with customer end A identification information, and return institute to customer end A State execution state information.
So, client can not directly interact with storage device inquiry, predetermined interface appoint from storage device inquiry The result of business request, and sent execution state information by predetermined interface to client, owing to client can not set with storage Standby contact, more can improve the safety of the data of storage in storage device.
In such scheme, alternatively, described method also includes:
All process message in described message channel are backed up by debugging node;Wherein, the described process of backup disappears Breath is used for carrying out mistake debugging.
As it is shown in figure 9, debugging node includes the process message of each process node of backup, it is provided that viewing system is transported The window of row, it is simple to staff's exploitation, debugging etc., in debugging node, the process message of backup runs on Debug as will be described In, the program finished is carried out the investigation of leak, eliminates mistake or leak as far as possible.
In technical scheme described in the present embodiment, process as the n-th process node and (n+1)th responding same task requests Node, it is to obtain task from message channel to process message, according to from message that described n-th process node and (n+1)th processes node The task that passage obtains processes message and performs corresponding scheduled operation, it is not necessary to n-th processes node and (n+1)th processes to enter between node Row alternately with call, solve the close coupling problem between different disposal node in prior art, thus also contribute to follow-up right Each processes the maintenance of node;Meanwhile, abnormality processing node the task requests that appearance is abnormal is processed, it is possible to locate in time Manage various abnormal conditions, if realizing the complete rollback of data, will data produced by during performing described task requests Delete.
Embodiment two
Embodiments providing a kind of task processing system, as shown in Figure 10, described system includes:
N-th processes node 10, processes message for obtaining the n-th task from message channel, and processes according to described n-th task Message performs the n-th scheduled operation, sends feedback message according to the execution result of the n-th scheduled operation to described message channel;Wherein, Described n-th scheduled operation is the described n-th one or more pre-stator operation processing that node performs;
(n+1)th processes node 20, for when described n-th scheduled operation performs correct, obtaining from described message channel The (n+1)th task formed based on described feedback message processes message, and processes message execution (n+1)th according to described (n+1)th task Scheduled operation;Wherein, described (n+1)th scheduled operation is the described (n+1)th one or more pre-stator operation processing that node performs;
Wherein, described (n+1)th next running node that node is described n-th process node is processed;Described n-th scheduled operation It is the response operation responding same task requests with described (n+1)th scheduled operation;Described n is the positive integer less than N;Described N is Respond the total number processing node of described task requests.
Abnormality processing node 30, for when described n-th scheduled operation performs mistake, obtaining base from described message channel The abnormal task formed in described feedback message processes message, and processes message execution abnormality processing behaviour according to described abnormal task Make.
In an optional embodiment, described system also includes:
Control node 40, be used for:
Process node described n-th and send feedback message according to the execution result of the n-th scheduled operation to described message channel Afterwards, judge whether the execution result of described n-th scheduled operation performs correctly based on described feedback message, wherein, described feedback Message includes the execution result of the n-th scheduled operation;
When described n-th scheduled operation performs correct, task based on described task requests processes inventory to described message Passage sends the (n+1)th task formed based on described feedback message and processes message;Wherein, described task process inventory includes performing The N number of described process node of described task requests, and the execution sequence of the scheduled operation of N number of described process node execution;
When described n-th scheduled operation performs mistake, notify abnormality processing node 30, by abnormality processing node 30 based on institute Task of stating processes inventory and sends the abnormal task process message formed based on described feedback message to described message channel.
In a detailed description of the invention, described n-th processes node 10, is additionally operable to:
Judge whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs correct, then according to the execution result of the n-th scheduled operation to described message channel Feedback first kind message;Wherein, described first kind message includes that described n-th processes the execution result of node, described n-th process joint Point processes node identification and the described task process inventory of the (n+1)th process node that inventory determines according to task;Wherein, institute Task of stating process that inventory includes performing involved by described task requests each process the node identification of node, and described each Process the execution sequence between node and scheduled operation.
In another detailed description of the invention, described n-th processes node 10, is additionally operable to:
Judge whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs occur abnormal, then according to the execution result of the n-th scheduled operation to described message Passage feedback Equations of The Second Kind message;Wherein, described Equations of The Second Kind message includes that described n-th processes the execution result of node, at described n-th Abnormality processing node and described task that reason node determines process inventory.
In a detailed description of the invention, described abnormality processing node 30, it is additionally operable to:
Determine each process node needing to perform abnormality processing operation and the order performing abnormality processing.
In an optional embodiment, described system also includes:
Storage device 50, for storing the result that each process node sends, is stored in the described of described storage device Result, for responding the inquiry request of the execution inquiring about described task requests.
In an optional embodiment, described system also includes:
Detection node 60, for detecting the inquiry request that client sends;
Responsive node 70, is used for responding described inquiry request, according to the result of storage in described storage device to visitor Family end sends execution state information.
In a detailed description of the invention, described system also includes:
Distribution node 80, is used for:
When receiving task requests, estimate described task requests required time;
When required time is more than or equal to preset time threshold, for sending the client distribution task of described task requests Identification code;Wherein, described task identification code, for inquiring about the result of described task requests.
In a detailed description of the invention, described detection node 60, it is additionally operable to be carried from client reception by storage device There is the inquiry request of described task identification code;
Described responsive node 70, is additionally operable to by described storage device according to described task identification code, inquiry and described The result that business identification code is corresponding.
In another detailed description of the invention, described detection node 60, it is additionally operable to be taken from client reception by predetermined interface Inquiry request with the identification information of client;
Described responsive node 70, is additionally operable to the result that logical described predetermined interface inquiry is corresponding with described identification information, And return described execution state information to described client.
In an optional embodiment, described system also includes:
Debugging node 90, for backing up all process message in described message channel;Wherein, backup is described Process message to be used for carrying out mistake debugging.
It will be appreciated by those skilled in the art that the function of each node in the task processing system of the present embodiment, before can refer to State the associated description of task processing method and understand.
In actual application, above-mentioned n-th processes node 10, (n+1)th processes node 20, abnormality processing node 30, controls node 40, detection node 60, responsive node 70, distribution node 80, the concrete structure of debugging node 90 may both correspond to processor or clothes Business device.The concrete structure of described processor can be central processing unit (CPU, Central Processing Unit), micro-process Device (MCU, Micro Controller Unit), digital signal processor (DSP, Digital Signal Processing) or PLD (PLC, Programmable Logic Controller) etc. have process function electronic devices and components or The set of electronic devices and components.Wherein, described processor includes that executable code, described executable code are stored in storage medium In, described processor can be connected in described storage medium by communication interfaces such as buses, is performing concrete each unit During corresponding function, read from described storage medium and run described executable code.Described storage medium is used for storing described The part of executable code is preferably non-moment storage medium.Described storage device 50 can be various species type memorizer or There is the server of storage function, such as data base.
In actual application, each functional module in task processing system can be collaborative real by the hardware resource in server Existing, as processor etc. calculates resource, the communication resource (communication as supporting to realize various mode) realization.
Figure 11 illustrates an optional hardware architecture diagram of server, including processor 11, input/defeated Outgoing interface 13 (such as display screen, touch screen, speaker), storage medium 14 and network interface 12, assembly can be total through system Line 15 connects communication.Correspondingly, in the storage medium 14 of server 10, storage has for performing appointing of embodiment of the present invention offer The executable instruction of business processing method.
Wherein, described storage medium 14 can be flash memory device, random access memory (RAM, Random Access Memory), read only memory (ROM, Read-Only Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.Preferably, described storage medium 14 can be non-volatile memory medium.
Wherein, processor 11 can be CPU, MCU, DSP, PLC, it is also possible to is to process circuit, such as, special IC (ASIC, Application Specific Integrated Circuits).
Specifically, described processor 11 is read from described storage medium 14 by described system bus 15 and performs task The executable instruction of processing method, can perform following steps:
Notify that the n-th process node obtains the n-th task from message channel and processes message, and disappear according to described n-th task process Breath performs the n-th scheduled operation, sends feedback message according to the execution result of the n-th scheduled operation to described message channel;Wherein, institute Stating the n-th scheduled operation is the described n-th one or more pre-stator operation processing that node performs;When described n-th scheduled operation is held When row is correct, notify that the (n+1)th process node obtains the (n+1)th task formed based on described feedback message from described message channel Process message, and perform the (n+1)th scheduled operation according to described (n+1)th task process message;Wherein, described (n+1)th scheduled operation The one or more pre-stator operation that node performs is processed for described (n+1)th;When described n-th scheduled operation performs mistake, logical Know that abnormality processing node obtains the abnormal task formed based on described feedback message from described message channel and processes message, and root Process message according to described abnormal task and perform abnormality processing operation;Wherein, described (n+1)th process node is described n-th process joint Next running node of point;Described n-th scheduled operation and described (n+1)th scheduled operation are the response behaviour responding same task requests Make;Described n is the positive integer less than N;Described N is the total number processing node responding described task requests.
Task processing system described in the present embodiment, the close coupling solved in prior art between different disposal node is asked Topic, thus also contribute to the follow-up maintenance that each is processed node;Meanwhile, abnormality processing node appearance is processed abnormal Task requests, it is possible to process in time various abnormal conditions, if realizing the complete rollback of data, will perform described task please Produced data deletion during asking.
Embodiment three
Above-mentioned task processing system can be realized by hardware, and Figure 11 gives a kind of hardware configuration of task processing system Schematic diagram, as shown in figure 11, including multiple servers and multiple storage device;Wherein,
Described server is divided into multiclass, including:
First kind server is distribution node, and in figure, server a represents that distribution node, distribution node are responsible for receiving client During the task requests that end sends, estimate described task requests required time;When required time is more than or equal to Preset Time During threshold value, for sending the client distribution task identification code of described task requests;Wherein, described task identification code, it is used for inquiring about The result of described task requests;
Equations of The Second Kind server is for controlling node, and in figure, server b represents control node, controls node and is responsible for message channel Management;It is also responsible for generating task based on the task requests that client sends and processes inventory, and by message channel at each Reason node distribution task processes message;Obtain each and process the feedback message that node is sent in message channel;
3rd class server is conventional treatment node, and in figure, server n, n+1 represent at the n-th of the same task requests of response Reason node and (n+1)th processes node, and described n-th process node and (n+1)th processes node to be responsible for obtaining from message channel appointing Business processes message, processes message according to obtaining from message channel of task and performs corresponding scheduled operation, and according to scheduled operation Execution result to described message channel send feedback message;
4th class server is abnormality processing node, and in figure, server c represents abnormality processing node;Abnormality processing node, It is responsible for when n-th processes node or the (n+1)th process node performs the execution result of scheduled operation for performing mistake, from described message Passage obtains the abnormal task process that execution result based on this kind of scheduled operation is the feedback message formation performing mistake disappear Breath, and process message execution abnormality processing operation according to described abnormal task;
5th class server is detection node, and in figure, server d represents detection node;Detection node is responsible for detecting client The inquiry request sent;
6th class server is responsive node, and in figure, server e represents responsive node;Responsive node is responsible for described in response looking into Ask request, send execution state information according to the result of storage in the first storage device to client;
7th class server is debugging node, and in figure, server f represents debugging node;Debugging node is responsible for depositing according to second In storage equipment, the process message in the message channel of backup is debugged;
Described first storage device, for storing the result that each process node sends, is stored in described storage device Described result, can be used for response and inquire about the inquiry request of execution of described task requests;
Described second storage device, all process message in backup messages passage, adjust for debugging section point Examination.
It can be seen from figure 11 that client according to distribution node be its distribution task identification code, by detection node with Responsive node can interact with the first storage device inquiry, by task identification code at storage device query task is asked Reason result, facilitates client query, improves query task and performs the convenience of result.As responding the of same task requests N processes node and (n+1)th and processes node, and described n-th process node and (n+1)th processes node and only need to obtain from message channel Task processes message, then processes message according to obtaining from message channel of task and performs corresponding scheduled operation, and to message Passage feedback performs the execution result of corresponding scheduled operation, it is not necessary to n-th processes node directly appoints to the (n+1)th process node transmission Business processes message, processes node without n-th and the (n+1)th process node mutually calls.Native system is saved by abnormality processing Point is responsible for processing anomalous event, owing to being to transmit message rather than by one by message channel between different disposal node Individual process node is directly given to next process node;The most when an error occurs, this abnormality processing node can lead to from message Road obtains the process message of two transmission processed between node, carries out error analysis;Solve at least in prior art because of Close coupling between different disposal node and the system that causes cannot obtain abnormal information problem.Debugging node processes from second and sets The process message of standby middle each process node obtaining backup, it is possible to provide the window that viewing system is run, it is simple to staff opens Send out, debugging etc..
Embodiment four
The O&M process structure figure of a kind of task processing system that Figure 12 provides for the embodiment of the present invention, as shown in figure 12, This framework mainly includes three parts:
Part I is Access Layer, and described Access Layer includes: interface and task requests processing unit;
Wherein, described interface is the functional interfaces that whole system provides, and calls for web page or other system.
Wherein, described task requests processing unit, it is responsible for received task requests being analyzed, by described task Request splits into multiple process step, and wherein, each process step is realized by a processing module.
Specifically, the operation principle of described task requests processing unit: after receiving function request, splitted into process mould The atom interface of internal subsystems in block, and it is arranged in orderly step according to task requests, as step is disassembled in function request Suddenly (step) 1, step2, step3, as in a task process message dilivery to message queue.Wherein, described process Module includes internal subsystems and executor.
Alternatively, described task requests processing unit, it is also responsible for distributing task identification code.Described interface, is also responsible for institute State task identification code and return to called side.Such as, described called side is client.Described called side can be based on described task identification Code query processing result.
In actual application, the interface receiving task requests can synthesize an interface with the interface returning result.
Part II is transport layer, and described transport layer includes: message queue;
Wherein, described message queue, is the passage driving whole system operating.Each processing module is entered by message queue Row communication.
Part III is execution level, and described execution level includes: conventional actuator and the subsystem corresponding with conventional actuator System.
Wherein, described conventional actuator is atom interface executor, the corresponding internal subsystems of each conventional actuator. Here, described atom interface refers to feed back the interface running succeeded or performing failure information, described atom interface export Information be clear and definite information.
Described conventional actuator, is responsible for one's own task in monitoring information queue and processes message, and task processes message By providing task requests processing unit to deliver or the conventional actuator delivery of other upstream.Conventional actuator receives to one's name Task process after message, carry out the logical process of personalization, after having processed, result write storage device such as In translog, inquire about for called side;Conventional actuator is also responsible for again rendering in message queue feedback message.
Alternatively, described execution level also includes: abnormality processing executor (Error Executor), backup executor (Debug Executor)。
Wherein, described abnormality processing executor, is responsible for obtaining from described message channel being formed based on described feedback message Abnormal task process message, and according to described abnormal task process message perform abnormality processing operation.
All of conventional actuator performs to make a mistake, and the recipient of message can be set to abnormality processing executor, different Often process executor to be responsible for determining that abnormal task processes message, be again delivered in message queue.Such as, as the 3rd executor When performing step3 appearance exception, notify the 3rd executor, the second executor, the first executor, according to step3-> step2-> Step1, performs rolling back action successively.
It addition, described abnormality processing executor, can not use on subsystems as the window of viewing system exception Look into daily record everywhere, it is simple to abnormal node occurs in location.
Backup executor, is responsible for backing up all process message in described message channel, is used for developing debugging, institute State backup executor and can observe, as one, the window that whole big system is run equally.
The internal subsystems corresponding with conventional actuator, is to provide the operational system of concrete special services, is responsible for and intelligence Software, smart machine, intelligent robot or computer system etc. interact, to guarantee realizing of each step.
Alternatively, described framework also includes:
Part IV, described Part IV includes: storage device (such as TransLog).
Wherein, described storage device is responsible for the result that each executor sends, and is stored in the described of described storage device Result, for responding the inquiry request of the execution inquiring about described task requests.
Specifically, described storage device can use nosql storage or DB storage.
In several embodiments provided herein, it should be understood that disclosed equipment and method, can be passed through it Its mode realizes.Apparatus embodiments described above is only schematically, such as, the division of described unit, it is only A kind of logic function divides, and actual can have other dividing mode, such as when realizing: multiple unit or assembly can be in conjunction with, or It is desirably integrated into another system, or some features can be ignored, or do not perform.It addition, shown or discussed each composition portion Dividing coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, equipment or unit Or communication connection, can be electrical, machinery or other form.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, shows as unit The parts shown can be or may not be physical location;Both may be located at a place, it is also possible to be distributed to multiple network list In unit;Part or all of unit therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme.
It addition, each functional unit in various embodiments of the present invention can be fully integrated in a processing unit, it is possible to Being that each unit is individually as a unit, it is also possible to two or more unit are integrated in a unit;Above-mentioned Integrated unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit and realizes.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be passed through The hardware that programmed instruction is relevant completes, and aforesaid program can be stored in computer read/write memory medium, and this program exists During execution, perform to include the step of said method embodiment;And aforesaid storage medium includes: movable storage device, read-only deposit Reservoir (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or The various medium that can store program code such as CD.
Or, if the above-mentioned integrated unit of the present invention is using the form realization of software function module and as independent product When selling or use, it is also possible to be stored in a computer read/write memory medium.Based on such understanding, the present invention implements The part that prior art is contributed by the technical scheme of example the most in other words can embody with the form of software product, This computer software product is stored in a storage medium, including some instructions with so that a computer equipment is (permissible It is personal computer, server or the network equipment etc.) perform all or part of of method described in each embodiment of the present invention. And aforesaid storage medium includes: movable storage device, ROM, RAM, magnetic disc or CD etc. are various can store program code Medium.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art, in the technical scope that the invention discloses, can readily occur in change or replace, should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with described scope of the claims.

Claims (22)

1. a task processing method, it is characterised in that described method is applied to include message channel and connect with message channel In the task processing system of the multiple process nodes connect, including:
N-th processes node obtains the n-th task process message from message channel, and processes message execution n-th according to described n-th task Scheduled operation, sends feedback message according to the execution result of the n-th scheduled operation to described message channel;Wherein, described n-th makes a reservation for Operation processes, for described n-th, the one or more pre-stator operation that node performs;
When described n-th scheduled operation performs correct, (n+1)th processes node obtains based on described feedback from described message channel The (n+1)th task that message is formed processes message, and performs the (n+1)th scheduled operation according to described (n+1)th task process message;Its In, described (n+1)th scheduled operation is the described (n+1)th one or more pre-stator operation processing that node performs;
Wherein, described (n+1)th next running node that node is described n-th process node is processed;Described n-th scheduled operation and institute Stating the (n+1)th scheduled operation is the response operation responding same task requests;Described n is the positive integer less than N;Described N is response The total number processing node of described task requests;
When described n-th scheduled operation performs mistake, abnormality processing node obtains based on described feedback from described message channel The abnormal task that message is formed processes message, and processes message execution abnormality processing operation according to described abnormal task.
Method the most according to claim 1, it is characterised in that the described execution result according to the n-th scheduled operation is to described After message channel sends feedback message, described method also includes:
Control node and judge whether the execution result of described n-th scheduled operation performs correctly based on described feedback message, wherein, institute State feedback message and include the execution result of the n-th scheduled operation;
When described n-th scheduled operation performs correct, task based on described task requests processes inventory to described message channel Send the (n+1)th task formed based on described feedback message and process message;Wherein, described task process inventory includes that execution is described The N number of described process node of task requests, and the execution sequence of the scheduled operation of N number of described process node execution;
When described n-th scheduled operation performs mistake, process inventory based on described task and send based on institute to described message channel State the abnormal task process message that feedback message is formed.
Method the most according to claim 1, it is characterised in that described method also includes:
Described n-th processes node judges whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs correct, then feed back to described message channel according to the execution result of the n-th scheduled operation First kind message;Wherein, described first kind message includes that described n-th processes the execution result of node, described n-th process node root Node identification and the described task process inventory of the (n+1)th process node that inventory determines is processed according to task;Wherein, described Business processes inventory and includes performing the node identification of each process node involved by described task requests, and described each processes Execution sequence between node and scheduled operation.
Method the most according to claim 1, it is characterised in that described method also includes:
Described n-th processes node judges whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs occur abnormal, then according to the execution result of the n-th scheduled operation to described message channel Feedback Equations of The Second Kind message;Wherein, described Equations of The Second Kind message includes that described n-th processes the execution result of node, described n-th process joint Abnormality processing node and described task that point determines process inventory.
Method the most according to claim 1, it is characterised in that at the described abnormal task formed based on described feedback message Reason message, including:
Determine each process node needing to perform abnormality processing operation and the order performing abnormality processing.
Method the most according to claim 1, it is characterised in that described method also includes:
The result of each process node is sent to storage device, is stored in the described result of described storage device, For responding the inquiry request of the execution inquiring about described task requests.
Method the most according to claim 6, it is characterised in that described method also includes:
The inquiry request that detection client sends;
Respond described inquiry request, send execution state letter according to the result of storage in described storage device to client Breath.
Method the most according to claim 7, it is characterised in that described method also includes:
When receiving task requests, estimate described task requests required time;
When required time is more than or equal to preset time threshold, for sending the client distribution task identification of described task requests Code;Wherein, described task identification code, for inquiring about the result of described task requests.
Method the most according to claim 8, it is characterised in that
The inquiry request that described detection client sends, including:
Storage device receives the inquiry request carrying described task identification code from client;
The described inquiry request of described response, obtains result from described storage device, including:
Described storage device, according to described task identification code, inquires about the result corresponding with described task identification code;Wherein, institute State storage device storage and have the mapping relations of task identification code and result.
Method the most according to claim 7, it is characterised in that
The inquiry request that described detection client sends, including:
Predetermined interface receives the inquiry request of the identification information carrying client from client;
The described inquiry request of described response, obtains result from described storage device, including:
The result corresponding with described identification information is inquired about from described storage device by predetermined interface, and to described client Return execution state information;
Wherein, described storage device storage has the identification information of client and the mapping relations of result.
11. methods according to claim 1, it is characterised in that described method also includes:
All process message in described message channel are backed up by debugging node;Wherein, the described process message of backup is used In carrying out mistake debugging.
12. 1 kinds of task processing systems, it is characterised in that described system includes:
Message channel, is used for transmitting message;
N-th processes node, is connected with described message channel, processes message, and root for obtaining the n-th task from described message channel Process message according to described n-th task and perform the n-th scheduled operation, according to the execution result of the n-th scheduled operation to described message channel Send feedback message;Wherein, described n-th scheduled operation is the described n-th one or more pre-stator operation processing that node performs;
(n+1)th processes node, is connected with described message channel, for when described n-th scheduled operation performs correct, disappearing from described Breath passage obtains the (n+1)th task formed based on described feedback message and processes message, and disappear according to described (n+1)th task process Breath performs the (n+1)th scheduled operation;Wherein, described (n+1)th scheduled operation is the one or more of described (n+1)th process node execution Pre-stator operation;Wherein, described (n+1)th next running node that node is described n-th process node is processed;Described n-th makes a reservation for Operation and described (n+1)th scheduled operation are the response operation responding same task requests;Described n is the positive integer less than N;Described N is the total number processing node responding described task requests;
Abnormality processing node, is connected with described message channel, for when described n-th scheduled operation performs mistake, disappearing from described Breath passage obtains the abnormal task formed based on described feedback message and processes message, and process message according to described abnormal task Execution abnormality processing operates.
13. systems according to claim 12, it is characterised in that described system also includes:
Control node, be used for:
Node is processed according to the execution result of the n-th scheduled operation after described message channel sends feedback message described n-th, Judge whether the execution result of described n-th scheduled operation performs correctly based on described feedback message, wherein, described feedback message bag Include the execution result of the n-th scheduled operation;
When described n-th scheduled operation performs correct, task based on described task requests processes inventory to described message channel Send the (n+1)th task formed based on described feedback message and process message;Wherein, described task process inventory includes that execution is described The N number of described process node of task requests, and the execution sequence of the scheduled operation of N number of described process node execution;
When described n-th scheduled operation performs mistake, process inventory based on described task and send based on institute to described message channel State the abnormal task process message that feedback message is formed.
14. systems according to claim 12, it is characterised in that
Described n-th processes node, is additionally operable to:
Judge whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs correct, then feed back to described message channel according to the execution result of the n-th scheduled operation First kind message;Wherein, described first kind message includes that described n-th processes the execution result of node, described n-th process node root Node identification and the described task process inventory of the (n+1)th process node that inventory determines is processed according to task;Wherein, described Business processes inventory and includes performing the node identification of each process node involved by described task requests, and described each processes Execution sequence between node and scheduled operation.
15. systems according to claim 12, it is characterised in that
Described n-th processes node, is additionally operable to:
Judge whether described n-th scheduled operation performs correctly;
When described n-th scheduled operation performs occur abnormal, then according to the execution result of the n-th scheduled operation to described message channel Feedback Equations of The Second Kind message;Wherein, described Equations of The Second Kind message includes that described n-th processes the execution result of node, described n-th process joint Abnormality processing node and described task that point determines process inventory.
16. systems according to claim 12, it is characterised in that described abnormality processing node, are additionally operable to:
Determine each process node needing to perform abnormality processing operation and the order performing abnormality processing.
17. systems according to claim 12, it is characterised in that described system also includes:
Storage device, for storing the result that each process node sends, is stored in the described process knot of described storage device Really, for responding the inquiry request of the execution inquiring about described task requests.
18. systems according to claim 17, it is characterised in that described system also includes:
Detection node, for detecting the inquiry request that client sends;
Responsive node, is used for responding described inquiry request, sends out to client according to the result of storage in described storage device Send execution state information.
19. systems according to claim 18, it is characterised in that described system also includes:
Distribution node, is used for:
When receiving task requests, estimate described task requests required time;
When required time is more than or equal to preset time threshold, for sending the client distribution task identification of described task requests Code;Wherein, described task identification code, for inquiring about the result of described task requests.
20. systems according to claim 19, it is characterised in that
Described detection node, is additionally operable to the inquiry by storage device carries described task identification code from client reception and asks Ask;
Described responsive node, is additionally operable to by described storage device according to described task identification code, inquiry and described task identification The result that code is corresponding;Wherein, described storage device storage has the mapping relations of task identification code and result.
21. systems according to claim 18, it is characterised in that
Described detection node, is additionally operable to the inquiry by predetermined interface receives, from client, the identification information carrying client and asks Ask;
Described responsive node, is additionally operable to logical described predetermined interface and ties from the process that storage device inquiry is corresponding with described identification information Really, and to described client execution state information is returned;Wherein, described storage device storage has identification information and the place of client The mapping relations of reason result.
22. systems according to claim 12, it is characterised in that described system also includes:
Debugging node, for backing up all process message in described message channel;Wherein, the described process of backup disappears Breath is used for carrying out mistake debugging.
CN201610578726.2A 2016-07-21 2016-07-21 A kind of task processing method and system Active CN106250254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610578726.2A CN106250254B (en) 2016-07-21 2016-07-21 A kind of task processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610578726.2A CN106250254B (en) 2016-07-21 2016-07-21 A kind of task processing method and system

Publications (2)

Publication Number Publication Date
CN106250254A true CN106250254A (en) 2016-12-21
CN106250254B CN106250254B (en) 2019-02-22

Family

ID=57603719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610578726.2A Active CN106250254B (en) 2016-07-21 2016-07-21 A kind of task processing method and system

Country Status (1)

Country Link
CN (1) CN106250254B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153596A (en) * 2017-12-15 2018-06-12 珠海金山网络游戏科技有限公司 A kind of message treatment method and device based on lock-free queue
CN109218338A (en) * 2017-06-29 2019-01-15 北京京东尚科信息技术有限公司 Information processing system, method and apparatus
CN109274755A (en) * 2018-10-12 2019-01-25 成都信息工程大学 A kind of cross-node two-way in length and breadth intersection cooperation interaction method based on the cross-domain network of multicore
CN110502317A (en) * 2018-05-16 2019-11-26 北京京东尚科信息技术有限公司 A kind of method and apparatus of transaction management
CN113467908A (en) * 2021-06-23 2021-10-01 深圳市蘑菇财富技术有限公司 Task execution method and device, computer readable storage medium and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101184056A (en) * 2007-12-04 2008-05-21 浙江大学 Distributed enterprise service bus message switching method
US7512668B2 (en) * 2004-04-21 2009-03-31 Sap Ag Message-oriented middleware server instance failover
US7937433B1 (en) * 2003-09-23 2011-05-03 Embarq Holdings Company, Llc Queuing connector to promote message servicing
CN102521044A (en) * 2011-12-30 2012-06-27 北京拓明科技有限公司 Distributed task scheduling method and system based on messaging middleware
CN103019866A (en) * 2012-10-24 2013-04-03 北京京东世纪贸易有限公司 Distributed method and system based on message queue
CN104866378A (en) * 2015-05-29 2015-08-26 北京京东尚科信息技术有限公司 System and method for coordinating execution tasks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7937433B1 (en) * 2003-09-23 2011-05-03 Embarq Holdings Company, Llc Queuing connector to promote message servicing
US7512668B2 (en) * 2004-04-21 2009-03-31 Sap Ag Message-oriented middleware server instance failover
CN101184056A (en) * 2007-12-04 2008-05-21 浙江大学 Distributed enterprise service bus message switching method
CN102521044A (en) * 2011-12-30 2012-06-27 北京拓明科技有限公司 Distributed task scheduling method and system based on messaging middleware
CN103019866A (en) * 2012-10-24 2013-04-03 北京京东世纪贸易有限公司 Distributed method and system based on message queue
CN104866378A (en) * 2015-05-29 2015-08-26 北京京东尚科信息技术有限公司 System and method for coordinating execution tasks

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218338A (en) * 2017-06-29 2019-01-15 北京京东尚科信息技术有限公司 Information processing system, method and apparatus
CN109218338B (en) * 2017-06-29 2021-05-25 北京京东尚科信息技术有限公司 Information processing system, method and device
CN108153596A (en) * 2017-12-15 2018-06-12 珠海金山网络游戏科技有限公司 A kind of message treatment method and device based on lock-free queue
CN110502317A (en) * 2018-05-16 2019-11-26 北京京东尚科信息技术有限公司 A kind of method and apparatus of transaction management
CN110502317B (en) * 2018-05-16 2024-03-01 北京京东尚科信息技术有限公司 Transaction management method and device
CN109274755A (en) * 2018-10-12 2019-01-25 成都信息工程大学 A kind of cross-node two-way in length and breadth intersection cooperation interaction method based on the cross-domain network of multicore
CN113467908A (en) * 2021-06-23 2021-10-01 深圳市蘑菇财富技术有限公司 Task execution method and device, computer readable storage medium and terminal equipment
CN113467908B (en) * 2021-06-23 2024-02-20 深圳市蘑菇财富技术有限公司 Task execution method, device, computer readable storage medium and terminal equipment

Also Published As

Publication number Publication date
CN106250254B (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN106250254A (en) A kind of task processing method and system
DE2908316C2 (en) Modular multi-processor data processing system
CN109048996B (en) Robot abnormal state processing method and device
CN103500475B (en) A kind of adjustment method, system of office buildings gate control system
CN107407918A (en) Programmable logic controller (PLC) is extended using app
CN110780590B (en) Techniques for providing safety control parameters for multi-channel control of a machine
DE102008044018A1 (en) Method for determining a security level and security manager
CN108306787A (en) A kind of application monitoring method and relevant device
CN115297124B (en) System operation and maintenance management method and device and electronic equipment
JP6938573B2 (en) Equipment with operator server and operator client
EP2036263B1 (en) Method and device for the creation of a communication system based on can communication controllers featuring an increased data throughput
CN114138568A (en) Scheduling method and system for client fault transfer in Redis sentinel mode
US6625664B2 (en) Automation system to access functionality of hardware components with each hardware component having system connection unit with function objects representing real functionality of components
AT512665B1 (en) Method and apparatus for forming software fault containment units in a distributed real-time system
CN110958139B (en) Network control method, orchestrator, controller, and computer-readable storage medium
CN105610594A (en) Service chain fault diagnosis method and service chain fault diagnosis device
CN108196529A (en) Data processing method and its device, data processing system
CN104346233B (en) A kind of fault recovery method and device for computer system
CN115437761A (en) Simulation method of scheduler, electronic device, and storage medium
CN115291891A (en) Cluster management method and device and electronic equipment
CN103914339A (en) Server management system and server management method
CN111427861B (en) Distributed file system configuration method and device
CN110955210B (en) AGV scheduling method, device and system
CN113900741B (en) Service processing method and device based on plug-in, computer equipment and medium
CN104067264A (en) Supervising and recovering software components associated with medical diagnostics instruments

Legal Events

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