CN112764962A - Tracking method and system for application version exception recovery - Google Patents

Tracking method and system for application version exception recovery Download PDF

Info

Publication number
CN112764962A
CN112764962A CN202110129374.3A CN202110129374A CN112764962A CN 112764962 A CN112764962 A CN 112764962A CN 202110129374 A CN202110129374 A CN 202110129374A CN 112764962 A CN112764962 A CN 112764962A
Authority
CN
China
Prior art keywords
abnormal
log
application version
information
version number
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
CN202110129374.3A
Other languages
Chinese (zh)
Other versions
CN112764962B (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.)
Hengonda Technology Co ltd
Original Assignee
Hengonda 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 Hengonda Technology Co ltd filed Critical Hengonda Technology Co ltd
Priority to CN202110129374.3A priority Critical patent/CN112764962B/en
Publication of CN112764962A publication Critical patent/CN112764962A/en
Application granted granted Critical
Publication of CN112764962B publication Critical patent/CN112764962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0781Error filtering or prioritizing based on a policy defined by the user or on a policy defined by a hardware/software module, e.g. according to a severity level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis

Abstract

The invention provides a tracking method and a system for application version abnormity repair, wherein the method comprises the following steps: when the application of the equipment is abnormal, capturing abnormal information; generating an abnormal id according to the abnormal information; generating a file name of an abnormal log according to the abnormal id and the application version information; judging whether the abnormal logs are uploaded to a log server or not according to the abnormal id, and uploading the abnormal logs which are not successfully uploaded to the log server; after receiving the abnormal log, the log server newly establishes an abnormality in the database, sets the abnormal id as an open state under the current application version number, directly classifies and filters the abnormal id and the application version number, and directly analyzes the abnormal type number of each application version from the application version number of the abnormal log; when the exception is checked or solved, a new application version number is established, exception log tracking record information is formed, and an inquiry condition of the exception id and/or the application version number is provided. The invention can effectively prevent the repeated reporting of the same exception on one hand, and has the tracking function of exception repair on the other hand.

Description

Tracking method and system for application version exception recovery
Technical Field
The invention relates to the technical field of computers, in particular to a tracking method and a tracking system for application version exception recovery.
Background
With the popularization of intelligent electronic devices, android and ios-based smart phones, tablets, intelligent android devices and the like become essential electronic devices in daily life. In the using process of the electronic equipment, the problem of abnormal operation of the application program often occurs, and the abnormal exit of the equipment application can be caused when the problem occurs. When the equipment has an abnormal exit problem, the positioning problem needs to be fed back and reproduced, at present, or after an abnormal log file is generated, a developer needs to manually search the abnormal log from a plurality of log files, and manually and carefully analyze the abnormal log to determine the reason for generating the abnormal log.
Chinese invention with publication No. CN109376056A, published at 20190222, discloses an abnormal log analysis method, apparatus, storage medium, mobile terminal, and server. The method comprises the following steps: when detecting that an abnormal log analysis event is triggered, acquiring an abnormal log of the mobile terminal; sending the abnormal log to a server, wherein the abnormal log is used for indicating the server to determine an abnormal source of the abnormal log and sending the abnormal source to the mobile terminal; and receiving the abnormal source and displaying the abnormal source. The invention directly sends the abnormal log generated when the mobile terminal runs abnormally to the server, so that the server can accurately and quickly determine the abnormal source of the abnormal log according to the abnormal log and feed the abnormal source back to the mobile terminal in time.
Chinese invention CN105025318A discloses a method and an apparatus for feeding back abnormal log information of an application program, which is disclosed in 20151104, wherein the method for feeding back abnormal log information of an application program comprises: when the application program is abnormal, starting a log information collection function aiming at the application program, and starting a monitoring function for the abnormal condition; after the abnormal condition is monitored to reappear, the log information collection function is closed, and the collected log information is stored as the abnormal log information of the application program; and feeding back the abnormal log information to a preset server. The method only feeds back the abnormal log information of the application program to the preset server, has good pertinence, and is convenient for developers to analyze and process the abnormal condition of the application program. However, similarly, when the same abnormality repeatedly occurs on the same device, the scheme does not prevent the same abnormality information from being repeatedly reported, and does not have a tracking function of abnormality repair.
Chinese invention CN105204969A, published under 20151230, provides an exception log processing method and an exception log processing apparatus. The abnormal log processing method comprises the steps of detecting an application abnormal signal, and recording system information, application information and call stack information of the mobile terminal when the application is abnormal according to the application abnormal signal; generating an abnormal log related to the application abnormal signal according to the system information, the application information and the call stack information of the mobile terminal, and storing the abnormal log in the mobile terminal; and reading and displaying the abnormal log when the application is started. The abnormal log processing device is used for generating the abnormal log according to the application abnormal signal and directly storing the abnormal log in the mobile terminal, so that application testers can conveniently check the abnormal log, and the processing efficiency of application abnormity is improved. However, similarly, when the same abnormality repeatedly occurs on the same device, the scheme does not prevent the same abnormality information from being repeatedly reported, and does not have a tracking function of abnormality repair.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and a system for automatically collecting abnormal log information, which can effectively prevent repeated reporting of the same abnormality on one hand, and also have a function of tracking abnormality recovery on the other hand.
In a first aspect, the present invention provides a method for tracking application version exception repair, including the following steps:
s1, when the application of the equipment is abnormal, capturing abnormal information including abnormal source code information and abnormal information description;
s2, the equipment generates an abnormal id according to the abnormal source code information and the abnormal information description;
s3, the device generates the file name of the abnormal log according to the abnormal id, wherein the file name comprises the abnormal id, the application version information, the device id and the information of the log file generation time;
s4, judging whether the abnormal log is uploaded to a log server by the equipment according to the abnormal id, and if so, ignoring; if not, uploading the abnormal log to a log server, if the uploading is successful, recording a corresponding abnormal id in the local equipment, and if the uploading is failed, storing the abnormal log in the local equipment to wait for the next supplementary transmission;
s5, after receiving the abnormal log, the log server builds an abnormality in the database, sets the abnormal id as the open state under the current application version number, and generates the abnormal log tracking record information of the abnormal id; directly classifying and filtering by applying version numbers according to the abnormal id, directly analyzing the abnormal type number of each application version from the application version number of the abnormal log, and judging the specific abnormal position and reason from the abnormal information content of the abnormal log;
s6, the log server establishes a new application version number corresponding to the abnormal id, when the abnormality is checked or solved, the corresponding abnormal id is set to be in a solved state under the new application version, a solution and opening record of the corresponding abnormal id under each application version number is generated, and all abnormal situations and solution situations are inquired according to the abnormal id or the application version number.
In a second aspect, the present invention provides a tracking system for application version exception repair, including:
the capturing module is used for capturing abnormal information when the application of the equipment is abnormal, wherein the abnormal information comprises abnormal source code information and abnormal information description;
the abnormal id generation module is used for generating an abnormal id according to the abnormal source code information and the abnormal information description by the equipment;
the file name generating module is used for generating a file name of the abnormal log by the equipment according to the abnormal id, wherein the file name comprises the abnormal id, application version information, equipment id and log file generation time information;
the uploading module is used for judging whether the abnormal log is uploaded to the log server or not by the equipment according to the abnormal id, and if so, ignoring the abnormal log; if not, uploading the abnormal log to a log server, if the uploading is successful, recording a corresponding abnormal id in the local equipment, and if the uploading is failed, storing the abnormal log in the local equipment to wait for the next supplementary transmission;
an abnormal state setting module, configured to, after receiving the abnormal log, the log server newly establishes an abnormality in the database, sets an abnormal id as an open state in the current application version number, and generates abnormal log tracking record information of the abnormal id; the system is also used for setting the corresponding abnormal id to be in a solved state under the new application version when the abnormality is checked or solved;
the abnormal filtering analysis module is used for classifying and filtering the log server directly according to the abnormal id and the application version number, directly analyzing the abnormal type number of each application version from the application version number of the abnormal log, and judging the specific abnormal position and reason from the information content of the abnormal log;
and the tracking module is used for establishing a new application version number corresponding to the abnormal id by the log server when the abnormality is checked or solved, generating a solution and an opening record of the corresponding abnormal id under each application version number, and inquiring all abnormal situations and solution conditions according to the abnormal id or the application version number.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: at the equipment end, the abnormal id is generated according to the captured abnormal source code information and the abnormal information description, various different abnormalities can be distinguished according to the abnormal id keyword, each abnormal id represents different abnormal contents, and therefore filtering can be carried out based on the abnormal id, and repeated reporting of abnormal logs is effectively avoided; at the server side, after receiving the abnormal log, the server side can directly apply version number to classify and filter according to the abnormal id, automatically build or open the bug condition, conveniently check the abnormal information on the abnormal log server, and check and solve the corresponding abnormality; related abnormal problems can be quickly positioned according to abnormal information (including source code file names, function names, line numbers and abnormal call stack information), and log analysis work can be effectively reduced; when the abnormity is checked or solved, the log server establishes a new application version number in the database, records, solves, records and solves the abnormity, and generates abnormal content information into the abnormal log tracking record information, so as to provide the abnormal log tracking record information with an inquiry condition of the abnormal id and/or the application version number, thereby greatly facilitating the tracking of the abnormal repair of the application version.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a schematic block diagram of the system of the present invention;
FIG. 2 is a flow chart of a method according to one embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the invention;
fig. 5 is a schematic structural diagram of a medium according to a fourth embodiment of the present invention.
Detailed Description
By providing the method and the system for automatically collecting the abnormal log information, the embodiment of the application can effectively prevent the repeated reporting of the same abnormality on one hand, and also has a tracking function of repairing the abnormality on the other hand.
The technical scheme in the embodiment of the application has the following general idea: at the equipment end, an abnormal id is generated according to the captured abnormal source code information and the abnormal information description, and filtering is performed based on the abnormal id, so that repeated reporting of abnormal logs is effectively avoided; at the server side, after receiving the abnormal log, the server side can directly apply version number to classify and filter according to the abnormal id, automatically build or open the bug condition, conveniently check the abnormal information on the abnormal log server, and check and solve the corresponding abnormality; related abnormal problems can be quickly positioned according to abnormal information (including source code file names, function names, line numbers and abnormal call stack information), and the log file analysis work can be effectively reduced; when the abnormity is checked or solved, the log server establishes a new application version number in the database, records, solves and records the abnormity, and generates abnormal content information into the abnormal log tracking record information, thereby providing the abnormal log tracking record information with an inquiry condition of the abnormity id and/or the application version number, and greatly facilitating the tracking of the abnormal repair of the application version.
Before describing the specific embodiment, a system framework corresponding to the method of the embodiment of the present application is described, and as shown in fig. 1, the system is roughly divided into two parts:
and the device is used for installing an application program, generating an abnormal id and a file name of the abnormal log when the application program is abnormal, filtering the abnormal log based on the abnormal id and reporting the abnormal log to the log server.
The log server is used for receiving the abnormal logs, classifying and filtering the abnormal logs directly according to the abnormal id and the application version number in the database, automatically building or opening bug details, quickly positioning related abnormal problems according to abnormal information (including source code file names, function names, line numbers and abnormal call stack information), and when the abnormality is checked or solved, establishing a new application version number by the log server and generating abnormal related information to obtain tracking record information for inquiring and tracking according to the abnormal id and/or the application version number.
Example one
As shown in fig. 2, the present embodiment provides a method for tracking application version exception repair, including the following steps:
s1, when the application of the equipment is abnormal, capturing abnormal information including abnormal source code information and abnormal information description; the abnormal source code information comprises a source code file name, a function name, a line number and an abnormal call stack;
s2, the equipment generates an abnormal id according to the abnormal source code information and the abnormal information description; the generation rule of the abnormal id is as follows: forming a character string by the source code file name, the function name and the abnormal information description, and generating an md5 value by the character string, wherein the character string form of the md5 value is the abnormal id;
the file name of the abnormal log is as follows: < abnormal id > _< application version number > _< device id > _< log file generation time >. log; wherein the content of the first and second substances,
for the application with the registered user, the equipment id is the user id, and for the application without the registered user, the equipment id is the equipment mac address;
the format of the log file generation time is yyymmdhhmmss, yyyy is a four-digit year, MM is a two-digit month, dd is a two-digit date, HH is a two-digit hour, MM is a two-digit minute, and SS is a two-digit second.
S3, the device generates the file name of the abnormal log according to the abnormal id, wherein the file name comprises the abnormal id, the application version information, the device id and the information of the log file generation time;
s4, judging whether the abnormal log is uploaded to a log server by the equipment according to the abnormal id, and if so, ignoring; if not, uploading the abnormal log to a log server, if the uploading is successful, recording a corresponding abnormal id in the local equipment, and if the uploading is failed, storing the abnormal log in the local equipment to wait for the next supplementary transmission;
s5, after receiving the abnormal log, the log server builds an abnormality in the database, sets the abnormal id as the open state under the current application version number, and generates the abnormal log tracking record information of the abnormal id; directly classifying and filtering by applying version numbers according to the abnormal id, directly analyzing the abnormal type number of each application version from the application version number of the abnormal log, and judging the specific abnormal position and reason from the abnormal information content of the abnormal log;
s6, the log server establishes a new application version number corresponding to the abnormal id, when the abnormality is checked or solved, the corresponding abnormal id is set to be in a solved state under the new application version, a solution and opening record of the corresponding abnormal id under each application version number is generated, and all abnormal situations and solution situations are inquired according to the abnormal id or the application version number. The method comprises the following steps: the exception begins to appear in which application version number, and the exception is reproduced after the exception is solved by a plurality of application version numbers in the middle, and the version number finally solved is which.
As a more preferred implementation manner or a more specific implementation manner of the present embodiment, the following steps may be further included:
and S7, when the version of the application of the equipment is upgraded, clearing the abnormal id of the local uploaded abnormal log of the equipment, and when the same abnormality reappears in the new version, re-uploading the abnormal log once.
As shown in fig. 3, in S5, after receiving the exception log, the log server first determines whether the corresponding exception id exists in the server local area, if not, creates an exception, and sets the exception id as an open state in the current application version number, and generates log tracking record information of the exception id, and if yes:
and judging whether the abnormal id is in an open state under the current application version number, if so, ignoring, otherwise, setting the open state of the abnormal id under the application version number, and generating the abnormal log tracking record information of the abnormal id.
Description of abnormal conditions: the abnormal state of each abnormal id is divided into the following application version numbers: the log server is in an open state and a resolved state, wherein the resolved state means that after a developer resolves a certain exception, the developer sets the application version number in which the exception id is resolved into the resolved state, and the log server generates a resolution record; the open state refers to an abnormal state of the log server under a corresponding version which is automatically newly built or opened according to the abnormal id and the application version number reported by the equipment application, and the log server can generate a problem occurrence record.
Reporting an exception to a log server by an application of the equipment, wherein the reported content comprises exception id information, an exception version number, equipment id and exception information content (source code position (source code file name, function name and line number), exception information description and exception call stack information); example (c):
such as: the version of an application is 101, and when an attribute to invoke virtual method' bolt address in code.bitmap.compress.abnormity occurs in line 76 of a code at function name bmptoring () of a source code file string entries will, the method for calculating the abnormal id will be: md5 ("strings. java: bmpstring: Attempt to invoke virtual method 'bootean android. graphics. bitmap $ CompressFormat, int, java. io. OutputStream)' on a null object reference") calculated as exception id 52a5be57a1adc1bc8524ffcbe0e66539 and exception call stack information:
Figure BDA0002924608730000081
if the device id is 13055234567 and the current system time is 20201219102030, the generated abnormal file name is: 52a5be57a1adc1bc8524ffcbe0e66539_101_13055234567_20201219102030.log, the contents in the exception log file are:
Figure BDA0002924608730000082
Figure BDA0002924608730000091
exception log content generation rules and exception log analysis examples:
capturing the source code position (source code file name, function name and line number) of the occurrence of the abnormity, describing the abnormity information and calling stack information.
Such as: the following exception log file indicates the exception occurrence location (chained entries. java file, bmpToString function, No. 76), the exception information is (at update virtual method 'bolt address. graphics. bitmap. compressor. compressors) (int, java. io. output stream)' on arbitrary object reference), and the exception call stack information is the content of the entire log file.
Figure BDA0002924608730000092
After receiving the abnormal log, the log server sets the abnormal id as an open state under the current application version number, and can check and process the abnormality manually, wherein the process is as shown in fig. 4:
the developer checks the details of the opened exception-related bug, including: an abnormal id, an application version number and abnormal information;
(1) the log server establishes a new application version number, after the exception is manually solved, the log server generates a new application version number of the exception corresponding to the exception id and marks the solved state of the exception id on the new application version, so that subsequent exception tracking is facilitated;
because the abnormal information content on the log server contains specific abnormal problems including source code position (source code file name, function name and line number), abnormal information description and abnormal call stack information, developers can conveniently solve corresponding problems according to the abnormal information on the log server, an application version number is newly established on the log server, the application version number for solving the corresponding abnormal id is correspondingly selected, and the log server can generate the abnormal state of the abnormal id on the new application version, so that the follow-up abnormal tracking is facilitated.
Item tracker tracking exceptions: the occurrence record, the solution record and the solution condition of the abnormity, the abnormal content information and the like are checked, the application version number where the abnormity begins to appear can be tracked according to the abnormal id, the solution of a plurality of version numbers in the middle is repeated, and the finally solved version number is which; all exceptions that occur/are resolved may also be queried according to a certain application version number.
The process of log server auto-tracking anomalies is shown in fig. 3: after the device reports the abnormal id, the application version number and other abnormal information, the log server judges whether the abnormal id exists in the abnormal log server, if not, the log server establishes an abnormality and sets the abnormal id as an 'open state' under the current application version; if the abnormal id exists in the log server, judging whether the abnormal id is in an open state under the current application version number, if so, indicating that the abnormality is processed, and ignoring the report of the abnormality by the server; if not, the log server places it in the "open state" in this application version number and generates abnormal log record information.
Based on the same inventive concept, the application also provides a system corresponding to the method in the first embodiment, which is detailed in the second embodiment.
Example two
As shown in fig. 5, in this embodiment, a tracking system for application version exception repair is provided, including:
the capturing module is used for capturing abnormal information when the application of the equipment is abnormal, wherein the abnormal information comprises abnormal source code information and abnormal information description; the abnormal source code information comprises a source code file name, a function name and a line number;
the abnormal id generation module is used for generating an abnormal id according to the abnormal source code information and the abnormal information description by the equipment; the generation rule of the abnormal id adopted by the abnormal id generation module is as follows: forming a character string by the source code file name, the function name and the abnormal information description, and generating an md5 value by the character string, wherein the character string form of the md5 value is the abnormal id;
the file name of the abnormal log is as follows: < abnormal id > _< application version number > _< device id > _< log file generation time >. log; wherein the content of the first and second substances,
for the application with the registered user, the equipment id is the user id, and for the application without the registered user, the equipment id is the equipment mac address;
the format of the log file generation time is yyymmdhhmmss, yyyy is a four-digit year, MM is a two-digit month, dd is a two-digit date, HH is a two-digit hour, MM is a two-digit minute, and SS is a two-digit second.
The file name generating module is used for generating a file name of the abnormal log by the equipment according to the abnormal id, wherein the file name comprises the abnormal id, application version information, equipment id and log file generation time information;
the uploading module is used for judging whether the abnormal log is uploaded to the log server or not by the equipment according to the abnormal id, and if so, ignoring the abnormal log; if not, uploading the abnormal log to a log server, if the uploading is successful, recording a corresponding abnormal id in the local equipment, and if the uploading is failed, storing the abnormal log in the local equipment to wait for the next supplementary transmission;
an abnormal state setting module, configured to, after receiving the abnormal log, the log server newly establishes an abnormality in the database, sets an abnormal id as an open state in the current application version number, and generates abnormal log tracking record information of the abnormal id; the system is also used for setting the corresponding abnormal id to be in a solved state under the new application version when the abnormality is checked or solved;
the abnormal filtering analysis module is used for classifying and filtering the log server directly according to the abnormal id and the application version number, directly analyzing the abnormal type number of each application version from the application version number of the abnormal log, and judging the specific abnormal position and reason from the abnormal information content of the abnormal log;
and the tracking module is used for establishing a new application version number corresponding to the abnormal id by the log server, setting the corresponding abnormal id to be a solved state under the new application version when the abnormality is checked or solved, generating a solution and opening record of the corresponding abnormal id under each application version number, and inquiring the occurrence and solution conditions of all the abnormalities according to the abnormal id or the application version number. The method comprises the following steps: the exception begins to appear in which application version number, and the exception is reproduced after the exception is solved by a plurality of application version numbers in the middle, and the version number finally solved is which.
As a more preferred implementation manner (more specific implementation manner) of this embodiment, the method further includes:
and the clearing module is used for clearing the abnormal id of the local uploaded abnormal log of the equipment when the version of the application of the equipment is upgraded, and re-uploading the abnormal log once when the same abnormality is reproduced in the new version.
The abnormal state setting module is specifically as follows: after receiving the abnormal log, the log server firstly judges whether the corresponding abnormal id exists in the server local area, if not, the log server newly establishes an abnormal state in the database, collocates the abnormal id as an open state under the current application version number, and generates log tracking record information of the abnormal id, and if so, the log server:
and judging whether the abnormal id is in an open state under the current application version number, if so, ignoring, otherwise, setting the open state of the abnormal id under the application version number, and generating the abnormal log tracking record information of the abnormal id.
Description of abnormal conditions: the abnormal state of each abnormal id is divided into the following application version numbers: the log server is in an open state and a resolved state, wherein the resolved state means that after a developer resolves a certain exception, the developer sets the application version number in which the exception id is resolved into the resolved state, and the log server generates a resolution record; the open state refers to an abnormal state of the log server under a corresponding version which is automatically newly built or opened according to the abnormal id and the application version number reported by the equipment application, and the log server can generate a problem occurrence record.
Reporting an exception to a log server by an application of the equipment, wherein the reported content comprises exception id information, an exception version number, equipment id and exception information content (source code position (source code file name, function name and line number), exception information description and exception call stack information); example (c):
such as: the version of an application is 101, and when an attribute to invoke virtual method' bolt address in code.bitmap.compress.abnormity occurs in line 76 of a code at function name bmptoring () of a source code file string entries will, the method for calculating the abnormal id will be: md5 ("strings. java: bmpstring: Attempt to invoke virtual method 'bootean android. graphics. bitmap $ CompressFormat, int, java. io. OutputStream)' on a null object reference") calculated as exception id 52a5be57a1adc1bc8524ffcbe0e66539 and exception call stack information:
Figure BDA0002924608730000131
if the device id is 13055234567 and the current system time is 20201219102030, the generated abnormal file name is: 52a5be57a1adc1bc8524ffcbe0e66539_101_13055234567_20201219102030.log, the contents in the exception log file are:
Figure BDA0002924608730000132
Figure BDA0002924608730000141
exception log content generation rules and exception log analysis examples:
capturing the source code position (source code file name, function name and line number) of the occurrence of the abnormity, describing the abnormity information and calling stack information.
Such as: the following exception log file indicates the exception occurrence location (chained entries. java file, bmpToString function, No. 76), the exception information is (at update virtual method 'bolt address. graphics. bitmap. compressor. compressors) (int, java. io. output stream)' on arbitrary object reference), and the exception call stack information is the content of the entire log file.
Figure BDA0002924608730000142
After receiving the abnormal log, the log server sets the abnormal id as an open state under the current application version number, and can check and process the abnormality manually, wherein the process is as shown in fig. 4:
the developer checks the details of the opened exception-related bug, including: an abnormal id, an application version number and abnormal information;
(2) the log server establishes a new application version number, when the exception is manually solved, the new application version number with the exception solved corresponding to the exception id is selected, and the log server generates the exception id to mark the solved state on the new application version, so that the follow-up exception tracking is facilitated;
because the abnormal information content on the log server contains specific abnormal problems including source code position (source code file name, function name and line number), abnormal information description and abnormal call stack information, developers can conveniently solve corresponding problems according to the abnormal information on the log server, an application version number is newly established on the log server, the application version number for solving the corresponding abnormal id is correspondingly selected, and the log server can generate the abnormal state of the abnormal id on the new application version, so that the follow-up abnormal tracking is facilitated.
Item tracker tracking exceptions: the occurrence record, the solution record and the solution condition of the abnormity, the abnormal content information and the like are checked, the application version number where the abnormity begins to appear can be tracked according to the abnormal id, the solution of a plurality of version numbers in the middle is repeated, and the finally solved version number is which; all exceptions that occur/are resolved may also be queried according to a certain application version number.
The process of log server auto-tracking anomalies is shown in fig. 3: after the device reports the abnormal id, the application version number and other abnormal information, the log server judges whether the abnormal id exists in the abnormal log server, if not, the log server establishes an abnormality and sets the abnormal id as an 'open state' under the current application version; if the abnormal id exists in the log server, judging whether the abnormal id is in an open state under the current application version number, if so, indicating that the abnormality is processed, and ignoring the report of the abnormality by the server; if not, the log server places it in the "open state" in this application version number and generates abnormal log record information.
Since the system described in the second embodiment of the present invention is a system used for implementing the method of the first embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the device based on the method described in the first embodiment of the present invention, and thus the detailed description is omitted here. All the devices adopted in the method of the first embodiment of the present invention belong to the protection scope of the present invention.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages: at the equipment end, an abnormal id is generated according to the captured abnormal source code information and the abnormal information description, and filtering is performed based on the abnormal id, so that repeated reporting of abnormal logs is effectively avoided; at the server side, after receiving the abnormal log, the server side can directly apply the version number to classify and filter according to the abnormal id, and automatically create or open a bug condition in the database, so that the abnormal information on the abnormal log server can be conveniently checked, and corresponding abnormality can be checked and solved; related abnormal problems can be quickly positioned according to abnormal information (including source code file names, function names, line numbers and abnormal call stack information), and the log file analysis work can be effectively reduced; when the abnormity is checked or solved, the log server establishes a new application version number, records, solves and records the abnormity, generates abnormal content information into the abnormal log tracking record information, and provides an inquiry condition of the abnormal id and/or the application version number for the abnormal log tracking record information, thereby greatly facilitating the tracking of the abnormal repair of the application version.
Those skilled in the art will appreciate that embodiments of the present invention may be provided as a method or system, which may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, 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 apparatus 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (8)

1. A tracking method for application version exception repair is characterized in that: the method comprises the following steps:
s1, when the application of the equipment is abnormal, capturing abnormal information including abnormal source code information and abnormal information description;
s2, the equipment generates an abnormal id according to the abnormal source code information and the abnormal information description;
s3, the device generates the file name of the abnormal log according to the abnormal id, wherein the file name comprises the abnormal id, the application version information, the device id and the information of the log file generation time;
s4, judging whether the abnormal log is uploaded to a log server by the equipment according to the abnormal id, and if so, ignoring; if not, uploading the abnormal log to a log server, if the uploading is successful, recording a corresponding abnormal id in the local equipment, and if the uploading is failed, storing the abnormal log in the local equipment to wait for the next supplementary transmission;
s5, after receiving the abnormal log, the log server builds an abnormality in the database, sets the abnormal id as the open state under the current application version number, and generates the abnormal log tracking record information of the abnormal id; directly classifying and filtering by applying version numbers according to the abnormal id, analyzing the number of the abnormal types of each application version from the application version number of the abnormal log, and judging the specific abnormal position and reason from the abnormal information content of the abnormal log;
s6, the log server establishes a new application version number corresponding to the abnormal id, when the abnormality is checked or solved, the corresponding abnormal id is set to be in a solved state under the new application version, a solution and opening record of the corresponding abnormal id under each application version number is generated, and all abnormal situations and solution situations are inquired according to the abnormal id or the application version number.
2. The method for tracking application version exception repair according to claim 1, wherein: and S5, after receiving the abnormal log, the log server judges whether the corresponding abnormal id exists in the server local, if not, the log server newly establishes an abnormal state in the database, collocates the abnormal id as an open state under the current application version number, and generates log tracking record information of the abnormal id, and if so, the log server:
and judging whether the abnormal id is in an open state under the current application version number, if so, ignoring, otherwise, setting the open state of the abnormal id under the application version number, and generating abnormal log tracking record information of the abnormal id.
3. The method for tracking application version exception repair according to claim 1, wherein: the abnormal source code information comprises a source code file name, a function name and a line number;
the generation rule of the abnormal id is as follows: forming a character string by the source code file name, the function name and the abnormal information description, and generating an md5 value by the character string, wherein the character string form of the md5 value is the abnormal id;
the file name of the abnormal log is as follows: < abnormal id > _< application version number > _< device id > _< log file generation time >. log; wherein the content of the first and second substances,
for the application with the registered user, the equipment id is the user id, and for the application without the registered user, the equipment id is the equipment mac address;
the format of the log file generation time is yyymmdhhmmss, yyyy is a four-digit year, MM is a two-digit month, dd is a two-digit date, HH is a two-digit hour, MM is a two-digit minute, and SS is a two-digit second.
4. The method for tracking application version exception repair according to claim 1, wherein: further comprising the steps of:
and S7, when the version of the application of the equipment is upgraded, clearing the abnormal id of the local uploaded abnormal log of the equipment, and when the same abnormality reappears in the new version, re-uploading the abnormal log once.
5. A tracking system for application version exception recovery, characterized by: the method comprises the following steps:
the capturing module is used for capturing abnormal information when the application of the equipment is abnormal, wherein the abnormal information comprises abnormal source code information and abnormal information description;
the abnormal id generation module is used for generating an abnormal id according to the abnormal source code information and the abnormal information description by the equipment;
the file name generating module is used for generating a file name of the abnormal log by the equipment according to the abnormal id, wherein the file name comprises the abnormal id, application version information, equipment id and log file generation time information;
the uploading module is used for judging whether the abnormal log is uploaded to the log server or not by the equipment according to the abnormal id, and if so, ignoring the abnormal log; if not, uploading the abnormal log to a log server, if the uploading is successful, recording a corresponding abnormal id in the local equipment, and if the uploading is failed, storing the abnormal log in the local equipment to wait for the next supplementary transmission;
an abnormal state setting module, configured to, after receiving the abnormal log, the log server newly establishes an abnormality in the database, sets an abnormal id as an open state in the current application version number, and generates abnormal log tracking record information of the abnormal id; the system is also used for setting the corresponding abnormal id to be in a solved state under the new application version when the abnormality is checked or solved;
the abnormal filtering analysis module is used for classifying and filtering the log server directly according to the abnormal id and the application version number, directly analyzing the abnormal type number of each application version from the application version number of the abnormal log, and judging the specific abnormal position and reason from the abnormal information content of the abnormal log;
and the tracking module is used for establishing a new application version number corresponding to the abnormal id by the log server, generating a solution and an open record of the corresponding abnormal id under each application version number when the abnormality is checked or solved, and inquiring the occurrence and solution conditions of all the abnormalities according to the abnormal id or the application version number.
6. The tracking system for application version exception repair as claimed in claim 5, wherein: the abnormal state setting module is specifically as follows: after receiving the abnormal log, the log server firstly judges whether the corresponding abnormal id exists in the server local area, if not, the log server newly establishes an abnormal state in the database, collocates the abnormal id as an open state under the current application version number, and generates log tracking record information of the abnormal id, and if so, the log server:
and judging whether the abnormal id is in an open state under the current application version number, if so, ignoring, otherwise, setting the open state of the abnormal id under the application version number, and generating the abnormal log tracking record information of the abnormal id.
7. The tracking system for application version exception repair as claimed in claim 5, wherein: the abnormal source code information comprises a source code file name, a function name, a line number and call stack information;
the generation rule of the abnormal id adopted by the abnormal id generation module is as follows: forming a character string by the source code file name, the function name and the abnormal information description, and generating an md5 value by the character string, wherein the character string form of the md5 value is the abnormal id;
the file name of the abnormal log is as follows: < abnormal id > _< application version number > _< device id > _< log file generation time >. log; wherein the content of the first and second substances,
for the application with the registered user, the equipment id is the user id, and for the application without the registered user, the equipment id is the equipment mac address;
the format of the log file generation time is yyymmdhhmmss, yyyy is a four-digit year, MM is a two-digit month, dd is a two-digit date, HH is a two-digit hour, MM is a two-digit minute, and SS is a two-digit second.
8. The tracking system for application version exception repair as claimed in claim 5, wherein: further comprising:
and the clearing module is used for clearing the abnormal id of the local uploaded abnormal log of the equipment when the version of the application of the equipment is upgraded, and re-uploading the abnormal log once when the same abnormality is reproduced in the new version.
CN202110129374.3A 2021-01-29 2021-01-29 Tracking method and system for application version exception recovery Active CN112764962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110129374.3A CN112764962B (en) 2021-01-29 2021-01-29 Tracking method and system for application version exception recovery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110129374.3A CN112764962B (en) 2021-01-29 2021-01-29 Tracking method and system for application version exception recovery

Publications (2)

Publication Number Publication Date
CN112764962A true CN112764962A (en) 2021-05-07
CN112764962B CN112764962B (en) 2022-05-17

Family

ID=75703938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110129374.3A Active CN112764962B (en) 2021-01-29 2021-01-29 Tracking method and system for application version exception recovery

Country Status (1)

Country Link
CN (1) CN112764962B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102945254A (en) * 2012-10-18 2013-02-27 福建省海峡信息技术有限公司 Method for detecting abnormal data among TB-level mass audit data
US20150205979A1 (en) * 2012-06-19 2015-07-23 Beijing Qihoo Technology Company Limited Method and system for repairing file at user terminal
CN105430681A (en) * 2015-11-04 2016-03-23 努比亚技术有限公司 Automatic abnormity upload and recovery methods, automatic abnormity upload device and mobile terminal
CN107171825A (en) * 2017-04-11 2017-09-15 捷开通讯(深圳)有限公司 A kind of repetition daily record filter method of terminal
CN108491320A (en) * 2018-03-05 2018-09-04 平安普惠企业管理有限公司 Exception analysis method, device, computer equipment and the storage medium of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150205979A1 (en) * 2012-06-19 2015-07-23 Beijing Qihoo Technology Company Limited Method and system for repairing file at user terminal
CN102945254A (en) * 2012-10-18 2013-02-27 福建省海峡信息技术有限公司 Method for detecting abnormal data among TB-level mass audit data
CN105430681A (en) * 2015-11-04 2016-03-23 努比亚技术有限公司 Automatic abnormity upload and recovery methods, automatic abnormity upload device and mobile terminal
CN107171825A (en) * 2017-04-11 2017-09-15 捷开通讯(深圳)有限公司 A kind of repetition daily record filter method of terminal
CN108491320A (en) * 2018-03-05 2018-09-04 平安普惠企业管理有限公司 Exception analysis method, device, computer equipment and the storage medium of application program

Also Published As

Publication number Publication date
CN112764962B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN109240886B (en) Exception handling method, exception handling device, computer equipment and storage medium
CN107357731B (en) Monitoring, analyzing and processing method for core dump problem generated by process
CN105630682A (en) System and method for automatically collecting and analyzing collapse of mobile terminal
CN113190401B (en) Abnormality monitoring method for fast game, electronic device, mobile terminal and storage medium
CN112416705A (en) Abnormal information processing method and device
CN113568841A (en) Risk detection method, device and equipment for applet
CN111400435B (en) Mail alarm convergence method, device, computer equipment and storage medium
CN113672456A (en) Modular self-monitoring method, system, terminal and storage medium of application platform
CN115344416A (en) Abnormal log screening method, system and device and computer readable storage equipment
US20200125544A1 (en) Method and Apparatus of Collecting and Reporting Database Application Incompatibilities
CN112764962B (en) Tracking method and system for application version exception recovery
CN113094248B (en) User behavior data analysis method and device, electronic equipment and medium
CN114020432A (en) Task exception handling method and device and task exception handling system
CN113110965A (en) Abnormal information monitoring method and device, computer storage medium and terminal
CN110515792B (en) Monitoring method and device based on web version task management platform and computer equipment
CN112256532A (en) Test interface generation method and device, computer equipment and readable storage medium
CN115878358A (en) Abnormal log analysis method and device, electronic equipment and storage medium
CN113050926B (en) Method, device and equipment for confirming code synchronization change
CN110601879B (en) Method and device for forming Zabbix alarm process information and storage medium
CN115033412A (en) Task log merging method and device
CN112699005A (en) Server hardware fault monitoring method, electronic equipment and storage medium
CN112650613A (en) Error information processing method and device, electronic equipment and storage medium
CN113806196B (en) Root cause analysis method and system
CN114090398A (en) System alarm method and device
JP2011203911A (en) System and method, and program for failure information collection

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