CN108446185B - Exception handling method and device, electronic terminal and readable storage medium - Google Patents

Exception handling method and device, electronic terminal and readable storage medium Download PDF

Info

Publication number
CN108446185B
CN108446185B CN201810260262.XA CN201810260262A CN108446185B CN 108446185 B CN108446185 B CN 108446185B CN 201810260262 A CN201810260262 A CN 201810260262A CN 108446185 B CN108446185 B CN 108446185B
Authority
CN
China
Prior art keywords
abnormal
exception
defining
configuration
reason
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810260262.XA
Other languages
Chinese (zh)
Other versions
CN108446185A (en
Inventor
张振铎
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810260262.XA priority Critical patent/CN108446185B/en
Publication of CN108446185A publication Critical patent/CN108446185A/en
Application granted granted Critical
Publication of CN108446185B publication Critical patent/CN108446185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0763Error or fault detection not based on redundancy by bit configuration check, e.g. of formats or tags

Landscapes

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

Abstract

The embodiment of the invention provides an exception handling method, an exception handling device, an electronic terminal and a readable storage medium. The exception handling method comprises the following steps: when a node is abnormal, reading an abnormal configuration file to obtain abnormal configuration corresponding to the abnormality of the node; generating an abnormal label according to the abnormal configuration, wherein the abnormal label comprises an abnormal reason and an abnormal suggestion; and displaying the abnormal label in the electronic terminal.

Description

Exception handling method and device, electronic terminal and readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to an exception handling method and device, an electronic terminal and a readable storage medium.
Background
When the operation of each system is abnormal, most systems only return to null or return to a simple description, such as' parameter error! "," network Exception! "service internal error" and the like, but the maintainability and locatability of such abnormal responses are poor, which brings great difficulty to the normal operation and maintenance of the system.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide an exception handling method, an exception handling apparatus, an electronic terminal and a readable storage medium.
The exception handling method provided by the embodiment of the invention is applied to an electronic terminal, and comprises the following steps:
when a node is abnormal, reading an abnormal configuration file to obtain abnormal configuration corresponding to the abnormality of the node;
generating an abnormal label according to the abnormal configuration, wherein the abnormal label comprises an abnormal reason and an abnormal suggestion;
and displaying the abnormal label in the electronic terminal.
The embodiment of the invention also provides an exception handling device, which is applied to an electronic terminal and comprises:
the reading module is used for reading the abnormal configuration file to obtain the abnormal configuration corresponding to the abnormality of a node when the node is abnormal;
the generation module is used for generating an abnormal label according to the abnormal configuration, wherein the abnormal label comprises an abnormal reason and an abnormal suggestion;
and the display module is used for displaying the abnormal label in the electronic terminal.
An embodiment of the present invention further provides an electronic terminal, including:
a memory;
a processor;
in the above-described abnormality processing device, the real-time moving image display device is stored in the memory and is controlled and executed by the processor.
An embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, where the computer program, when executed, implements the above-mentioned exception handling method.
Compared with the prior art, the exception handling method, the exception handling device, the electronic terminal and the readable storage medium of the embodiment of the invention have the advantages that the exception configuration is obtained, the exception label is generated according to the exception configuration, and the finally displayed exception label comprises the exception reason and the exception suggestion, so that a user can better locate the exception, and the user can better maintain the system.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of an electronic terminal according to an embodiment of the present invention.
Fig. 2 is a flowchart of an exception handling method according to an embodiment of the present invention.
Fig. 3 is a detailed flowchart of step S101 of the exception handling method according to the embodiment of the present invention.
Fig. 4 is a detailed flowchart of step S101 of an exception handling method according to another embodiment of the present invention.
Fig. 5 is a functional block diagram of an exception handling apparatus according to a preferred embodiment of the present invention.
Fig. 6 is a functional block diagram of a read module of the exception handling apparatus according to the preferred embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 is a block diagram of the electronic terminal 100. The electronic terminal 100 includes an exception handling apparatus 110, a memory 111, a storage controller 112, a processor 113, a peripheral interface 114, an input/output unit 115, and a display unit 116. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic terminal 100. For example, the electronic terminal 100 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 111, the memory controller 112, the processor 113, the peripheral interface 114, the input/output unit 115 and the display unit 116 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The exception handling apparatus 110 includes at least one software function module which can be stored in the memory 111 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic terminal 100. The processor 113 is configured to execute an executable module stored in the memory, such as a software functional module or a computer program included in the exception handling apparatus 110.
The Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 111 is configured to store a program, and the processor 113 executes the program after receiving an execution instruction, and the method executed by the electronic terminal 100 defined by the process disclosed in any embodiment of the present invention may be applied to the processor 113, or implemented by the processor 113.
In this embodiment, an Android operating system (Android) is installed in the electronic terminal 100. The Android operating system is stored in the memory 111. Wherein the operating system may include various software components and/or drivers for managing system tasks such as memory management, storage device control, power management, etc.
The processor 113 may be an integrated circuit chip having signal processing capabilities. The Processor 113 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The peripheral interface 114 couples various input/output devices to the processor 113 and memory 111. In some embodiments, the peripheral interface 114, the processor 113, and the memory controller 112 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The input/output unit 115 is used to provide input data to a user. The input/output unit 115 may be, but is not limited to, a mouse, a keyboard, and the like.
The display unit 116 provides an interactive interface (e.g., a user operation interface) between the electronic terminal 100 and a user or is used to display image data to a user reference. In this embodiment, the display unit may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. The support of single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are sent to the processor for calculation and processing.
The research of the applicant finds that in the field of software engineering Java, the scenes of interaction of multi-process services are very common, and the scenes which are not interacted with other Java processes are controlled independently and are difficult to maintain and expand. For example, in a common mall system, functions such as a commodity list, a shopping cart, an order, payment and the like may belong to different systems, i.e., different processes, each process provides different functions, and the processes interact with each other to form a mesh structure, so that complex and huge functions are provided in cooperation. However, it is inevitable that an exception occurs in a system or an application, and in a complex multi-process form, specification and efficient processing of the exception are very important, and how an exception of a bottom-layer service is correctly and regularly transmitted and processed to an upper-layer calling party is an important problem to be solved for system maintainability and robustness.
When the traditional Java multi-process interaction occurs, an exception is generated, and most of the exceptions are only simple to return null or a simple description, such as' parameter error! "," network Exception! The simple responses such as "" service internal error "" and the like are adopted, so that the development workload of program developers is small, but the maintainability and the locatability of the service are poor, the time for troubleshooting the problem is long, even the problem of the system cannot be located, and great difficulty is directly brought to the normal operation and maintenance of the system.
Based on the above problems, the present application provides a plurality of embodiments to effectively solve the above technical problems, and the following embodiments are specifically described.
Please refer to fig. 2, which is a flowchart illustrating an exception handling method applied to the electronic terminal shown in fig. 1 according to an embodiment of the present invention. The specific process shown in fig. 2 will be described in detail below.
Step S101, when a node is abnormal, reading an abnormal configuration file to obtain an abnormal configuration corresponding to the abnormality of the node.
In one embodiment, a configuration file defining the exception description is pre-configured in the electronic terminal. The configuration file may include description information of the exception, an occurrence reason of the exception, and a suggestion for handling the exception. In one embodiment, different exceptions correspond to different description information of the exception, the cause of the exception, and a suggestion for handling the exception. And when the abnormity occurs, searching the abnormal configuration from the configuration file through the name of the abnormity or the identification number of the abnormity.
In one example, description information of the abnormality may be stored in the string key.
The method in this embodiment may be implemented in an SDK (Software Development Kit) by packaging. In this embodiment, first, the description, the reason, and the suggestion of the abnormality corresponding to the plurality of kinds of abnormalities are stored in the configuration file in advance. By standardizing the description of the exception through the configuration file, the problem that the exception handling of the conventional system is directly assembled in the program code, and a program developer can develop the code and handle the exception based on own development habit to cause lower maintainability can be effectively solved.
And when an exception occurs, the SDK searches an exception configuration file corresponding to the exception in the configuration file. Specifically, a method of the SDK is called, an abnormal flag of an abnormal node is transmitted to the method of the SDK, and the method of the SDK finds a corresponding abnormal configuration in a configuration file.
And S102, generating an abnormal label according to the abnormal configuration, wherein the abnormal label comprises an abnormal reason and an abnormal suggestion.
In this embodiment, the step S102 includes: and assigning values to each attribute in the prestored abnormal class according to the abnormal configuration to obtain the abnormal label.
In this embodiment, the exception class includes a plurality of attributes: the name of the exception, the description information of the exception, the occurrence reason of the exception and the processing suggestion of the exception; the step S102 includes: and respectively assigning and packaging the name of the abnormality, the description information of the abnormality, the occurrence reason of the abnormality and the processing suggestion of the abnormality by using the abnormality configuration to obtain the abnormality label.
Specifically, the SDK method may assemble the abnormal configuration into an abnormal packet structure with a uniform specification and throw the abnormal packet structure out.
Specifically, in the development phase, a program developer only needs to call the method of the SDK and transfer an abnormal key when judging when an exception needs to be thrown. The development of repeated logic is avoided for each developer, and meanwhile, the flow normalization is ensured.
In one embodiment, the SDK is packaged with exception throwing logic, and is uniformly assembled into a canonical exception structure, which may include the following four-tuple data structure:
ExceptionName: defining a name of the exception;
exceptinodesc: defining description information of the exception;
exceptinonreason: defining a cause of the occurrence of the anomaly;
exceptinodividence: an exception handling recommendation is defined.
In this embodiment, the exceptinonname and the exceptinondesc may be of a string type, and the exceptinonreason and the exceptinonadvice may be of a string array type.
In this embodiment, the exception class may include the above four-tuple exception structure.
The specification of the abnormal structure body is observed by a plurality of Java processes, so that the returned message attribute information can be directly analyzed and processed without knowing when the abnormal returned from the lower layer is processed among the plurality of processes, and the abnormal processing efficiency is improved.
It is to be understood that a person skilled in the art may set the abnormal structure according to requirements, for example, the abnormal structure may include more attributes to describe the abnormality in more detail, or may include less attributes to make the abnormal structure more concise.
In the embodiment, the problem of poor non-normativity and poor locatability of exception handling in the traditional program development can be effectively solved by defining the exception structure, an exception structure message based on an exception configuration file and a unified standard is provided, Java exceptions which can be described, maintained and located can be provided for each Java process only by adopting the specification, and the maintainability and the robustness of the system are improved.
And step S103, displaying the abnormal label in the electronic terminal.
According to the exception handling method provided by the embodiment of the invention, the exception configuration is obtained, the exception label is generated according to the exception configuration, and the finally displayed exception label comprises the exception reason and the exception suggestion, so that a user can better position the exception, and the user can better maintain the system.
In this embodiment, the exception configuration includes an exception identifier and an exception reason, as shown in fig. 3, the step S101 includes: step S1011 and step S1012.
In step S1011, an abnormality identification number of the current abnormality is acquired.
Step S1012, finding an abnormal reason in the configuration file according to the abnormal identification number.
In this embodiment, the exception identification number may be an exception code generated when an exception occurs, or may be a name of the exception. The exception identifier may identify a type of exception.
In this embodiment, the configuration file may store, according to the plurality of exception identification numbers, the exception reason corresponding to each exception identification number. Therefore, the abnormality reason can be found in the configuration file according to the abnormality identification number.
In this embodiment, the exception configuration includes an exception identification number, an exception cause, and an exception suggestion; as shown in fig. 4, the step S101 includes: step S1011 to step S1013.
In step S1011, an abnormality identification number of the current abnormality is acquired.
Step S1012, finding an abnormal reason in the configuration file according to the abnormal identification number.
And S1013, acquiring a corresponding abnormal suggestion according to the abnormal reason to obtain abnormal configuration.
In one embodiment, the exception suggestion may be stored in the configuration file, so that the exception cause may be found in the configuration file according to the exception cause.
In another embodiment, the exception suggestion may be obtained from data that historically handles the cause of the exception. Further, the electronic terminal can store data with historical processing exception.
In another embodiment, the exception suggestion may be directly searched from the configuration file according to the exception identifier.
The content of the generated abnormal label can be used to enrich and reduce the time spent by maintenance personnel in positioning the abnormality by increasing the data of the abnormal configuration, and the operation and maintenance efficiency is improved.
Further, if the corresponding abnormal configuration is not found in the configuration file according to the abnormal identification number, it indicates that the current abnormal is not preset with abnormal data, and other abnormal tags can be generated according to other preset abnormal standards.
In this embodiment, a limited number of types of abnormal reasons not stored in the configuration file may be enumerated, and the limited number of types of abnormal reasons not stored in the configuration file are assigned to each attribute in the abnormal class to obtain the abnormal label. By further processing the abnormity which can not be found out in the abnormal configuration, the range of the abnormal investigation of the user can be reduced, and the efficiency of the user for maintaining the system can also be improved.
Please refer to fig. 5, which is a functional block diagram of the exception handling apparatus 110 shown in fig. 1 according to an embodiment of the present invention. Each module and unit in the exception handling apparatus 110 in this embodiment are used to execute the steps in the above method embodiments. The exception handling apparatus 110 includes: a reading module 1101, a generating module 1102 and a display module 1103.
The reading module 1101 is configured to, when a node is abnormal, read an abnormal configuration file to obtain an abnormal configuration corresponding to the abnormality of the node.
The generating module 1102 is configured to generate an exception tag according to the exception configuration, where the exception tag includes an exception cause and an exception suggestion.
The display module 1103 is configured to display the abnormal tag in the electronic terminal.
In this embodiment, the exception configuration includes an exception identification number, an exception cause, and an exception suggestion. As shown in fig. 6, the reading module 1101 may include: a first acquisition unit 1101 and a lookup unit 1102. The reading module 1101 may further include three units, namely a first obtaining unit 11011, a searching unit 11012 and a second obtaining unit 11013.
The first obtaining unit 11011 is configured to obtain an exception identifier of the current exception.
The searching unit 11012 is configured to search for an exception reason in a configuration file according to the exception identifier.
The second obtaining unit 11013 is configured to obtain a corresponding abnormal suggestion according to the abnormal reason, so as to obtain an abnormal configuration.
In this embodiment, the generating module 1102 is further configured to assign a value to each attribute in a pre-stored exception class according to the exception configuration, so as to obtain the exception tag.
In this embodiment, the exception class includes a plurality of attributes: the name of the exception, the description information of the exception, the occurrence reason of the exception and the processing suggestion of the exception; the generating module 1102 is further configured to perform assignment packaging on the name of the exception, the description information of the exception, the occurrence reason of the exception, and the processing suggestion of the exception, respectively, using the exception configuration to obtain the exception tag.
For other details of the present embodiment, reference may be further made to the description of the above method embodiment, which is not repeated herein.
According to the exception handling device provided by the embodiment of the invention, the exception configuration is obtained, the exception label is generated according to the exception configuration, and the finally displayed exception label comprises the exception reason and the exception suggestion, so that a user can better position the exception, and the user can better maintain the system.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. An exception handling method is applied to an electronic terminal, and comprises the following steps:
when a node is abnormal, reading an abnormal configuration file to obtain abnormal configuration corresponding to the abnormality of the node, wherein the abnormal configuration comprises an abnormal identification number, an abnormal reason and an abnormal suggestion, the abnormal class is an abnormal structural body, the abnormal structural body comprises a four-tuple data structure, and the four-tuple data structure is as follows: defining the name of the exception, defining description information of the exception, defining the reason of the exception and defining the processing suggestion of the exception;
assigning values to each attribute in a prestored abnormal class according to the abnormal configuration to obtain an abnormal label, wherein the abnormal label comprises an abnormal reason and an abnormal suggestion;
wherein, the step of assigning values to each attribute in the pre-stored abnormal class according to the abnormal configuration to obtain the abnormal label comprises:
assigning and packaging the name of the definition exception, the description information of the definition exception, the occurrence reason of the definition exception and the processing suggestion of the definition exception by using the exception configuration to obtain the exception tag; the multiple Java processes all comply with the specification of the abnormal structure, so that the message attribute information which does not need to be returned when the exception returned from the lower layer is processed among the multiple processes is directly analyzed and processed;
and
displaying the abnormal label in the electronic terminal;
wherein the anomaly recommendation is obtained by:
acquiring an abnormal identification number of the current abnormality, searching an abnormal reason in the abnormal configuration file according to the abnormal identification number, and acquiring a corresponding abnormal suggestion according to the abnormal reason; or,
and acquiring the abnormal suggestion from data of the abnormal reason processed in history.
2. The exception handling method of claim 1, wherein the exception class comprises a quad data structure, the quad data structure being:
ExceptionName: defining a name of the exception;
exceptinodesc: defining description information of the exception;
exceptinonreason: defining a cause of the occurrence of the anomaly;
exceptinodividence: defining an exception handling recommendation;
the step of assigning values to each attribute in the pre-stored abnormal class according to the abnormal configuration to obtain the abnormal label comprises: and respectively carrying out assignment and encapsulation on tuples ExceptionName, ExceptionDesc, ExceptionReason and ExceptionAdvice by using the abnormal configuration to obtain the abnormal label.
3. An exception handling apparatus, applied to an electronic terminal, the exception handling apparatus comprising:
the reading module is used for reading an abnormal configuration file to obtain abnormal configuration corresponding to the abnormality of a node when the node is abnormal, wherein the abnormal configuration comprises an abnormal identification number, an abnormal reason and an abnormal suggestion; the abnormal structure comprises a quadruple data structure, wherein the abnormal structure is an abnormal structure body, the quadruple data structure is as follows: defining the name of the exception, defining description information of the exception, defining the reason of the exception and defining the processing suggestion of the exception;
the generation module is used for assigning values to all attributes in a prestored abnormal class according to the abnormal configuration so as to obtain an abnormal label, and the abnormal label comprises an abnormal reason and an abnormal suggestion; the generating module is further configured to assign and package the name of the definition exception, the description information of the definition exception, the reason of the occurrence of the definition exception, and the processing suggestion of the definition exception by using the exception configuration, so as to obtain the exception tag; the multiple Java processes all comply with the specification of the abnormal structure, so that the message attribute information which does not need to be returned when the exception returned from the lower layer is processed among the multiple processes is directly analyzed and processed;
the display module is used for displaying the abnormal label in the electronic terminal;
wherein the anomaly recommendation is obtained by:
acquiring an abnormal identification number of the current abnormality, searching an abnormal reason in the abnormal configuration file according to the abnormal identification number, and acquiring a corresponding abnormal suggestion according to the abnormal reason; or,
and acquiring the abnormal suggestion from data of the abnormal reason processed in history.
4. The exception handling apparatus of claim 3 wherein the exception class comprises a quad data structure, the quad data structure being:
ExceptionName: defining a name of the exception;
exceptinodesc: defining description information of the exception;
exceptinonreason: defining a cause of the occurrence of the anomaly;
exceptinodividence: defining an exception handling recommendation;
the generation module is further used for respectively carrying out assignment encapsulation on the ExceptionName, the ExceptionDesc, the ExceptionReason and the ExceptionAdvice by using the abnormal configuration so as to obtain the abnormal label.
5. An electronic terminal, comprising:
a memory;
a processor;
an exception handling apparatus as claimed in any one of claims 3 to 4, stored in said memory and controlled to execute by said processor.
6. A readable storage medium on which a computer program is stored, characterized in that the computer program, when executed, implements the exception handling method of any of the preceding claims 1-2.
CN201810260262.XA 2018-03-27 2018-03-27 Exception handling method and device, electronic terminal and readable storage medium Active CN108446185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810260262.XA CN108446185B (en) 2018-03-27 2018-03-27 Exception handling method and device, electronic terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810260262.XA CN108446185B (en) 2018-03-27 2018-03-27 Exception handling method and device, electronic terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN108446185A CN108446185A (en) 2018-08-24
CN108446185B true CN108446185B (en) 2021-07-23

Family

ID=63197074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810260262.XA Active CN108446185B (en) 2018-03-27 2018-03-27 Exception handling method and device, electronic terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN108446185B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471832B (en) * 2019-06-25 2024-05-07 平安科技(深圳)有限公司 Processing method and device for program running and computer readable storage medium
CN113760720B (en) * 2021-01-07 2024-10-18 北京沃东天骏信息技术有限公司 Method and device for displaying abnormal information of codes
CN114546691A (en) * 2022-01-11 2022-05-27 奇安信科技集团股份有限公司 Data exception handling method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0466447B1 (en) * 1990-07-13 1996-01-17 Fujitsu Limited Method and apparatus for detecting and processing abnormal messages
CN101937372A (en) * 2010-08-30 2011-01-05 北京数码大方科技有限公司 Exception processing method and device
CN103425576A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Information feedback method and terminal
CN106055419A (en) * 2016-03-31 2016-10-26 惠州市德赛西威汽车电子股份有限公司 Device and method for exception handling of vehicle-mounted embedded system
CN107729180A (en) * 2017-09-30 2018-02-23 珠海市魅族科技有限公司 Abnormal information processing method and processing device, computer installation and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0466447B1 (en) * 1990-07-13 1996-01-17 Fujitsu Limited Method and apparatus for detecting and processing abnormal messages
CN101937372A (en) * 2010-08-30 2011-01-05 北京数码大方科技有限公司 Exception processing method and device
CN103425576A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Information feedback method and terminal
CN106055419A (en) * 2016-03-31 2016-10-26 惠州市德赛西威汽车电子股份有限公司 Device and method for exception handling of vehicle-mounted embedded system
CN107729180A (en) * 2017-09-30 2018-02-23 珠海市魅族科技有限公司 Abnormal information processing method and processing device, computer installation and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN108446185A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
US11924021B1 (en) Actionable event responder architecture
US11645471B1 (en) Determining a relationship recommendation for a natural language request
US11366686B1 (en) Managing user data in a multitenant deployment
US11829330B2 (en) Log data extraction from data chunks of an isolated execution environment
US10942960B2 (en) Automatic triage model execution in machine data driven monitoring automation apparatus with visualization
US10942946B2 (en) Automatic triage model execution in machine data driven monitoring automation apparatus
US10868711B2 (en) Actionable alert messaging network for automated incident resolution
US11838351B1 (en) Customizable load balancing in a user behavior analytics deployment
US11288319B1 (en) Generating trending natural language request recommendations
US11670288B1 (en) Generating predicted follow-on requests to a natural language request received by a natural language processing system
US11086974B2 (en) Customizing a user behavior analytics deployment
US11475053B1 (en) Providing completion recommendations for a partial natural language request received by a natural language processing system
CN108446185B (en) Exception handling method and device, electronic terminal and readable storage medium
US11574429B1 (en) Automated generation of display layouts
US11144336B1 (en) Customization tool for dashboards
CN112148700A (en) Log data processing method and device, computer equipment and storage medium
CN113342472A (en) Micro-service cluster creating method and device, electronic equipment and readable storage medium
WO2021072742A1 (en) Assessing an impact of an upgrade to computer software
US10360128B2 (en) System and method for dynamic scaling of concurrent processing threads
US11836869B1 (en) Generating three-dimensional data visualizations in an extended reality environment
US20140115602A1 (en) Integration of a calculation engine with a software component
CN112699282A (en) Industrial internet data processing method and device, electronic equipment and storage medium
CN110874365A (en) Information query method and related equipment thereof
US10104007B1 (en) Stored views of web service application programming interfaces (APIs)
US11461378B1 (en) Generating dashboards based on user-based filters

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
GR01 Patent grant
GR01 Patent grant