CN112416705A - Abnormal information processing method and device - Google Patents

Abnormal information processing method and device Download PDF

Info

Publication number
CN112416705A
CN112416705A CN202011256242.9A CN202011256242A CN112416705A CN 112416705 A CN112416705 A CN 112416705A CN 202011256242 A CN202011256242 A CN 202011256242A CN 112416705 A CN112416705 A CN 112416705A
Authority
CN
China
Prior art keywords
abnormal
log
information
log information
exception
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011256242.9A
Other languages
Chinese (zh)
Inventor
夏世琦
陈丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information 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 Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202011256242.9A priority Critical patent/CN112416705A/en
Publication of CN112416705A publication Critical patent/CN112416705A/en
Pending legal-status Critical Current

Links

Images

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

Abstract

The embodiment of the invention provides a method and a device for processing abnormal information, wherein a server can obtain at least one piece of first log information, the first log information can comprise an abnormal error reporting log and a user behavior log, the abnormal error reporting log can comprise abnormal error information, the server can locate an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log and determine an abnormal grade corresponding to the abnormal code, then the abnormal grade is adopted to classify each piece of first log information so as to process the abnormal code according to different abnormal grades, the abnormal code is located by combining user behavior, the reason of the abnormal occurrence is effectively restored, the abnormal is favorably processed in a targeted manner, and maintenance personnel can process the abnormal code in a grading manner according to the influence degree of the abnormal, and exception handling with different priorities is realized, and the effectiveness of exception handling is improved.

Description

Abnormal information processing method and device
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for processing exception information.
Background
In the client, the user can complete information interaction with the application service system through auxiliary functions provided by different pages, and the final purpose of accessing the page by the user is further achieved. In general, a client developed by a developer is not perfect, and problems such as page abnormality are often easy to occur, so that the problem corresponding to page abnormality information needs to be handled. Currently, the method monitors a page, and if abnormal information is monitored, the abnormal information is uploaded so that a server can process the abnormal information correspondingly. However, in the process, only the abnormal information occurring in the process of the user performing the page operation is uploaded, the process of analyzing the abnormal information is lacked, and the page abnormal problem cannot be more effectively located, which is not beneficial to the processing of the abnormal problem.
Disclosure of Invention
The embodiment of the invention provides a method for processing abnormal information, which aims to solve the problem that the page abnormal problem cannot be effectively positioned and analyzed in the prior art.
Correspondingly, the embodiment of the invention also provides a device for processing the abnormal information, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses a method for processing abnormal information, which is applied to a server, and the method includes:
acquiring at least one piece of first log information, wherein the first log information at least comprises an abnormal error report log and a user behavior log, and the abnormal error report log comprises abnormal error information;
according to the abnormal error information and the user behavior log, positioning an abnormal code corresponding to the first log information;
determining an exception grade corresponding to the exception code;
and classifying at least one first log information by using the abnormal grade.
Optionally, the exception error log further includes an exception identifier, and the method further includes:
determining an exception type aiming at the exception error information by adopting the exception identifier;
and classifying at least one piece of first log information according to the abnormal type, and displaying the classified first log information.
Optionally, the method further comprises:
in response to detecting a classification operation on at least one piece of the first log information, acquiring a classification dimension corresponding to the classification operation;
classifying the at least one first log information by adopting the classification dimension, and displaying the classified first log information;
wherein the classification dimension at least comprises one of a user identity dimension, a time dimension and a running environment dimension.
Optionally, the obtaining at least one first log information includes:
extracting abnormal logs from a preset database, and recording the number of the logs at corresponding time points;
establishing an abnormal trend graph aiming at the abnormal log by adopting the time points and the log quantity;
if the abnormal peak value appears in the abnormal trend graph, acquiring a target time point corresponding to the abnormal peak value, and extracting at least one piece of first log information in a preset time period associated with the target time point.
Optionally, the method further comprises:
and generating reminding information aiming at the abnormal peak value, and outputting the reminding information.
Optionally, before extracting the abnormal log from the preset database and recording the number of logs at the corresponding time point, the method further includes:
if the abnormal logs are detected to exist in a preset message queue, the abnormal logs are stored in a preset database, and the message queue is used for receiving the abnormal logs sent by a target client.
Optionally, the method further comprises:
acquiring second log information sent by a target client, wherein the second log information comprises an operation record of a user on a corresponding page in the target client;
and generating optimization information aiming at the page by adopting the operation record.
Optionally, the determining an exception level corresponding to the exception code includes:
acquiring a target abnormal result corresponding to the abnormal code;
and matching the target abnormal result with a preset abnormal result to obtain an abnormal grade corresponding to the abnormal code.
The embodiment of the invention also discloses a method for processing the abnormal information, which is applied to the client and comprises the following steps:
if the page of the client is detected to be abnormal, acquiring abnormal error information and user behavior information which cause the page to be abnormal, and generating an abnormal error report log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information;
generating first log information by adopting the abnormal error reporting log and the user behavior log;
and sending the first log information to a message queue preset in a server, wherein the message queue is used for temporarily storing the first log information, and the server is used for extracting the first log information from the message queue and carrying out exception handling according to the first log information.
Optionally, the client includes an information reporting control, and the method further includes:
responding to the user operation acting on the information reporting control, acquiring an operation record of the user on the page, and generating second log information corresponding to the operation record;
and sending the second log information to the server, wherein the server is used for optimizing the application interface according to the second log information.
The embodiment of the invention also discloses a device for processing the abnormal information, which is applied to the server side and comprises the following components:
the system comprises a first log information acquisition module, a second log information acquisition module and a first log information processing module, wherein the first log information acquisition module is used for acquiring at least one piece of first log information, the first log information at least comprises an abnormal error reporting log and a user behavior log, and the abnormal error reporting log comprises abnormal error information;
an abnormal code positioning module, configured to position an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log;
the abnormal grade determining module is used for determining the abnormal grade corresponding to the abnormal code;
and the log information classification module is used for classifying at least one piece of first log information by adopting the abnormal grade.
Optionally, the exception error log further includes an exception identifier, and the apparatus further includes:
the abnormal type determining module is used for determining the abnormal type aiming at the abnormal error information by adopting the abnormal identifier;
and the log information display module is used for classifying at least one piece of first log information according to the abnormal type and displaying the classified first log information.
Optionally, the method further comprises:
a classification dimension acquisition module, configured to, in response to detecting a classification operation for at least one piece of the first log information, acquire a classification dimension corresponding to the classification operation;
the log information classification module is used for classifying the at least one first log information by adopting the classification dimension and displaying the classified first log information;
wherein the classification dimension at least comprises one of a user identity dimension, a time dimension and a running environment dimension.
Optionally, the first log information obtaining module includes:
the abnormal log extraction submodule is used for extracting abnormal logs from a preset database and recording the number of the logs at corresponding time points;
the abnormal trend graph establishing submodule is used for establishing an abnormal trend graph aiming at the abnormal log by adopting the time point and the log quantity;
and the log information extraction submodule is used for acquiring a target time point corresponding to the abnormal peak value if the abnormal peak value is monitored to appear in the abnormal trend graph, and extracting at least one piece of first log information in a preset time period associated with the target time point.
Optionally, the method further comprises:
and the reminding information output module is used for generating reminding information aiming at the abnormal peak value and outputting the reminding information.
Optionally, the apparatus further comprises:
the abnormal log detection module is used for storing the abnormal logs in a preset database if the abnormal logs are detected to exist in a preset message queue, and the message queue is used for receiving the abnormal logs sent by a target client.
Optionally, the method further comprises:
the second log information acquisition module is used for acquiring second log information sent by a target client, wherein the second log information comprises an operation record of a user on a corresponding page in the target client;
and the optimization information generation submodule is used for generating the optimization information aiming at the page by adopting the operation record.
Optionally, the abnormality level determining module is specifically configured to:
acquiring a target abnormal result corresponding to the abnormal code;
and matching the target abnormal result with a preset abnormal result to obtain an abnormal grade corresponding to the abnormal code.
The embodiment of the invention also discloses a device for processing the abnormal information, which is applied to the client and comprises the following components:
the information acquisition module is used for acquiring abnormal error information and user behavior information which cause the page abnormality if the page abnormality of the client is detected, and generating an abnormal error report log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information;
the first log information generating module is used for generating first log information by adopting the abnormal error reporting log and the user behavior log;
the system comprises a first log information sending module, a message queue and a server, wherein the first log information sending module is used for sending the first log information to the message queue preset in the server, the message queue is used for temporarily storing the first log information, and the server is used for extracting the first log information from the message queue and carrying out exception handling according to the first log information.
Optionally, the client includes an information reporting control, and the apparatus further includes:
the second log information generating module is used for responding to the user operation acting on the information reporting control, acquiring the operation record of the user on the page and generating second log information corresponding to the operation record;
and the second log information sending module is used for sending the second log information to the server, and the server is used for optimizing the application interface according to the second log information.
The embodiment of the invention also discloses an electronic device, which comprises:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform the method as described above.
Embodiments of the invention also disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods as described above.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the server can obtain at least one first log information, the first log information can comprise an abnormal error reporting log and a user behavior log, and the abnormal error reporting log can comprise abnormal error information, so that the server can locate an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log, determine an abnormal level corresponding to the abnormal code, classify each first log information by adopting the abnormal level so as to process the abnormal code according to different abnormal levels, realize the positioning of the abnormal code by combining the user behavior, effectively restore the reason of the abnormal occurrence, be favorable for carrying out targeted processing on the abnormal, and realize the abnormal processing with different priorities according to the influence degree of the abnormal by carrying out classified processing on the abnormal code, the effectiveness of exception handling is improved.
Drawings
FIG. 1 is a flow chart illustrating the steps of one embodiment of a method for handling exception information;
FIG. 2 is a flowchart illustrating the steps of one embodiment of a method for handling exception information;
fig. 3 is a schematic flow chart of log reporting in the embodiment of the present invention;
FIG. 4 is a flowchart illustrating the steps of one embodiment of a method for handling exception information;
FIG. 5 is a flow chart illustrating exception handling according to an embodiment of the present invention;
FIG. 6 is a block diagram of an embodiment of an exception information processing apparatus according to the present invention;
fig. 7 is a block diagram of an embodiment of an exception information processing apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As an example, for writing of the underlying code, a developer can hardly avoid the occurrence of code exceptions, and how to locate the corresponding exceptions is a problem to be solved by the developer. The abnormal problem may occur after a series of operations of a user, the error cause may be from a terminal model, a network environment, an interface request, a complex operation behavior, and the like, and since the abnormal problem is complex, a developer is often difficult to reproduce when processing the abnormal problem, so that the processing of the abnormal problem is troublesome.
Therefore, one of the core invention points of the embodiment of the present invention is that a script file is deployed at a user side to perform exception monitoring, and an exception log is sent to a service side, and an operator at the service side performs exception handling.
Specifically, referring to fig. 1, a flowchart of steps of an embodiment of the method for processing exception information according to the present invention is shown, and is applied to a server, where the method specifically includes the following steps:
step 101, obtaining at least one first log information, wherein the first log information at least comprises an abnormal error report log and a user behavior log, and the abnormal error report log comprises abnormal error information;
in the embodiment of the invention, the script file can be configured at the client, the behavior of the user on the page can be monitored, and the page abnormity can be monitored, so that the server can obtain the log information sent by the client, and the abnormity of the page can be processed according to the log information.
The first log information may be an abnormal error report log corresponding to abnormal error information and a user behavior log corresponding to user behavior information, which are generated after the script file detects that a page is abnormal and collects information causing the page abnormality and collects corresponding behaviors of a user. It is understood that the first log information is a log generated when an abnormality occurs in the client.
In the specific implementation, the client can monitor the page in real time through the corresponding page script file, and when it is monitored that the page is abnormal, such as breakdown, flash back, false death of the page, loss of local functions and the like, abnormal information causing the page abnormality can be collected, corresponding user behavior information is collected, then an abnormal error reporting log corresponding to the abnormal information and a user behavior log corresponding to the user behavior information are generated, and then the abnormal error reporting log and the corresponding user behavior log are packaged and sent to the server, so that the server can process the page abnormality corresponding to different logs. The exception error log may include exception error information, such as an error file, a line number, stack information, and an exception type; the user behavior log may include records of user actions that result in page exceptions, such as click events, slide events, keyboard entry events, page jump events, scroll events, and data requests, among others.
102, positioning an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log;
in a specific implementation, the server may preliminarily search an initial abnormal code causing the page abnormality according to the abnormal error information, and then further screen the initial abnormal code in combination with an operation record of the user in the user behavior log, for example, determine that a certain line of code is abnormal by combining different operation records of the user, or determine that the page is abnormal due to linkage among multiple lines of codes, so that the abnormal code is positioned by combining the user behavior, thereby effectively restoring the reason of the occurrence of the abnormality, and facilitating the targeted processing of the abnormality.
Step 103, determining an exception grade corresponding to the exception code;
and 104, classifying at least one piece of first log information by adopting the abnormal grade.
Different abnormal codes can cause different abnormal results, such as breakdown, flash quit, page false death, local function loss, no-sense abnormality and the like, and the abnormal results corresponding to the abnormal codes can be divided into different abnormal levels according to the degree of the page abnormality, so that different first log information can be classified according to the abnormal levels, maintenance personnel can determine which page abnormalities need to be processed preferentially and which exceptions can be processed next time according to the influence degree of the page abnormality, the hierarchical processing of the page abnormality is realized, and the effectiveness of the abnormality processing is improved while the effective processing of the abnormality is ensured.
In the embodiment of the invention, the server can obtain at least one first log information, the first log information can comprise an abnormal error reporting log and a user behavior log, and the abnormal error reporting log can comprise abnormal error information, so that the server can locate an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log, determine an abnormal level corresponding to the abnormal code, classify each first log information by adopting the abnormal level so as to process the abnormal code according to different abnormal levels, realize the positioning of the abnormal code by combining the user behavior, effectively restore the reason of the abnormal occurrence, be favorable for carrying out targeted processing on the abnormal, and realize the abnormal processing with different priorities according to the influence degree of the abnormal by carrying out classified processing on the abnormal code, the effectiveness of exception handling is improved.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a method for processing exception information according to the present invention is shown, and applied to a server, the method specifically includes the following steps:
step 201, obtaining at least one first log information, where the first log information at least includes an abnormal error reporting log and a user behavior log, and the abnormal error reporting log includes abnormal error information and an abnormal identifier;
in the specific implementation, the client can monitor the page in real time through the corresponding page script file, and when it is monitored that the page is abnormal, such as breakdown, flash back, false death of the page, loss of local functions and the like, abnormal information causing the page abnormality can be collected, corresponding user behavior information is collected, then an abnormal error reporting log corresponding to the abnormal information and a user behavior log corresponding to the user behavior information are generated, and then the abnormal error reporting log and the corresponding user behavior log are packaged and sent to the server, so that the server can process the page abnormality corresponding to different logs.
In an optional embodiment of the present invention, in the process of reporting the log by the client, if the client accesses the server in a centralized manner, the client is likely to cause a large system overhead and data processing due to centralized access, and further cause a concurrency problem, after monitoring that a page is abnormal and generating corresponding log information, the client may report the log information to the message queue and temporarily store the log information in the message queue, thereby avoiding directly sending the log information to the server, and reducing the overhead of the server system. Then, the database connected to the server can detect the message queue in real time, and if the content of the message (i.e. the log information) is detected, the message is removed from the message queue and stored in the database, so that the server can extract the corresponding log information from the database.
In specific implementation, referring to fig. 3, a schematic flow diagram of log reporting in an embodiment of the present invention is shown, where a client includes a log reporting service, the client may send a log to a message queue through the log reporting service, a log receiving service in a database detects message content in the message queue in real time, and if the message content is detected, the message content is extracted and stored in the database. The server side can extract abnormal logs from the data, record the number of the logs at the corresponding time point, establish an abnormal trend graph for the abnormal logs by adopting the time point and the number of the logs, monitor the abnormal trend graph, obtain a target time point corresponding to an abnormal peak value if the abnormal peak value is detected to appear in the abnormal trend graph, and extract at least one piece of first log information in a preset time period associated with the target time point.
The abnormal trend graph can be a line graph established by taking time as an abscissa and the log number as an ordinate, and the number of page abnormalities at different time points can be intuitively known through the line graph, so that when an abnormal sudden increase occurs at a time point, first log information in a corresponding time period before the time point can be extracted, abnormal codes can be conveniently positioned according to the first log information, and then abnormal processing is carried out.
In one example, the server may extract an abnormal log from the database in a "day" period, record the number of logs per day, then establish an abnormal trend graph with time as an abscissa and the number of logs as an ordinate, perform monitoring through the abnormal trend graph, obtain a target time point corresponding to an abnormal peak if the abnormal peak is detected to appear in the abnormal trend graph, and extract first log information within three days before the target time point so as to detect a cause of the abnormal occurrence and process the first log information.
It should be noted that, for the log extraction period, extraction may be performed at other time periods, for example, every hour, every minute, and the like, so that the time point of the abnormal sudden increase may be located, and meanwhile, for the occurrence of the abnormal peak value, a prompt message for the abnormal peak value may be generated, and the prompt message may be output to implement early warning.
Step 202, according to the abnormal error information and the user behavior log, positioning an abnormal code corresponding to the first log information;
in a specific implementation, the server may preliminarily search an initial abnormal code causing the page abnormality according to the abnormal error information, and then further screen the initial abnormal code in combination with an operation record of the user in the user behavior log, for example, determine that a certain line of code is abnormal by combining different operation records of the user, or determine that the page is abnormal due to linkage among multiple lines of codes, so that the abnormal code is positioned by combining the user behavior, thereby effectively restoring the reason of the occurrence of the abnormality, and facilitating the targeted processing of the abnormality.
In an example, the exception error information may include an error file, a line number, stack information, an exception type, and the like, and then detailed error information may be determined according to the stack information, and a corresponding code may be checked from the line number corresponding to the error file, and an exception code causing a page exception may be determined in combination with an operation event of a user, so that the exception code may be located in combination with a user behavior, thereby effectively restoring a cause of an exception, and facilitating a targeted processing of the exception.
Step 203, determining an exception grade corresponding to the exception code;
different exception codes can cause different exception results, such as crash, flash back, page false death, local function loss, no-sense exception and the like, so that a target exception result corresponding to the exception code can be obtained, and then the target exception result is matched with a preset exception result to obtain an exception grade corresponding to the exception code. For example, for a page, a crash and a flash will be accompanied by a page close or an information loss, so that such a result may be defined as a highest level of exception level, a partial function loss, a page false dead, and the like may be defined as a medium level of exception level, a non-sensed exception may be defined as a low level of exception level, and the like, which is not limited by the present invention.
Step 204, classifying at least one first log information by adopting the abnormal grade;
in a specific implementation, the server may divide the exception result corresponding to the exception code into different exception levels according to the degree of the page exception, so as to classify different first log information according to the exception levels, as shown in table 1 below:
log information Abnormal result Grade of anomaly
Log 1 Page crash Advanced
Log 2 Non-sensory abnormality Low grade
Log 3 Local loss of function Middle stage
TABLE 1
By carrying out hierarchical processing on the abnormal result corresponding to the abnormal code, maintenance personnel can determine which page abnormalities need to be processed preferentially and which abnormalities can be processed next time according to the influence degree of the page abnormalities, so that the hierarchical processing of the page abnormalities is realized, and the effectiveness of the abnormality processing is improved while the effective processing of the abnormalities is ensured.
Step 205, determining an exception type for the exception error information by using the exception identifier;
in the embodiment of the present invention, the exception error report log may further include an exception identifier, and if different exception identifiers may correspond to different exception types, the exception identifier may be adopted to determine the exception type for the exception error information, so as to perform a type-based search on the exception information, which is beneficial to query and process the exception information.
In an example, the exception type may include a static resource loading exception, a code running exception, an interface request exception, and the like, where the code running exception may include an unprocessed commit exception in an asynchronous function, an undefined type, a messy type usage, exceeding a maximum stack limit, a circular reference, and an exception type including an impermissible character, and when the client reports an exception error report log, the client may carry an exception identifier in the log, and different exception types are assigned with different exception identifiers, so that the server may determine the exception type according to the exception identifier, and perform screening and classification, thereby facilitating a maintainer to query and process exception information, and improving the efficiency of exception handling.
And step 206, classifying at least one piece of first log information according to the abnormal type, and displaying the classified first log information.
After the abnormal type corresponding to each first log information is determined, the first log information can be classified according to the abnormal type, and the classified first log information is displayed, so that the page abnormal information is displayed in a visual mode, and maintenance personnel can visually know the abnormal problems corresponding to different abnormal logs. Meanwhile, the server can respond to the detection of the classification operation aiming at the at least one first log information, obtain the classification dimension corresponding to the classification operation, classify the at least one first log information by adopting the classification dimension, and display the classified first log information, so that maintenance personnel can classify abnormal logs by different classification dimensions, check and search abnormal information, and further improve the efficiency of abnormal processing.
The classification dimension at least comprises one of a user identity dimension, a time dimension and an operation environment dimension, and for abnormal problems of the client, the client usually depends on a special user identity account or a special set of meal packages, a special region, a special network environment, a specific return condition of a server interface and the like, so that the client can support reporting of user-defined data such as the user identity account, the set of meal packages, the region, the network environment and the like, and the server can classify abnormal logs according to different classification dimensions so as to facilitate query and processing of maintenance personnel.
In another optional embodiment of the present invention, the server may further obtain second log information sent by the target client, where the second log information includes an operation record of a corresponding page in the target client by the user, and the server may generate the optimization information for the page by using the operation record. Specifically, the client can provide an information reporting control, and the client can respond to a user operation acting on the information reporting control, acquire an operation record of a user on a page, generate second log information corresponding to the operation record, and then send the second log information to the server.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art can set the method according to practical situations, and the present invention is not limited to this.
In the embodiment of the invention, the server can obtain at least one first log information, the first log information can comprise an abnormal error reporting log and a user behavior log, and the abnormal error reporting log can comprise abnormal error information, so that the server can locate an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log, determine an abnormal level corresponding to the abnormal code, classify each first log information by adopting the abnormal level so as to process the abnormal code according to different abnormal levels, realize the positioning of the abnormal code by combining the user behavior, effectively restore the reason of the abnormal occurrence, be favorable for carrying out targeted processing on the abnormal, and realize the abnormal processing with different priorities according to the influence degree of the abnormal by carrying out classified processing on the abnormal code, the effectiveness of exception handling is improved.
Referring to fig. 4, a flowchart illustrating steps of an embodiment of a method for processing exception information according to the present invention is shown, and applied to a client, the method specifically includes the following steps:
step 401, if it is detected that the page of the client is abnormal, acquiring abnormal error information and user behavior information which cause the page to be abnormal, and generating an abnormal error report log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information;
step 402, generating first log information by adopting the abnormal error reporting log and the user behavior log;
step 403, sending the first log information to a message queue preset in a server, where the message queue is used to temporarily store the first log information, and the server is used to extract the first log information from the message queue and perform exception handling according to the first log information.
In the embodiment of the present invention, the client may be an application program running in the user terminal, and the content displayed on the graphical user interface of the user terminal may at least include an application page of the application program, and the user may have problems such as application abnormality during the operation of the application page, so that abnormality monitoring needs to be performed on the application page.
In a specific implementation, a page script file can be configured in the client, the behavior of the user on the page and the page abnormality are monitored, if the abnormality is detected, a corresponding abnormality log is generated, and the abnormality log is sent to the server, so that the server can process the abnormality of the page according to the log information. Specifically, in the process of monitoring application exception, user behavior information can be collected, so that exception positioning can be performed by combining the behavior of the user during exception handling, and the pertinence and the effectiveness of exception handling are improved.
In an optional embodiment of the present invention, the client includes an information reporting control, and the client may respond to a user operation acting on the information reporting control, obtain an operation record of the user on the page, and generate second log information corresponding to the operation record; and the server is used for optimizing the application interface according to the second log information, so that the user can actively report the operation record of the user through the information reporting control under the condition that the client does not trigger an exception, the server can analyze and process the operation record of the user according to the information reporting control, the client is further optimized, and the use experience of the user is improved.
In the embodiment of the invention, if the client detects that the page of the client is abnormal, the client acquires abnormal error information and user behavior information which cause the page abnormality, generates an abnormal error reporting log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information, then generates first log information by adopting the abnormal error reporting log and the user behavior log, then sends the first log information to a message queue preset in a server, the message queue is used for temporarily storing the first log information, the server is used for extracting the first log information from the message queue and processing the abnormality according to the first log information, and the server can locate the abnormal code by combining the user behavior by collecting the user behavior information, thereby effectively restoring the reason of the abnormal occurrence and being beneficial to the specific processing of the abnormality, and by carrying out hierarchical processing on the abnormal codes, maintenance personnel can realize abnormal processing with different priorities according to the influence degree of the abnormality, and the effectiveness of the abnormal processing is improved.
In order that those skilled in the art will be able to better understand the embodiments of the present invention, the following description will be given by way of an example:
referring to fig. 5, a schematic flow diagram illustrating processing of abnormal information in an embodiment of the present invention is shown, where a page script file may be configured in a client, and a monitoring abnormal event, a user behavior event, and a log reporting event are registered, and when the client detects a page abnormality through the script file, the client may collect abnormal error information causing the page abnormality and corresponding user behavior information, and generate a corresponding abnormal error reporting log and a corresponding user behavior log. The abnormal error reporting log is used for describing reasons of page abnormality and carrying an abnormal identifier of the abnormality, and the abnormal identifier is used for classifying abnormal types; the user behavior log is used for recording user operation events causing the page exception, such as click events, sliding events, keyboard input events, page jump events, scrolling events, data requests and the like.
After the client generates the abnormal log, the abnormal log can be transmitted to the message queue for temporary storage, and if the database detects that the abnormal log exists in the message queue, the abnormal log is extracted from the message queue and stored. The background abnormal analysis service of the server side can store, acquire and alarm abnormal data, and for a visual system, a specific abnormal log can be pulled for visual display, so that developers can visually analyze and process the abnormal data. Specifically, the visualization system may extract an abnormal log from the data, record the number of logs at a corresponding time point, then establish an abnormal trend graph for the abnormal log by using the time point and the number of logs, monitor the abnormal trend graph, if an abnormal peak is detected in the abnormal trend graph, obtain a target time point corresponding to the abnormal peak, and extract at least one piece of first log information within a preset time period associated with the target time point. For example, the server may extract an abnormal log from the database in a "day" period, record the number of logs per day, create an abnormal trend graph with time as an abscissa and the number of logs as an ordinate, monitor through the abnormal trend graph, obtain a target time point corresponding to an abnormal peak if it is monitored that the abnormal peak occurs in the abnormal trend graph, and extract first log information within three days before the target time point, so as to detect a cause of the occurrence of the abnormality, and process the first log information. Specifically, the abnormal error information may include an error file, a line number, stack information, an abnormal type, and the like, and then detailed error information may be determined according to the stack information, and a corresponding code may be checked from the line number corresponding to the error file, and an abnormal code causing a page abnormality may be determined in combination with an operation event of a user, so that the abnormal code may be located in combination with a user behavior, thereby effectively restoring a cause of the abnormality, and facilitating a targeted processing of the abnormality.
In addition, in the visualization system, the abnormal logs can be classified according to different classification dimensions, abnormal levels, abnormal types and the like, so that developers can conveniently perform hierarchical processing, query and search on abnormal problems, and the abnormal processing efficiency is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 6, a block diagram of an embodiment of an exception information processing apparatus according to the present invention is shown, and the exception information processing apparatus is applied to a server, and specifically includes the following modules:
a first log information obtaining module 601, configured to obtain at least one first log information, where the first log information at least includes an abnormal error reporting log and a user behavior log, and the abnormal error reporting log includes abnormal error information;
an abnormal code positioning module 602, configured to position an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log;
an exception level determining module 603, configured to determine an exception level corresponding to the exception code;
a log information classification module 604, configured to classify at least one of the first log information by using the anomaly level.
In an optional embodiment of the present invention, the exception error log further includes an exception identifier, and the apparatus further includes:
the abnormal type determining module is used for determining the abnormal type aiming at the abnormal error information by adopting the abnormal identifier;
and the log information display module is used for classifying at least one piece of first log information according to the abnormal type and displaying the classified first log information.
In an optional embodiment of the present invention, further comprising:
a classification dimension acquisition module, configured to, in response to detecting a classification operation for at least one piece of the first log information, acquire a classification dimension corresponding to the classification operation;
the log information classification module is used for classifying the at least one first log information by adopting the classification dimension and displaying the classified first log information;
wherein the classification dimension at least comprises one of a user identity dimension, a time dimension and a running environment dimension.
In an optional embodiment of the present invention, the first log information obtaining module 601 includes:
the abnormal log extraction submodule is used for extracting abnormal logs from a preset database and recording the number of the logs at corresponding time points;
the abnormal trend graph establishing submodule is used for establishing an abnormal trend graph aiming at the abnormal log by adopting the time point and the log quantity;
and the log information extraction submodule is used for acquiring a target time point corresponding to the abnormal peak value if the abnormal peak value is monitored to appear in the abnormal trend graph, and extracting at least one piece of first log information in a preset time period associated with the target time point.
In an optional embodiment of the present invention, further comprising:
and the reminding information output module is used for generating reminding information aiming at the abnormal peak value and outputting the reminding information.
In an optional embodiment of the invention, the apparatus further comprises:
the abnormal log detection module is used for storing the abnormal logs in a preset database if the abnormal logs are detected to exist in a preset message queue, and the message queue is used for receiving the abnormal logs sent by a target client.
In an optional embodiment of the present invention, further comprising:
the second log information acquisition module is used for acquiring second log information sent by a target client, wherein the second log information comprises an operation record of a user on a corresponding page in the target client;
and the optimization information generation submodule is used for generating the optimization information aiming at the page by adopting the operation record.
In an optional embodiment of the present invention, the abnormality level determining module is specifically configured to:
acquiring a target abnormal result corresponding to the abnormal code;
and matching the target abnormal result with a preset abnormal result to obtain an abnormal grade corresponding to the abnormal code.
Referring to fig. 7, a block diagram of an embodiment of an exception information processing apparatus according to the present invention is shown, and is applied to a client, and specifically includes the following modules:
the information acquisition module 701 is configured to, if it is detected that a page of the client is abnormal, acquire abnormal error information and user behavior information that cause the page to be abnormal, and generate an abnormal error report log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information;
a first log information generating module 702, configured to generate first log information by using the abnormal error report log and the user behavior log;
a first log information sending module 703, configured to send the first log information to a message queue preset in a server, where the message queue is used to temporarily store the first log information, and the server is used to extract the first log information from the message queue and perform exception handling according to the first log information.
In an optional embodiment of the present invention, the client includes an information reporting control, and the apparatus further includes:
the second log information generating module is used for responding to the user operation acting on the information reporting control, acquiring the operation record of the user on the page and generating second log information corresponding to the operation record;
and the second log information sending module is used for sending the second log information to the server, and the server is used for optimizing the application interface according to the second log information.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described in embodiments of the invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be 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 terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing describes in detail a method and a device for processing exception information according to the present invention, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the foregoing embodiment is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A method for processing abnormal information is applied to a server side, and comprises the following steps:
acquiring at least one piece of first log information, wherein the first log information at least comprises an abnormal error report log and a user behavior log, and the abnormal error report log comprises abnormal error information;
according to the abnormal error information and the user behavior log, positioning an abnormal code corresponding to the first log information;
determining an exception grade corresponding to the exception code;
and classifying at least one first log information by using the abnormal grade.
2. The method of claim 1, wherein the exception error log further comprises an exception identification, the method further comprising:
determining an exception type aiming at the exception error information by adopting the exception identifier;
and classifying at least one piece of first log information according to the abnormal type, and displaying the classified first log information.
3. The method of claim 1 or 2, further comprising:
in response to detecting a classification operation on at least one piece of the first log information, acquiring a classification dimension corresponding to the classification operation;
classifying the at least one first log information by adopting the classification dimension, and displaying the classified first log information;
wherein the classification dimension at least comprises one of a user identity dimension, a time dimension and a running environment dimension.
4. The method of claim 1, wherein the obtaining at least one first log information comprises:
extracting abnormal logs from a preset database, and recording the number of the logs at corresponding time points;
establishing an abnormal trend graph aiming at the abnormal log by adopting the time points and the log quantity;
if the abnormal peak value appears in the abnormal trend graph, acquiring a target time point corresponding to the abnormal peak value, and extracting at least one piece of first log information in a preset time period associated with the target time point.
5. The method of claim 4, further comprising:
and generating reminding information aiming at the abnormal peak value, and outputting the reminding information.
6. The method of claim 4, wherein before extracting the abnormal log from the preset database and recording the number of logs at the corresponding time point, the method further comprises:
if the abnormal logs are detected to exist in a preset message queue, the abnormal logs are stored in a preset database, and the message queue is used for receiving the abnormal logs sent by a target client.
7. The method of claim 1, further comprising:
acquiring second log information sent by a target client, wherein the second log information comprises an operation record of a user on a corresponding page in the target client;
and generating optimization information aiming at the page by adopting the operation record.
8. The method of claim 1, wherein the determining the exception level to which the exception code corresponds comprises:
acquiring a target abnormal result corresponding to the abnormal code;
and matching the target abnormal result with a preset abnormal result to obtain an abnormal grade corresponding to the abnormal code.
9. A method for processing abnormal information is applied to a client, and the method comprises the following steps:
if the page of the client is detected to be abnormal, acquiring abnormal error information and user behavior information which cause the page to be abnormal, and generating an abnormal error report log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information;
generating first log information by adopting the abnormal error reporting log and the user behavior log;
and sending the first log information to a message queue preset in a server, wherein the message queue is used for temporarily storing the first log information, and the server is used for extracting the first log information from the message queue and carrying out exception handling according to the first log information.
10. The method of claim 9, wherein the client comprises an information reporting control, and wherein the method further comprises:
responding to the user operation acting on the information reporting control, acquiring an operation record of the user on the page, and generating second log information corresponding to the operation record;
and sending the second log information to the server, wherein the server is used for optimizing the application interface according to the second log information.
11. An exception information processing apparatus, applied to a server, the apparatus comprising:
the system comprises a first log information acquisition module, a second log information acquisition module and a first log information processing module, wherein the first log information acquisition module is used for acquiring at least one piece of first log information, the first log information at least comprises an abnormal error reporting log and a user behavior log, and the abnormal error reporting log comprises abnormal error information;
an abnormal code positioning module, configured to position an abnormal code corresponding to the first log information according to the abnormal error information and the user behavior log;
the abnormal grade determining module is used for determining the abnormal grade corresponding to the abnormal code;
and the log information classification module is used for classifying at least one piece of first log information by adopting the abnormal grade.
12. An exception information processing apparatus, applied to a client, the apparatus comprising:
the information acquisition module is used for acquiring abnormal error information and user behavior information which cause the page abnormality if the page abnormality of the client is detected, and generating an abnormal error report log corresponding to the abnormal error information and a user behavior log corresponding to the user behavior information;
the first log information generating module is used for generating first log information by adopting the abnormal error reporting log and the user behavior log;
the system comprises a first log information sending module, a message queue and a server, wherein the first log information sending module is used for sending the first log information to the message queue preset in the server, the message queue is used for temporarily storing the first log information, and the server is used for extracting the first log information from the message queue and carrying out exception handling according to the first log information.
13. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-8 or 9-10.
14. One or more machine readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method of any of claims 1-8 or 9-10.
CN202011256242.9A 2020-11-11 2020-11-11 Abnormal information processing method and device Pending CN112416705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011256242.9A CN112416705A (en) 2020-11-11 2020-11-11 Abnormal information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011256242.9A CN112416705A (en) 2020-11-11 2020-11-11 Abnormal information processing method and device

Publications (1)

Publication Number Publication Date
CN112416705A true CN112416705A (en) 2021-02-26

Family

ID=74781719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011256242.9A Pending CN112416705A (en) 2020-11-11 2020-11-11 Abnormal information processing method and device

Country Status (1)

Country Link
CN (1) CN112416705A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799884A (en) * 2021-04-14 2021-05-14 北京八角科技有限责任公司 Automatic recovery method, device and storage medium after abnormal exit of network data processing system
CN113098715A (en) * 2021-03-29 2021-07-09 杭州网易云音乐科技有限公司 Information processing method, device, system, medium and computing equipment
CN113176987A (en) * 2021-04-29 2021-07-27 华人运通(上海)云计算科技有限公司 Log processing method, device and equipment for vehicle control instruction block and storage medium
CN113515401A (en) * 2021-05-18 2021-10-19 中国工商银行股份有限公司 Positioning debugging method, system, electronic equipment and medium for abnormal transactions
CN113553272A (en) * 2021-09-18 2021-10-26 深圳市信润富联数字科技有限公司 Interface abnormity monitoring method, device, medium and computer program product
CN114706709A (en) * 2022-06-01 2022-07-05 成都运荔枝科技有限公司 Saas service exception handling method and device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491320A (en) * 2018-03-05 2018-09-04 平安普惠企业管理有限公司 Exception analysis method, device, computer equipment and the storage medium of application program
CN109885537A (en) * 2019-02-22 2019-06-14 成都信息工程大学 A kind of journal displaying method, system and computer readable storage medium
CN109885478A (en) * 2018-12-30 2019-06-14 贝壳技术有限公司 A kind of localization method and system of error code
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log
CN111143185A (en) * 2019-12-30 2020-05-12 珠海金山网络游戏科技有限公司 Log-based fault analysis method and device
CN111651595A (en) * 2020-05-25 2020-09-11 泰康保险集团股份有限公司 Abnormal log processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491320A (en) * 2018-03-05 2018-09-04 平安普惠企业管理有限公司 Exception analysis method, device, computer equipment and the storage medium of application program
CN109885478A (en) * 2018-12-30 2019-06-14 贝壳技术有限公司 A kind of localization method and system of error code
CN109885537A (en) * 2019-02-22 2019-06-14 成都信息工程大学 A kind of journal displaying method, system and computer readable storage medium
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log
CN111143185A (en) * 2019-12-30 2020-05-12 珠海金山网络游戏科技有限公司 Log-based fault analysis method and device
CN111651595A (en) * 2020-05-25 2020-09-11 泰康保险集团股份有限公司 Abnormal log processing method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098715A (en) * 2021-03-29 2021-07-09 杭州网易云音乐科技有限公司 Information processing method, device, system, medium and computing equipment
CN113098715B (en) * 2021-03-29 2022-07-22 杭州网易云音乐科技有限公司 Information processing method, device, system, medium and computing equipment
CN112799884A (en) * 2021-04-14 2021-05-14 北京八角科技有限责任公司 Automatic recovery method, device and storage medium after abnormal exit of network data processing system
CN112799884B (en) * 2021-04-14 2021-08-03 北京八角科技有限责任公司 Automatic recovery method, device and storage medium after abnormal exit of network data processing system
CN113176987A (en) * 2021-04-29 2021-07-27 华人运通(上海)云计算科技有限公司 Log processing method, device and equipment for vehicle control instruction block and storage medium
CN113176987B (en) * 2021-04-29 2023-09-15 华人运通(上海)云计算科技有限公司 Log processing method, device and equipment of vehicle control instruction block and storage medium
CN113515401A (en) * 2021-05-18 2021-10-19 中国工商银行股份有限公司 Positioning debugging method, system, electronic equipment and medium for abnormal transactions
CN113553272A (en) * 2021-09-18 2021-10-26 深圳市信润富联数字科技有限公司 Interface abnormity monitoring method, device, medium and computer program product
CN114706709A (en) * 2022-06-01 2022-07-05 成都运荔枝科技有限公司 Saas service exception handling method and device and readable storage medium

Similar Documents

Publication Publication Date Title
CN112416705A (en) Abnormal information processing method and device
CN107766208B (en) Method, system and device for monitoring business system
US8886660B2 (en) Method and apparatus for tracking a change in a collection of web documents
US7913233B2 (en) Performance analyzer
CN111078513A (en) Log processing method, device, equipment, storage medium and log alarm system
CN112988509A (en) Alarm message filtering method and device, electronic equipment and storage medium
CN115344416A (en) Abnormal log screening method, system and device and computer readable storage equipment
CN114968959A (en) Log processing method, log processing device and storage medium
CN114048099A (en) Java application monitoring method and device, storage medium and electronic equipment
CN116755992B (en) Log analysis method and system based on OpenStack cloud computing
CN106789335B (en) Method and system for processing information
CN112100035A (en) Page abnormity detection method, system and related device
US10572458B2 (en) Method and apparatus of collecting and reporting database application incompatibilities
CN110011845B (en) Log collection method and system
CN110750416A (en) Method and device for automatically processing fault information
CN111784176A (en) Data processing method, device, server and medium
CN115658443B (en) Log filtering method and device
JP2019164788A (en) Information processing device, information processing method, program and image information display system
CN115098378A (en) Method and device for classifying and aggregating log fragments based on abnormal breakpoints
CN113781068A (en) Online problem solving method and device, electronic equipment and storage medium
CN114138537A (en) Crash information online analysis method for android application
JP5444071B2 (en) Fault information collection system, method and program
CN112749140A (en) MySQL slow SQL log real-time collection and optimization method and system
CN112131090A (en) Business system performance monitoring method and device, equipment and medium
CN110750376B (en) Server system fault acquisition and processing method and device and storage medium

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