CN109240886A - Abnormality eliminating method, device, computer equipment and storage medium - Google Patents

Abnormality eliminating method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109240886A
CN109240886A CN201811021610.4A CN201811021610A CN109240886A CN 109240886 A CN109240886 A CN 109240886A CN 201811021610 A CN201811021610 A CN 201811021610A CN 109240886 A CN109240886 A CN 109240886A
Authority
CN
China
Prior art keywords
exception
default
abnormal
application program
information
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.)
Granted
Application number
CN201811021610.4A
Other languages
Chinese (zh)
Other versions
CN109240886B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811021610.4A priority Critical patent/CN109240886B/en
Publication of CN109240886A publication Critical patent/CN109240886A/en
Application granted granted Critical
Publication of CN109240886B publication Critical patent/CN109240886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 discloses a kind of abnormality eliminating method, device, computer equipment and storage mediums, wherein the described method includes: determining the corresponding journal file of application program;If after detecting the application program throw exception, exception information corresponding with the exception of the application program is found in the journal file;The corresponding abnormal keyword of the exception information is obtained using default script;Go out Exception Type and exception level according to the abnormal keyword recognition;Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.The embodiment of the present invention may be implemented to abnormal capture, and to the abnormal progress automatic processing captured.

Description

Abnormality eliminating method, device, computer equipment and storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of abnormality eliminating method, device, computer equipment and Storage medium.
Background technique
In the prior art, for none abnormal complete, reasonable response mechanism of system, on the one hand, when system When exception occurs, if carrying out abnormality processing by manually accordingly writing program code for each exception, it will usually flower Take a large amount of man power and material, causes the waste of man power and material;On the other hand, can not accomplish to automated to respond to for various exceptions And it automatically processes;With the continuous innovation of technology, the continuous growth of portfolio, existing exception response mechanism cannot expire The business demand and development of foot instantly.
Summary of the invention
It is situated between in view of this, the embodiment of the present invention provides a kind of abnormality eliminating method, device, computer equipment and storage Matter may be implemented to abnormal capture, and to the abnormal progress automatic processing captured.
On the one hand, the embodiment of the invention provides a kind of abnormality eliminating methods, this method comprises:
Determine the corresponding journal file of application program;
If after detecting the application program throw exception, being found in the journal file and the application program Abnormal corresponding exception information;
The corresponding abnormal keyword of the exception information is obtained using default script;
Go out Exception Type and exception level according to the abnormal keyword recognition;
Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.
On the other hand, the embodiment of the invention provides a kind of exception handling device, described device includes:
Determination unit, for determining the corresponding journal file of application program;
Searching unit, if after for detecting the application program throw exception, found in the journal file with The corresponding exception information of the exception of the application program;
Acquiring unit, for obtaining the corresponding abnormal keyword of the exception information using default script;
Recognition unit, for going out Exception Type and exception level according to the abnormal keyword recognition;
Processing unit, for calling default exception handling interfaces processing abnormal according to the Exception Type and exception level.
Another aspect the embodiment of the invention also provides a kind of computer equipment, including memory, processor and is stored in On the memory and the computer program that can run on the processor, when the processor executes the computer program Realize abnormality eliminating method as described above.
It is described computer-readable to deposit in another aspect, the embodiment of the invention also provides a kind of computer readable storage medium Storage media is stored with one or more than one computer program, and the one or more computer program can be by one Or more than one processor executes, to realize abnormality eliminating method as described above.
The embodiment of the present invention provides a kind of abnormality eliminating method, device, computer equipment and storage medium, wherein method Comprise determining that the corresponding journal file of application program;If after detecting the application program throw exception, in the journal file In find exception information corresponding with the exception of the application program;It is corresponding that the exception information is obtained using default script Abnormal keyword;Go out Exception Type and exception level according to the abnormal keyword recognition;According to the Exception Type and exception Grade calls default exception handling interfaces processing abnormal.The embodiment of the present invention may be implemented to abnormal capture, and to being captured Abnormal carry out automatic processing.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow diagram of abnormality eliminating method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow diagram of abnormality eliminating method provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow diagram of abnormality eliminating method provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic block diagram of exception handling device provided in an embodiment of the present invention;
Fig. 5 is a kind of another schematic block diagram of exception handling device provided in an embodiment of the present invention;
Fig. 6 is a kind of another schematic block diagram of exception handling device provided in an embodiment of the present invention;
Fig. 7 is a kind of structure composition schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow diagram of abnormality eliminating method provided in an embodiment of the present invention.This method It may operate in smart phone (such as Android phone, IOS mobile phone), tablet computer, laptop and smart machine etc. In terminal.As shown in Figure 1, the method comprising the steps of S101~S105.
S101 determines the corresponding journal file of application program.
In embodiments of the present invention, the event of the permanent records application program operation aspect of the journal file, each application The event that program has independent journal file all to be occurred in records application program operational process, for example, application program institute The application of generation is abnormal, and (such as host is rolled up, CPU (Central Processing Unit, central processing unit) utilization rate is high, line It is abnormal that journey obstruction, low memory, I/O (Input/Output, input/output) read and write slow and application file missing etc.) It can also be in log text to find the database program of corresponding record or application program from the journal file of application program Database of record program run-time error in part.Specifically, the journal file is deposited in the application with specified file format , for example .log format can check all logs of .log format in application program in the present embodiment by cmd order File.
S102, if after detecting the application program throw exception, being found in the journal file and the application The corresponding exception information of the exception of program.
In embodiments of the present invention, exception throws are set for the application program that may be abnormal corresponding code position Code block detected, for example, in the corresponding code position setting try-catch- of the application program that is easily abnormal Finally block is detected, wherein comprising being likely to occur abnormal code statement in try block, catch block is responsible for in try block The exception of appearance is captured, and finally block is responsible for executing customized other of user, and to execute sentence (such as different by what is captured Often it is sent to called side etc.), wherein the exception gone out in try block may be multiple exceptions, for multiple and different exceptions, need Multiple catch blocks are arranged to be captured to detect the application program throw exception.In the present embodiment, due to journal file The event occurred in middle records application program operational process can be corresponding from application program after application program throw exception Journal file in find exception information for the exception, the exception information includes the operation information and CPU of application program The environmental informations such as utilization rate, thread occupied information, memory usage.
In one embodiment, the exception information can also include the temporal information etc. occurred extremely.
Further, referring to Fig. 2, the step S102 includes step S202~S204.
S202, the timestamp information generated when recording the application program throw exception using flume collection system.
In embodiments of the present invention, corresponding by the data collecting assembly (such as agent component) in flume collection system It is monitored with the event of program throw exception and collects the timestamp information when event occurs;The timestamp information includes Timing node when application program throw exception, the timing node correspond to the system time in application program.
S204 positions the journal file according to the timestamp information and is found and the application program Abnormal corresponding exception information.
In embodiments of the present invention, timestamp information when the abnormal generation that will be collected by flume collection system exists Exception information is positioned in journal file, specifically, due to record in journal file when application program is abnormal Temporal information, therefore by comparing temporal information when being abnormal in collected timestamp information and journal file Compared with so as to be positioned to the exception information recorded in journal file, to carry out obtaining corresponding exception information.
S103 obtains the corresponding abnormal keyword of the exception information using default script.
In embodiments of the present invention, the default script includes shell script, described described different using default script acquisition Often the corresponding abnormal keyword of information specifically includes: it is corresponding to obtain the exception information using the grep order of shell script Abnormal keyword.For example, being by the abnormal keyword that the grep order in shell script is got when CPU usage is high " CPU usage is high ";It is " out by the abnormal keyword that the grep order in shell script is got when low memory Ofmemory " etc..
S104 goes out Exception Type and exception level according to the abnormal keyword recognition.
In embodiments of the present invention, settable Exception Type and exception level, Exception Type include that application program itself is different The types such as normal and environmental abnormality, wherein environmental abnormality includes the types such as CPU usage height, low memory, thread block again.Into one Step, it will can be anomaly divided into different grades in advance, it is minimum such as application program for example, 1 grade of exception is the exception of the lowest class Warning message etc.;5 grades of exceptions are the exception of highest level, such as delay machine alarm exception.Different exception informations have corresponded to difference Exception Type and exception level.For example, detecting CPU exception, then identify that Exception Type is that CPU usage is high.Work as appearance When delay machine is alarmed, then identify that exception level is 5 grades of exceptions etc..
S105 calls default exception handling interfaces processing abnormal according to the Exception Type and exception level.
In embodiments of the present invention, exception handling interfaces can be preset, and configure interface table in exception handling interfaces , with the mapping relations established between Exception Type and exception level and default exception handling interfaces, i.e., different default exceptions Processing Interface has corresponded to different Exception Type and exception level, is called according to the Exception Type and exception level identified different Default exception handling interfaces handle it is abnormal.The default exception handling interfaces include that programmer is customized according to oneself needs Exception handling interfaces Handler and default exception handling interfaces DefaultHandler for handling Common Abnormity.
It should be noted that different default exception handling interfaces are additionally provided with for different Exception Types and exception level Default processing rule.
Further, referring to Fig. 3, the step S105 includes S302~S306.
S302, obtains the corresponding interface entry of the default exception handling interfaces, and the interface entry is called for describing The precondition of the default exception handling interfaces, the precondition include default Exception Type information and default exception etc. Grade information.
In embodiments of the present invention, in advance respectively in customized exception handling interfaces Handler or default exception Interface entry is configured in reason interface DefaultHandler, establishes Exception Type and exception level and pre- by configuring interface entry If the mapping relations between exception handling interfaces.
Table 1 is the sample for configuring the interface entry.
Table 1
Interface serial number Default Exception Type Default exception level
Handler1 CPU usage is high 3
Handler2 Low memory 5
S304, precondition in the Exception Type and exception level that will identify that and acquired interface entry into Row matching.
In the present embodiment, the default Processing Interface difference being matched to according to different Exception Types with exception level, When being matched, if the precondition in the Exception Type and exception level that identify and default Processing Interface corresponds, The Exception Type and exception level meet the precondition in the interface entry, and illustrate the default Processing Interface With success.
S306 is called corresponding if the Exception Type and exception level meet the precondition in the interface entry Default exception handling interfaces processing is abnormal.
In embodiments of the present invention, if the Exception Type and exception level meet the preposition item in the interface entry Part calls the exception handling interfaces Handler or default exception handling interfaces DefaultHandler of above-mentioned institute's successful match Processing is abnormal.
In one embodiment, described that default exception handling interfaces processing is called according to the Exception Type and exception level It is abnormal, be specifically used for: default exception handling interfaces called according to the Exception Type and exception level, and by it is described preset it is different Often the corresponding default processing rule process of Processing Interface is abnormal.
In the present embodiment, if the application is rolled up extremely for host, the default processing rule are as follows: identify and delete and work as The temporary file of preceding host storage and log, or the temporary file of current hosts storage and log are subjected to compression formation Compressed file, and compressed file is moved to other hosts, other hosts can be the backup host of current hosts, can also be with It is and other cluster systems of the current hosts in same cluster space, and deletes the temporary file stored on current hosts and day Will;If the application is the high default processing rule of CPU usage extremely are as follows: the identification highest application of CUP utilization rate is closed It closes/restarts identified application and the terminal of the currently used application is made to be connected to other hosts;If the application is line extremely Journey obstruction, the default processing rule are as follows: make current hosts no longer receive task, restart again after the completion of current task is processed Current hosts, and other tasks are distributed to other hosts.
As seen from the above, the embodiment of the present invention, which passes through, determines the corresponding journal file of application program;If detecting described answer After program throw exception, exception information corresponding with the exception of the application program is found in the journal file;Make The corresponding abnormal keyword of the exception information is obtained with default script;According to the abnormal keyword recognition go out Exception Type and Exception level;Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.The embodiment of the present invention It may be implemented to abnormal capture, and to the abnormal progress automatic processing captured.
Referring to Fig. 4, a kind of corresponding above-mentioned abnormality eliminating method, the embodiment of the present invention also proposes a kind of abnormality processing dress It sets, which comprises determining that unit 101, searching unit 102, acquiring unit 103, recognition unit 104, processing unit 105.
Wherein, the determination unit 101, for determining the corresponding journal file of application program.In embodiments of the present invention, The event of the permanent records application program operation aspect of the journal file, each application program have independent journal file with The event occurred in records application program operational process, for example, the application that application program is occurred it is abnormal (such as host is rolled up, CPU (Central Processing Unit, central processing unit) utilization rate height, thread block, low memory, I/O (Input/ Output, input/output) read and write the exceptions such as slow and application file missing) can be looked for from the journal file of application program To corresponding record or the database program of application program database of record program mistake can also be run in journal file Accidentally.Specifically, the journal file exists in the application with specified file format, such as .log format, in this implementation In example, all journal files of .log format in application program can be checked by cmd order
Searching unit 102, if being found in the journal file after for detecting the application program throw exception Exception information corresponding with the exception of the application program.In embodiments of the present invention, for the application journey that may be abnormal The code block of the corresponding code position setting exception throws of sequence is detected, for example, corresponding in the application program being easily abnormal Code position setting try-catch-finally block detected, wherein comprising being likely to occur abnormal code in try block Sentence, catch block be responsible for the exception occurred in try block is captured, finally block be responsible for execute user it is customized other It executes sentence (such as the exception captured is sent to called side etc.), wherein the exception gone out in try block may be multiple different Often, it for multiple and different exceptions, needs to be arranged multiple catch blocks and is captured to detect the application program throw exception. In the present embodiment, by the event occurred in records application program operational process in journal file, when application program is dished out After exception, the exception information for the exception, the exception information packet can be found from the corresponding journal file of application program Include the environmental informations such as operation information and CPU usage, thread occupied information, the memory usage of application program.
Acquiring unit 103, for obtaining the corresponding abnormal keyword of the exception information using default script.In the present invention In embodiment, the default script includes shell script, and the acquiring unit 103 is specifically used for: using shell script Grep order obtains the corresponding abnormal keyword of the exception information.For example, when CPU usage is high, by shell script The abnormal keyword that gets of grep order be " CPU usage is high ";When low memory, by shell script The abnormal keyword that grep order is got is " out of memory " etc..
Recognition unit 104, for going out Exception Type and exception level according to the abnormal keyword recognition.Of the invention real It applies in example, settable Exception Type and exception level, Exception Type includes the types such as application program itself exception and environmental abnormality, Wherein environmental abnormality includes the types such as CPU usage height, low memory, thread block again.It further, can be in advance by abnormal point For different grades, for example, 1 grade of exception is the exception of the lowest class, such as the minimum warning message of application program;5 grades of exceptions It is abnormal for the exception of highest level, such as delay machine alarm.Different exception informations has corresponded to different Exception Type and exception etc. Grade.For example, detecting CPU exception, then identify that Exception Type is that CPU usage is high.When there is delay machine alarm, then identify Exception level is 5 grades of exceptions etc..
Processing unit 105, for calling default exception handling interfaces processing different according to the Exception Type and exception level Often.In embodiments of the present invention, exception handling interfaces can be preset, and configure interface entry in exception handling interfaces, with The mapping relations between Exception Type and exception level and default exception handling interfaces are established, i.e., different default abnormality processings connects Mouth has corresponded to different Exception Type and exception level, calls different preset according to the Exception Type and exception level that identify Exception handling interfaces processing is abnormal.The default exception handling interfaces include programmer according to oneself customized exception of needs Manage the interface Handler and default exception handling interfaces DefaultHandler for handling Common Abnormity.
In one embodiment, the processing unit 105 is specifically used for: being called according to the Exception Type and exception level Default exception handling interfaces, and pass through the corresponding default processing rule process exception of the default exception handling interfaces.
It should be noted that different default exception handling interfaces are additionally provided with for different Exception Types and exception level Default processing rule.
As seen from the above, the embodiment of the present invention, which passes through, determines the corresponding journal file of application program;If detecting described answer After program throw exception, exception information corresponding with the exception of the application program is found in the journal file;Make The corresponding abnormal keyword of the exception information is obtained with default script;According to the abnormal keyword recognition go out Exception Type and Exception level;Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.The embodiment of the present invention It may be implemented to abnormal capture, and to the abnormal progress automatic processing captured.
Referring to Fig. 5, the searching unit 102, comprising:
Recording unit 102a, generated when for recording the application program throw exception using flume collection system when Between stab information.In embodiments of the present invention, right by the data collecting assembly (such as agent component) in flume collection system The event of application program throw exception is monitored and collects the timestamp information when event occurs;The timestamp information packet Timing node when application program throw exception is included, which corresponds to the system time in application program.
Search subelement 102b, for the journal file is positioned according to the timestamp information and is found with The corresponding exception information of the exception of the application program.In embodiments of the present invention, it will be collected by flume collection system Timestamp information when abnormal generation positions exception information in journal file, specifically, due to remembering in journal file Temporal information when application program is abnormal is recorded, therefore by will occur in collected timestamp information and journal file Temporal information when abnormal is compared, so as to position to the exception information recorded in journal file, to carry out Obtain corresponding exception information.
Referring to Fig. 6, the processing unit 105, comprising:
Acquiring unit 105a, for obtaining the corresponding interface entry of the default exception handling interfaces, the interface entry For describing to call the precondition of the default exception handling interfaces, the precondition include default Exception Type information with And default exception level information.In embodiments of the present invention, in advance respectively in customized exception handling interfaces Handler or Interface entry is configured in default exception handling interfaces DefaultHandler, establishes Exception Type and different by configuring interface entry Mapping relations between normal grade and default exception handling interfaces.
Matching unit 105b, in the Exception Type and exception level for will identify that and acquired interface entry Precondition matched.In the present embodiment, the default processing being matched to according to different Exception Type and exception level Interface is different, when being matched, if the precondition in the Exception Type and exception level that identify and default Processing Interface It corresponds, then the Exception Type and exception level meet the precondition in the interface entry, and illustrate described pre- If Processing Interface successful match.
Subelement 105c is handled, if meeting the preposition item in the interface entry for the Exception Type and exception level Part calls corresponding default exception handling interfaces processing abnormal.In embodiments of the present invention, if the Exception Type and exception etc. Grade meets the precondition in the interface entry, calls the exception handling interfaces Handler or silent of above-mentioned institute's successful match It is abnormal to recognize exception handling interfaces DefaultHandler processing.
Above-mentioned exception handling device and above-mentioned abnormality eliminating method one-to-one correspondence, specific principle and process and above-mentioned reality It is identical to apply the method, repeats no more.
Above-mentioned exception handling device can be implemented as a kind of form of computer program, and computer program can be in such as Fig. 7 Shown in run in computer equipment.
Fig. 7 is a kind of structure composition schematic diagram of computer equipment of the present invention.The equipment can be terminal, be also possible to take Business device, wherein terminal can be smart phone, tablet computer, laptop, desktop computer, personal digital assistant and wearing Formula device etc. has the electronic device of communication function.Server can be independent server, be also possible to multiple server groups At server cluster.Referring to Fig. 7, the computer equipment 500 include the processor 502 connected by system bus 501, it is non-easily The property lost storage medium 503, built-in storage 504 and network interface 505.Wherein, the non-volatile memories of the computer equipment 500 are situated between Matter 503 can storage program area 5031 and computer program 5032, which is performed, and may make processor 502 execute a kind of abnormality eliminating method.The processor 502 of the computer equipment 500 is for providing calculating and control ability, support The operation of entire computer equipment 500.The built-in storage 504 is the computer program 5032 in non-volatile memory medium 503 Operation provide environment, when which is executed by processor, processor 502 may make to execute a kind of abnormality processing side Method.The network interface 505 of computer equipment 500 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art Member is appreciated that structure shown in Fig. 7, only the block diagram of part-structure relevant to application scheme, composition pair The restriction for the computer equipment that application scheme is applied thereon, specific computer equipment may include than as shown in the figure more More or less component perhaps combines certain components or with different component layouts.
Wherein, following operation is realized when the processor 502 executes the computer program:
Determine the corresponding journal file of application program;
If after detecting the application program throw exception, being found in the journal file and the application program Abnormal corresponding exception information;
The corresponding abnormal keyword of the exception information is obtained using default script;
Go out Exception Type and exception level according to the abnormal keyword recognition;
Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.
In one embodiment, if it is described detect the application program throw exception after, looked into the journal file Find exception information corresponding with the exception of the application program, comprising:
The timestamp information generated when recording the application program throw exception using flume collection system;
The journal file is positioned according to the timestamp information and finds the exception with the application program Corresponding exception information.
In one embodiment, the default script includes shell script, described to obtain the exception using default script The corresponding abnormal keyword of information, comprising:
The corresponding abnormal keyword of the exception information is obtained using the grep order of shell script.
In one embodiment, described that default exception handling interfaces processing is called according to the Exception Type and exception level It is abnormal, comprising:
The corresponding interface entry of the default exception handling interfaces is obtained, the interface entry is described pre- for describing to call If the precondition of exception handling interfaces, the precondition includes default Exception Type information and default exception level letter Breath;
Precondition progress in the Exception Type and exception level and acquired interface entry that will identify that Match;
If the Exception Type and exception level meet the precondition in the interface entry, call it is corresponding preset it is different Normal Processing Interface processing is abnormal.
In one embodiment, described that default exception handling interfaces processing is called according to the Exception Type and exception level It is abnormal, comprising:
Default exception handling interfaces are called according to the Exception Type and exception level, and pass through the default abnormality processing The corresponding default processing rule process of interface is abnormal.
It will be understood by those skilled in the art that the embodiment of computer equipment shown in Fig. 7 is not constituted to computer The restriction of equipment specific composition, in other embodiments, computer equipment may include components more more or fewer than diagram, or Person combines certain components or different component layouts.For example, in some embodiments, computer equipment only includes memory And processor, in such embodiments, the structure and function of memory and processor are consistent with embodiment illustrated in fig. 7, herein It repeats no more.
The present invention provides a kind of computer readable storage medium, computer-readable recording medium storage has one or one A above computer program, the one or more computer program can be held by one or more than one processor Row, to perform the steps of
Determine the corresponding journal file of application program;
If after detecting the application program throw exception, being found in the journal file and the application program Abnormal corresponding exception information;
The corresponding abnormal keyword of the exception information is obtained using default script;
Go out Exception Type and exception level according to the abnormal keyword recognition;
Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.
In one embodiment, if it is described detect the application program throw exception after, looked into the journal file Find exception information corresponding with the exception of the application program, comprising:
The timestamp information generated when recording the application program throw exception using flume collection system;
The journal file is positioned according to the timestamp information and finds the exception with the application program Corresponding exception information.
In one embodiment, the default script includes shell script, described to obtain the exception using default script The corresponding abnormal keyword of information, comprising:
The corresponding abnormal keyword of the exception information is obtained using the grep order of shell script.
In one embodiment, described that default exception handling interfaces processing is called according to the Exception Type and exception level It is abnormal, comprising:
The corresponding interface entry of the default exception handling interfaces is obtained, the interface entry is described pre- for describing to call If the precondition of exception handling interfaces, the precondition includes default Exception Type information and default exception level letter Breath;
Precondition progress in the Exception Type and exception level and acquired interface entry that will identify that Match;
If the Exception Type and exception level meet the precondition in the interface entry, call it is corresponding preset it is different Normal Processing Interface processing is abnormal.
In one embodiment, described that default exception handling interfaces processing is called according to the Exception Type and exception level It is abnormal, comprising:
Default exception handling interfaces are called according to the Exception Type and exception level, and pass through the default abnormality processing The corresponding default processing rule process of interface is abnormal.
Present invention storage medium above-mentioned include: magnetic disk, CD, read-only memory (Read-Only Memory, The various media that can store program code such as ROM).
Unit in all embodiments of the invention can pass through universal integrated circuit, such as CPU (Central Processing Unit, central processing unit), or pass through ASIC (Application Specific Integrated Circuit, specific integrated circuit) it realizes.
Step in abnormality eliminating method of the embodiment of the present invention can according to actual needs the adjustment of carry out sequence, merge and delete Subtract.
Unit in exception handling device of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of abnormality eliminating method, which is characterized in that the described method includes:
Determine the corresponding journal file of application program;
If finding the exception with the application program in the journal file after detecting the application program throw exception Corresponding exception information;
The corresponding abnormal keyword of the exception information is obtained using default script;
Go out Exception Type and exception level according to the abnormal keyword recognition;
Call default exception handling interfaces processing abnormal according to the Exception Type and exception level.
2. the method as described in claim 1, which is characterized in that if it is described detect the application program throw exception after, Exception information corresponding with the exception of the application program is found in the journal file, comprising:
The timestamp information generated when recording the application program throw exception using flume collection system;
The journal file is positioned according to the timestamp information and is found corresponding with the exception of the application program Exception information.
3. the method as described in claim 1, which is characterized in that the default script includes shell script, described using default Script obtains the corresponding abnormal keyword of the exception information, comprising:
The corresponding abnormal keyword of the exception information is obtained using the grep order of shell script.
4. the method as described in claim 1, which is characterized in that described called according to the Exception Type and exception level is preset Exception handling interfaces processing is abnormal, comprising:
Obtain the corresponding interface entry of the default exception handling interfaces, the interface entry for describe to call it is described preset it is different The precondition of normal Processing Interface, the precondition include default Exception Type information and default exception level information;
The Exception Type and exception level that will identify that are matched with the precondition in acquired interface entry;
If the Exception Type and exception level meet the precondition in the interface entry, corresponding default exception is called It is abnormal to manage interface processing.
5. the method as described in claim 1, which is characterized in that described called according to the Exception Type and exception level is preset Exception handling interfaces processing is abnormal, comprising:
Default exception handling interfaces are called according to the Exception Type and exception level, and pass through the default exception handling interfaces Corresponding default processing rule process is abnormal.
6. a kind of exception handling device, which is characterized in that described device includes:
Determination unit, for determining the corresponding journal file of application program;
Searching unit, if after for detecting the application program throw exception, found in the journal file with it is described The corresponding exception information of the exception of application program;
Acquiring unit, for obtaining the corresponding abnormal keyword of the exception information using default script;
Recognition unit, for going out Exception Type and exception level according to the abnormal keyword recognition;
Processing unit, for calling default exception handling interfaces processing abnormal according to the Exception Type and exception level.
7. device as claimed in claim 6, which is characterized in that the searching unit, comprising:
Recording unit, the timestamp information generated when for recording the application program throw exception using flume collection system;
Subelement is searched, for being positioned and being found to the journal file according to the timestamp information and the application The corresponding exception information of the exception of program.
8. device as claimed in claim 6, which is characterized in that the processing unit, comprising:
Acquiring unit, for obtaining the corresponding interface entry of the default exception handling interfaces, the interface entry is for describing The precondition of the default exception handling interfaces is called, the precondition includes default Exception Type information and presets different Normal class information;
Matching unit, the preposition item in the Exception Type and exception level and acquired interface entry for will identify that Part is matched;
Subelement is handled, if meeting the precondition in the interface entry for the Exception Type and exception level, is called Corresponding default exception handling interfaces processing is abnormal.
9. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes that claim 1-5 such as appoints when executing the computer program Abnormality eliminating method described in one.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage have one or More than one computer program, the one or more computer program can be by one or more than one processors It executes, to realize abnormality eliminating method as described in any one in claim 1-5.
CN201811021610.4A 2018-09-03 2018-09-03 Exception handling method, exception handling device, computer equipment and storage medium Active CN109240886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811021610.4A CN109240886B (en) 2018-09-03 2018-09-03 Exception handling method, exception handling device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811021610.4A CN109240886B (en) 2018-09-03 2018-09-03 Exception handling method, exception handling device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109240886A true CN109240886A (en) 2019-01-18
CN109240886B CN109240886B (en) 2023-04-18

Family

ID=65060405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811021610.4A Active CN109240886B (en) 2018-09-03 2018-09-03 Exception handling method, exception handling device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109240886B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061644A (en) * 2019-12-25 2020-04-24 南京大学 Method and device for detecting and positioning abnormal throwing processing defects
CN111176874A (en) * 2019-12-23 2020-05-19 京东数字科技控股有限公司 Processing method, device and equipment for abnormal exit of application program and storage medium
CN111405546A (en) * 2020-03-03 2020-07-10 Oppo广东移动通信有限公司 Call exception handling method and device
CN111597093A (en) * 2019-02-20 2020-08-28 阿里巴巴集团控股有限公司 Exception handling method, device and equipment
CN112416640A (en) * 2020-11-16 2021-02-26 武汉联影医疗科技有限公司 Exception handling method and device, computer equipment and storage medium
CN112685045A (en) * 2020-12-28 2021-04-20 北京达佳互联信息技术有限公司 Page source file processing method and device, electronic equipment and storage medium
CN113114510A (en) * 2021-04-22 2021-07-13 中国科学技术大学 Network fault information synchronization method and device
CN113112316A (en) * 2019-12-24 2021-07-13 阿里巴巴集团控股有限公司 Exception handling method and device
CN113422697A (en) * 2021-06-21 2021-09-21 深信服科技股份有限公司 Tracking method, device, electronic equipment and readable storage medium
CN113448827A (en) * 2020-03-26 2021-09-28 北京沃东天骏信息技术有限公司 Test data processing method and device
CN113590373A (en) * 2021-08-10 2021-11-02 平安普惠企业管理有限公司 Processing method, device and equipment based on application version release and storage medium
CN113672574A (en) * 2021-07-12 2021-11-19 国网河北省电力有限公司营销服务中心 Log processing method, electronic device and computer-readable storage medium
CN113836004A (en) * 2021-08-30 2021-12-24 山东有人物联网股份有限公司 Application program positioning analysis method, device, equipment and storage medium
CN114401160A (en) * 2022-01-19 2022-04-26 腾讯科技(深圳)有限公司 Data processing method, device, server, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385508A (en) * 2010-09-03 2012-03-21 金蝶软件(中国)有限公司 Exception handling method and device and software system
CN103377094A (en) * 2012-04-12 2013-10-30 金蝶软件(中国)有限公司 Abnormity monitoring method and abnormity monitoring device
CN106844139A (en) * 2016-12-19 2017-06-13 广州视源电子科技股份有限公司 A kind of log file analysis method and device
CN106911519A (en) * 2017-04-10 2017-06-30 北京搜狐新媒体信息技术有限公司 A kind of data acquisition monitoring method and device
CN108306879A (en) * 2018-01-30 2018-07-20 福建师范大学 The real-time abnormal localization method of distribution based on Web session streams

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385508A (en) * 2010-09-03 2012-03-21 金蝶软件(中国)有限公司 Exception handling method and device and software system
CN103377094A (en) * 2012-04-12 2013-10-30 金蝶软件(中国)有限公司 Abnormity monitoring method and abnormity monitoring device
CN106844139A (en) * 2016-12-19 2017-06-13 广州视源电子科技股份有限公司 A kind of log file analysis method and device
CN106911519A (en) * 2017-04-10 2017-06-30 北京搜狐新媒体信息技术有限公司 A kind of data acquisition monitoring method and device
CN108306879A (en) * 2018-01-30 2018-07-20 福建师范大学 The real-time abnormal localization method of distribution based on Web session streams

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597093A (en) * 2019-02-20 2020-08-28 阿里巴巴集团控股有限公司 Exception handling method, device and equipment
CN111597093B (en) * 2019-02-20 2024-04-16 阿里巴巴集团控股有限公司 Exception handling method, device and equipment thereof
CN111176874B (en) * 2019-12-23 2022-04-12 京东科技控股股份有限公司 Processing method, device and equipment for abnormal exit of application program and storage medium
CN111176874A (en) * 2019-12-23 2020-05-19 京东数字科技控股有限公司 Processing method, device and equipment for abnormal exit of application program and storage medium
CN113112316A (en) * 2019-12-24 2021-07-13 阿里巴巴集团控股有限公司 Exception handling method and device
CN111061644A (en) * 2019-12-25 2020-04-24 南京大学 Method and device for detecting and positioning abnormal throwing processing defects
CN111061644B (en) * 2019-12-25 2021-04-30 南京大学 Method and device for detecting and positioning abnormal throwing processing defects
CN111405546A (en) * 2020-03-03 2020-07-10 Oppo广东移动通信有限公司 Call exception handling method and device
CN111405546B (en) * 2020-03-03 2023-12-08 Oppo广东移动通信有限公司 Call abnormity processing method and device
CN113448827A (en) * 2020-03-26 2021-09-28 北京沃东天骏信息技术有限公司 Test data processing method and device
CN112416640A (en) * 2020-11-16 2021-02-26 武汉联影医疗科技有限公司 Exception handling method and device, computer equipment and storage medium
CN112685045A (en) * 2020-12-28 2021-04-20 北京达佳互联信息技术有限公司 Page source file processing method and device, electronic equipment and storage medium
CN113114510A (en) * 2021-04-22 2021-07-13 中国科学技术大学 Network fault information synchronization method and device
CN113422697B (en) * 2021-06-21 2023-03-24 深信服科技股份有限公司 Tracking method, device, electronic equipment and readable storage medium
CN113422697A (en) * 2021-06-21 2021-09-21 深信服科技股份有限公司 Tracking method, device, electronic equipment and readable storage medium
CN113672574A (en) * 2021-07-12 2021-11-19 国网河北省电力有限公司营销服务中心 Log processing method, electronic device and computer-readable storage medium
CN113590373A (en) * 2021-08-10 2021-11-02 平安普惠企业管理有限公司 Processing method, device and equipment based on application version release and storage medium
CN113836004A (en) * 2021-08-30 2021-12-24 山东有人物联网股份有限公司 Application program positioning analysis method, device, equipment and storage medium
CN113836004B (en) * 2021-08-30 2024-02-27 山东有人物联网股份有限公司 Application program positioning analysis method, device, equipment and storage medium
CN114401160A (en) * 2022-01-19 2022-04-26 腾讯科技(深圳)有限公司 Data processing method, device, server, terminal and storage medium
CN114401160B (en) * 2022-01-19 2022-12-02 腾讯科技(深圳)有限公司 Data processing method, device, server, terminal and storage medium

Also Published As

Publication number Publication date
CN109240886B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN109240886A (en) Abnormality eliminating method, device, computer equipment and storage medium
CN109656934B (en) Source Oracle database DDL synchronization method and device based on log analysis
CN109284251A (en) Blog management method, device, computer equipment and storage medium
CN110489699B (en) Asynchronous data acquisition method and system
CN109885453B (en) Big data platform monitoring system based on stream data processing
CN110309030A (en) Log analysis monitoring system and method based on ELK and Zabbix
CN111368619B (en) Suspicious person detection method, suspicious person detection device and suspicious person detection equipment
CN108804299A (en) Application exception processing method and processing device
CN111752793A (en) System abnormity monitoring method and device, computer equipment and storage medium
US10459804B2 (en) Database rollback using WAL
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN112330834A (en) Attendance checking method, equipment and storage medium for actively selecting attendance checking event
CN107481447A (en) A kind of processing method, system, equipment and storage medium forgotten after card taking
CN110599093A (en) Airport luggage full-flow tracking method and system
US9916220B2 (en) Smart logging of trace data for storage systems
CN106502825B (en) Data processing method and device
CN112433888A (en) Data processing method and device, storage medium and electronic equipment
CN116136801B (en) Cloud platform data processing method and device, electronic equipment and storage medium
JP6834703B2 (en) Business use file management system, business use file management method, and programs
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN113468029A (en) Log management method and device, electronic equipment and readable storage medium
CN111611107A (en) Method and device for acquiring database logs
CN112650613A (en) Error information processing method and device, electronic equipment and storage medium
CN111552703A (en) Data processing method and device
CN106097104A (en) A kind of judge the method and system of internet data integrity under distributed system

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