CN107171825B - Repeated log filtering method for terminal - Google Patents
Repeated log filtering method for terminal Download PDFInfo
- Publication number
- CN107171825B CN107171825B CN201710233039.1A CN201710233039A CN107171825B CN 107171825 B CN107171825 B CN 107171825B CN 201710233039 A CN201710233039 A CN 201710233039A CN 107171825 B CN107171825 B CN 107171825B
- Authority
- CN
- China
- Prior art keywords
- log
- stored
- abnormal
- identification information
- snapshot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
- H04L43/028—Capturing of monitoring data by filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
- H04L63/1425—Traffic logging, e.g. anomaly detection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a repeated log filtering method of a terminal. Wherein the method comprises the following steps: acquiring a log to be stored, which is generated in the running process of a terminal and has an abnormal record; extracting identification information capable of uniquely identifying the abnormality from the log to be stored; generating an abnormal snapshot of the log to be stored by utilizing the identification information; comparing whether the abnormal snapshot of the log to be stored is repeated with the abnormal snapshot of the stored log existing in the database; and if the duplication does not exist, storing the log to be stored and the abnormal snapshot of the log to be stored into the database. Through the mode, the method and the system can reduce the workload of developers, reduce the expenditure of the server, and improve the working efficiency and the stability of the terminal system.
Description
Technical Field
The invention relates to the technical field of network security, in particular to a repeated log filtering method of a terminal.
Background
The Log is a Log which is often said by us, and is usually a record of some processing which is completed by a system or some software, so that the Log is used as a reference when an exception occurs in the future to solve a software bug. Due to the existence of the log, a developer of the system and the software can quickly locate and solve the problem after the abnormality occurs, and the log plays a vital role in maintaining the system and the software.
At present, although there are many applications capable of automatically capturing abnormal logs at a mobile phone end, when an abnormality occurs, logs related to the abnormality can be automatically stored and uploaded to a server, and then an engineer can solve the problem according to the uploaded logs. However, because the system is not generating logs all the time, the log file is very complicated, and when an exception occurs repeatedly, the application will continuously upload the repeated logs to the server, which causes data redundancy and wastes a lot of time for the engineer to analyze the logs.
Disclosure of Invention
The technical problem mainly solved by the invention is to provide a repeated log filtering method for a terminal, which can reduce the workload of developers, reduce the expenditure of servers and improve the working efficiency and the stability of a terminal system.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is a method for filtering a duplicate log of a terminal, the method including: acquiring a log to be stored, which is generated in the running process of a terminal and has an abnormal record; extracting identification information capable of uniquely identifying the abnormality from the log to be stored; generating an abnormal snapshot of the log to be stored by utilizing the identification information; comparing whether the abnormal snapshot of the log to be stored is repeated with the abnormal snapshot of the stored log existing in the database; and if the duplication does not exist, storing the log to be stored and the abnormal snapshot of the log to be stored into the database.
In order to solve the technical problem, the invention adopts another technical scheme that: provided is a method for filtering a duplicate log of a terminal, the method including: acquiring a log to be stored, which is generated in the running process of a terminal and has an abnormal record; extracting identification information capable of uniquely identifying the abnormality from the log to be stored; generating an abnormal snapshot of the log to be stored by utilizing the identification information; sending the abnormal snapshot of the log to be stored to a server; judging whether a control instruction fed back by the server based on the abnormal snapshot of the log to be stored is an uploading instruction or a giving up instruction; if the command is an uploading command, uploading the log to be stored and the abnormal snapshot of the log to be stored to the server; and if the command is a abandoning command, the log to be stored is not uploaded to the server, and the abnormal snapshot of the log to be stored is uploaded to the server.
In order to solve the technical problem, the invention adopts another technical scheme that: provided is a method for filtering a duplicate log of a terminal, the method including: receiving an abnormal snapshot of a log to be stored from a terminal; comparing whether the abnormal snapshot of the log to be stored is repeated with the abnormal snapshot of the stored log existing in the database; if the log is not repeated, sending an uploading instruction to the terminal to instruct the terminal to upload the log to be stored and the abnormal snapshot of the log to be stored; and if the log is repeated, sending a abandon instruction to the terminal to indicate that the terminal does not upload the log to be stored and the abnormal snapshot of the log to be stored.
The invention has the beneficial effects that: different from the situation of the prior art, the log to be stored, which is generated in the running process of the terminal and recorded with the abnormality, is obtained, the identification information capable of uniquely identifying the abnormality is extracted from the log to be stored, the identification information is further utilized to generate the abnormal snapshot of the log to be stored, whether the abnormal snapshot of the log to be stored and the abnormal snapshot of the stored log existing in the database are repeated or not is compared, if the abnormal snapshot of the log to be stored and the abnormal snapshot of the log to be stored do not exist, the log to be stored and the abnormal snapshot of the log to be stored are stored in the database, so that the expense of a server is reduced, and the working efficiency and the stability of.
Drawings
Fig. 1 is a schematic flow chart of a first embodiment of a duplicate log filtering method of a terminal according to the present invention;
FIG. 2 is a flowchart illustrating a duplicate log filtering method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating a third embodiment of a duplicate log filtering method of a terminal according to the present invention;
FIG. 4 is a flowchart illustrating a fourth embodiment of a duplicate log filtering method of a terminal according to the present invention;
FIG. 5 is a schematic diagram of a terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an embodiment of the server according to the present invention.
Detailed Description
Referring to fig. 1, fig. 1 is a flowchart illustrating a duplicate log filtering method of a terminal according to a first embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 1 if the results are substantially the same. As shown in fig. 1, the method comprises the steps of:
s101: and acquiring a log to be stored, in which an abnormal log is recorded, generated in the running process of the terminal.
The Log is also a Log, and is usually a record of some processing that has been completed by a system or some software for future reference, and it has no fixed format, usually a text file, and can be opened by using a notepad to view contents, and of course, it is likely to be in other formats, and it is a messy code when directly opened. Most logs can see their role from the filename, such as uninstantall log or error log, although the former is usually a record generated during the installation of software so as to be available to the uninstaller for future uninstallation, and the latter is usually used to record some error information during the operation of software.
The terminal can be a Mobile phone, a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID, Mobile Internet Device), a wearable Device (smart watch, smart bracelet) or other terminal devices.
First, a problem needs to be described, in which log files generated by logs to be stored with the same abnormality may be different. This is because besides the exception information, a large amount of dynamic information such as exception time, instant process number, dynamic memory address, etc. is recorded in the log file, and these changed data may cause a same exception, which occurs at different times and the generated logs are different.
Further, since the terminal device does not have a function of detecting an abnormal log, the terminal device needs to register a corresponding service when the terminal device wants to acquire information of the log to be stored, in which an abnormality is recorded, generated during the operation process. Specifically, after the Android (Android) device registers the DropBox, the DropBox manager in the Android system sends a DropBox broadcast, and the Android device can obtain a log to be stored, in which an exception is recorded.
S102: identification information capable of uniquely identifying an anomaly is extracted from a log to be stored.
In which, because the logs to be stored have the same exception, the generated log files may be different. Therefore, the identification information capable of uniquely identifying the abnormity in the log to be stored can be extracted, and the identification information capable of uniquely identifying the abnormity does not comprise the dynamic information of the log.
S103: and generating an abnormal snapshot of the log to be stored by utilizing the identification information.
And simplifying the identification information according to a preset simplification rule. Specifically, whether the identification information contains a specific symbol is judged first; if the specific symbol is included, the specific symbol is removed. Wherein the specific symbol includes a space, etc.
Further, the identification information is associated with the name of the abnormal application package corresponding to the abnormality and the system version number of the operating system operated by the terminal, and is used as an abnormal snapshot of the log to be stored. Specifically, the identification information is connected with the name of the abnormal application packet and the system version number of the operating system run by the terminal, so as to form a complete abnormal snapshot of a character string type.
S104: and comparing whether the abnormal snapshot of the log to be stored is repeated with the abnormal snapshot of the stored log existing in the database.
The abnormal snapshot of the stored log in the database comprises identification information capable of uniquely identifying the abnormality, an abnormal application package name corresponding to the abnormality and a system version number of an operating system operated by the terminal. Specifically, the comparison process is to compare the identification information capable of uniquely identifying the abnormality of the log to be stored and the stored log existing in the database, the name of the abnormal application packet corresponding to the abnormality, and the system version number of the operating system run by the terminal.
S105: and if the duplication does not exist, storing the log to be stored and the abnormal snapshot of the log to be stored into the database.
Specifically, if the only difference between the log to be stored and the stored log is only the difference between the dynamic information, the system considers the log to be stored and the stored log as a duplicate log.
S106: and if the log to be stored and the abnormal snapshot of the log to be stored are repeated, not storing the log to be stored and the abnormal snapshot of the log to be stored to the database.
In the embodiment, a log to be stored, in which an exception is recorded, generated in the operation process of the terminal is obtained, identification information capable of uniquely identifying the exception is extracted from the log to be stored, an exception snapshot of the log to be stored is generated by using the identification information, whether the exception snapshot of the log to be stored is repeated with an exception snapshot of a stored log existing in a database is compared, and if the exception snapshot of the log to be stored is not repeated, the log to be stored and the exception snapshot of the log to be stored are stored in the database, so that the expense of a server is reduced, and the work efficiency and the stability of a terminal system are improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a duplicate log filtering method according to a second embodiment of the present invention. The embodiment is a specific embodiment of extracting identification information capable of uniquely identifying an anomaly from a log to be stored, and the method comprises the following steps:
s201: and determining the type of the abnormity according to the log to be stored.
Specifically, the types of the exceptions determined by the log to be stored can be specifically divided into an Exception at the Application layer (JaveException), an Exception at the local layer (Native Exception), and an Exception without response by the Application (Application notransition).
S202: an extraction rule is determined according to the type of the anomaly.
Specifically, the rule for extracting the anomaly of the application layer is as follows: and judging each row of the abnormal information twice, firstly judging whether the abnormal information starts from at, and then judging whether the abnormal information contains the name of the error application packet. Because the stack information of the exception is at the beginning of the at and is the position of the exception occurrence code, the exception can be uniquely identified; after the packet name of the error application is included, some irrelevant contents can be removed, and abnormal snapshots can be simplified.
Specifically, the extraction rule of the anomaly of the local stratum is as follows: the abnormal information is judged for each line, the line beginning from "# 00", "01" or "# 02" is extracted, and the symbols such as blank spaces are removed. Since the anomaly information important for the type of anomaly of the local layer is concentrated in the three rows, the contents of the three rows can be taken as the main body of the anomaly snapshot.
Specifically, the extraction rule applying the no-response exception is: the abnormal information is judged for each line, the line from the beginning of "executing" is extracted, and the symbols such as spaces are removed.
S203: and extracting the identification information from the log to be stored according to the extraction rule.
One specific implementation manner is that the abnormal information in the log to be stored is scanned line by line, whether the abnormal information of the current line includes a specific mark corresponding to the extraction rule is judged, and if the abnormal information of the current line includes the specific mark, the abnormal information of the current line is extracted as the identification information.
Specifically, the row extracted by the anomaly of the application layer contains at beginning and error application package name at the same time; the row extracted by the abnormity of the stratum comprises a row beginning from "# 00", "01" and "# 02"; the row extracted by the application of the unresponsive exception contains the beginning of "executing".
In one specific embodiment, taking the Android device as an example, when an application layer of the Android device is abnormal, a DropBox manager of the Android system sends a DropBox broadcast. The information obtained in the DropBox broadcast is integrated to obtain the following piece of exception information.
Type:Java Exception
(JE),Time:20161008091222866,PackageName:com.dropboxtest2.tester ror,Tag:data_app_crash,Pid:0000,
Process:com.dropboxtest2.testerror
Flags:0x38e8be46
Package:com.dropboxtest2.testerror v1(1.0)
Build:TCL/5080X/shine_lite:6.0/MRA58K/v2CA6-0:user/release-keys
java.lang.NullPointerException:Attempt to invoke virtual method'intjava.lang.String.length()'on a null object reference
at
com.dropboxtest2.testerror.MainActivity.onClick(MainActivity.java:71)
at android.view.View.performClick(View.java:5265)
at android.view.View$PerformClick.run(View.java:21534)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5774)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.ja va:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Firstly extracting the name of an abnormal application package corresponding to the abnormality as follows: com. dropoxtest 2. testror. Then each line is scanned again, and the data meeting the two conditions is stored: beginning with at and containing the name of the error application package. Removing symbols such as spaces from the lines meeting the two conditions, and storing the obtained identification information in the character string Logbody:
atcom.dropboxtest2.testerror.MainActivity.onClick(MainActivity.java:71)
then, the Logbody of the character string, the name of the abnormal application packet corresponding to the abnormality, and the system version number of the operating system run by the terminal are connected together by "═ to" to form a character string abnormal snapshot, and the final abnormal snapshot result is:
TCL/5080X/shine_lite:6.0/MRA58K/v2CA6-0:user/release-keys===com.dropboxtest2.testerror===atcom.dropboxtest2.testerror.MainActivity.onClick(MainActivity.java:71)。
and finally, comparing the abnormal snapshot with the abnormal snapshot of the stored log existing in the database, if the comparison result is inconsistent, uploading the abnormal snapshot and the log to be stored corresponding to the abnormal snapshot to the database, otherwise, not uploading.
In the embodiment, the system determines the type of the abnormality according to the log to be stored, further determines the extraction rule according to the type of the abnormality, extracts the identification information from the log to be stored according to the extraction rule, can quickly extract the identification information capable of uniquely identifying the abnormality, reduces the workload of developers, reduces the expenditure of servers, and improves the working efficiency.
Referring to fig. 3, fig. 3 is a flowchart illustrating a duplicate log filtering method according to a third embodiment of the present invention. The implementation mode is one of implementation modes which mainly comprises a terminal, and the method comprises the following steps:
s301: and acquiring a log to be stored, in which an abnormal log is recorded, generated in the running process of the terminal.
S302: identification information capable of uniquely identifying an anomaly is extracted from a log to be stored.
One embodiment of extracting identification information capable of uniquely identifying an anomaly is as follows: determining the type of the abnormity according to the log to be stored, then determining an extraction rule according to the type of the abnormity, and finally extracting the identification information from the log to be stored according to the extraction rule.
Specifically, one of the embodiments of extracting the identification information from the log to be stored according to the extraction rule is as follows: scanning abnormal information in a log to be stored line by line, judging whether the abnormal information of the current line contains a specific mark corresponding to the extraction rule, and if the abnormal information of the current line contains the specific mark, extracting the abnormal information of the current line as identification information.
S303: and generating an abnormal snapshot of the log to be stored by utilizing the identification information.
And judging whether the identification information contains a specific symbol or not, and removing the specific symbol if the identification information contains the specific symbol. Specifically, the specific symbol is a space or the like.
And associating the identification information with the name of the abnormal application packet corresponding to the abnormality and the system version number of the operating system operated by the terminal, and taking the name as an abnormal snapshot of the log to be stored.
S304: and sending the abnormal snapshot of the log to be stored to a server.
S305: and judging whether the control instruction fed back by the server based on the abnormal snapshot of the log to be stored is an uploading instruction or a giving up instruction.
S306: and if the command is an uploading command, uploading the log to be stored and the abnormal snapshot of the log to be stored to the server.
S307: and if the command is a abandoning command, the log to be stored is not uploaded to the server, and the abnormal snapshot of the log to be stored is uploaded to the server.
In the embodiment, the log to be stored, in which an exception is recorded, generated in the operation process of the terminal is obtained, the identification information capable of uniquely identifying the exception is extracted from the log to be stored, the identification information is further used for generating an exception snapshot of the log to be stored, whether the exception snapshot of the log to be stored is repeated with an exception snapshot of a stored log existing in the database is compared, and if the exception snapshot of the log to be stored is not repeated, the log to be stored and the exception snapshot of the log to be stored are stored in the database, so that the expense of the server is reduced, and the work efficiency and the stability of the terminal system are improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a duplicate log filtering method according to a fourth embodiment of the present invention. The implementation mode is one of implementation modes which mainly comprises a server, and the method comprises the following steps:
s401: and receiving the abnormal snapshot of the log to be stored from the terminal.
S402: and comparing whether the abnormal snapshot of the log to be stored is repeated with the abnormal snapshot of the stored log existing in the database.
S403: and if the log is not repeated, sending an uploading instruction to the terminal to instruct the terminal to upload the log to be stored and the abnormal snapshot of the log to be stored.
S404: and if the log is repeated, sending a abandon instruction to the terminal to indicate that the terminal does not upload the log to be stored and the abnormal snapshot of the log to be stored.
In the embodiment, the log to be stored, in which an exception is recorded, generated in the operation process of the terminal is obtained, the identification information capable of uniquely identifying the exception is extracted from the log to be stored, the identification information is further used for generating an exception snapshot of the log to be stored, whether the exception snapshot of the log to be stored is repeated with an exception snapshot of a stored log existing in the database is compared, and if the exception snapshot of the log to be stored is not repeated, the log to be stored and the exception snapshot of the log to be stored are stored in the database, so that the expense of the server is reduced, and the work efficiency and the stability of the terminal system are improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention. In this embodiment, the terminal 50 is the terminal in the above embodiment, and the terminal 50 includes a first processor 51, a first memory 52, a first receiver 53, and a first transmitter 54.
The first memory 52 is used for storing an operating system, instructions executed by the first processor 51, received messages, and the like.
The first receiver 53 is used to receive server instructions.
The first transmitter 54 is used to upload the log to be stored and the abnormal snapshot of the log to be stored.
The first processor 51 is configured to obtain a log to be stored, in which an exception is recorded, generated in an operation process of the terminal; extracting identification information capable of uniquely identifying the abnormality from the log to be stored; generating an abnormal snapshot of the log to be stored by utilizing the identification information; sending the abnormal snapshot of the log to be stored to a server; judging whether a control instruction fed back by the server based on the abnormal snapshot of the log to be stored is an uploading instruction or a giving up instruction; if the command is an uploading command, uploading the log to be stored and the abnormal snapshot of the log to be stored to the server; and if the command is a abandoning command, the log to be stored is not uploaded to the server, and the abnormal snapshot of the log to be stored is uploaded to the server.
The first processor 51 is further configured to determine a type of the exception according to the log to be stored; determining an extraction rule according to the type of the abnormality; and extracting the identification information from the log to be stored according to the extraction rule.
Further, the first processor 51 is further configured to scan the abnormal information in the log to be stored line by line; judging whether the abnormal information of the current line contains a specific mark corresponding to the extraction rule; and if the specific mark is included, extracting the abnormal information of the current line as the identification information.
Further, the first processor 51 is further configured to determine whether the identification information includes a specific symbol; if the specific symbol is included, the specific symbol is removed.
Further, the first processor 51 is further configured to associate the identification information with an abnormal application package name corresponding to the abnormality and a system version number of an operating system run by the terminal, and use the association as an abnormal snapshot of the log to be stored.
In the embodiment, the log to be stored, in which an exception is recorded, generated in the operation process of the terminal is obtained, the identification information capable of uniquely identifying the exception is extracted from the log to be stored, the identification information is further used for generating an exception snapshot of the log to be stored, whether the exception snapshot of the log to be stored is repeated with an exception snapshot of a stored log existing in the database is compared, and if the exception snapshot of the log to be stored is not repeated, the log to be stored and the exception snapshot of the log to be stored are stored in the database, so that the expense of the server is reduced, and the work efficiency and the stability of the terminal system are improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a server according to an embodiment of the present invention. In this embodiment, the terminal 60 is the server in the above embodiment, and the server 60 includes a second processor 61, a second memory 62, a second receiver 63, and a second transmitter 64.
The second memory 62 is used for storing an operating system, instructions executed by the second processor 61, received messages, and the like.
The second receiver 63 is configured to receive an abnormal snapshot of the log to be stored from the terminal.
The second transmitter 64 is for transmitting an upload instruction and a discard instruction.
The second processor 61 is configured to compare whether an abnormal snapshot of the log to be stored is repeated with an abnormal snapshot of a stored log existing in the database; if the log is not repeated, sending an uploading instruction to the terminal to instruct the terminal to upload the log to be stored and the abnormal snapshot of the log to be stored; and if the log is repeated, sending a abandon instruction to the terminal to indicate that the terminal does not upload the log to be stored and the abnormal snapshot of the log to be stored.
In the embodiment, the log to be stored, in which an exception is recorded, generated in the operation process of the terminal is obtained, the identification information capable of uniquely identifying the exception is extracted from the log to be stored, the identification information is further used for generating an exception snapshot of the log to be stored, whether the exception snapshot of the log to be stored is repeated with an exception snapshot of a stored log existing in the database is compared, and if the exception snapshot of the log to be stored is not repeated, the log to be stored and the exception snapshot of the log to be stored are stored in the database, so that the expense of the server is reduced, and the work efficiency and the stability of the terminal system are improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (6)
1. A method for filtering repeated logs of a terminal is characterized by comprising the following steps:
acquiring a log to be stored, in which an exception is recorded, generated in the running process of the terminal;
extracting identification information capable of uniquely identifying the abnormality from the log to be stored;
generating an abnormal snapshot of the log to be stored by using the identification information;
comparing whether the abnormal snapshot of the log to be stored is repeated with the abnormal snapshot of the stored log existing in the database;
if the log to be stored and the abnormal snapshot of the log to be stored do not exist, storing the log to be stored and the abnormal snapshot of the log to be stored to the database;
the step of extracting identification information capable of uniquely identifying the anomaly from the log to be stored includes:
determining the type of the abnormity according to the log to be stored;
determining an extraction rule according to the type of the abnormality;
extracting the identification information from the log to be stored according to the extraction rule;
the step of extracting the identification information from the log to be stored according to the extraction rule comprises the following steps:
scanning the abnormal information in the log to be stored line by line;
judging whether the abnormal information of the current line contains a specific mark corresponding to the extraction rule;
and if the specific mark is included, extracting the abnormal information of the current line as the identification information.
2. The method according to claim 1, wherein the step of generating the abnormal snapshot of the log to be stored by using the identification information comprises:
and simplifying the identification information according to a preset simplification rule.
3. The method according to claim 2, wherein the step of reducing the identification information according to a predetermined reduction rule comprises:
judging whether the identification information contains a specific symbol or not;
and if the specific symbol is contained, removing the specific symbol.
4. The method according to claim 1, wherein the step of generating the abnormal snapshot of the log to be stored by using the identification information comprises:
and associating the identification information with the name of the abnormal application packet corresponding to the abnormality and the system version number of the operating system operated by the terminal, and taking the associated identification information as the abnormal snapshot of the log to be stored.
5. A method for filtering repeated logs of a terminal is characterized by comprising the following steps:
acquiring a log to be stored, in which an exception is recorded, generated in the running process of the terminal;
extracting identification information capable of uniquely identifying the abnormality from the log to be stored;
generating an abnormal snapshot of the log to be stored by using the identification information;
sending the abnormal snapshot of the log to be stored to the server;
judging whether a control instruction fed back by the server based on the abnormal snapshot of the log to be stored is an uploading instruction or a giving up instruction;
if the log is an uploading instruction, uploading the log to be stored and the abnormal snapshot of the log to be stored to the server;
if the command is a abandoning command, the log to be stored and the abnormal snapshot of the log to be stored are not uploaded to the server;
the step of extracting identification information capable of uniquely identifying the anomaly from the log to be stored includes:
determining the type of the abnormity according to the log to be stored;
determining an extraction rule according to the type of the abnormality;
extracting the identification information from the log to be stored according to the extraction rule;
the step of extracting the identification information from the log to be stored according to the extraction rule further comprises:
scanning the abnormal information in the log to be stored line by line;
judging whether the abnormal information of the current line contains a specific mark corresponding to the extraction rule;
and if the specific mark is included, extracting the abnormal information of the current line as the identification information.
6. The method of claim 5, wherein the step of generating the abnormal snapshot of the log to be stored by using the identification information comprises:
judging whether the identification information contains a specific symbol or not;
if the specific symbol is contained, removing the specific symbol;
the step of generating the abnormal snapshot of the log to be stored by using the identification information includes:
and associating the identification information with the name of the abnormal application packet corresponding to the abnormality and the system version number of the operating system operated by the terminal, and taking the associated identification information as the abnormal snapshot of the log to be stored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710233039.1A CN107171825B (en) | 2017-04-11 | 2017-04-11 | Repeated log filtering method for terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710233039.1A CN107171825B (en) | 2017-04-11 | 2017-04-11 | Repeated log filtering method for terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107171825A CN107171825A (en) | 2017-09-15 |
CN107171825B true CN107171825B (en) | 2020-09-25 |
Family
ID=59849627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710233039.1A Active CN107171825B (en) | 2017-04-11 | 2017-04-11 | Repeated log filtering method for terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107171825B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446329B (en) * | 2018-02-13 | 2021-03-12 | 北京工业大数据创新中心有限公司 | Adaptive database partitioning method and system for industrial time sequence database |
CN108932305A (en) * | 2018-06-12 | 2018-12-04 | 北京顶象技术有限公司 | A kind of data processing method, device, electronic equipment and storage medium |
CN109101644A (en) * | 2018-08-21 | 2018-12-28 | 上海新炬网络信息技术股份有限公司 | A kind of sound state journal file scanning collecting method |
CN111190871A (en) * | 2019-12-18 | 2020-05-22 | 中移(杭州)信息技术有限公司 | Log generation method and device, computer equipment and storage medium |
CN111324482A (en) * | 2020-03-24 | 2020-06-23 | 李勉勉 | Computer application program running data fault processing system |
CN112100025A (en) * | 2020-08-25 | 2020-12-18 | 北京明略昭辉科技有限公司 | Log simplifying method and device, electronic equipment and computer readable medium |
CN112273366A (en) * | 2020-10-28 | 2021-01-29 | 玉林市农业科学院(广西农业科学院玉林分院) | Method and system for ecologically repelling birds by agricultural unmanned aerial vehicle in rice direct seeding cultivation |
CN112579611B (en) * | 2020-12-29 | 2024-03-19 | 珠海金山数字网络科技有限公司 | Data processing method and device |
CN112685277B (en) * | 2020-12-31 | 2023-01-24 | 海光信息技术股份有限公司 | Warning information checking method and device, electronic equipment and readable storage medium |
CN112764963A (en) * | 2021-01-29 | 2021-05-07 | 恒鸿达科技有限公司 | Method, device, equipment and medium for automatically collecting abnormal log information |
CN112764962B (en) * | 2021-01-29 | 2022-05-17 | 恒鸿达科技有限公司 | Tracking method and system for application version exception recovery |
CN115454954B (en) * | 2022-08-31 | 2023-07-25 | 上海移柯通信技术股份有限公司 | Data processing method, system and device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3810577B2 (en) * | 1999-03-26 | 2006-08-16 | 株式会社日立製作所 | Directory synchronization method |
CN101996233A (en) * | 2009-08-11 | 2011-03-30 | 国际商业机器公司 | Method and system for replicating deduplicated data |
CN103716174A (en) * | 2012-10-09 | 2014-04-09 | 鸿富锦精密工业(深圳)有限公司 | Test log acquisition system and method for the same |
CN105515847A (en) * | 2015-12-02 | 2016-04-20 | 深圳Tcl数字技术有限公司 | Terminal fault processing method, device and system |
CN105656699A (en) * | 2016-03-29 | 2016-06-08 | 网宿科技股份有限公司 | Alarm management method and system for content distribution network |
-
2017
- 2017-04-11 CN CN201710233039.1A patent/CN107171825B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3810577B2 (en) * | 1999-03-26 | 2006-08-16 | 株式会社日立製作所 | Directory synchronization method |
CN101996233A (en) * | 2009-08-11 | 2011-03-30 | 国际商业机器公司 | Method and system for replicating deduplicated data |
CN103716174A (en) * | 2012-10-09 | 2014-04-09 | 鸿富锦精密工业(深圳)有限公司 | Test log acquisition system and method for the same |
CN105515847A (en) * | 2015-12-02 | 2016-04-20 | 深圳Tcl数字技术有限公司 | Terminal fault processing method, device and system |
CN105656699A (en) * | 2016-03-29 | 2016-06-08 | 网宿科技股份有限公司 | Alarm management method and system for content distribution network |
Also Published As
Publication number | Publication date |
---|---|
CN107171825A (en) | 2017-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107171825B (en) | Repeated log filtering method for terminal | |
CN108491199B (en) | Method and terminal for automatically generating interface | |
US8140908B2 (en) | System and method of client side analysis for identifying failing RAM after a user mode or kernel mode exception | |
US20180357154A1 (en) | Automatically Running Tests Against WEB APIs Based on Specifications | |
EP2798494B1 (en) | Virtual channel for embedded process communication | |
EP2990942B1 (en) | Service extraction and application composition | |
WO2019169761A1 (en) | Automated testing method and apparatus, and storage medium | |
US8645938B2 (en) | System and method for replacing code | |
CN106708704B (en) | Method and device for classifying crash logs | |
CN113867913A (en) | Business request processing method, device, equipment and storage medium for microservice | |
CN110222119B (en) | Data conversion synchronization method, equipment and storage medium for heterogeneous database | |
WO2017020459A1 (en) | Method and apparatus for configuring plugin package for host | |
CN110727581B (en) | Crash positioning method and electronic equipment | |
US20180025162A1 (en) | Application program analysis apparatus and method | |
CN106326129A (en) | Program abnormity information generating method and device | |
CN108062714B (en) | Annuity data sending method and device, computer equipment and storage medium | |
CN112860645A (en) | Processing method and device for offline compressed file, computer equipment and medium | |
CN111782520A (en) | Test method and device and electronic equipment | |
CN113360379B (en) | Program test environment creation method and program test environment creation apparatus | |
CN109254856B (en) | Method for providing interface to client by intelligent POS server | |
CN111158777A (en) | Component calling method and device and computer readable storage medium | |
JP6055366B2 (en) | Virtual Web server program and function substitution method | |
CN112559248B (en) | Preprocessing service recovery method, device, equipment and storage medium | |
CN106557379B (en) | Method and device for generating silent installation package | |
CN113010434A (en) | System and method for realizing lightweight application point burying |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200907 Address after: 315000 10 / F, No. 5, Lane 999, Yangfan Road, hi tech Zone, Ningbo City, Zhejiang Province Applicant after: TCL mobile communication technology (Ningbo) Co.,Ltd. Address before: 518063 Guangdong city of Shenzhen province Nanshan District ten South Road West High Technology South Road North Tower B 16 floor TCL Applicant before: Jiekai communication (Shenzhen) Co.,Ltd. |
|
TA01 | Transfer of patent application right |