A method, device, terminal and storage medium for handling abnormality
By receiving, recording and broadcasting exception messages, the problems of low efficiency and inability to manage uniformly in the prior art are solved, and efficient exception handling and unified management are achieved.
Patent Information
- Application Number
- CN202010575635.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-22
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2040-06-22
AI Technical Summary
The existing exception handling methods are inefficient and cannot be managed and repaired in a unified manner.
By receiving exception messages sent by the service system, recording them to the exception message table and broadcasting them, so that the corresponding service system can perform exception processing. At the same time, update the processing status and rebroadcast if necessary to ensure successful processing.
It improves exception handling efficiency, realizes unified management and repair of different exceptions, and ensures the reliability and efficiency of exception handling.
Smart Images

Figure CN111782431B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to software development technology, and in particular to an exception processing method, device, terminal and storage medium. Background Art
[0002] During the software development process, unforeseen events may occur at any time in the various stages of testing, running and maintaining the program, interrupting the normal condition chain. These unforeseen events are called exceptions.
[0003] At present, the common exception handling methods are mainly through developers' self-checking and processing, running code for retries, or establishing a retry polling table to handle all exceptions by querying them in sequence.
[0004] The shortcomings of the existing exception handling methods include at least: low efficiency of exception handling and inability to uniformly manage and repair different exceptions. Summary of the invention
[0005] The embodiments of the present invention provide an exception processing method, device, terminal and storage medium, which improve the exception processing efficiency and can uniformly manage and repair different exceptions.
[0006] In a first aspect, an embodiment of the present invention provides an exception processing method, which is applied to an exception processing system, including:
[0007] Receiving a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard;
[0008] Recording the first exception message to an exception message table, and setting a processing status of the recorded first exception message to unrepaired, and the processing status is updated according to the processing progress of the first exception message;
[0009] The abnormal message table is queried in sequence, and the first abnormal message found to be in an unrepaired processing state is used as the second abnormal message to be processed currently;
[0010] The second exception message is broadcasted so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message.
[0011] Optionally, after broadcasting the second abnormal message, the method further includes:
[0012] Receiving an exception handling result sent by a business system corresponding to the second exception message;
[0013] When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired;
[0014] When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure;
[0015] The second exception message with a processing status of repair failure is recorded in the repair failure table.
[0016] Optionally, after broadcasting the second abnormal message, the method further includes:
[0017] Determining whether the second abnormal message is broadcast successfully;
[0018] If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number;
[0019] When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure;
[0020] The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
[0021] Further, when the first exception message with a processing status of unrepaired in the queried exception message table is empty, the first exception message and the exception data of the first exception message are summarized.
[0022] Further, receiving a third abnormal message delivered by at least one business system, wherein the third abnormal message is an abnormal message that does not meet a preset verification standard;
[0023] The third exception message is recorded in a delivery exception table, and the delivery exception table is sent to a preset client.
[0024] In a second aspect, an embodiment of the present invention provides an exception processing method, which is applied to a business system, including:
[0025] Receive an exception message, and package the exception message to obtain a specific exception corresponding to the exception message;
[0026] When the specific exception meets the preset verification standard, sending the specific exception as a first exception message to the exception handling system;
[0027] Monitor the second exception message broadcast by the exception handling system, and filter out the fourth exception message of the business system from the second exception message;
[0028] The scene of the abnormal event is restored according to the data carried by the fourth abnormal message, and the abnormal event is repaired based on a repair module corresponding to the restored scene.
[0029] In a third aspect, an embodiment of the present invention further provides an exception processing device, which is applied to an exception processing system, including:
[0030] A first abnormal message receiving module, used to receive a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard;
[0031] A recording module, configured to record the first abnormal message into an abnormal message table, and set a processing status of the recorded first abnormal message to unrepaired;
[0032] A query module, used for querying the abnormal message table in sequence, and taking the first abnormal message found in the query whose processing status is unrepaired as the second abnormal message to be processed currently;
[0033] The broadcast module is used to broadcast the second exception message so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message.
[0034] In a fourth aspect, an embodiment of the present invention provides an abnormal processing device, which is applied to a business system, including:
[0035] A packaging processing module, used for receiving an exception message, and packaging the exception message to obtain a specific exception corresponding to the exception message;
[0036] A sending module, configured to send the specific exception as a first exception message to an exception handling system when the specific exception meets a preset verification standard;
[0037] A monitoring module, used for monitoring the second abnormal message broadcasted by the abnormality handling system, and filtering out the fourth abnormal message of the business system from the second abnormal message;
[0038] A repair module is used to restore the scene of the abnormal event according to the data carried by the fourth abnormal message, and repair the abnormal event based on the repair module corresponding to the restored scene.
[0039] In a fifth aspect, an embodiment of the present invention further provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the exception handling method provided in any embodiment of the present application is implemented.
[0040] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a method for handling an exception as provided in any embodiment of the present application.
[0041] The embodiment of the present invention provides an exception processing method, device, terminal and storage medium, wherein the exception segmentation method includes: receiving a first exception message sent by at least one business system, wherein the first exception message is an exception message that meets a preset verification standard; recording the first exception message to an exception message table, and setting the processing status of the recorded first exception message to unrepaired; querying the exception message table in sequence, and using the first first exception message with an unrepaired processing status as the second exception message to be processed; broadcasting the second exception message so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message. The exception processing efficiency is improved, and unified management and repair can be performed for different exceptions. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of an abnormality processing method provided in the first embodiment of the present invention;
[0043] Figure 2 It is a flowchart of an abnormality processing method provided in the second embodiment of the present invention;
[0044] Figure 3 is a schematic diagram of the structure of an abnormality processing device provided in Embodiment 3 of the present invention;
[0045] Figure 4 is a schematic diagram of the structure of an abnormality processing device provided by Embodiment 4 of the present invention;
[0046] Figure 5 It is a structural diagram of a terminal provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through implementation methods with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the following embodiments, each embodiment provides optional features and examples at the same time. The various features recorded in the embodiments can be combined to form multiple optional solutions. Each numbered embodiment should not be regarded as only one technical solution.
[0048] Embodiment 1
[0049] Figure 1 1 is a flowchart of an exception handling method provided in the first embodiment of the present invention. This embodiment is applicable to the case of handling exceptions occurring in a business system. The method can be executed by the exception handling device provided in the embodiment of the present invention. The device can be implemented in software and / or hardware and configured in a terminal, such as a computer. Figure 1 As shown, the method is applied to an exception handling system and includes the following operations:
[0050] S110, receiving a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard;
[0051] A business system refers to a system, software or application that can realize a certain business function. Sometimes, an exception may occur during the operation of a business system. The preset verification standard means that each business system will have certain preset verification standard requirements for the abnormal message to be delivered by the system. Only when this verification standard is met can it be delivered normally. Exemplarily, the preset verification standard can be whether the abnormal message contains abnormal parameters, or it can also be whether it contains the corresponding business system name, or it contains the business system abnormal code, etc. The embodiment of the present invention does not specifically limit the preset standard, and the preset verification standards of different business systems can be the same or different.
[0052] When a business system wants to send an exception message, it will first verify the exception message according to the preset verification standard of this system. If it meets its own verification standard, it is judged that the exception message has passed the message verification. The exception message that passes the verification of this business system is called the first exception message. The business system sends the first exception message to the exception message queue that has passed the message verification of this system. The exception handling system receives the first exception message through the exception message queue that has passed the message verification of the business system.
[0053] Optionally, receiving a third abnormal message delivered by at least one business system, wherein the third abnormal message is an abnormal message that does not meet a preset verification standard;
[0054] The third exception message is recorded in a delivery exception table, and the delivery exception table is sent to a preset client.
[0055] If an abnormal message does not meet the preset verification standard of this business system, it is judged that the abnormal message has not passed the message verification. Preferably, the abnormal message that has not passed the message verification is called the third abnormal message. The embodiment of the present invention does not limit the name of the abnormal message that has passed the message verification. The delivery exception table is responsible for recording the abnormal messages reported by different business systems that do not meet their own preset verification standards. The exception handling system first uses the abnormal message queue that has not passed the message verification from the business system to receive the third abnormal message, and then records the third abnormal message in the delivery exception table. The delivery exception table is responsible for recording the reported abnormal messages that do not meet the parameter verification standard of the exception handling center, and then sends them to the preset client for monitoring and early warning. The preset client refers to notifying the person in charge of the business system of the third abnormal message through the client, informing the person in charge that the business system and the abnormal handling system are incorrectly connected, so that the person in charge can re-check the parameter settings of the business system. For example, the early warning notification can be made by calling the email service, or the person in charge of the application can be notified through the WeChat message interface service. The example of the present invention does not limit the preset client.
[0056] The abnormal information that fails the message verification is counted to facilitate subsequent monitoring and early warning.
[0057] S120, recording the first abnormal message into the abnormal message table, and setting the processing status of the recorded first abnormal message to unrepaired, and the processing status is updated according to the processing progress of the first abnormal message;
[0058] The exception message table is responsible for recording the exception messages reported by the business system through the exception delivery tool, and recording whether the exception message can be repaired and the repair status. This table records the first exception message, that is, the exception message that passes the message verification. Optionally, the exception message table is an exception message reporting table. For the exception message just recorded, since no processing has been performed, the initial processing status of the exception message is set to unrepaired, so that the repair status of the exception message can be updated and managed in real time according to the processing situation.
[0059] S130, querying the abnormal message table in sequence, and taking the first abnormal message found in the query whose processing status is unrepaired as the second abnormal message to be processed;
[0060] The order may be the order of arrangement according to the time of receiving the abnormal messages, or the order of arrangement after the abnormal messages are numbered. The embodiment of the present invention does not limit the order. The abnormal handling system receives the first abnormal message sent by the business system by using the abnormal message queue that passes the message verification, and then records the abnormal message in the abnormal message table. The query is to query all the abnormalities in the abnormal message table with the processing status of unrepaired by the timed task scheduling system, wherein the timed task scheduling system refers to a system that automatically executes tasks based on a given time point, a given time interval or a given number of executions. The embodiment of the present invention does not limit the query method used by the timed task scheduling system. The paging query can be a query for each abnormal message in one page, or it can be a query for all abnormalities in an average of several pages. The embodiment of the present invention does not limit the paging query method. Preferably, the first abnormal message received on the day that has been verified and not repaired is queried from the abnormal message table in sequence. If the first abnormal message is successfully queried, the abnormal message is used as the abnormal message to be processed, which is called the second abnormal message. The embodiment of the present invention does not limit the name of the abnormal message, and the second abnormal message is broadcasted later. Optionally, the first uncorrected abnormal message received the previous day and passed the message verification is sequentially queried from the abnormal message table in pages, and the queried abnormal message is broadcasted for subsequent abnormal processing.
[0061] Optionally, when the first exception message with a processing status of unrepaired in the queried exception message table is empty, the first exception message and the exception data of the first exception message are summarized.
[0062] When the first exception message with a processing status of unrepaired in the queried exception message table is empty, it indicates that the query of the unrepaired first exception message that has passed the message verification in the exception message table has been completed, then all the exception messages that have been queried and the exception data of the exception messages are summarized. Exemplarily, the summary of the exception messages can be a summary of how many exception messages have been queried in total, and the exception data can include an exception code, or exception parameters of the exception message, or an exception description of the exception. An exemplary exception description can be an interface parameter exception, etc. The embodiment of the present invention does not limit the content of the summary, and the summary of the exception data of the exception messages can be a summary of how many exception codes there are in all the first exception messages that have been queried, or how many exception parameters there are, or how many different exception descriptions there are, etc.
[0063] S140: Broadcast the second exception message, so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message.
[0064] Broadcasting means that the exception handling system sends the exception message to the exception message processing queue, and monitoring means that the business system obtains the exception message belonging to the business system from the exception message queue. The exception handling system sends the second exception message that needs to be processed to the exception message processing queue for broadcasting. Since the business system integrates the exception repair tool, it will automatically monitor the broadcast exception messages in the exception message processing queue and perform subsequent exception processing on the monitored exception messages.
[0065] Optionally, after broadcasting the second abnormal message, the method further includes:
[0066] Receiving an exception handling result sent by a business system corresponding to the second exception message;
[0067] When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired;
[0068] When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure;
[0069] The second exception message with a processing status of repair failure is recorded in the repair failure table.
[0070] The business system processes the monitored second abnormal message through an abnormal repair tool, and after processing, sends the processing result of whether it is repaired to the abnormal handling system. Since the second abnormal message is sent to the abnormal message processing queue for broadcasting once, it is considered to be repaired once. When it does not exceed the preset number of sending times, and the business system successfully repairs the abnormality, the abnormal handling system changes the original repair state of the corresponding second abnormal message in the abnormal message table from unrepaired to repaired; when the number of times the abnormal message is sent to the abnormal message processing queue for broadcasting exceeds the preset number of sending times, the abnormal message repair fails, and the abnormal handling system changes the original repair state of the corresponding second abnormal message in the abnormal message table from unrepaired to repair failure. Preferably, the abnormal handling state for the repair failure can be an unrepairable exception, and the abnormal data of the unrepairable exception is recorded in the repair failure table. Exemplarily, the abnormal data can be the abnormal parameters of the exception, or the abnormal code, etc. The repair failure table can be used to compile daily reports, etc., which is convenient for business R&D personnel to analyze the reasons for the failure of abnormal repair.
[0071] Optionally, after broadcasting the second abnormal message, the method further includes:
[0072] Determining whether the second abnormal message is broadcast successfully;
[0073] If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number;
[0074] When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure;
[0075] The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
[0076] Since the exception handling system considers a repair once when it broadcasts to the exception repair queue, if the preset number of transmissions is not reached, and the repair status corresponding to the exception message in the exception message table has been changed from "unrepaired" to "repaired", the second exception message is repaired successfully, and the broadcast is considered successful.
[0077] Since the business system may rely on the external system call interface to repair the second exception message that it has monitored and belongs to the business system, when the external system is in a busy state, etc., the second exception message is not repaired successfully, and the broadcast is unsuccessful. The business system feeds back the exception processing result of the unrepaired second exception message to the exception message processing system, and the exception message processing system resends the second exception message to the exception message processing queue for broadcasting. The broadcast count of the second exception message is increased by 1 as long as the second exception message is broadcast once; if the repair tool has successfully repaired the exception when the business system monitors the second exception message of the system through the last broadcast, the business system feeds back the exception processing result of the repaired second exception message to the exception message processing system, and the exception processing system no longer sends the second exception message to the exception message processing queue for broadcasting, but changes the repair status of the second exception message in the exception message table from unrepaired to repaired. If the repair status of the second exception message is still not repaired when the preset number of sending times is reached, it means that the repair of the second exception message has failed, and its broadcast is deemed to have failed. The exception handling system changes the repair status corresponding to the exception message in the exception message table to broadcast failure. Preferably, the exception handling status with the repair status of broadcast failure may be an unrepairable exception. The exception handling system also records the exception message in the broadcast failure table. Preferably, the broadcast failure may specifically be an abnormal over-sending times table, which is used to record abnormal messages that exceed the repair sending times.
[0078] Different situations of different exceptions are handled separately, which improves the efficiency of exception handling.
[0079] An exception processing method provided by an embodiment of the present invention is applied to an exception processing system, first receiving a first exception message sent by at least one business system, wherein the first exception message is an exception message that meets a preset verification standard; recording the first exception message in an exception message table, and setting the processing status of the recorded first exception message to unrepaired, and updating the processing status according to the processing process of the first exception message; querying the exception message table in sequence, and taking the first first exception message with an unrepaired processing status as the second exception message to be processed; broadcasting the second exception message so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message. The exception processing efficiency is improved, and different exceptions can be uniformly managed and repaired.
[0080] Embodiment 2
[0081] Figure 2 is a flowchart of an exception handling method provided in the second embodiment of the present invention. This embodiment is applicable to the case of handling exceptions occurring in a business system. The method can be executed by the exception handling device provided in the embodiment of the present invention. The device can be implemented in software and / or hardware and configured in a terminal, such as a computer. Figure 2 As shown, applied to a business system, the method includes the following operations:
[0082] S210, receiving an exception message, and packaging the exception message to obtain a specific exception corresponding to the exception message;
[0083] The exception delivery tool exposes two exception collection interfaces to the business system. One is a local interface. When an exception occurs, the business system immediately calls the local interface to capture the exception information. The exception captured by the local interface does not perform any exception processing. In addition, a specific exception can be obtained by packaging the exception. The specific exception can be an exception code specified for the original exception, or it can be a parameter containing the original exception generation scenario. The packaged specific exception is reported through the method call stack. When the specific annotation of the exception collection tool collects the specific exception, the business system captures the specific exception through the specific annotation. The business system receives the captured exception message containing the exception parameter, exception code and corresponding application name. The above-mentioned specific annotation implements functions similar to the interface here. For example, specific exceptions can be captured using specific annotations with the help of Aspect Oriented Programming (AOP) in Spring.
[0084] S220, when the specific exception meets the preset verification standard, sending the specific exception as a first exception message to the exception handling system;
[0085] The packaged specific exception is verified using the preset verification standard described in Example 1, and the specific exception that passes the message verification is used as the first exception message. The first exception message is sent to the exception handling system through the exception message queue that has passed the message verification of the business system and is saved in the exception message table.
[0086] S230, monitoring the second exception message broadcast by the exception handling system, and filtering out the fourth exception message of the business system from the second exception message;
[0087] The exception handling system will query the exception messages in the exception message table whose processing status is unprocessed through the scheduled task scheduling system, and send a first exception message successfully queried as the second exception message currently being processed to the exception message processing queue for broadcasting. The business system monitors the second exception message broadcast by the exception handling system in the exception message queue. If the second exception message is detected to belong to the business system, the business system will receive the second exception message as the fourth exception message by calling the system interface and perform subsequent exception processing. Exemplarily, it can be determined whether the second exception message belongs to the business system by the application name contained in the second exception message.
[0088] S240: restore the scene of the abnormal event according to the data carried by the fourth abnormal message, and repair the abnormal event based on a repair module corresponding to the restored scene.
[0089] Scene restoration refers to the restoration of the parameters and / or data of the exception by the exception repair tool. The repair module is the exception repair tool of the business system. The business system calls the repair tool of the exception repair system to restore the scene of the fourth exception message belonging to the business system according to the exception code and the exception scene parameters contained in the fourth exception message monitored by the business system. After the parameters and / or data of the fourth exception message are restored, the repair tool can repair the exception.
[0090] An exception handling method provided by an embodiment of the present invention is applied to a business system, including: receiving an exception message, packaging the exception message to obtain a specific exception corresponding to the exception message; when the specific exception meets a preset verification standard, sending the specific exception as a first exception message to an exception handling system; the business system monitors the second exception message broadcast by the exception handling system, and filters out a fourth exception message of the business system from the second exception message; restoring the scene of the abnormal event according to the data carried by the fourth exception message, and repairing the abnormal event based on a repair module corresponding to the restored scene. The business system monitors the abnormalities belonging to the business system to facilitate abnormal repair.
[0091] Embodiment 3
[0092] Figure 3 1 is a schematic diagram of the structure of an exception processing device provided in Embodiment 3 of the present invention. The device is used to execute an exception processing method provided in the above embodiment and is applied to an exception processing system. The device includes:
[0093] A first abnormal message receiving module 310 is used to receive a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard;
[0094] The recording module 320 is used to record the first abnormal message into the abnormal message table, and set the processing status of the recorded first abnormal message to unrepaired, and the processing status is updated according to the processing progress of the first abnormal message;
[0095] A query module 330 is used to query the abnormal message table in sequence, and use the first abnormal message found in the query whose processing status is unrepaired as the second abnormal message to be processed currently;
[0096] The broadcast module 340 is used to broadcast the second abnormal message so that the business system corresponding to the second abnormal message performs abnormal processing according to the monitored second abnormal message.
[0097] Optionally, the exception processing device is applied to the exception processing system and also includes
[0098] The third exception receiving module is used to receive a third exception message delivered by at least one business system, wherein the third exception message is an exception message that does not meet a preset verification standard.
[0099] Optionally, the recording module also includes:
[0100] The third exception message is recorded in a delivery exception table, and the delivery exception table is sent to a preset client.
[0101] Optionally, when the first exception message with a processing status of unrepaired in the queried exception message table is empty, the first exception message and the exception data of the first exception message are summarized.
[0102] Optionally, the broadcast module also includes:
[0103] Receiving an exception handling result sent by a business system corresponding to the second exception message;
[0104] When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired;
[0105] When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure;
[0106] Recording the second abnormal message with a processing status of repair failure into the repair failure table;
[0107] Determining whether the second abnormal message is broadcast successfully;
[0108] If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number;
[0109] When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure;
[0110] The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
[0111] An exception processing device provided in the third embodiment of the present invention can execute the exception processing method provided in any embodiment of the present invention, and is applied to an exception processing system with corresponding functional modules and beneficial effects of the execution method.
[0112] Embodiment 4
[0113] Figure 4 1 is a schematic diagram of the structure of an abnormality processing device provided in Embodiment 4 of the present invention. The device is used to execute an abnormality processing method provided in the above embodiment and is applied to a business system. The device includes:
[0114] The packaging processing module 410 is used to receive the abnormal message and perform packaging processing on the abnormal message to obtain the specific abnormality corresponding to the abnormal message;
[0115] A sending module 420, configured to send the specific exception as a first exception message to the exception handling system when the specific exception meets the preset verification standard;
[0116] A monitoring module 430, configured to monitor the second abnormal message broadcast by the abnormality handling system, and filter out the fourth abnormal message of the business system from the second abnormal message;
[0117] The repair module 440 is used to restore the scene of the abnormal event according to the data carried by the fourth abnormal message, and repair the abnormal event based on the repair module corresponding to the restored scene.
[0118] An exception processing device provided in the fourth embodiment of the present invention can execute the exception processing method provided in any embodiment of the present invention, is applied to a business system, and has functional modules and beneficial effects corresponding to the execution method.
[0119] Embodiment 5
[0120] Figure 5 It is a structural diagram of a terminal provided in Embodiment 5 of the present invention. Figure 5 A block diagram of an exemplary terminal 12 suitable for use in implementing any of the embodiments of the present invention is shown. Figure 5 The terminal 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The device 12 is typically a terminal that performs the breast segmentation function.
[0121] like Figure 5 As shown, the terminal 12 is 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 connecting different components (including the memory 28 and the processing unit 16).
[0122] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0123] Terminal 12 typically includes a variety of computer readable media. These media can be any available media that can be accessed by terminal 12, including volatile and non-volatile media, removable and non-removable media.
[0124] The memory 28 may include computer device readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The terminal 12 may further include other removable / non-removable, volatile / non-volatile computer storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product 40, which has a set of program modules 42, which are configured to perform the functions of various embodiments of the present invention. The program product 40 may be stored in, for example, the memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment. The program module 42 generally performs the functions and / or methods in the embodiments described in the present invention.
[0125] 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 device that enables the terminal 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the terminal 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the terminal 12 via a bus 18. It should be understood that, although not shown in the figure, 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 arrays (RAID) devices, tape drives, and data backup storage devices.
[0126] 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 in the above embodiment of the present invention, which is applied to the exception handling system, and the method includes:
[0127] Receiving a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard;
[0128] Record the first exception message to the exception message table, and set the processing status of the recorded first exception message to unrepaired, and the processing status is updated according to the processing progress of the first exception message;
[0129] The exception message table is queried in sequence, and the first exception message found to be in an unrepaired processing state is used as the second exception message to be processed;
[0130] The second exception message is broadcasted so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message.
[0131] Applied to a business system, the method includes:
[0132] Receive an exception message, and package the exception message to obtain a specific exception corresponding to the exception message;
[0133] When the specific exception meets the preset verification standard, the specific exception is sent as a first exception message to the exception handling system;
[0134] Monitor the second exception message broadcast by the exception handling system, and filter out the fourth exception message of the business system from the second exception message;
[0135] The scene of the abnormal event is restored according to the data carried by the fourth abnormal message, and the abnormal event is repaired based on a repair module corresponding to the restored scene.
[0136] Embodiment 6
[0137] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for handling an exception provided in any embodiment of the present application is implemented, and the method is applied to an exception handling system. The method includes:
[0138] Receiving a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard;
[0139] Record the first exception message to the exception message table, and set the processing status of the recorded first exception message to unrepaired, and the processing status is updated according to the processing progress of the first exception message;
[0140] The exception message table is queried in sequence, and the first exception message found to be in an unrepaired processing state is used as the second exception message to be processed;
[0141] The second exception message is broadcasted so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message.
[0142] Applied to a business system, the method includes:
[0143] Receive an exception message, and package the exception message to obtain a specific exception corresponding to the exception message;
[0144] When the specific exception meets the preset verification standard, the specific exception is sent as a first exception message to the exception handling system;
[0145] Monitor the second exception message broadcast by the exception handling system, and filter out the fourth exception message of the business system from the second exception message;
[0146] The scene of the abnormal event is restored according to the data carried by the fourth abnormal message, and the abnormal event is repaired based on a repair module corresponding to the restored scene.
[0147] Of course, the computer program stored on a computer-readable storage medium provided by an embodiment of the present invention is not limited to the above method instructions, and can also execute the exception processing method provided by any embodiment of the present invention.
[0148] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution device, a device or a device or used in combination with it.
[0149] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution device, apparatus, or device.
[0150] 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.
[0151] Computer program code for executing the instructions of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0152] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for handling an exception, characterized in that: Applied to exception handling systems, including: Receive a first exception message sent by at least one business system, wherein the first exception message is an exception message that meets a preset verification standard; wherein the preset verification standard is whether the exception message contains an exception parameter, a corresponding business system name, and a business system exception code; Recording the first exception message to an exception message table, and setting the processing status of the recorded first exception message to unrepaired, and updating the processing status according to the processing progress of the first exception message, wherein the exception message table is used to record the reported exception message, and record whether the exception message is repairable, and the repair status; The abnormal message table is queried in sequence, and the first abnormal message found to be in an unrepaired processing state is used as the second abnormal message to be processed currently; broadcasting the second exception message so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message; The method further comprises: Receiving a third abnormal message delivered by at least one business system, wherein the third abnormal message is an abnormal message that does not meet a preset verification standard; Recording the third exception message into a delivery exception table, and sending the delivery exception table to a preset client; After broadcasting the second abnormal message, the method further includes: Receiving an exception handling result sent by a business system corresponding to the second exception message; When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired; When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure; Recording the second abnormal message with a processing status of repair failure into the repair failure table; After broadcasting the second abnormal message, the method further includes: Determining whether the second abnormal message is broadcast successfully; If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number; When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure; The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
2. The method according to claim 1, characterized in that: Also includes: When the first exception message with a processing status of unrepaired in the queried exception message table is empty, the first exception message and the exception data of the first exception message are summarized.
3. A method for handling an exception, characterized in that: Applied to business systems, including: Receive an exception message, and package the exception message to obtain a specific exception corresponding to the exception message; When the specific exception meets the preset verification standard, sending the specific exception as a first exception message to the exception handling system; Monitor the second exception message broadcast by the exception handling system, and filter out the fourth exception message of the business system from the second exception message; 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 repair module corresponding to the restored scene; Wherein, the exception handling system is used to: Receiving a third abnormal message delivered by at least one business system, wherein the third abnormal message is an abnormal message that does not meet a preset verification standard; Recording the third exception message into a delivery exception table, and sending the delivery exception table to a preset client; The exception handling system is used to: Broadcasting the second abnormal message; After broadcasting the second abnormal message, the method further includes: Receiving an exception handling result sent by a business system corresponding to the second exception message; When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired; When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure; Recording the second abnormal message with a processing status of repair failure into the repair failure table; After broadcasting the second abnormal message, the method further includes: Determining whether the second abnormal message is broadcast successfully; If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number; When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure; The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
4. An abnormality processing device, characterized in that: Applied to exception handling systems, including A first abnormal message receiving module, used to receive a first abnormal message sent by at least one business system, wherein the first abnormal message is an abnormal message that meets a preset verification standard; wherein the preset verification standard is whether the abnormal message contains abnormal parameters, a corresponding business system name and a business system abnormal code; A recording module, used for recording the first abnormal message into an abnormal message table, and setting the processing status of the recorded first abnormal message to unrepaired, and the processing status is updated according to the processing progress of the first abnormal message, wherein the abnormal message table is used for recording the reported abnormal message, and recording whether the abnormal message is repairable, and the repair status; A query module, used for querying the abnormal message table in sequence, and taking the first abnormal message found in the query whose processing status is unrepaired as the second abnormal message to be processed currently; A broadcast module, used for broadcasting the second exception message, so that the business system corresponding to the second exception message performs exception processing according to the monitored second exception message; The device further comprises: A third abnormality receiving module, used to receive a third abnormality message delivered by at least one business system, wherein the third abnormality message is an abnormality message that does not meet the preset verification standard; The recording module is further used for: Recording the third exception message into a delivery exception table, and sending the delivery exception table to a preset client; The broadcast module is also used for: Receiving an exception handling result sent by a business system corresponding to the second exception message; When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired; When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure; Recording the second abnormal message with a processing status of repair failure into the repair failure table; The broadcast module is also used for: Determining whether the second abnormal message is broadcast successfully; If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number; When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure; The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
5. An abnormality processing device, characterized in that: Applied to business systems, including A packaging processing module, used for receiving an exception message, and packaging the exception message to obtain a specific exception corresponding to the exception message; A sending module, configured to send the specific exception as a first exception message to an exception handling system when the specific exception meets a preset verification standard; A monitoring module, used for monitoring the second abnormal message broadcasted by the abnormality handling system, and filtering out the fourth abnormal message of the business system from the second abnormal message; a repair module, configured to restore the scene of the abnormal event according to the data carried by the fourth abnormal message, and repair the abnormal event based on the repair module corresponding to the restored scene; Wherein, the exception handling system is used to: Receiving a third abnormal message delivered by at least one business system, wherein the third abnormal message is an abnormal message that does not meet a preset verification standard; Recording the third exception message into a delivery exception table, and sending the delivery exception table to a preset client; The exception handling system is used for: a broadcast module; Broadcasting the second abnormal message; Wherein, the exception handling system comprises: The broadcast module is also used for: Receiving an exception handling result sent by a business system corresponding to the second exception message; When the exception handling result is successful, updating the processing status of the second exception message from unrepaired to repaired; When the exception handling result is a processing failure, updating the processing status of the second exception message from unrepaired to repair failure; Recording the second abnormal message with a processing status of repair failure into the repair failure table; The broadcast module is also used for: Determining whether the second abnormal message is broadcast successfully; If not, the second abnormal message is rebroadcasted and the number of retries of the second abnormal message is updated until the second abnormal message is successfully broadcasted or the number of retries reaches a preset number; When the number of retries reaches a preset number, updating the processing status of the second abnormal message from unrepaired to broadcast failure; The second abnormal message with a processing status of broadcast failure is recorded in the broadcast failure table.
6. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the exception processing method described in any one of claims 1 to 2 or the exception processing method described in 3 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the program implements the exception processing method described in any one of claims 1 to 2 or the exception processing method described in claim 3.
Citation Information
Patent Citations
Abnormal event processing method and apparatus, electronic device and storage medium
CN107908494A