CN111782431A - Exception processing method, exception processing device, terminal and storage medium - Google Patents
Exception processing method, exception processing device, terminal and storage medium Download PDFInfo
- Publication number
- CN111782431A CN111782431A CN202010575635.XA CN202010575635A CN111782431A CN 111782431 A CN111782431 A CN 111782431A CN 202010575635 A CN202010575635 A CN 202010575635A CN 111782431 A CN111782431 A CN 111782431A
- Authority
- CN
- China
- Prior art keywords
- abnormal
- message
- exception
- abnormal message
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 162
- 238000003672 processing method Methods 0.000 title description 2
- 230000002159 abnormal effect Effects 0.000 claims abstract description 390
- 238000000034 method Methods 0.000 claims abstract description 54
- 230000008439 repair process Effects 0.000 claims description 32
- 230000005856 abnormality Effects 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 9
- 238000004806 packaging method and process Methods 0.000 claims description 9
- 238000012216 screening Methods 0.000 claims description 7
- 238000012795 verification Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 210000000481 breast Anatomy 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error 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/0793—Remedial or corrective actions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error 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/0766—Error or fault reporting or storing
- G06F11/0775—Content or structure details of the error report, e.g. specific table structure, specific error fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Multimedia (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a method, a device, a terminal and a storage medium for processing exception, wherein the method comprises the following steps: receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard; recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message; sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently; and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message. According to the technical scheme, the abnormity occurring in different service systems is sent to the abnormity processing system for processing, the abnormity processing efficiency is improved, and different abnormity can be managed and repaired in a unified manner.
Description
Technical Field
The embodiment of the invention relates to a software development technology, in particular to an exception handling method, an exception handling device, a terminal and a storage medium.
Background
During the development of software, unforeseen events, called exceptions, may occur at any time during the various stages of detecting, running and maintaining the program to break the normal chain of conditions.
At present, a common exception handling method is mainly to perform a retry by a developer through self-checking and processing and code running, or to establish a retry polling table, and to perform processing on all exceptions through sequential inquiry, etc.
The defects of the existing exception handling method at least comprise the following steps: the efficiency of exception handling is low and different exceptions cannot be managed and repaired in a unified manner.
Disclosure of Invention
The embodiment of the invention provides an exception handling method, an exception handling device, a terminal and a storage medium, which improve exception handling efficiency and can uniformly manage and repair different exceptions.
In a first aspect, an embodiment of the present invention provides an exception handling method, which is applied to an exception handling system, and includes:
receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message;
sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently;
and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
Optionally, after the broadcasting the second exception message, the method further includes:
receiving an exception processing result sent by the service system corresponding to the second exception message;
when the exception processing result is that the processing is successful, updating the processing state of the second exception message from unrepaired state to repaired state;
when the exception handling result is processing failure, updating the processing state of the second exception message from unrepaired state to repair failure;
and recording the second abnormal message with the processing state of repair failure to a repair failure table.
Optionally, after the broadcasting the second exception message, the method further includes:
judging whether the second abnormal message is broadcast successfully;
if not, re-broadcasting the second abnormal message, and updating the retry times of the second abnormal message until the second abnormal message is successfully broadcast or the retry times reach the preset times;
when the retry times reach preset times, updating the processing state of the second abnormal message from unrepaired state to broadcast failure;
and recording the second abnormal message with the processing state of broadcast failure to a broadcast failure table.
Further, when the first abnormal message with the processing state of unrepaired in the inquired abnormal message table is empty, summarizing the first abnormal message and the abnormal data of the first abnormal message.
Further, receiving a third exception message delivered by at least one service system, wherein the third exception message is an exception message which does not meet a preset check standard;
and recording the third exception message to a delivery exception table, and sending the delivery exception table to a preset client.
In a second aspect, an embodiment of the present invention provides an exception handling method, which is applied to a service system, and includes:
receiving an abnormal message, and packaging the abnormal message to obtain a specific abnormality corresponding to the abnormal message;
when the specific exception meets the preset check standard, the specific exception is used as a first exception message to be sent to an exception handling system;
monitoring a second abnormal message broadcast by the abnormal processing system, and screening a fourth abnormal message of the service system from the second abnormal message;
and restoring the scene of the abnormal event according to the data carried by the fourth abnormal message, and repairing the abnormal event based on a repairing module corresponding to the restored scene.
In a third aspect, an embodiment of the present invention further provides an exception handling apparatus, which is applied to an exception handling system, and includes:
the first abnormal message receiving module is used for receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
the recording module is used for recording the first abnormal message to an abnormal message table and setting the processing state of the recorded first abnormal message as unrepaired;
the query module is used for sequentially querying the abnormal message table and taking the first abnormal message which is queried and has the first processing state of unrepaired as the second abnormal message to be processed currently;
and the broadcasting module is used for broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
In a fourth aspect, an embodiment of the present invention provides an exception handling apparatus, which is applied to a service system, and includes:
the package processing module is used for receiving the abnormal message and packaging the abnormal message to obtain a specific exception corresponding to the abnormal message;
the sending module is used for sending the specific exception as a first exception message to an exception handling system when the specific exception meets a preset check standard;
the monitoring module is used for monitoring second abnormal messages broadcast by the abnormal processing system and screening out fourth abnormal messages of the service system from the second abnormal messages;
and the repairing module is used for restoring the scene of the abnormal event according to the data carried by the fourth abnormal message and repairing the abnormal event based on the repairing module corresponding to the restored scene.
In a fifth aspect, an embodiment of the present invention further provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for handling an exception, as provided in any embodiment of the present application, when executing the program.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is configured to, when executed by a processor, implement a method for handling an exception as provided in any embodiment of the present application.
The embodiment of the invention provides an exception handling method, an exception handling device, a terminal and a storage medium, wherein the exception dividing method comprises the following steps: receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard; recording the first abnormal message to an abnormal message table, and setting the processing state of the recorded first abnormal message as unrepaired; sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently; and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message. The exception handling efficiency is improved, and unified management and repair can be performed on different exceptions.
Drawings
Fig. 1 is a schematic flowchart illustrating an exception handling method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an exception handling method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an exception handling apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an exception handling apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through embodiments with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
Example one
Fig. 1 is a flowchart illustrating a method for processing an exception according to an embodiment of the present invention, where the embodiment is applicable to a case of processing an exception occurring in a service system. The method can be executed by an exception handling device provided by the embodiment of the invention, and the device can be realized in a software and/or hardware manner and is configured in a terminal, such as a computer. Accordingly, as shown in fig. 1, applied to an exception handling system, the method includes the following operations:
s110, receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
the preset check standard means that each service system has a certain preset check standard requirement on the exception message to be delivered by the system, and the service system can be normally delivered only if the preset check standard meets the check standard. For example, the preset check criteria may be whether the exception message includes an exception parameter, or may include a corresponding service system name, or includes a service system exception code, or the like.
When a business system needs to send a certain abnormal message, firstly, the abnormal message is subjected to message verification according to a preset verification standard of the system, if the abnormal message meets the self verification standard, the abnormal message is judged to pass the message verification, the abnormal message which passes the verification of the business system is called a first abnormal message, the business system sends the first abnormal message to an abnormal message queue which passes the message verification of the system, and the abnormal processing system receives the first abnormal message through the abnormal message queue which passes the message verification of the business system.
Optionally, a third exception message delivered by at least one service system is received, where the third exception message is an exception message that does not meet a preset check standard;
and recording the third exception message to a delivery exception table, and sending the delivery exception table to a preset client.
If a certain abnormal message does not meet the preset check standard of the service system, it is determined that the abnormal message does not pass the message check, and preferably, the abnormal message that does not pass the message check is called a third abnormal message. The delivery exception table is used for recording exception messages which are reported by different service systems and do not accord with the preset check standard of the delivery exception table. The exception handling system firstly receives the third exception message from an exception message queue of the business system which does not pass message verification, then records the third exception message in a delivery exception table, and the delivery exception table is responsible for recording reported exception messages which do not accord with the parameter verification standard of the exception handling center and then sends the exception messages to a preset client side for monitoring and early warning. The preset client is used for informing the responsible person of the service system of the third exception message in a client mode and informing the responsible person that the service system and the exception handling system are wrongly accessed, so that the responsible person rechecks the parameter setting of the service system.
And counting the abnormal information which does not pass the message verification, so that the follow-up monitoring and early warning are facilitated.
S120, recording the first abnormal message to an abnormal message table, setting the recorded processing state of the first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message;
the abnormal message table is responsible for recording the abnormal messages reported by the service system through the abnormal delivery tool, recording whether the abnormal messages can be repaired or not, and recording the repair state, wherein the table records the first abnormal messages, namely the abnormal messages verified through the messages, and optionally, the abnormal message table is an abnormal message upper report. For the exception message just recorded, since no processing is performed, the initial processing state of the exception message is set to be unrepaired, so that the repair state of the exception message is updated and managed in real time according to the processing condition.
S130, sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently;
the sequence may be a sequence arranged according to the receiving time of the exception message, or a sequence arranged after numbering the exception message. The exception handling system receives a first exception message sent by the service system by using an exception message queue passing through message verification, and then records the exception message in an exception message table. The query is to perform paging query on all the exceptions with unrepaired processing states in the exception message table through a timed task scheduling system, wherein the timed task scheduling system is a system for automatically executing tasks based on a given time point, a given time interval or a given execution frequency. The paging query may be performed by dividing each abnormal message into one page, or may be performed by dividing all abnormal messages into several pages on average. Preferably, the unrepaired first exception messages which are received in the current day and are subjected to the message verification are sequentially searched from the exception message table in a paging mode, and if the first exception messages are successfully searched, the exception messages are used as exception messages to be subjected to exception handling and are called second exception messages. Optionally, the unrepaired first exception messages received the previous day after the message check are sequentially searched from the exception message table in a page-wise manner, and the searched exception messages are broadcasted for exception handling in the following process.
Optionally, when the first abnormal message in the processing state of the queried abnormal message table is not repaired, summarizing the first abnormal message and the abnormal data of the first abnormal message.
When the first abnormal message with unrepaired processing state in the inquired abnormal message table is empty, indicating that the query for the unrepaired first exception message in the exception table that passed the message check is complete, summarizing all abnormal messages after query completion and abnormal data of the abnormal messages, wherein the summarization of the abnormal messages can be, for example, summarizing how many abnormal messages are queried together, the abnormal data can comprise an abnormal code, an abnormal parameter of the abnormal message and an abnormal description of the abnormality, and the example abnormal description can be an interface parameter abnormality and the like, and the summary content is not limited in the embodiment of the invention, the summary of the abnormal data of the abnormal message may be how many abnormal codes are shared by the first abnormal messages of all the query completions, how many abnormal parameters exist, how many different abnormal descriptions exist, and the like.
S140, broadcasting the second abnormal message, so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
The broadcast refers to that the exception handling system sends an exception message to an exception message handling queue, and the monitoring refers to that the service system acquires the exception message belonging to the service system from the exception message queue. The second abnormal message needing to be processed is sent to the abnormal message processing queue for broadcasting by the abnormal processing system, and the abnormal message broadcasted in the abnormal message processing queue can be automatically monitored by the service system due to the integration of the abnormal repairing tool, and the monitored abnormal message is subjected to subsequent abnormal processing.
Optionally, after the broadcasting the second exception message, the method further includes:
receiving an exception processing result sent by the service system corresponding to the second exception message;
when the exception processing result is that the processing is successful, updating the processing state of the second exception message from unrepaired state to repaired state;
when the exception handling result is processing failure, updating the processing state of the second exception message from unrepaired state to repair failure;
and recording the second abnormal message with the processing state of repair failure to a repair failure table.
And the service system processes the second abnormal message through the abnormal repairing tool, and sends a processing result of whether to repair the second abnormal message to the abnormal processing system after processing the second abnormal message. The second abnormal message is sent to the abnormal message processing queue to be broadcasted once, namely, the second abnormal message is considered to be repaired once, and when the number of sending times is not more than the preset number of sending times and the abnormal repairing is successfully repaired by the service system, the abnormal processing system changes the unrepaired state of the original set repairing state of the second abnormal message in the abnormal message table into repaired state; when the number of times of sending the abnormal message to the abnormal message processing queue for broadcasting exceeds the preset number of times of sending, the abnormal message is failed to be repaired, the abnormal processing system changes the unrepaired original repair state of the second abnormal message corresponding to the abnormal message table into the repair failure, preferably, the abnormal processing state of the repair failure can be an unrepairable abnormality, abnormal data of the unrepairable abnormality is recorded in a repair failure table, exemplarily, the abnormal data can be abnormal parameters of the abnormality or abnormal codes, and a daily report and the like can be counted by using the repair failure table, so that service research personnel can analyze the reason of the abnormal repair failure.
Optionally, after the broadcasting the second exception message, the method further includes:
judging whether the second abnormal message is broadcast successfully;
if not, re-broadcasting the second abnormal message, and updating the retry times of the second abnormal message until the second abnormal message is successfully broadcast or the retry times reach the preset times;
when the retry times reach preset times, updating the processing state of the second abnormal message from unrepaired state to broadcast failure;
and recording the second abnormal message with the processing state of broadcast failure to a broadcast failure table.
Since the exception handling system sends the exception repair queue to broadcast once, that is, considers that the exception is repaired once, if the preset sending times are not reached, and the unrepaired state corresponding to the exception message in the exception message table is changed into repaired, the second exception message is repaired successfully, that is, the broadcast is considered to be successful.
The service system may rely on an external system call interface to perform repair processing on the monitored second abnormal message belonging to the service system, when the external system is in a busy state and the like, the second abnormal message is not repaired successfully, the broadcast is not successful, the service system feeds back an abnormal processing result of the second abnormal message which is not repaired to the abnormal message processing system, the abnormal message processing system resends the second abnormal message to an abnormal message processing queue for broadcasting, and only the broadcast frequency of the second abnormal message is increased by 1; if the service system monitors the second abnormal message of the system through the last broadcast, the repairing tool successfully repairs the abnormality, the service system feeds back the repaired abnormal processing result of the second abnormal message to the abnormal message processing system, the abnormal processing system does not send the second abnormal message to the abnormal message processing queue for broadcasting any more, and the unrepaired state corresponding to the second abnormal message in the abnormal message table is changed into repaired state. If the repair state of the second abnormal message is not repaired when the preset sending times are reached, the second abnormal message is judged to be failed to be repaired, the broadcast is also considered to be failed, the abnormal processing system changes the repair state corresponding to the abnormal message in the abnormal message table into broadcast failure, preferably, the abnormal processing state with the broadcast failure can be unrepairable abnormal, the abnormal processing system further records the abnormal message in the broadcast failure table, preferably, the broadcast failure can be specifically an abnormal super-sending times table, and the abnormal super-sending times table is used for recording the abnormal message with the repairing sending times exceeded.
And different conditions of different exceptions are processed respectively, so that exception processing efficiency is improved.
The method for processing the exception, provided by the embodiment of the invention, is applied to an exception processing system, and comprises the steps of firstly receiving a first exception message sent by at least one service system, wherein the first exception message is an exception message meeting a preset check standard; recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message; sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently; and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message. The exception handling efficiency is improved, and different exceptions can be managed and repaired in a unified mode.
Example two
Fig. 2 is a flowchart illustrating a method for processing an exception according to a second embodiment of the present invention, where the present embodiment is applicable to a case of processing an exception occurring in a service system. The method can be executed by an exception handling device provided by the embodiment of the invention, and the device can be realized in a software and/or hardware manner and is configured in a terminal, such as a computer. Correspondingly, as shown in fig. 2, the method is applied to a business system, and includes the following operations:
s210, receiving the abnormal message, and packaging the abnormal message to obtain a specific abnormality corresponding to the abnormal message;
the exception delivery tool exposes two exception collecting interfaces to the service system, wherein one is a local interface, when an exception occurs, the service system immediately calls the local interface to capture exception information, and the exception captured by the local interface is not processed in any exception; in addition, a specific exception can be obtained by packaging the exception, the specific exception can be obtained by assigning an exception code to the original exception or can be a parameter containing an original exception generation scene, the packaged specific exception is reported through a method call stack, and when a specific annotation of an exception collection tool collects the specific exception, a service system captures the specific exception through the specific annotation. The service system receives the captured exception message, which contains the exception parameter, the exception code and the corresponding application name, and the specific annotation here implements a function similar to that of the interface, and illustratively, the specific annotation can be used for capturing the specific exception by using the Aspect Oriented Programming (AOP) in Spring.
S220, when the specific exception meets the preset check standard, the specific exception is used as a first exception message to be sent to an exception handling system;
and performing message verification on the packaged specific exception by using the preset verification standard in the first embodiment, taking the specific exception passing the message verification as a first exception message, and sending the first exception message to an exception handling system through an exception message queue of the service system passing the message verification to store the first exception message in an exception message table.
S230, monitoring second abnormal messages broadcast by the abnormal processing system, and screening out fourth abnormal messages of the service system from the second abnormal messages;
the abnormal processing system inquires the abnormal message of which the processing state is unprocessed in the abnormal message table through the timing task scheduling system, sends a certain first abnormal message which is successfully inquired as a second abnormal message which is processed currently to the abnormal message processing queue for broadcasting, monitors the second abnormal message which is broadcasted in the abnormal message queue by the abnormal processing system through the service system, and receives the second abnormal message as a fourth abnormal message through a calling system interface by the service system and processes subsequent abnormal processing if the second abnormal message is monitored to belong to the service system. For example, whether the second exception message belongs to the business system may be determined by an application name included in the second exception message.
And S240, performing scene restoration on the abnormal event according to the data carried by the fourth abnormal message, and repairing the abnormal event based on a repairing module corresponding to the restored scene.
The scenario restoration means that the abnormal repairing tool restores the parameters and/or data of the abnormality. The repair module is an abnormal repair tool of the business system. And the service system calls a repairing tool of the exception repairing system to restore the scene of the fourth exception message according to the exception code and the exception generation scene parameter which are monitored to be contained in the fourth exception message belonging to the service system, and after the parameter and/or the data of the fourth exception message are restored, the repairing tool can repair the exception.
The method for processing the exception, provided by the embodiment of the invention, is applied to a service system and comprises the following steps: receiving the abnormal message, and packaging the abnormal message to obtain a specific abnormality corresponding to the abnormal message; when the specific exception meets the preset check standard, the specific exception is taken as a first exception message and sent to an exception handling system; the service system monitors the second abnormal message broadcast by the abnormal processing system and screens out a fourth abnormal message of the service system from the second abnormal message; and restoring the scene of the abnormal event according to the data carried by the fourth abnormal message, and repairing the abnormal event based on a repairing module corresponding to the restored scene. The business system identifies the abnormity belonging to the business system, and is convenient for repairing the abnormity.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an exception handling apparatus according to a third embodiment of the present invention. The device is used for executing the exception handling method provided by the embodiment and is applied to an exception handling system. The device includes:
a first exception message receiving module 310, configured to receive a first exception message sent by at least one service system, where the first exception message is an exception message meeting a preset check standard;
the recording module 320 is configured to record the first exception message to the exception message table, set a processing state of the recorded first exception message as unrepaired, and update the processing state according to a processing progress of the first exception message;
the query module 330 is configured to sequentially query the exception message table, and take the first exception message that is queried and whose first processing state is unrepaired as a second exception message to be currently processed;
the broadcasting module 340 is configured to broadcast the second exception message, so that the service system corresponding to the second exception message performs exception handling according to the monitored second exception message.
Optionally, the exception handling apparatus is applied to an exception handling system, and further includes
And the third exception receiving module is used for receiving a third exception message delivered by at least one service system, wherein the third exception message is an exception message which does not accord with a preset check standard.
Optionally, the recording module further includes:
and recording the third exception message to a delivery exception table, and sending the delivery exception table to a preset client.
Optionally, when the first abnormal message in the processing state of the queried abnormal message table is not repaired, summarizing the first abnormal message and the abnormal data of the first abnormal message.
Optionally, the broadcast module further includes:
receiving an exception processing result sent by the service system corresponding to the second exception message;
when the exception processing result is that the processing is successful, updating the processing state of the second exception message from unrepaired state to repaired state;
when the exception handling result is processing failure, updating the processing state of the second exception message from unrepaired state to repair failure;
recording the second abnormal message with the processing state of repair failure to a repair failure table;
judging whether the second abnormal message is broadcast successfully;
if not, re-broadcasting the second abnormal message, and updating the retry times of the second abnormal message until the second abnormal message is successfully broadcast or the retry times reach the preset times;
when the retry times reach preset times, updating the processing state of the second abnormal message from unrepaired state to broadcast failure;
and recording the second abnormal message with the processing state of broadcast failure to a broadcast failure table.
The exception handling device provided by the third embodiment of the present invention is capable of executing the exception handling method provided by any embodiment of the present invention, and is applied to an exception handling system having functional modules corresponding to the execution method and beneficial effects.
Example four
Fig. 4 is a schematic structural diagram of an exception handling apparatus according to a fourth embodiment of the present invention. The apparatus is configured to execute the method for processing an exception provided in the foregoing embodiment, and is applied to a service system, where the apparatus includes:
a wrapping processing module 410, configured to receive the exception message, and perform wrapping processing on the exception message to obtain a specific exception corresponding to the exception message;
a sending module 420, configured to send the specific exception to the exception handling system as a first exception message when the specific exception meets a preset check standard;
a monitoring module 430, configured to monitor the second exception message broadcast by the exception handling system, and screen out a fourth exception message of the service system from the second exception message;
the repairing module 440 is configured to perform scene restoration on the abnormal event according to the data carried by the fourth abnormal message, and repair the abnormal event based on the repairing module corresponding to the restored scene.
The exception handling device provided by the fourth embodiment of the present invention is capable of executing the exception handling method provided by any embodiment of the present invention, is applied to a service system, and has a functional module corresponding to the execution method and a beneficial effect.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a terminal according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary terminal 12 suitable for use in implementing any of the embodiments of the present invention. The terminal 12 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention. The device 12 is typically a terminal that assumes the function of breast segmentation.
As shown in fig. 5, the terminal 12 is embodied in the form of a general purpose computing device. The components of the terminal 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).
The terminal 12 typically includes a variety of computer readable media. Such media may be any available media that is accessible by terminal 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The terminal 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with the terminal 12, and/or any devices (e.g., network card, modem, etc.) that enable the terminal 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the terminal 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with the other modules of the terminal 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.
The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, for example, implementing the exception handling method provided by the above-mentioned embodiment of the present invention, and is applied to an exception handling system, the method includes:
receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message;
sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently;
and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
Applied to a business system, the method comprises the following steps:
receiving an abnormal message, and packaging the abnormal message to obtain a specific abnormality corresponding to the abnormal message;
when the specific exception meets the preset check standard, the specific exception is taken as a first exception message and sent to an exception handling system;
monitoring a second abnormal message broadcast by the abnormal processing system, and screening a fourth abnormal message of the service system from the second abnormal message;
and restoring the scene of the abnormal event according to the data carried by the fourth abnormal message, and repairing the abnormal event based on a repairing module corresponding to the restored scene.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for processing an exception, which is provided in any embodiment of the present application, and is applied to an exception handling system, where the method includes:
receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message;
sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently;
and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
Applied to a business system, the method comprises the following steps:
receiving an abnormal message, and packaging the abnormal message to obtain a specific abnormality corresponding to the abnormal message;
when the specific exception meets the preset check standard, the specific exception is taken as a first exception message and sent to an exception handling system;
monitoring a second abnormal message broadcast by the abnormal processing system, and screening a fourth abnormal message of the service system from the second abnormal message;
and restoring the scene of the abnormal event according to the data carried by the fourth abnormal message, and repairing the abnormal event based on a repairing module corresponding to the restored scene.
Of course, the computer program stored on the computer-readable storage medium provided in the embodiments of the present invention is not limited to the above method instructions, and may also execute the exception handling method provided in any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out instructions of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A method for processing an exception is applied to an exception processing system and comprises the following steps:
receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message;
sequentially inquiring the abnormal message table, and taking the first abnormal message which is inquired and has an unrepaired processing state as a second abnormal message to be processed currently;
and broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
2. The method of claim 1, further comprising, after said broadcasting the second exception message:
receiving an exception processing result sent by the service system corresponding to the second exception message;
when the exception processing result is that the processing is successful, updating the processing state of the second exception message from unrepaired state to repaired state;
when the exception handling result is processing failure, updating the processing state of the second exception message from unrepaired state to repair failure;
and recording the second abnormal message with the processing state of repair failure to a repair failure table.
3. The method of claim 1, further comprising, after said broadcasting the second exception message:
judging whether the second abnormal message is broadcast successfully;
if not, re-broadcasting the second abnormal message, and updating the retry times of the second abnormal message until the second abnormal message is successfully broadcast or the retry times reach the preset times;
when the retry times reach preset times, updating the processing state of the second abnormal message from unrepaired state to broadcast failure;
and recording the second abnormal message with the processing state of broadcast failure to a broadcast failure table.
4. The method of claim 1, further comprising:
when the first abnormal message with the processing state of unrepaired in the inquired abnormal message table is empty, summarizing the first abnormal message and the abnormal data of the first abnormal message.
5. The method of claim 1, further comprising:
receiving a third exception message delivered by at least one service system, wherein the third exception message is an exception message which does not accord with a preset check standard;
and recording the third exception message to a delivery exception table, and sending the delivery exception table to a preset client.
6. A method for processing exception is applied to a business system, and comprises the following steps:
receiving an abnormal message, and packaging the abnormal message to obtain a specific abnormality corresponding to the abnormal message;
when the specific exception meets the preset check standard, the specific exception is used as a first exception message to be sent to an exception handling system;
monitoring a second abnormal message broadcast by the abnormal processing system, and screening a fourth abnormal message of the service system from the second abnormal message;
and restoring the scene of the abnormal event according to the data carried by the fourth abnormal message, and repairing the abnormal event based on a repairing module corresponding to the restored scene.
7. An exception handling apparatus, applied to an exception handling system, includes
The first abnormal message receiving module is used for receiving a first abnormal message sent by at least one service system, wherein the first abnormal message is an abnormal message meeting a preset check standard;
the recording module is used for recording the first abnormal message to an abnormal message table, setting the processing state of the recorded first abnormal message as unrepaired, and updating the processing state according to the processing progress of the first abnormal message;
the query module is used for sequentially querying the abnormal message table and taking the first abnormal message which is queried and has the first processing state of unrepaired as the second abnormal message to be processed currently;
and the broadcasting module is used for broadcasting the second abnormal message so that the service system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
8. An exception handling apparatus, applied to a business system, includes
The package processing module is used for receiving the abnormal message and packaging the abnormal message to obtain a specific exception corresponding to the abnormal message;
the sending module is used for sending the specific exception as a first exception message to an exception handling system when the specific exception meets a preset check standard;
the monitoring module is used for monitoring second abnormal messages broadcast by the abnormal processing system and screening out fourth abnormal messages of the service system from the second abnormal messages;
and the repairing module is used for restoring the scene of the abnormal event according to the data carried by the fourth abnormal message and repairing the abnormal event based on the repairing module corresponding to the restored scene.
9. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of handling an exception as claimed in any one of claims 1 to 5 or the method of handling an exception as claimed in claim 6 when executing the program.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a method of handling an exception as claimed in any one of claims 1 to 5 or a method of handling an exception as claimed in claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010575635.XA CN111782431A (en) | 2020-06-22 | 2020-06-22 | Exception processing method, exception processing device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010575635.XA CN111782431A (en) | 2020-06-22 | 2020-06-22 | Exception processing method, exception processing device, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111782431A true CN111782431A (en) | 2020-10-16 |
Family
ID=72756065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010575635.XA Pending CN111782431A (en) | 2020-06-22 | 2020-06-22 | Exception processing method, exception processing device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111782431A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113190371A (en) * | 2021-05-18 | 2021-07-30 | 京东数科海益信息科技有限公司 | Task compensation method and device, electronic equipment and readable storage medium |
CN113867841A (en) * | 2021-09-29 | 2021-12-31 | 中国平安财产保险股份有限公司 | Calling exception handling method, device, equipment and storage medium of business system |
CN115086263A (en) * | 2022-07-22 | 2022-09-20 | 康键信息技术(深圳)有限公司 | IM message sending method, system, storage medium and computer equipment of IOS terminal |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105357049A (en) * | 2015-11-24 | 2016-02-24 | 广东欧珀移动通信有限公司 | Network communication functional abnormity processing method, application processor and mobile terminal |
CN107483635A (en) * | 2017-09-22 | 2017-12-15 | 浪潮软件集团有限公司 | Service request processing method, processing system and message middleware |
WO2017220013A1 (en) * | 2016-06-23 | 2017-12-28 | 中兴通讯股份有限公司 | Service processing method and apparatus, and storage medium |
CN107908494A (en) * | 2017-11-10 | 2018-04-13 | 泰康保险集团股份有限公司 | Processing method, device, electronic equipment and the storage medium of anomalous event |
CN110555150A (en) * | 2019-09-09 | 2019-12-10 | 江苏满运软件科技有限公司 | Data monitoring method, device, equipment and storage medium |
-
2020
- 2020-06-22 CN CN202010575635.XA patent/CN111782431A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105357049A (en) * | 2015-11-24 | 2016-02-24 | 广东欧珀移动通信有限公司 | Network communication functional abnormity processing method, application processor and mobile terminal |
WO2017220013A1 (en) * | 2016-06-23 | 2017-12-28 | 中兴通讯股份有限公司 | Service processing method and apparatus, and storage medium |
CN107483635A (en) * | 2017-09-22 | 2017-12-15 | 浪潮软件集团有限公司 | Service request processing method, processing system and message middleware |
CN107908494A (en) * | 2017-11-10 | 2018-04-13 | 泰康保险集团股份有限公司 | Processing method, device, electronic equipment and the storage medium of anomalous event |
CN110555150A (en) * | 2019-09-09 | 2019-12-10 | 江苏满运软件科技有限公司 | Data monitoring method, device, equipment and storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113190371A (en) * | 2021-05-18 | 2021-07-30 | 京东数科海益信息科技有限公司 | Task compensation method and device, electronic equipment and readable storage medium |
CN113190371B (en) * | 2021-05-18 | 2024-04-05 | 京东科技信息技术有限公司 | Task compensation method and device, electronic equipment and readable storage medium |
CN113867841A (en) * | 2021-09-29 | 2021-12-31 | 中国平安财产保险股份有限公司 | Calling exception handling method, device, equipment and storage medium of business system |
CN115086263A (en) * | 2022-07-22 | 2022-09-20 | 康键信息技术(深圳)有限公司 | IM message sending method, system, storage medium and computer equipment of IOS terminal |
CN115086263B (en) * | 2022-07-22 | 2024-04-05 | 康键信息技术(深圳)有限公司 | IM message sending method, system, storage medium and computer equipment of IOS terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908494B (en) | Abnormal event processing method and device, electronic equipment and storage medium | |
CN109240886B (en) | Exception handling method, exception handling device, computer equipment and storage medium | |
CN111585867B (en) | Message processing method and device, electronic equipment and readable storage medium | |
CN111782431A (en) | Exception processing method, exception processing device, terminal and storage medium | |
CN111752799A (en) | Service link tracking method, device, equipment and storage medium | |
CN110825694A (en) | Data processing method, device, equipment and storage medium | |
CN110851324B (en) | Log-based routing inspection processing method and device, electronic equipment and storage medium | |
CN113495820A (en) | Method and device for collecting and processing abnormal information and abnormal monitoring system | |
CN108509322B (en) | Method for avoiding excessive return visit, electronic device and computer readable storage medium | |
CN112306833A (en) | Application program crash statistical method and device, computer equipment and storage medium | |
CN115620877A (en) | Method, system, equipment and storage medium for uploading medical data to cloud platform | |
CN113791943A (en) | Website real-time monitoring method, system, equipment and storage medium | |
CN116680055A (en) | Asynchronous task processing method and device, computer equipment and storage medium | |
CN112818204B (en) | Service processing method, device, equipment and storage medium | |
CN111240923A (en) | Automatic test method and device for recurring problems of vehicle navigation system and storage medium | |
CN112650613B (en) | Error information processing method and device, electronic equipment and storage medium | |
CN115952227A (en) | Data acquisition system and method, electronic device and storage medium | |
CN112965793B (en) | Identification analysis data-oriented data warehouse task scheduling method and system | |
CN110764931B (en) | Processing method, system, equipment and storage medium for OTA website uploading certificate | |
CN112181737B (en) | Message processing method, device, electronic equipment and medium | |
CN113297149A (en) | Method and device for monitoring data processing request | |
CN111061609A (en) | Log monitoring method and system | |
CN112306819B (en) | Abnormal event playback method and device, electronic equipment and storage medium | |
CN111400156A (en) | Log analysis method and device | |
CN112257004B (en) | Method, device, server and storage medium for page backup |
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 |