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

A kind of task processing method and system Download PDF

Info

Publication number
CN106250254B
CN106250254B CN201610578726.2A CN201610578726A CN106250254B CN 106250254 B CN106250254 B CN 106250254B CN 201610578726 A CN201610578726 A CN 201610578726A CN 106250254 B CN106250254 B CN 106250254B
Authority
CN
China
Prior art keywords
processing
task
message
node
predetermined operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610578726.2A
Other languages
Chinese (zh)
Other versions
CN106250254A (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, the described method includes: the n-th processing node, which obtains the n-th task from message channel, handles message, and message is handled according to n-th task and executes the n-th predetermined operation, feedback message is sent to the message channel according to the implementing result of the n-th predetermined operation;When n-th predetermined operation execution is correct, the (n+1)th processing node is obtained the (n+1)th task formed based on the feedback message from the message channel and handles message, and handles message the (n+1)th predetermined operation of execution according to (n+1)th task;Wherein, the (n+1)th processing node is next running node of the n-th processing node;N-th predetermined operation and (n+1)th predetermined operation are to respond the response operation of same task requests;The n is the positive integer less than N;The N is the total number of the processing node of the response task requests.

Description

A kind of task processing method and system
Technical field
The present invention relates to field of computer technology, and in particular to a kind of task processing method and system.
Background technique
More existing includes the system of multiple subsystems interaction, the execution of a usually process from the beginning to the end, respectively Interaction between a node is called mutually by the context of program.But it is if a certain during execution task When node executes appearance exception, system will be unable to obtain exception information.When mission failure, data can not complete rollback;In addition, by It can not be decoupled between each node, the upgrading of some station code necessarily affects the execution of the task.
Summary of the invention
In view of this, an embodiment of the present invention is intended to provide a kind of task processing method and systems, above-mentioned ask at least can solve One of topic.
The technical scheme of the present invention is realized as follows:
The embodiment of the invention provides a kind of task processing method, it is applied to connect including message channel and with message channel In the task processing system of the multiple processing nodes connect, which comprises
N-th processing node obtains the n-th task from message channel and handles message, and handles message according to n-th task and hold The n-th predetermined operation of row sends feedback message to the message channel according to the implementing result of the n-th predetermined operation;Wherein, described N predetermined operation is the pre- stator operation of one or more that the n-th processing node executes;
When n-th predetermined operation execution is correct, the (n+1)th processing node is obtained from the message channel based on described The (n+1)th task that feedback message is formed handles message, and handles message according to (n+1)th task and execute the (n+1)th predetermined operation;
Wherein, the (n+1)th processing node is next running node of the n-th processing node;N-th predetermined operation It is to respond the response operation of same task requests with (n+1)th predetermined operation;The n is the positive integer less than N;The N is Respond the total number of the processing node of the task requests;
When n-th predetermined operation executes mistake, abnormality processing node is obtained from the message channel based on described The abnormal task that feedback message is formed handles message, and handles message according to the abnormal task and execute abnormality processing operation.
The embodiment of the invention provides a kind of task processing system, the system comprises:
Message channel is used for transmission message;
N-th processing node, connect with the message channel, handles message for obtaining the n-th task from the message channel, And message is handled according to n-th task and executes the n-th predetermined operation, according to the implementing result of the n-th predetermined operation to the message Channel sends feedback message;Wherein, n-th predetermined operation is the pre- stator of one or more that the n-th processing node executes Operation;
(n+1)th processing node, connect with the message channel, is used for when n-th predetermined operation executes correct, from institute State the (n+1)th task processing message for obtaining in message channel and being formed based on the feedback message, and according to (n+1)th task at It manages message and executes the (n+1)th predetermined operation;Wherein, (n+1)th predetermined operation be it is described (n+1)th processing node execute one or Multiple pre- stator operations;Wherein, the (n+1)th processing node is next running node of the n-th processing node;Described n-th Predetermined operation and (n+1)th predetermined operation are to respond the response operation of same task requests;The n is the positive integer less than N; The N is the total number of the processing node of the response task requests;
Abnormality processing node is connect with the message channel, is used for when n-th predetermined operation executes mistake, from institute It states the abnormal task for obtaining in message channel and being formed based on the feedback message and handles message, and handled according to the abnormal task Message executes abnormality processing operation.
Using technical solution described in the embodiment of the present invention, the n-th of same task requests handles node and n-th in response + 1 processing node, the n-th processing node and the (n+1)th processing node only need to obtain task from message channel and handle message, so Corresponding predetermined operation is executed according to from the task processing message of message channel acquisition afterwards, and is executed accordingly to message channel feedback Predetermined operation implementing result, without n-th processing node directly to (n+1)th processing node send task handle message, also without The n-th processing node is needed mutually to be called with the (n+1)th processing node.In compared with the existing technology at the n-th processing node and (n+1)th Reason node is called mutually by the context of program, and system can not obtain for exception information when an error occurs, this Shen Abnormality processing node please be introduce to be responsible for handling anomalous event, due to being to disappear between different disposal node by message channel transmission Breath, rather than next processing node is directly given to by a processing node;So when an error occurs, the abnormality processing section Point can carry out error analysis from the processing message for obtaining the transmission between two processing nodes in message channel;At least solve In the prior art system can not obtain exception information problem because of caused by the close coupling between different disposal node.
Detailed description of the invention
Fig. 1 is the implementation process schematic diagram of task processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram that three provided in an embodiment of the present invention processing nodes execute a certain task requests;
Fig. 3 is a kind of schematic diagram provided in an embodiment of the present invention that task processing message is delivered to each processing node;
Fig. 4 is another schematic diagram provided in an embodiment of the present invention that task processing message is delivered to each processing node;
Fig. 5 is another schematic diagram that three provided in an embodiment of the present invention processing nodes execute a certain task requests;
Fig. 6 is the one of the abnormality processing operation that three provided in an embodiment of the present invention processing nodes execute a certain task requests Kind schematic diagram;
A kind of schematic diagram of Fig. 7 query task executive condition provided in an embodiment of the present invention;
Another schematic diagram of Fig. 8 query task executive condition provided in an embodiment of the present invention;
Fig. 9 is that the task of each processing node of debugging node standby provided in an embodiment of the present invention handles the signal of message Figure;
Figure 10 is the composed structure schematic diagram of task processing system provided in an embodiment of the present invention;
Figure 11 is an optional hardware configuration in the embodiment of the present invention for realizing the server of task processing system Schematic diagram;
Figure 12 is a kind of hardware structural diagram of task processing system provided in an embodiment of the present invention;
Figure 13 is a kind of O&M process structure figure of task processing system provided in an embodiment of the present invention.
Specific embodiment
The technical solution of the present invention is further elaborated in the following with reference to the drawings and specific embodiments.
Embodiment one
The embodiment of the present invention provides a kind of task processing method, and the method can be applied to server side, as shown in Figure 1, The method specifically includes that
Step 101: n-th processing node from message channel obtain the n-th task handle message, and according to n-th task at It manages message and executes the n-th predetermined operation, feedback message is sent to the message channel according to the implementing result of the n-th predetermined operation.
Wherein, the n is the positive integer less than N;The N is the total number of the processing node of a certain task requests of response.
Wherein, the n-th task processing message package contains the n-th processing node and holds needed for a certain task requests to respond The capable corresponding parameter of operation and the execution operation.
Here, the required operation executed refers to that the n-th processing node executes for a certain task requests of response are required The step of.The parameter refers to that the n-th processing node is parameter used the step of execution needed for a certain task requests of response;Its In, the parameter may include the processing result of the upper processing node of the n-th processing node.
For example, the content executed needed for described includes: the n-th predetermined operation;N-th predetermined operation is to respond the task to ask The response operation asked.
Wherein, n-th predetermined operation is the pre- stator operation of one or more that the n-th processing node executes.
That is, the n-th processing node is supported to execute at least one pre- stator operation, when the n-th processing node When executing different pre- stator operations, it is able to achieve different functions.
For example, 2 processing nodes are shared, each processing node can execute multiple pre- stator operations.1st processing section Point can support two pre- stator operations of S1, S2;Wherein, the pre- stator operation of S1 is to obtain log-on message, and the pre- stator operation of S2 is root It determines whether to enter certain account system according to authenticating result;2nd processing node can support two pre- stator operations of S3, S4; Wherein, the pre- stator operation of S3 is to authenticate to log-on message, returns to authenticating result;The pre- stator operation of S4 be establish account with it is close The corresponding relationship of code.So, when receiving the task requests of a login account, the 1st processing node executes the predetermined behaviour of S1 Make, i.e. acquisition log-on message;2nd processing node executes S3 predetermined operation, i.e., authenticates to the log-on message;2nd processing Node executes S3 predetermined operation, i.e., authenticates to the log-on message, returns to authenticating result;It is pre- that 3rd processing node executes S2 Fixed operation determines whether to enter certain account system according to authenticating result.So far, at by the 1st processing node and the 2nd It manages node and executes corresponding pre- stator operation, the task requests can be completed.
In the present embodiment, the message channel is used to store the task processing message of each processing node, is also used to receive The feedback message of each processing node.For example, the message channel includes the various transmission channels such as message queue, data/address bus. Preferably, the message channel includes message queue, and the message queue is the appearance that message is saved in the transmission process of message Device.
In an optional embodiment, the message channel includes multiple sub- message channels, each processing node corresponding one A sub- message channel, each processing node can be obtained from corresponding sub- message channel task processing message, and to Its corresponding sub- message channel sends feedback message;The multiple sub- message channel is connected with a total message channel, institute It states total message channel and takes out feedback message from each sub- message channel, and distributed simultaneously based on feedback message to each sub- message channel Transmission task handles message.In this way, identifying and obtaining convenient for each processing node since each sub- message channel is independent from each other Corresponding task is taken to handle message.
Step 102: when n-th predetermined operation execution is correct, the (n+1)th processing node is obtained from the message channel Message is handled based on the (n+1)th task that the feedback message is formed, and message is handled according to (n+1)th task and executes (n+1)th Predetermined operation.
Wherein, (n+1)th predetermined operation is the pre- stator operation of one or more that the (n+1)th processing node executes.
Wherein, the (n+1)th processing node is next processing node of the n-th processing node;N-th predetermined operation It is to respond the response operation of same task requests with (n+1)th predetermined operation.
For example, a certain task requests need A processing node, B processing node, C processing node collaboration to complete.Each It is different to handle function achieved by node, for example, tri- kinds of predetermined operations of A1, A2, A3 can be performed in A processing node, different is pre- It is fixed to operate brought response results difference;B, which handles node, can be performed tetra- kinds of predetermined operations of B1, B2, B3, B4, and different is predetermined Response results brought by operating are different;C, which handles node, can be performed tri- kinds of predetermined operations of C1, C2, C3, different predetermined operation institutes Bring response results are different.
As shown in Fig. 2, A processing node needs to be implemented A3 predetermined operation, and B handles node and needs when executing a certain task requests B2 predetermined operation is executed, C processing node needs to be implemented C1 predetermined operation;And execution sequence is A3 predetermined operation, the predetermined behaviour of B2 Make, C1 predetermined operation.Therefore, A handles node and obtains A task processing message from message channel, when A processing node execution A3 is pre- Surely the implementing result operated is when executing correct, and B processing node obtains B task processing message from message channel, when B processing saves The implementing result that point executes B2 predetermined operation is when executing correct, and C processing node obtains the processing of C task from message channel and disappears Breath, when the implementing result that C processing node executes C1 predetermined operation is to execute correct, the task requests execute completion.
Again for example, task requests 1 need to use A shown in Fig. 2 processing node, B processing node, C processing node, and It needs A processing node to execute A3 predetermined operation, B processing node is needed to execute B2 predetermined operation, need C processing node to execute C1 pre- Fixed operation;Task requests 4 need to use A shown in Fig. 2 and handle node, B processing node, and it is pre- to need A processing node to execute A2 Fixed operation needs B processing node to execute B1 predetermined operation;If execute task requests 1, A handles node and executes A3 predetermined operation It executes correctly, B processing node execution B2 predetermined operation execution is correct, and the node of C processing at this time is in upgrade status, task requests 1 Temporarily it is unable to complete, and at this point, can continue after a period of time at C due to distributing task processing message by message channel It manages node or sends task to spare C processing node and handle message.While executing task 1, by message channel at A It manages node and distributes the task processing message for executing A2 predetermined operation, after A processing node distribution execution A2 predetermined operation is correct, to B handles the task processing message that node distribution executes B1 predetermined operation.Obviously, the execution of task requests 1, which is not constituted, appoints execution The influence of business request 2.
In an optional embodiment, the implementing result according to the n-th predetermined operation sends anti-to the message channel After presenting message, the method also includes:
Control node judges whether the implementing result of n-th predetermined operation executes correctly based on the feedback message, In, the feedback message includes the implementing result of the n-th predetermined operation;
When n-th predetermined operation execution is correct, the task based on the task requests handles inventory to the message Channel is sent the (n+1)th task formed based on the feedback message and handles message.
Wherein, the feedback message includes the implementing result of n-th predetermined operation.
Wherein, the (n+1)th task processing message includes the (n+1)th predetermined operation executed by the (n+1)th processing node, The (n+1)th task processing message is that the control node task based access control processing inventory determines.
Wherein, the task processing inventory includes the N number of processing node for executing the task requests and N number of institute That states the predetermined operation that processing node executes executes sequence.
As shown in figure 3, formulating task processing according to the task requests by control node when system receives task requests Inventory, and inventory is handled based on the task and handles message to each processing node distribution task, receive what each processing node returned Feedback message;
That is, judging whether the implementing result of the n-th processing node the n-th predetermined operation of execution executes by control node Correctly, the n-th processing node is without judging its implementing result.N-th processing node only needs to disappear from the processing of the n-th task The predetermined operation that it to be executed and the execution parameter that it to be returned are obtained in breath, without be concerned about next node by who Lai Operation.
In another optional embodiment, the method also includes:
The n-th processing node judges whether n-th predetermined operation executes correctly;
When n-th predetermined operation executes it is correct when, then according to the implementing result of the n-th predetermined operation to the message channel Feed back first kind message;Wherein, the first kind message includes the implementing result of the n-th processing node, the n-th processing section Point handles the node identification for the (n+1)th processing node that inventory determines according to task and the task handles inventory;Wherein, institute Stating task processing inventory includes executing each processing node identification of node involved in the task requests and described each Handle execution sequence and the predetermined operation between node.
As shown in figure 4, formulating task processing according to the task requests by control node when system receives task requests Task processing inventory is sent to first processing node in task processing inventory by message channel by inventory, later, The first kind message that first handles node feeding back is handled into message directly as the task of next processing node, by described Message channel is sent to first specified next processing node of processing node, and so on, the control node is not necessarily to root Determine that the task of next processing node handles message according to the feedback information of each processing node.
That is, by n-th processing node come judge the n-th processing node execute the n-th predetermined operation implementing result whether It executes correctly, the n-th processing node handles inventory according to task and determines that whom next processing node is, and specified by the first kind Message is sent to its identified (n+1)th processing node, the throwing that the control node only need to be specified according to the n-th processing node Object is passed by the first kind message after encapsulation, i.e., by task processing message by being sent to the (n+1)th processing node in message channel.
Step 103: when n-th predetermined operation executes mistake, abnormality processing node is obtained from the message channel Message is handled based on the abnormal task that the feedback message is formed, and message is handled according to the abnormal task and executes abnormality processing Operation.
In this way, abnormal task requests are executed to handle by a special processing node, it can be abnormal to processing in time Task requests handled.Abnormal task requests are executed to handle by a special processing node, can be found in time Abnormal problem is executed, timely reply can be also made according to the problem.For example, the place that the abnormality processing node will go wrong Task processing message corresponding to reason node is sent to another spare task that is able to carry out by message channel and handles message Processing node, in this way, when this it is spare processing node implementing result it is correct when, additionally it is possible to continue to execute the task requests, should Task requests will not stop due to mistake occurs in intermediate a certain link.
For example, task requests 1, task requests 2 are required to use A processing node shown in Fig. 2, B processing node, C Handle node;And be required to B processing node and execute B2 predetermined operation, if execute task requests 1, it is pre- that B handles node execution B2 There is exception in fixed operation, if the data that clean-up task request 1 generates not in time, influence the implementation progress of task requests 2.And it adopts Message is handled with abnormality processing node special disposal abnormal task, as carrying out in time to data caused by task requests 1 Processing, will not cause big influence to the execution of task requests 2.
Again for example, task requests 1 need to use A shown in Fig. 2 processing node, B processing node, C processing node, and It needs A processing node to execute A3 predetermined operation, B processing node is needed to execute B2 predetermined operation, need C processing node to execute C1 pre- Fixed operation;If B, which handles node and executes B2 predetermined operation, to be occurred abnormal, then abnormality processing node can will when executing task requests 1 Notification message channel sends task to spare B ' processing node and handles message, and notice B ' processing node executes B2 predetermined operation, In this way, C processing node can continue to execute the predetermined behaviour of C1 when the implementing result that B ' processing node executes B2 predetermined operation is correct Make, in this way, will not cause task requests 1 that can not continue to execute because B handles the implementing result mistake of node.
Here, the step 102 and the step 103 are coordination.I.e. after step 101, if it is predetermined to work as described n-th When operation executes correct, step 102 is executed;If executing step 103 when n-th predetermined operation executes mistake.
In an optional embodiment, the implementing result according to the n-th predetermined operation sends anti-to the message channel After presenting message, the method also includes:
Control node judges whether the implementing result of n-th predetermined operation executes correctly based on the feedback message, In, the feedback message includes the implementing result of the n-th predetermined operation;
When n-th predetermined operation executes mistake, abnormality processing node in control node notice system, by exception Reason node task based access control, which is handled inventory and sends the abnormal task formed based on the feedback message to the message channel and handle, to disappear Breath;Wherein, the task processing inventory includes the N number of processing node for executing the task requests and N number of processing The predetermined operation that node executes executes sequence.
In another optional embodiment, the method also includes:
The n-th processing node judges whether n-th predetermined operation executes correctly;
When n-th predetermined operation, which executes, occurs abnormal, then according to the implementing result of the n-th predetermined operation to the message Feed back the second class message in channel;Wherein, the second class message includes the implementing result of the n-th processing node, at described n-th Manage the abnormality processing node and task processing inventory that node determines;
The abnormality processing node determined from the n-th processing node is based on the task and handles inventory to the message channel It sends the abnormal task formed based on the second class message and handles message.
Here, the abnormality processing node in system can be multiple.
When continuing to execute a certain task requests, A processing node needs to be implemented A3 predetermined operation, and B processing node needs are held Row B2 predetermined operation, C processing node need to be implemented C1 predetermined operation;And execution sequence is A3 predetermined operation, B2 predetermined operation, C1 It is illustrated for predetermined operation.As shown in figure 5, A processing node obtains A task processing message from message channel, when A processing The implementing result that node executes A3 predetermined operation is when executing correct, and B processing node obtains the processing of B task from message channel and disappears Breath, when the implementing result that B processing node executes B2 predetermined operation is to execute correct, C processing node obtains C from message channel Task handles message, and when the implementing result that C processing node executes C1 predetermined operation is to execute mistake, abnormality processing node is from institute It states and obtains the abnormal task processing message that the feedback message based on C processing node is formed in message channel, and according to the exception Task handles message and executes abnormality processing operation.
In one embodiment, the abnormal task formed based on the feedback message handles message, comprising:
Determine each processing node for needing to be implemented abnormality processing operation and the sequence for executing abnormality processing.
For example, the abnormality processing operation, comprising: generated data will be deleted during executing the task requests It removes.
In this way, when reusing same memory space, convenient for when executing other task requests or re-executing described When task requests, generated data relevant to the task requests interfere currently performed task requests before.
For another example, the abnormality processing operation, comprising: execute rolling back action.
Here, the rolling back action refers to the behavior that program or data are restored to last correct status.
When continuing to execute a certain task requests, A processing node needs to be implemented A3 predetermined operation, and B processing node needs are held Row B2 predetermined operation, C processing node need to be implemented C1 predetermined operation;And execution sequence is A3 predetermined operation, B2 predetermined operation, C1 It is illustrated for predetermined operation.When the implementing result that A processing node executes A3 predetermined operation is to execute correctly, B handles node The implementing result for executing B2 predetermined operation is to execute correctly, and the implementing result that C processing node executes C1 predetermined operation is to execute mistake It mistakes, abnormality processing node is from the abnormal task for obtaining the feedback message formation based on C processing node in the message channel Message is managed, and message is handled according to the abnormal task and executes rolling back action operation, abnormality processing node is from the message channel The middle abnormal task processing message for obtaining the feedback message based on C processing node and being formed, and handled and disappeared according to the abnormal task Breath executes abnormality processing operation, wherein and the abnormal task processing message includes: that C processing node needs to be implemented E1 predetermined operation, B processing node needs to be implemented E1 predetermined operation, and A processing node needs to be implemented E1 predetermined operation;And execution sequence is C processing section Point, B processing node, A handle node, wherein the E1 predetermined operation indicates rolling back action;Make a reservation for when C processing node executes E1 When end of operation, B processing node executes E1 predetermined operation and finishes, when A processing node execution E1 predetermined operation finishes, for this The rolling back action of business request is completed.
In an optional embodiment, the sequence for executing abnormality processing are as follows: different currently to execute task requests appearance Normal processing node be starting point, according to each processing node for having executed the task requests execution sequence inverted order mode into Row sequence.
For example, as shown in fig. 6, abnormality processing node is obtained from the message channel based on the anti-of C processing node It presents the abnormal task that message is formed and handles message, and message is handled according to the abnormal task and executes abnormality processing operation, wherein The abnormal task processing message includes: that C processing node needs to be implemented E1 predetermined operation, and it is predetermined that B processing node needs to be implemented E1 Operation, A processing node need to be implemented E1 predetermined operation;And execution sequence is C processing node, B processing node, A processing node.Such as Shown in Fig. 6, C processing node obtains C abnormal task processing message from message channel, when C processing node executes E1 predetermined operation When finishing, B processing node obtains B abnormal task processing message from message channel, when B processing node execution E1 predetermined operation is complete Bi Shi, A processing node obtain A abnormal task processing message from message channel, finish when A processing node executes E1 predetermined operation When, completion is operated for the abnormality processing of the task requests.
In above scheme, optionally, the method also includes:
The processing result of each processing node is sent in storage equipment, the processing knot of the storage equipment is stored in Fruit, for responding the inquiry request for inquiring the execution of the task requests.
In above scheme, optionally, the method also includes:
When system receives task requests, the time required to the task requests are completed in control node estimation;
When required time is greater than or equal to preset time threshold, task is distributed to send the client of the task requests Identification code;Wherein, the task identification code, for inquiring the processing result of the task requests.
In this way, when longer the time required to completing the task requests that client is sent one can be distributed for the client Be engaged in identification code, remind the client how long after the execution feelings of the task requests can be inquired according to the task identification code Condition.
It certainly, in a specific embodiment, is not the transmission task when required time is less than preset time threshold The client of request distributes task identification code.
Alternatively, in a specific embodiment, distributing task identification code to send the client of the task requests, but not The task identification code is sent to the client.
In one embodiment, the method also includes:
Detect the inquiry request that client is sent;
The inquiry request is responded, execution state is sent to client according to the processing result stored in the storage equipment Information.
In a specific embodiment, the inquiry request that the detection client is sent, comprising: store equipment from client Receive the inquiry request for carrying the task identification code.Correspondingly, the response inquiry request, from the storage equipment Middle acquisition processing result, comprising: the storage equipment is inquired corresponding with the task identification code according to the task identification code Processing result.Here, the storage equipment is stored with the corresponding relationship of task identification code and processing result.
As shown in fig. 7, client M sends the inquiry request in relation to task requests 1 to storage equipment, storage equipment is received After inquiry request, the inquiry processing result corresponding with client M task identification code from storage equipment, and returned to client M The execution state information.
In this way, not having to inquire by third party, client can be interacted directly with storage equipment query, pass through task Identification code facilitates client query, improves query task implementing result from the processing result of storage equipment query task requests Convenience.
In another specific embodiment, inquiry request that the detection client is sent, comprising: predetermined interface is from client End receives the inquiry request for carrying the identification information of client.Correspondingly, the response inquiry request, from the storage Processing result is obtained in equipment, comprising: inquiry processing result corresponding with the identification information, and institute is returned to the client State execution state information.Here, the storage equipment is stored with the corresponding relationship of client identification information and processing result.
As shown in figure 8, customer end A sends the inquiry request in relation to task requests 1 to predetermined interface, predetermined interface is received After inquiry request, the inquiry processing result corresponding with customer end A identification information from storage equipment, and institute is returned to customer end A State execution state information.
In this way, client cannot be interacted directly with storage equipment query, appointed by predetermined interface from storage equipment query The processing result of business request, and execution state information is sent from predetermined interface to client, since client cannot be set with storage Standby contact can more improve the safety of the data stored in storage equipment.
In above scheme, optionally, the method also includes:
Debugging node backs up all processing message in the message channel;Wherein, the processing of backup disappears Breath is for carrying out wrong debugging.
As shown in figure 9, including the processing message of each processing node of backup in debugging node, observing system fortune is provided Capable window debugs the processing message backed up in node as will be described and runs on Debug convenient for staff's exploitation, debugging etc. In, the investigation of loophole is carried out to the program finished, and eliminates mistake or loophole as far as possible.
In technical solution described in the present embodiment, the n-th processing node of same task requests and the (n+1)th processing in response Node, the n-th processing node and the (n+1)th processing node are that task processing message is obtained from message channel, according to from message The task processing message that channel obtains executes corresponding predetermined operation, without between the n-th processing node and the (n+1)th processing node into Row interaction and call, solve the problems, such as the close coupling between different disposal node in the prior art, thus also contribute to it is subsequent right The maintenance of each processing node;At the same time, it is handled by abnormality processing node and abnormal task requests occurs, can located in time Manage various abnormal conditions, be such as able to achieve the complete rollback of data, i.e., will during executing the task requests generated data It deletes.
Embodiment two
The embodiment of the invention provides a kind of task processing systems, as shown in Figure 10, the system comprises:
N-th processing node 10 handles message for obtaining the n-th task from message channel, and is handled according to n-th task Message executes the n-th predetermined operation, sends feedback message to the message channel according to the implementing result of the n-th predetermined operation;Wherein, N-th predetermined operation is the pre- stator operation of one or more that the n-th processing node executes;
(n+1)th processing node 20, for being obtained from the message channel when n-th predetermined operation executes correct Message is handled based on the (n+1)th task that the feedback message is formed, and message is handled according to (n+1)th task and executes (n+1)th Predetermined operation;Wherein, (n+1)th predetermined operation is the pre- stator operation of one or more that the (n+1)th processing node executes;
Wherein, the (n+1)th processing node is next running node of the n-th processing node;N-th predetermined operation It is to respond the response operation of same task requests with (n+1)th predetermined operation;The n is the positive integer less than N;The N is Respond the total number of the processing node of the task requests.
Abnormality processing node 30, for obtaining base from the message channel when n-th predetermined operation executes mistake Message is handled in the abnormal task that the feedback message is formed, and message is handled according to the abnormal task and executes abnormality processing behaviour Make.
In an optional embodiment, the system also includes:
Control node 40, is used for:
Feedback message is sent to the message channel according to the implementing result of the n-th predetermined operation in the n-th processing node Later, judge whether the implementing result of n-th predetermined operation executes correctly based on the feedback message, wherein the feedback Message includes the implementing result of the n-th predetermined operation;
When n-th predetermined operation execution is correct, the task based on the task requests handles inventory to the message Channel is sent the (n+1)th task formed based on the feedback message and handles message;Wherein, the task processing inventory includes executing The predetermined operation that N number of processing node of the task requests and N number of processing node execute executes sequence;
When n-th predetermined operation executes mistake, abnormality processing node 30 is notified, institute is based on by abnormality processing node 30 It states task and handles the abnormal task processing message that inventory is formed to message channel transmission based on the feedback message.
In a specific embodiment, the n-th processing node 10, is also used to:
Judge whether n-th predetermined operation executes correctly;
When n-th predetermined operation executes it is correct when, then according to the implementing result of the n-th predetermined operation to the message channel Feed back first kind message;Wherein, the first kind message includes the implementing result of the n-th processing node, the n-th processing section Point handles the node identification for the (n+1)th processing node that inventory determines according to task and the task handles inventory;Wherein, institute Stating task processing inventory includes executing each processing node identification of node involved in the task requests and described each Handle execution sequence and the predetermined operation between node.
In another specific embodiment, the n-th processing node 10 is also used to:
Judge whether n-th predetermined operation executes correctly;
When n-th predetermined operation, which executes, occurs abnormal, then according to the implementing result of the n-th predetermined operation to the message Feed back the second class message in channel;Wherein, the second class message includes the implementing result of the n-th processing node, at described n-th Manage the abnormality processing node and task processing inventory that node determines.
In a specific embodiment, the abnormality processing node 30, is also used to:
Determine each processing node for needing to be implemented abnormality processing operation and the sequence for executing abnormality processing.
In an optional embodiment, the system also includes:
Equipment 50 is stored, the processing result sent for storing each processing node is stored in the described of the storage equipment Processing result, for responding the inquiry request for inquiring the execution of the task requests.
In an optional embodiment, the system also includes:
Detection node 60, for detecting the inquiry request of client transmission;
Responsive node 70, for responding the inquiry request, according to the processing result that stores in the storage equipment to visitor Family end sends execution state information.
In a specific embodiment, the system also includes:
Distribution node 80, is used for:
When receiving task requests, the time required to the task requests are completed in estimation;
When required time is greater than or equal to preset time threshold, task is distributed to send the client of the task requests Identification code;Wherein, the task identification code, for inquiring the processing result of the task requests.
In a specific embodiment, the detection node 60 is also used to receive carrying from client by storage equipment There is the inquiry request of the task identification code;
The responsive node 70 is also used to inquire and described by the storage equipment according to the task identification code The corresponding processing result of business identification code.
In another specific embodiment, the detection node 60 is also used to take by predetermined interface from client reception The inquiry request of identification information with client;
The responsive node 70 is also used to lead to the predetermined interface and inquires processing result corresponding with the identification information, And the execution state information is returned to the client.
In an optional embodiment, the system also includes:
Node 90 is debugged, for backing up to all processing message in the message channel;Wherein, backup is described Processing message is for carrying out wrong debugging.
It will be appreciated by those skilled in the art that in the task processing system of the present embodiment each node function, before can refer to It states the associated description of task processing method and understands.
In practical application, above-mentioned n-th processing node 10, (n+1)th handles node 20, abnormality processing node 30, control node 40, detection node 60, responsive node 70, distribution node 80, debug node 90 specific structure may both correspond to processor or clothes Business device.The specific structure of 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 Programmable logic device (PLC, Programmable Logic Controller) etc. have processing function electronic component or The set of electronic component.Wherein, the processor includes executable code, and the executable code is stored in storage medium In, the processor can execute specific each unit by being connected in the communication interfaces such as bus and the storage medium When corresponding function, is read from the storage medium and run the executable code.The storage medium is described for storing The part of executable code is preferably non-moment storage medium.It is described storage equipment 50 can be various species type memory or Server with store function, such as database.
In practical application, each functional module in task processing system can be cooperateed with real by the hardware resource in server It is existing, such as processor computing resource, the communication resource (communication as being used to support to realize various modes) realization.
Figure 11 illustrates an optional hardware structural diagram of server, including processor 11, input/defeated Outgoing interface 13 (such as display screen, touch screen, loudspeaker), storage medium 14 and network interface 12, component can be total through system 15 connection communication of line.Correspondingly, it is stored in the storage medium 14 of server 10 for executing provided in an embodiment of the present invention The executable instruction for processing method of being engaged in.
Wherein, the storage medium 14 can be flash memory device, random access memory (RAM, Random Access Memory), read-only memory (ROM, Read-Only Memory), magnetic or disk etc. is various can store journey The medium of sequence code.Preferably, the storage medium 14 can be non-volatile memory medium.
Wherein, processor 11 can be CPU, MCU, DSP, PLC, can also be processing circuit, for example, specific integrated circuit (ASIC, Application Specific Integrated Circuits).
Specifically, the processor 11 is read from the storage medium 14 by the system bus 15 and executes task Following steps can be performed in the executable instruction of processing method:
It notifies the n-th processing node to obtain the n-th task processing message from message channel, and is handled and disappeared according to n-th task Breath executes the n-th predetermined operation, sends feedback message to the message channel according to the implementing result of the n-th predetermined operation;Wherein, institute Stating the n-th predetermined operation is the pre- stator operation of one or more that the n-th processing node executes;When n-th predetermined operation is held When row is correct, the (n+1)th processing node is notified to obtain the (n+1)th task formed based on the feedback message from the message channel Message is handled, and message is handled according to (n+1)th task and executes the (n+1)th predetermined operation;Wherein, (n+1)th predetermined operation The pre- stator operation of one or more executed for the (n+1)th processing node;When n-th predetermined operation executes mistake, lead to Know that abnormality processing node is obtained the abnormal task formed based on the feedback message from the message channel and handles message, and root Abnormality processing operation is executed according to abnormal task processing message;Wherein, the (n+1)th processing node is the n-th processing section Next running node of point;N-th predetermined operation and (n+1)th predetermined operation are the response behaviour for responding same task requests Make;The n is the positive integer less than N;The N is the total number of the processing node of the response task requests.
Task processing system described in the present embodiment, the close coupling solved between different disposal node in the prior art are asked Topic, to also contribute to the subsequent maintenance to each processing node;At the same time, it is abnormal that appearance is handled by abnormality processing node Task requests, various abnormal conditions can be handled in time, be such as able to achieve the complete rollback of data, i.e., will be asked executing the task Data caused by during asking are deleted.
Embodiment three
Above-mentioned task processing system can realize that Figure 11 gives a kind of hardware configuration of task processing system by hardware Schematic diagram, as shown in figure 11, including multiple servers and multiple storage equipment;Wherein,
The server is divided into multiclass, comprising:
First kind server is distribution node, and server a indicates that distribution node, distribution node are responsible for receiving client in figure When holding the task requests sent, the time required to the task requests are completed in estimation;When required time is greater than or equal to preset time When threshold value, task identification code is distributed to send the client of the task requests;Wherein, the task identification code, for inquiring The processing result of the task requests;
Second class server is control node, and server b indicates that control node, control node are responsible for message channel in figure Management;The task requests for being also responsible for sending based on client generate task processing inventory, and pass through message channel to each place It manages node distribution task and handles message;Obtain the feedback message that each processing node is sent in message channel;
Third class server is conventional treatment node, and server n, n+1 indicate to respond at the n-th of same task requests in figure Node and the (n+1)th processing node are managed, the n-th processing node and the (n+1)th processing node, which are responsible for obtaining from message channel, appoints Business processing message executes corresponding predetermined operation according to the task processing message obtained from message channel, and according to predetermined operation Implementing result to the message channel send feedback message;
4th class server is abnormality processing node, and server c indicates abnormality processing node in figure;Abnormality processing node, It is responsible for when the implementing result of the n-th processing node or the (n+1)th processing node execution predetermined operation is to execute mistake, from the message The abnormal task processing that the implementing result based on this kind of predetermined operation is the feedback message formation for executing mistake is obtained in channel to disappear Breath, and message is handled according to the abnormal task and executes abnormality processing operation;
5th class server is detection node, and server d indicates detection node in figure;Detection node is responsible for detecting client The inquiry request of transmission;
6th class server is responsive node, and server e indicates responsive node in figure;Responsive node is responsible for looking into described in response Request is ask, execution state information is sent to client according to the processing result stored in the first storage equipment;
7th class server is debugging node, and server f indicates debugging node in figure;Debugging node is responsible for depositing according to second The processing message in message channel backed up in storage equipment is debugged;
The first storage equipment, the processing result sent for storing each processing node, is stored in the storage equipment The processing result, can be used for responding the inquiry request for inquiring the execution of the task requests;
The second storage equipment, for all processing message in backup messages channel, so that debugging section point is adjusted 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 be interacted with the first storage equipment query, through task identification code from storage equipment query task requests Reason improves the convenience of query task implementing result as a result, facilitate client query.The of same task requests in response N handles node and the (n+1)th processing node, and the n-th processing node and the (n+1)th processing node need to only be obtained from message channel Task handles message, then executes corresponding predetermined operation according to the task processing message obtained from message channel, and to message Channel feedback executes the implementing result of corresponding predetermined operation, directly sends and appoints to the (n+1)th processing node without the n-th processing node Business processing message is mutually called without the n-th processing node and the (n+1)th processing node.This system passes through abnormality processing section Point is responsible for handling anomalous event, due to being by message channel transmission message, rather than by one between different disposal node A processing node is directly given to next processing node;So when an error occurs, which can be logical from message The processing message that the transmission between two processing nodes is obtained in road, carries out error analysis;Solve at least in the prior art because System caused by close coupling between different disposal node can not obtain exception information problem.Debugging node is set from second processing The processing message of the standby middle each processing node for obtaining backup, it is possible to provide the window of observing system operation is opened convenient for staff Hair, debugging etc..
Example IV
Figure 12 is a kind of O&M process structure figure of task processing system provided in an embodiment of the present invention, as shown in figure 12, The framework mainly includes three parts:
First part is access layer, and the access layer includes: interface and task requests processing unit;
Wherein, the interface is the functional interfaces that whole system provides, and is called for web page or other systems.
Wherein, the task requests processing unit is responsible for analyzing received task requests, by the task Request splits into multiple processing steps, wherein each processing step is realized by a processing module.
Specifically, the working principle of the task requests processing unit: after receiving function request, processing mould is splitted into The atom interface of internal subsystems in block, and orderly step is arranged according to task requests, such as by function request dismantling at step Suddenly (step) 1, step2, step3, as a task processing message dilivery into message queue.Wherein, the processing Module includes internal subsystems and actuator.
Optionally, the task requests processing unit is also responsible for distribution task identification code.The interface is also responsible for institute It states task identification code and returns to called side.For example, the called side is client.The called side can be based on the task identification Code query processing result.
In practical application, the interface for receiving task requests and the interface for returning to processing result can synthesize an interface.
Second part is transport layer, and the transport layer includes: message queue;
Wherein, the message queue is the channel for driving whole system operating.Each processing module by message queue into Row communication.
Part III is execution level, and the execution level includes: conventional actuator and subsystem corresponding with conventional actuator System.
Wherein, the conventional actuator is atom interface actuator, the corresponding internal subsystems of each conventional actuator. Here, the atom interface is the interface for referring to feedback and running succeeded or execute failure information, is exported by the atom interface Information be specific information.
The conventional actuator is responsible for one's own task in monitoring information queue and handles message, and task handles message It is delivered by offer task requests processing unit or the conventional actuator of other upstreams is delivered.Conventional actuator receives to one's name Task processing message after, carry out personalized logical process, processing result write into storage equipment such as after the completion of processing In translog, inquired for called side;Conventional actuator is also responsible for again launching feedback message in message queue.
Optionally, the execution level further include: abnormality processing actuator (Error Executor), backup actuator (Debug Executor)。
Wherein, the abnormality processing actuator is responsible for the acquisition from the message channel and is formed based on the feedback message Abnormal task handle message, and according to the abnormal task handle message execute abnormality processing operation.
All conventional actuators, which execute, occurs mistake, can set the recipient of message to abnormality processing actuator, different Often processing actuator is responsible for determining abnormal task processing message, is delivered in message queue again.For example, working as third actuator When executing step3 appearance exception, third actuator, the second actuator, the first actuator are notified, according to step3- > step2- > Step1 successively executes rolling back action.
In addition, the abnormality processing actuator, can be used as the window of observing system exception, does not use on subsystems Log is looked into everywhere, occurs abnormal node convenient for positioning.
Backup actuator is responsible for backing up all processing message in the message channel, for developing debugging, institute It states backup actuator equally and can be used as the window of the entire big system operation of an observation.
Internal subsystems corresponding with conventional actuator, are to provide the operational system of specific special services, are responsible for and intelligence Software, smart machine, intelligent robot or computer system etc. interact, to ensure can be achieved for each step.
Optionally, the framework further include:
Part IV, the Part IV include: storage equipment (such as TransLog).
Wherein, the storage equipment is responsible for the processing result that each actuator is sent, and is stored in the described of the storage equipment Processing result, for responding the inquiry request for inquiring the execution of the task requests.
Specifically, nosql storage or DB storage can be used in the storage equipment.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.Apparatus embodiments described above are merely indicative, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can combine, or It is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed each composition portion Mutual coupling or direct-coupling or communication connection is divided to can be through some interfaces, the INDIRECT COUPLING of equipment or unit Or communication connection, it can be electrical, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member, which can be or may not be, to be physically separated, aobvious as unit The component shown can be or may not be physical unit;Both it can be located in one place, and may be distributed over multiple network lists In member;Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated in one processing unit, it can also To be each unit individually as a unit, can also be integrated in one unit with two or more units;It is above-mentioned Integrated unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, which exists When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: movable storage device, read-only deposits Reservoir (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or The various media that can store program code such as CD.
If alternatively, the above-mentioned integrated unit of the present invention is realized in the form of software function module and as independent product When selling or using, it also can store in a computer readable storage medium.Based on this understanding, the present invention is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product is stored in a storage medium, including some instructions are used so that computer equipment (can be with It is personal computer, server or network equipment etc.) execute all or part of each embodiment the method for the present invention. And storage medium above-mentioned includes: that movable storage device, ROM, RAM, magnetic or disk etc. are various can store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (22)

1. a kind of task processing method, which is characterized in that the method is applied to connect including message channel and with message channel In the task processing system of the multiple processing nodes connect, comprising:
N-th processing node obtains the n-th task from message channel and handles message, and handles message according to n-th task and execute n-th Predetermined operation sends feedback message to the message channel according to the implementing result of the n-th predetermined operation;Wherein, described n-th is predetermined Operation is the pre- stator operation of one or more that the n-th processing node executes;
When n-th predetermined operation execution is correct, the (n+1)th processing node is obtained from the message channel based on the feedback The (n+1)th task that message is formed handles message, and handles message according to (n+1)th task and execute the (n+1)th predetermined operation;Its In, (n+1)th predetermined operation is the pre- stator operation of one or more that the (n+1)th processing node executes;
Wherein, the (n+1)th processing node is next running node of the n-th processing node;N-th predetermined operation and institute Stating the (n+1)th predetermined operation is to respond the response operation of same task requests;The n is the positive integer less than N;The N is response The total number of the processing node of the task requests;
When n-th predetermined operation executes mistake, abnormality processing node is obtained from the message channel based on the feedback The abnormal task that message is formed handles message, and handles message according to the abnormal task and execute abnormality processing operation.
2. the method according to claim 1, wherein the implementing result according to the n-th predetermined operation is to described After message channel sends feedback message, the method also includes:
Control node judges whether the implementing result of n-th predetermined operation executes correctly based on the feedback message, wherein institute State the implementing result that feedback message includes the n-th predetermined operation;
When n-th predetermined operation execution is correct, the task based on the task requests handles inventory to the message channel It sends the (n+1)th task formed based on the feedback message and handles message;Wherein, the task processing inventory includes described in execution The predetermined operation that N number of processing node of task requests and N number of processing node execute executes sequence;
When n-th predetermined operation executes mistake, inventory is handled based on the task and is based on institute to message channel transmission State the abnormal task processing message of feedback message formation.
3. the method according to claim 1, wherein the method also includes:
The n-th processing node judges whether n-th predetermined operation executes correctly;
When n-th predetermined operation execution is correct, then fed back according to the implementing result of the n-th predetermined operation to the message channel First kind message;Wherein, the first kind message includes the implementing result of the n-th processing node, the n-th processing node root The node identification of the (n+1)th processing node determined according to task processing inventory and the task handle inventory;Wherein, described Business processing inventory includes executing the node identification of each processing node and each processing involved in the task requests Execution sequence and predetermined operation between node.
4. the method according to claim 1, wherein the method also includes:
The n-th processing node judges whether n-th predetermined operation executes correctly;
When n-th predetermined operation, which executes, occurs abnormal, then according to the implementing result of the n-th predetermined operation to the message channel Feed back the second class message;Wherein, the second class message includes the implementing result of the n-th processing node, the n-th processing section The determining abnormality processing node of point and task handle inventory;Wherein, the task processing inventory includes executing task requests institute Execution sequence and predetermined operation between the node identification for each processing node being related to and each processing node.
5. the method according to claim 1, wherein at the abnormal task formed based on the feedback message Manage message, comprising:
Determine each processing node for needing to be implemented abnormality processing operation and the sequence for executing abnormality processing.
6. the method according to claim 1, wherein the method also includes:
The processing result of each processing node is sent in storage equipment, the processing result of the storage equipment is stored in, For responding the inquiry request for inquiring the execution of the task requests.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
Detect the inquiry request that client is sent;
The inquiry request is responded, execution state letter is sent to client according to the processing result stored in the storage equipment Breath.
8. the method according to the description of claim 7 is characterized in that the method also includes:
When receiving task requests, the time required to the task requests are completed in estimation;
When required time is greater than or equal to preset time threshold, task identification is distributed to send the client of the task requests Code;Wherein, the task identification code, for inquiring the processing result of the task requests.
9. according to the method described in claim 8, it is characterized in that,
The inquiry request that the detection client is sent, comprising:
Storage equipment receives the inquiry request for carrying the task identification code from client;
The response inquiry request, obtains processing result from the storage equipment, comprising:
The storage equipment inquires processing result corresponding with the task identification code according to the task identification code;Wherein, institute State the mapping relations that storage equipment is stored with task identification code and processing result.
10. the method according to the description of claim 7 is characterized in that
The inquiry request that the detection client is sent, comprising:
Predetermined interface receives the inquiry request for carrying the identification information of client from client;
The response inquiry request, obtains processing result from the storage equipment, comprising:
By predetermined interface from storage equipment query processing result corresponding with the identification information, and to the client Return to execution state information;
Wherein, the storage equipment is stored with the mapping relations of the identification information and processing result of client.
11. the method according to claim 1, wherein the method also includes:
Debugging node backs up all processing message in the message channel;Wherein, the processing message of backup is used In the wrong debugging of progress.
12. a kind of task processing system, which is characterized in that the system comprises:
Message channel is used for transmission message;
N-th processing node, connect with the message channel, handles message, and root for obtaining the n-th task from the message channel The n-th predetermined operation is executed according to n-th task processing message, according to the implementing result of the n-th predetermined operation to the message channel Send feedback message;Wherein, n-th predetermined operation is the pre- stator operation of one or more that the n-th processing node executes;
(n+1)th processing node, connect with the message channel, for disappearing from described when n-th predetermined operation executes correct The (n+1)th task formed based on the feedback message is obtained in breath channel and handles message, and is handled and disappeared according to (n+1)th task Breath executes the (n+1)th predetermined operation;Wherein, (n+1)th predetermined operation is the one or more that the (n+1)th processing node executes Pre- stator operation;Wherein, the (n+1)th processing node is next running node of the n-th processing node;Described n-th is predetermined Operation and (n+1)th predetermined operation are to respond the response operation of same task requests;The n is the positive integer less than N;It is described N is the total number of the processing node of the response task requests;
Abnormality processing node is connect with the message channel, for disappearing from described when n-th predetermined operation executes mistake The abnormal task formed based on the feedback message is obtained in breath channel and handles message, and message is handled according to the abnormal task Execute abnormality processing operation.
13. system according to claim 12, which is characterized in that the system also includes:
Control node is used for:
After the n-th processing node sends feedback message to the message channel according to the implementing result of the n-th predetermined operation, Judge whether the implementing result of n-th predetermined operation executes correctly based on the feedback message, wherein the feedback message packet Include the implementing result of the n-th predetermined operation;
When n-th predetermined operation execution is correct, the task based on the task requests handles inventory to the message channel It sends the (n+1)th task formed based on the feedback message and handles message;Wherein, the task processing inventory includes described in execution The predetermined operation that N number of processing node of task requests and N number of processing node execute executes sequence;
When n-th predetermined operation executes mistake, inventory is handled based on the task and is based on institute to message channel transmission State the abnormal task processing message of feedback message formation.
14. system according to claim 12, which is characterized in that
The n-th processing node, is also used to:
Judge whether n-th predetermined operation executes correctly;
When n-th predetermined operation execution is correct, then fed back according to the implementing result of the n-th predetermined operation to the message channel First kind message;Wherein, the first kind message includes the implementing result of the n-th processing node, the n-th processing node root The node identification of the (n+1)th processing node determined according to task processing inventory and the task handle inventory;Wherein, described Business processing inventory includes executing the node identification of each processing node and each processing involved in the task requests Execution sequence and predetermined operation between node.
15. system according to claim 12, which is characterized in that
The n-th processing node, is also used to:
Judge whether n-th predetermined operation executes correctly;
When n-th predetermined operation, which executes, occurs abnormal, then according to the implementing result of the n-th predetermined operation to the message channel Feed back the second class message;Wherein, the second class message includes the implementing result of the n-th processing node, the n-th processing section The determining abnormality processing node of point and task handle inventory;Wherein, the task processing inventory includes executing task requests institute Execution sequence and predetermined operation between the node identification for each processing node being related to and each processing node.
16. system according to claim 12, which is characterized in that the abnormality processing node is also used to:
Determine each processing node for needing to be implemented abnormality processing operation and the sequence for executing abnormality processing.
17. system according to claim 12, which is characterized in that the system also includes:
Equipment is stored, the processing result sent for storing each processing node is stored in the processing knot of the storage equipment Fruit, for responding the inquiry request for inquiring the execution of the task requests.
18. system according to claim 17, which is characterized in that the system also includes:
Detection node, for detecting the inquiry request of client transmission;
Responsive node is sent out according to the processing result stored in the storage equipment to client for responding the inquiry request Send execution state information.
19. system according to claim 18, which is characterized in that the system also includes:
Distribution node is used for:
When receiving task requests, the time required to the task requests are completed in estimation;
When required time is greater than or equal to preset time threshold, task identification is distributed to send the client of the task requests Code;Wherein, the task identification code, for inquiring the processing result of the task requests.
20. system according to claim 19, which is characterized in that
The detection node is also used to receive the inquiry for carrying the task identification code from client by storage equipment and asks It asks;
The responsive node is also used to through the storage equipment according to the task identification code, inquiry and the task identification The corresponding processing result of code;Wherein, the storage equipment is stored with the mapping relations of task identification code and processing result.
21. system according to claim 18, which is characterized in that
The detection node is also used to ask by predetermined interface from the inquiry that client receives the identification information for carrying client It asks;
The responsive node is also used to lead to the predetermined interface from storage equipment query processing knot corresponding with the identification information Fruit, and execution state information is returned to the client;Wherein, the storage equipment is stored with identification information and the place of client Manage the mapping relations of result.
22. system according to claim 12, which is characterized in that the system also includes:
Node is debugged, for backing up to all processing message in the message channel;Wherein, the processing of backup disappears Breath is for carrying out wrong 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 CN106250254A (en) 2016-12-21
CN106250254B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN110502317B (en) * 2018-05-16 2024-03-01 北京京东尚科信息技术有限公司 Transaction management method and device
CN109274755B (en) * 2018-10-12 2019-12-10 成都信息工程大学 longitudinal, transverse, bidirectional and cross-node cross collaborative interaction method based on multi-core cross-domain network
CN113467908B (en) * 2021-06-23 2024-02-20 深圳市蘑菇财富技术有限公司 Task execution method, 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

Also Published As

Publication number Publication date
CN106250254A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN106250254B (en) A kind of task processing method and system
CN110807064B (en) Data recovery device in RAC distributed database cluster system
CA3077225A1 (en) Methods for improved web application testing using remote headless browsers and devices thereof
CN109656782A (en) Visual scheduling monitoring method, device and server
US20110289354A1 (en) Distributed Batch Runner
CN110611707B (en) Task scheduling method and device
CN109144829A (en) Fault handling method, device, computer equipment and storage medium
TW200405696A (en) Client assisted autonomic computing
CN104182683B (en) A kind of monitoring method of online transaction, apparatus and system
CN105653322B (en) The processing method of O&M server and server event
CN104391777B (en) Cloud platform and its operation and monitoring method and device based on (SuSE) Linux OS
CN113220431A (en) Cross-cloud distributed data task scheduling method, device and storage medium
CN113220378A (en) Flow processing method and device, electronic equipment, storage medium and system
CN108228789A (en) The synchronous abnormality restoration methods and device triggered from node
CN110008034A (en) Task automated execution method, apparatus, electronic equipment and storage medium
CN113645314A (en) Private cloud deployment method and server
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN104346233B (en) A kind of fault recovery method and device for computer system
CN102868594B (en) Method and device for message processing
CN106230666B (en) A kind of monitoring method and monitoring system of service availability
CN108776618A (en) Distributed workflow management method and device
CN108920683A (en) A kind of method, apparatus and storage medium of cloud computing platform downloading external resource
CN112134764B (en) Method and device for determining connectivity of test environment
CN114371939A (en) Task processing method, device, electronic equipment, storage medium and program product
JP6382610B2 (en) Simulator system, gateway system test apparatus, and gateway system test method

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