CN109783215A - Abnormal task processing method and relevant apparatus - Google Patents

Abnormal task processing method and relevant apparatus Download PDF

Info

Publication number
CN109783215A
CN109783215A CN201910039374.7A CN201910039374A CN109783215A CN 109783215 A CN109783215 A CN 109783215A CN 201910039374 A CN201910039374 A CN 201910039374A CN 109783215 A CN109783215 A CN 109783215A
Authority
CN
China
Prior art keywords
call instruction
mentioned
server
instruction
executes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910039374.7A
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910039374.7A priority Critical patent/CN109783215A/en
Publication of CN109783215A publication Critical patent/CN109783215A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

This application provides a kind of abnormal task processing method and processing device, the above method includes: that server receives the call instruction from client;Above-mentioned server executes above-mentioned call instruction, re-executes above-mentioned call instruction if mistake occurs;For above-mentioned server in the case where executing the above-mentioned successful situation of call instruction, Xiang Shangshu client sends implementing result;For above-mentioned server in the case where re-executing above-mentioned call instruction generation mistake, Xiang Shangshu client sends error message.Implement the application, the resource of server and client side can be saved with saving signaling.

Description

Abnormal task processing method and relevant apparatus
Technical field
The present invention relates to computer field more particularly to a kind of abnormal task processing method and relevant apparatus.
Background technique
In the various application scenarios of internet, server usually needs to interact with client.In server and visitor During family end interacts, client often sends call instruction to server.The call instruction is used to indicate server Corresponding operation is carried out, to obtain the requested content of client.
Due to the failure on software or hardware, there may be mistakes during executing the call instruction for server.One As for, when server generates mistake during executing call instruction, can directly to client return error result, client End can repeatedly send call instruction, until server correctly executes the call instruction.
In this carry into execution a plan, server needs are frequently interacted with client, are wasted signaling, are wasted clothes The resource of business device and client.
Summary of the invention
The application proposes a kind of abnormal task processing method, can save the resource of server and client side with saving signaling.
In a first aspect, the application proposes a kind of abnormal task processing method, comprising:
Server receives the call instruction from client;
Above-mentioned server executes above-mentioned call instruction, re-executes above-mentioned call instruction if mistake occurs;
For above-mentioned server in the case where executing the above-mentioned successful situation of call instruction, Xiang Shangshu client sends implementing result;
For above-mentioned server in the case where re-executing above-mentioned call instruction generation mistake, Xiang Shangshu client sends mistake Information.
Implement the embodiment of the present application, the resource of server and client side can be saved with saving signaling.
With reference to first aspect, in one possible implementation, the above method further include:
Above-mentioned server stores above-mentioned call instruction;
It is above-mentioned to re-execute above-mentioned call instruction, comprising: to read above-mentioned call instruction, re-execute above-mentioned call instruction.
In one possible implementation, the above-mentioned call instruction of above-mentioned reading re-executes above-mentioned call instruction, packet It includes:
Above-mentioned server reads above-mentioned call instruction by the period of preset duration, re-executes above-mentioned call instruction.
Implement the embodiment of the present application, re-executes above-mentioned call instruction by the period of prefixed time interval, can be improved It states call instruction and is performed successful probability.
It is in one possible implementation, above-mentioned to re-execute above-mentioned call instruction, comprising:
Above-mentioned server exports operation interface;
Above-mentioned server receives operational order by aforesaid operations interface, and aforesaid operations instruction, which is used to indicate, to be re-executed Above-mentioned call instruction;
Above-mentioned server re-executes above-mentioned call instruction.
Implement the embodiment of the present application, user can control the execution of above-mentioned call instruction according to the actual situation, can be more preferable The resource of ground saving server.
In one possible implementation, above-mentioned in the case where re-executing above-mentioned call instruction generation mistake, to Above-mentioned client sends error message, comprising:
In the case where the number for re-executing above-mentioned call instruction generation mistake reaches threshold value, Xiang Shangshu client is sent Error message.
In one possible implementation, above-mentioned in the case where re-executing above-mentioned call instruction generation mistake, to Above-mentioned client sends error message, comprising:
Above-mentioned server in the case where re-executing aforesaid operations instruction generation mistake, believe by the reason that mistake occurs for capture Breath;Above-mentioned server merges the instruction information that above-mentioned cause information and instruction client stop sending call instruction, Obtain above-mentioned error message;Above-mentioned server sends error message to above-mentioned client.
Implement the embodiment of the present application, the number for re-executing above-mentioned call instruction is controlled within threshold range, it can be with Save the resource of server.
With reference to first aspect, in one possible implementation, it is above-mentioned re-execute above-mentioned call instruction after, also Include:
Above-mentioned server deletes the above-mentioned call instruction of storage.
Implement the embodiment of the present application, the resource of server and client side can be saved with saving signaling.
Second aspect, the application propose a kind of abnormal task processing unit, comprising:
Receiving unit, for receiving the call instruction from client;
Execution unit re-executes above-mentioned call instruction if mistake occurs for executing above-mentioned call instruction;
First transmission unit, in the case where executing the above-mentioned successful situation of call instruction, Xiang Shangshu client to send execution As a result;
Second transmission unit, in the case where re-executing above-mentioned call instruction mistake occurring, Xiang Shangshu client Send error message.
With reference to first aspect, in one possible implementation, above-mentioned apparatus further include:
Storage unit, for storing above-mentioned call instruction;
Above-mentioned execution unit is specifically used for reading above-mentioned call instruction, re-executes above-mentioned call instruction.
In one possible implementation, above-mentioned execution unit is specifically used for output operation interface;Pass through aforesaid operations Interface receives operational order, and aforesaid operations instruction, which is used to indicate, re-executes above-mentioned call instruction;Read above-mentioned call instruction; Re-execute above-mentioned call instruction.
In one possible implementation, above-mentioned execution unit is specifically used for reading using preset duration as the period above-mentioned Call instruction re-executes above-mentioned call instruction.
In one possible implementation, above-mentioned second transmission unit, specifically for referring to re-executing above-mentioned calling In the case where enabling the number that mistake occurs reach threshold value, Xiang Shangshu client sends error message.
In one possible implementation, above-mentioned apparatus further include:
Unit is deleted, specifically for deleting the above-mentioned call instruction of storage.
The third aspect, the application propose a kind of abnormal task processing unit, including processor, memory and transceiver;On Processor, above-mentioned memory and above-mentioned transceiver is stated to be connected with each other by bus;Wherein, above-mentioned transceiver refers to for receiving to call It enables, and sends implementing result or error message;Above-mentioned memory is for storing computer program, above-mentioned computer program packet Program instruction is included, above-mentioned processor is configured for calling above procedure instruction, executes the method as shown in first aspect.
Fourth aspect, the application propose a kind of computer readable storage medium, which is characterized in that above-mentioned computer-readable to deposit Storage media is stored with computer program, and above-mentioned computer program includes program instruction, and above procedure instruction, which is worked as, to be executed by processor When, so that above-mentioned processor is executed the method as shown in first aspect.
5th aspect, the embodiment of the present application provides a kind of computer program product comprising program instruction, when it is being counted When being run on calculation machine, so that computer executes the method as shown in first aspect.
Implement the application, the resource of server and client side can be saved with saving signaling.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application or in background technique below will be implemented the application Attached drawing needed in example or background technique is illustrated.
Fig. 1 is a kind of flow chart for abnormal task processing method that the application proposes;
Fig. 2 is the flow chart for another abnormal task processing method that the application proposes;
Fig. 3 is the flow chart for another abnormal task processing method that the application proposes;
Fig. 4 is a kind of structural schematic diagram for abnormal task processing unit that the application proposes;
Fig. 5 is the structural schematic diagram for another abnormal task processing unit that the application proposes;
Fig. 6 is the structural schematic diagram for another abnormal task processing unit that the application proposes.
Specific embodiment
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, is not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, meaning Figure, which is to cover, non-exclusive includes.Such as contain the process, method, system, product or equipment of a series of steps or units It is not limited to listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also Including other step or units intrinsic for these process, methods or equipment.
The application proposes a kind of abnormal task processing method and processing device, can save server and client side with saving signaling Resource.
Fig. 1 is a kind of abnormal task processing method that the application proposes, the above method is applied to server, above method packet Include the following contents:
101, server receives the call instruction from client.
Above-mentioned call instruction is used to indicate above-mentioned server and completes relevant operation, with execution knot needed for obtaining client Fruit.
For example, single instrction under user is sent in shopping process by user end to server, then above-mentioned payment refers to It enables including userspersonal information, the instruction that request server obtains the instruction of account balance information, request server is withholdd, And request server generates the instruction of order information.Above-mentioned lower single instrction may be used to indicate server and complete to obtain more than account Volume, the operation such as withhold and generate order.
Above-mentioned call instruction may include operation code and operand, and aforesaid operations code indicates the operation to be completed of server, Aforesaid operations number refers to the element address where the data for needing to participate in operation and the data.
In one possible implementation, above-mentioned server can using various communications protocols and above-mentioned client into Row connection, above-mentioned communication protocol may include hypertext transfer protocol (HyperText transfer protocol, HTTP), File Transfer Protocol (file transfer protocol, FTP) and remote terminal protocol etc..
In one possible implementation, if there is multiple client to send above-mentioned call instruction, above-mentioned clothes to server Business device can open multiple receiving process, receive the data packet from each terminal device simultaneously by different receiving ports.
After server receives above-mentioned call instruction, above-mentioned call instruction persistent storage can be deposited non-volatile In reservoir, it also may include electronics that above-mentioned nonvolatile memory, which may include magnetic disk storage, such as mechanical hard disk, floppy disk, The formula of erasing can make carbon copies read-only memory (electrically-erasable programmable read-only memory, EEPROM), flash memories etc..
102, above-mentioned server executes above-mentioned call instruction, re-executes above-mentioned call instruction if mistake occurs.
After above-mentioned server obtains above-mentioned call instruction, above-mentioned call instruction is executed, according to above-mentioned call instruction to finger Determine element address and obtain related data, and data are handled, implementing result needed for obtaining client.
In one possible implementation, above-mentioned call instruction is executed when the error occurs in server, can produce and hold Row unsuccessfully identifies.If server detects that above-mentioned execution unsuccessfully identifies, above-mentioned call instruction is re-executed.
Above-mentioned server executed there are many reason of above-metioned instruction breaks down, wherein may include instruction errors, service Device failure and with one of third party's memory cell failure or a variety of.For instruction errors, server is receiving client Call instruction when mistake will occur so that the above-mentioned call instruction data information that is included is imperfect or mistake.For clothes Business device failure, it may be possible to which the hardware fault or software runtimeerror of server prevent call instruction from being performed.Above-mentioned third Square memory cell failure may include storage server, database etc..
By taking third party's memory cell failure as an example, during user carries out shopping at network, pass through user end to server Send the call instruction for obtaining merchandise news, after server receives above-mentioned call instruction, access one or more databases or Storage server obtains the data information of commodity, and above-mentioned data information is returned to client.When database or storage clothes When business device breaks down, above-mentioned server cannot will successfully obtain the data information of commodity, and above-mentioned server executes above-metioned instruction There is mistake.
In one possible implementation, when server executes above-mentioned call instruction generation mistake, above-mentioned calling refers to Order may lose from high speed access storage.Above-mentioned server can store above-mentioned call instruction to non-volatile memories In device.Above-mentioned server reads above-mentioned call instruction, weight after executing above-mentioned call instruction failure from nonvolatile memory Newly execute above-mentioned call instruction.
103, for above-mentioned server in the case where executing the above-mentioned successful situation of call instruction, the transmission of Xiang Shangshu client executes knot Fruit.
Above-metioned instruction success is re-executed in the case where server executes the successful situation of above-metioned instruction for the first time, or in server In the case where, above-mentioned server will obtain implementing result.Above-mentioned server sends out above-mentioned implementing result after obtaining implementing result Give client.
For example, single instrction under user is sent in shopping process by user end to server, server receive down After single instrction, user account remaining sum is obtained according to above-mentioned lower single instrction, operation of withholing is executed, ultimately generates order information and withhold Success flag.After above-mentioned server has executed above-mentioned lower single instrction, the above order information and success flag of withholing are sent to visitor Family end.
104, in the case where re-executing above-mentioned call instruction generation mistake, Xiang Shangshu client is sent above-mentioned server Error message.
In the case where above-mentioned call instruction generation mistake is performed a plurality of times in server, do not continue to execute above-metioned instruction, to Client sends error message.
In one possible implementation, above-mentioned error message may include that server executes above-metioned instruction generation mistake The reason of information, request server retransmit the solicited message of above-mentioned call instruction or request server stops sending State the solicited message of call instruction.
In one possible implementation, after above-mentioned false command being performed a plurality of times, mistake occurs, capture produces server The reason information of raw mistake.If the reason that mistake occurs is that call instruction itself mistake occurs, above-mentioned error message be may include There is the reason information of mistake and requesting client retransmits the instruction information of call instruction.Client receives above-mentioned After error message, call instruction can be sent to above-mentioned server again.
For example, for user during shopping at network, server is when re-executing above-metioned instruction generation mistake, capture The reason information of mistake occurs.If re-executing above-mentioned call instruction the reason of mistake occurs is that call instruction itself mistake occurs Accidentally, above-mentioned server can merge the information that above-mentioned cause information and requesting client retransmit call instruction, obtain Obtain error message.Call instruction is sent to server again after receiving above-mentioned error message by above-mentioned client.
In one possible implementation, when the reason for executing call instruction generation mistake is unrelated with call instruction itself When, above-mentioned error message may include the reason information of mistake occur, and instruction client stops sending the finger of call instruction Show information.
For example, for user during shopping at network, server is when re-executing above-metioned instruction generation mistake, capture The reason information of mistake occurs.If executing above-mentioned call instruction the reason of mistake occurs is server fail, cause to service Device can not correctly execute above-mentioned call instruction.Above-mentioned cause information and requesting client can be stopped sending by above-mentioned server The information of call instruction merges, and obtains error message.Above-mentioned client after receiving above-mentioned error message, no longer to Above-mentioned server sends call instruction.
Implement the embodiment of the present application, the resource of server and client side can be saved with saving signaling.
Fig. 2 is the flow chart for another abnormal task processing method that the application proposes, the above method is applied to server. The above method includes the following contents:
201, server receives the call instruction from client.
202, server stores above-mentioned call instruction.
After server receives above-mentioned call instruction, usually all above-mentioned call instruction can be stored in the random of local memory In memory (random access memory, RAM).When above-mentioned server execute above-metioned instruction after, regardless of execute at Function still executes failure, and above-mentioned call instruction may be deleted from local memory, and server cannot re-execute above-mentioned Call instruction.
In order to which above-mentioned call instruction can be re-executed when executing failure, server receive above-mentioned call instruction it It afterwards, can be by above-mentioned call instruction persistent storage into memory.Wherein, above-mentioned memory is nonvolatile memory, can It also may include that the electronics formula of erasing can make carbon copies read-only memory to include magnetic disk storage, such as mechanical hard disk, floppy disk (electrically-erasable programmable read-only memory, EEPROM), flash memories etc..
For example, after above-mentioned server receives above-mentioned call instruction, above-mentioned call instruction initially enters server In RAM.Local hard drive can be written in above-mentioned call instruction in RAM by server.When server executes above-mentioned call instruction When failure, the above-mentioned call instruction in memory may be lost, and server can read above-mentioned call instruction from local hard drive, weight Newly execute above-mentioned call instruction.
203, above-mentioned server executes above-mentioned call instruction, reads above-mentioned call instruction if mistake occurs, re-executes Above-mentioned call instruction.
Server is when executing above-mentioned call instruction, it may occur however that mistake.The reason that mistake occurs may be server sheet The software or hardware fault of body, it is also possible to which third party's storage unit breaks down.
Wherein, above-mentioned third party's storage unit is stored with the requested data of above-mentioned call instruction, above-mentioned third party's storage Unit includes storage server and database etc..When above-mentioned third party's storage unit breaks down, in above-mentioned server execution When stating call instruction, the data of needs possibly can not be obtained from above-mentioned third party's storage unit, above-mentioned server executes above-mentioned Mistake can occur for call instruction.
If above-mentioned server, which executes above-mentioned call instruction, occurs mistake, read from nonvolatile memory stored Above-mentioned call instruction re-executes above-mentioned call instruction.
In one possible implementation, if above-mentioned server executes above-metioned instruction and sends mistake, mistake can be generated Mark.If above-mentioned server captures above-mentioned error identification, the process for executing above-mentioned call instruction can be entered, from non-volatile Stored above-mentioned call instruction is read in memory, re-executes above-mentioned call instruction.
204, above-mentioned server reads above-mentioned call instruction, re-executes above-mentioned call instruction, comprising: above-mentioned server is defeated Operation interface out;Above-mentioned server receives operational order by aforesaid operations interface, and aforesaid operations instruction is used to indicate again Execute above-mentioned call instruction;Server reads above-mentioned call instruction, re-executes above-mentioned call instruction.
In one possible implementation, when above-mentioned server executes above-metioned instruction failure, operation interface can be exported. Aforesaid operations interface is used to capture the operational order of operation personnel's input, and aforesaid operations instruction is used to indicate server and re-executes Above-mentioned call instruction.When above-mentioned server captures aforesaid operations instruction, aforesaid operations instruction is read, above-mentioned behaviour is re-executed It instructs.
In one in possible implementation, aforesaid operations instruction may include that instruction starts to execute the life of call instruction It enables, and executes the maximum times of above-mentioned call instruction.
For example, after server exports aforesaid operations interface, what operation personnel inputted on aforesaid operations interface Operational order may include: the maximum times N for executing above-mentioned call instruction, and start to execute the order of call instruction.Work as clothes Business device receives aforesaid operations instruction by aforesaid operations interface, starts to read stored above-mentioned call instruction, re-execute Above-mentioned call instruction.If N is greater than 1, above-mentioned server re-executes after executing above-mentioned call instruction for the first time and mistake occur Call instruction is stated, until the number that mistake occur in the above-mentioned call instruction of successful execution or the above-mentioned call instruction of execution reaches n times.
Implement the embodiment of the present application, server stops re-executing call instruction when errors number occurs and reaches threshold value, Server resource can be saved.
205, above-mentioned server reads above-mentioned call instruction, re-executes above-mentioned call instruction, comprising: above-mentioned server with Preset duration is to read above-mentioned call instruction in the period, re-executes above-mentioned call instruction.
In one possible implementation, above-mentioned server is using preset duration to store in periodic searches storage device Above-mentioned call instruction reads above-mentioned call instruction if searching above-mentioned call instruction, re-executes above-mentioned call instruction.Its In, above-mentioned preset duration can be set according to the actual situation.
In one possible implementation, if the above-mentioned above-mentioned call instruction of server successful execution, by implementing result Client is returned to, and deletes stored above-mentioned call instruction, stopping re-executes above-mentioned call instruction.
For example, if above-mentioned server executes above-mentioned call instruction and mistake occurs, can be with the time interval of 0.1S Above-mentioned call instruction is read into memory by the period from non-volatile memory device, re-executes above-mentioned call instruction.It is above-mentioned If server re-executes above-mentioned call instruction success, the above-mentioned call instruction of storage device storage can be deleted, is stopped again Above-mentioned call instruction is executed, and returns to implementing result to client.
Implement the embodiment of the present application, the call instruction of storage is read in timing, is executed call instruction, be can be improved and execute instruction Success rate, save server and client side's resource.
206, for above-mentioned server in the case where executing the above-mentioned successful situation of call instruction, the transmission of Xiang Shangshu client executes knot Fruit.
207, above-mentioned server is in the case where the number for re-executing above-mentioned call instruction and occurring mistake reaches threshold value, to Above-mentioned client sends error message.
Specifically, above-mentioned server, which when re-executing above-mentioned call instruction, can count, executes above-mentioned call instruction hair The number of raw mistake.When above-mentioned number reaches threshold value, server can be abandoned continuing to execute above-mentioned call instruction, to client Send error message.
In one possible implementation, errors number parameter can be set in above-mentioned server, and above-mentioned errors number is used The number that mistake occurs for above-mentioned call instruction is executed in the above-mentioned server of expression.The initial value of above-mentioned errors number is zero, service Device re-executes above-mentioned call instruction, every primary mistake occur, and the value of above-mentioned errors number increases by one.When above-mentioned errors number When value reaches threshold value, above-mentioned server stopping re-executes above-mentioned call instruction, sends error message to client.
More specifically, above-mentioned server can be set errors number, and by errors number persistent storage to non-volatile In memory.If server, which executes above-mentioned call instruction, mistake occurs, above-mentioned mistake is read from above-mentioned nonvolatile memory Above-mentioned errors number is increased by one by accidentally number.Above-mentioned server judges whether the value of above-mentioned errors number reaches threshold value, if reaching Threshold value, then stop re-executing above-mentioned call instruction, sends error message to client;If not reaching threshold value, in reading Call instruction is stated, above-mentioned call instruction is re-executed.
208, above-mentioned server deletes the above-mentioned call instruction of storage.
In order to save the resource of memory, above-mentioned server can clear up the call instruction of failure.Specifically, above-mentioned service After the above-mentioned call instruction of device successful execution, alternatively, after above-mentioned server re-executes above-mentioned call instruction generation mistake, on It states call instruction and is in failure state, above-mentioned server can delete stored above-mentioned call instruction.
More specifically, when the number that above-mentioned server re-executes above-mentioned call instruction generation mistake reaches threshold value, on Server is stated to delete above-mentioned call instruction from nonvolatile memory.Alternatively, working as the above-mentioned above-mentioned tune of server successful execution Above-mentioned call instruction is deleted from nonvolatile memory after obtaining implementing result with instruction.
Implement the embodiment of the present application, the resource of server and client side can be saved with saving signaling.
Fig. 3 is the flow chart for another abnormal task processing method that the application proposes, the above method is applied to server. The above method includes the following contents:
301, server receives the call instruction from client.
302, above-mentioned server stores above-mentioned call instruction into nonvolatile memory.
For server after receiving the call instruction from client, above-mentioned call instruction is first stored in server In RAM.Above-mentioned server can store the above-mentioned call instruction in RAM in the nonvolatile memory, such as be stored in clothes It is engaged in the mechanical hard disk of device local.
303, above-mentioned server executes above-mentioned call instruction, reads from nonvolatile memory if mistake occurs above-mentioned Call instruction re-executes above-mentioned call instruction.
Above-mentioned server executes above-mentioned call instruction and reads above-mentioned tune from nonvolatile memory if executing failure With instruction, above-mentioned call instruction is re-executed.Wherein, it when above-mentioned server executes the failure of above-mentioned call instruction, can be generated Execution unsuccessfully identifies.If server detects that above-mentioned execution unsuccessfully identifies, above-mentioned call instruction is read, is reentered in execution State the process of call instruction.
304, above-mentioned server statistics re-execute the number that above-mentioned call instruction generates mistake;When above-mentioned generation mistake When number reaches threshold value, above-mentioned server stopping re-executes above-mentioned call instruction, and Xiang Shangshu client sends error message;Its In, above-mentioned error message includes the reason information for generating mistake and the instruction of the above-mentioned client stopping transmission call instruction of instruction Information.
Before server executes above-mentioned call instruction, errors number and threshold value, above-mentioned errors number can be first set The number that mistake occurs for above-mentioned call instruction is re-executed for recording above-mentioned server, and above-mentioned threshold value is that above-mentioned server can be with The maximum errors number of permission.Wherein, the initial value of above-mentioned errors number is zero, and above-mentioned server is stated wrong time in initialization After number, the value of above-mentioned errors number is stored into nonvolatile memory.
After server executes above-mentioned call instruction, and mistake occurs, above-mentioned errors number is read from nonvolatile memory Value, and by the value of above-mentioned errors number increase by one.
If the value of above-mentioned errors number is equal to threshold value, above-mentioned server stopping re-executes above-mentioned call instruction, and captures Generate the reason information of mistake.Above-mentioned server is by above-mentioned cause information and indicates that above-mentioned client stops sending call instruction Instruction information merges, and obtains error message.Above-mentioned error message is sent to client by above-mentioned server.
305, for above-mentioned server in the case where successful execution above-mentioned call instruction, the transmission of Xiang Shangshu client executes knot Fruit.
Above-metioned instruction success is re-executed in the case where server executes the successful situation of above-metioned instruction for the first time, or in server In the case where, above-mentioned server will obtain implementing result.Above-mentioned server sends out above-mentioned implementing result after obtaining implementing result Give client.
306, above-mentioned server deletes the above-mentioned call instruction of storage.
After the above-mentioned above-mentioned call instruction of server successful execution, refer to alternatively, above-mentioned server re-executes above-mentioned calling After enabling the number that mistake occurs reach threshold value, above-mentioned server can delete stored above-mentioned call instruction.
Implement the embodiment of the present application, the resource of server and client side can be saved with saving signaling.
Referring to Fig. 4, Fig. 4 is a kind of structural schematic diagram of abnormal task processing unit provided by the embodiments of the present application, on Stating device includes:
Receiving unit 401, for receiving the call instruction from client;
Execution unit 402 re-executes above-mentioned call instruction if mistake occurs for executing above-mentioned call instruction;
First transmission unit 403, in the case where executing the above-mentioned successful situation of call instruction, the transmission of Xiang Shangshu client to be held Row result;
Second transmission unit 404, in the case where re-executing above-mentioned call instruction mistake occurring, Xiang Shangshu client End sends error message.
As shown in figure 5, above-mentioned apparatus further include:
Storage unit 405, for storing above-mentioned call instruction;
Unit 406 is deleted, for deleting the above-mentioned call instruction of storage;
Above-mentioned execution unit 402 is specifically used for reading above-mentioned call instruction, re-executes above-mentioned call instruction.
In one possible implementation, above-mentioned execution unit 402 is specifically used for output operation interface;By above-mentioned Operation interface receives operational order, and aforesaid operations instruction, which is used to indicate, re-executes above-mentioned call instruction;Read above-mentioned calling Instruction, re-executes above-mentioned call instruction.
In one possible implementation, above-mentioned execution unit 402 is specifically used for reading by the period of preset duration Call instruction is stated, above-mentioned call instruction is re-executed.
In one possible implementation, above-mentioned second transmission unit 404, specifically for re-executing above-mentioned calling In the case that the number that mistake occurs for instruction reaches threshold value, Xiang Shangshu client sends error message.
It is understood that the specific implementation of Fig. 4 and data transmission device shown in fig. 5 reference may also be made to Fig. 1, Fig. 2 and Fig. 3 institute The method shown, is no longer described in detail one by one here.
Implement the application, the resource of server and client side can be saved with saving signaling.
Referring to Fig. 6, Fig. 6 is the structural schematic diagram of another abnormal task processing unit provided by the embodiments of the present application. The device includes: at least one processor 601, such as central processing unit (central processing unit, CPU), at least One memory 602, at least one transceiver 603 and at least one bus 604.Wherein, above-mentioned bus 604 can be one group simultaneously Capable data line, for realizing the interconnection of above-mentioned processor 601, above-mentioned memory 602 and above-mentioned transceiver 603;It is above-mentioned Memory 602 can be high-speed random access memory (random access memory, RAM), be also possible to non-volatile Memory (non-volatile memory), for example, at least a read-only memory (read only memory, ROM).
Specifically, above-mentioned transceiver 603 can be used for receiving the call instruction of client transmission;For by implementing result or Error message is sent to client.
In one possible implementation, program instruction, above-mentioned processor 601 be can store in above-mentioned memory 602 It can be used for method shown in caller instruction execution Fig. 1, Fig. 2 and Fig. 3.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in computer readable storage medium, and storage is situated between Matter include read-only memory (read only memory, ROM), random access memory (random access memory, RAM), Programmable read only memory (programmable read only memory, PROM), Erasable Programmable Read Only Memory EPROM (erasable programmable read only memory, EPROM), disposable programmable read-only memory (one-time Programmable read-only memory, OTPROM), the electronics formula of erasing can make carbon copies read-only memory (electrically-erasable programmable read-only memory, EEPROM), CD-ROM (compact Disc read-only memory, CD-ROM) or other disc memories, magnetic disk storage, magnetic tape storage or can For carrying or any other computer-readable medium of storing data.
A kind of abnormal task processing method and processing device disclosed in the embodiment of the present application is described in detail above, herein In apply specific case the principle and implementation of this application are described, the explanation of above example is only intended to sides Assistant solves the present processes and its core concept;At the same time, for those skilled in the art, the think of according to the application Think, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification should not be construed as pair The limitation of the application.

Claims (10)

1. a kind of abnormal task processing method characterized by comprising
Server receives the call instruction from client;
The server executes the call instruction, re-executes the call instruction if mistake occurs;
For the server in the case where executing the successful situation of call instruction, Xiang Suoshu client sends implementing result;
For the server in the case where re-executing the call instruction generation mistake, Xiang Suoshu client sends mistake letter Breath.
2. method according to claim 1, which is characterized in that the server receive the call instruction from client it Afterwards, the method also includes: the server stores the call instruction;
Described to re-execute the call instruction include: to read the call instruction, re-executes the call instruction.
3. method according to claim 2, which is characterized in that it is described to read the call instruction, re-execute the calling Instruction, comprising:
The server exports operation interface;
The server receives operational order by the operation interface, the operational order be used to indicate re-execute it is described Call instruction;
The server reads the call instruction, re-executes the call instruction.
4. method according to claim 2, which is characterized in that it is described to read the call instruction, re-execute the calling Instruction, comprising:
The server reads the call instruction by the period of preset duration, re-executes the call instruction.
5. method according to claim 1, which is characterized in that the server is re-executing the call instruction generation mistake In the case where accidentally, Xiang Suoshu client sends error message, comprising:
The server is in the case where the number for re-executing the call instruction generation mistake reaches threshold value, Xiang Suoshu client End sends error message.
6. method according to claim 2, which is characterized in that it is described re-execute the call instruction after, further includes:
The server deletes the call instruction of storage.
7. a kind of abnormal task processing unit characterized by comprising
Receiving unit, for receiving the call instruction from client;
Execution unit re-executes the call instruction if mistake occurs for executing the call instruction;
First transmission unit, in the case where executing the successful situation of call instruction, Xiang Suoshu client to send implementing result;
Second transmission unit, in the case where re-executing the call instruction generation mistake, Xiang Suoshu client to be sent Error message.
8. method according to claim 7, which is characterized in that described device further include:
Storage unit, for storing the call instruction;
The execution unit is specifically used for reading the call instruction, re-executes the call instruction.
9. a kind of abnormal task processing unit, which is characterized in that including processor, memory and transceiver;The processor, institute Memory and the transceiver is stated to be connected with each other by bus;Wherein, the transceiver is used to receive call instruction, and is used for Send implementing result or error message;For the memory for storing computer program, the computer program includes program Instruction, the processor are configured for calling described program instruction, execute such as method as claimed in any one of claims 1 to 6.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program include program instruction, and described program instructs when being executed by a processor, execute the processor such as Method as claimed in any one of claims 1 to 6.
CN201910039374.7A 2019-01-16 2019-01-16 Abnormal task processing method and relevant apparatus Pending CN109783215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910039374.7A CN109783215A (en) 2019-01-16 2019-01-16 Abnormal task processing method and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910039374.7A CN109783215A (en) 2019-01-16 2019-01-16 Abnormal task processing method and relevant apparatus

Publications (1)

Publication Number Publication Date
CN109783215A true CN109783215A (en) 2019-05-21

Family

ID=66500546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910039374.7A Pending CN109783215A (en) 2019-01-16 2019-01-16 Abnormal task processing method and relevant apparatus

Country Status (1)

Country Link
CN (1) CN109783215A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783556A (en) * 2021-01-06 2021-05-11 南阳理工学院 Information processing method, information processing device and terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006059267A (en) * 2004-08-23 2006-03-02 Nec Nexsolutions Ltd Application execution system and application execution method
CN1822596A (en) * 2006-03-23 2006-08-23 杭州华为三康技术有限公司 Data processing method in customer/server frame
CN107368359A (en) * 2017-05-31 2017-11-21 杭州大搜车汽车服务有限公司 A kind of asynchronous task performs method and its storage medium, device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006059267A (en) * 2004-08-23 2006-03-02 Nec Nexsolutions Ltd Application execution system and application execution method
CN1822596A (en) * 2006-03-23 2006-08-23 杭州华为三康技术有限公司 Data processing method in customer/server frame
CN107368359A (en) * 2017-05-31 2017-11-21 杭州大搜车汽车服务有限公司 A kind of asynchronous task performs method and its storage medium, device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783556A (en) * 2021-01-06 2021-05-11 南阳理工学院 Information processing method, information processing device and terminal equipment

Similar Documents

Publication Publication Date Title
CN108459939B (en) Log collection method and device, terminal equipment and storage medium
CN107087033B (en) Message pushing method and device, storage medium and computer equipment
CN104601696B (en) Service processing method, service calling system, device and system
CN111104235B (en) Queue-based asynchronous processing method and device for service requests
CN107391268A (en) service request processing method and device
CN105468302B (en) A kind of method, apparatus and system of processing data
JP2019500680A (en) Data processing method and apparatus
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN111835467B (en) Message sending method, device, computer equipment and storage medium
CN113568686B (en) Asynchronous processing method and device for Lua language, computer equipment and storage medium
CN106407021A (en) Queue-based business request processing method
CN106034113A (en) Data processing method and data processing device
US20150058935A1 (en) Out-of-Path, Content-Addressed Writes with Untrusted Clients
CN110908837B (en) Application program exception handling method and device, electronic equipment and storage medium
CN112596801B (en) Transaction processing method, device, equipment, storage medium and database
CN108366098A (en) A kind of data interactive method and device of network node
CN105848114B (en) A kind of processing method and mobile terminal of multimedia message
CN108241616B (en) Message pushing method and device
CN109783215A (en) Abnormal task processing method and relevant apparatus
CN104866242B (en) A kind of data deletion system, method and data delete center
CN110333916A (en) Request message processing method, device, computer system and readable storage medium storing program for executing
CN110413398B (en) Task scheduling method and device, computer equipment and storage medium
CN107786308B (en) Data transmission method and terminal device
CN113852610B (en) Message processing method, device, computer equipment and storage medium
CN105975359A (en) Method and device for data cleaning of server and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190521