CN107436836A - The processing method and relevant device of a kind of journal file - Google Patents
The processing method and relevant device of a kind of journal file Download PDFInfo
- Publication number
- CN107436836A CN107436836A CN201710483339.5A CN201710483339A CN107436836A CN 107436836 A CN107436836 A CN 107436836A CN 201710483339 A CN201710483339 A CN 201710483339A CN 107436836 A CN107436836 A CN 107436836A
- Authority
- CN
- China
- Prior art keywords
- bug
- information
- classification
- log files
- sample log
- 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.)
- Withdrawn
Links
- 238000003672 processing method Methods 0.000 title abstract description 5
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 41
- 238000000034 method Methods 0.000 claims abstract description 32
- 238000012545 processing Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 10
- 238000000605 extraction Methods 0.000 claims 1
- 230000007547 defect Effects 0.000 abstract description 5
- 238000011160 research Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/865—Monitoring of software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Storage Device Security (AREA)
Abstract
The embodiment of the invention discloses a kind of processing method of journal file and terminal, wherein method includes:Server obtains a sample journal file, and a sample journal file is respectively the journal file that b terminal device uploads;C leak bug information is extracted from a sample journal file;Using each bug information in the c bug information as the input of hash algorithm, c cryptographic Hash is calculated;Identical cryptographic Hash in the c cryptographic Hash is counted, obtains the bug quantity of each bug classification in d bug classification and d bug classification, wherein a, b, c, d are positive integer, and d is less than or equal to c.Using the embodiment of the present invention, the bug classification that statistics obtains and the bug quantity that bug classifies can be utilized to determine using existing common defects, to help research staff to solve a fairly large number of bug information of bug occur.
Description
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a method for processing a log file and a related device.
Background
With the rapid development of the internet and the continuous improvement of the living standard of people, more and more electronic products are applied to the daily life of people, in particular to mobile phones. In order to meet the increasing material demand of people, research and development personnel also research and develop various application programs so as to enrich the application and entertainment of people.
In practice, it is found that many users have long time for using the mobile phone and high use frequency, and the mobile phone generates a large amount of log files in the operation process. At present, no scheme exists how to arrange log files and obtain relevant effective data to help find common defects of application programs.
Disclosure of Invention
The embodiment of the invention provides a log file processing method, which can find the commonly existing bug defects according to the counted bug number of bug classification so as to more quickly find and solve the commonly existing bug information.
In a first aspect, an embodiment of the present invention provides a method for processing a log file, where the method includes:
obtaining a sample log files, wherein the a sample log files are respectively log files uploaded by b terminal devices;
c loophole bug information is extracted from the a sample log files;
taking each of the c pieces of bug information as the input of a hash algorithm, and calculating to obtain c hash values;
and counting the same hash value in the c hash values to obtain d bug classifications and the number of bugs in each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is less than or equal to c.
In some possible embodiments, the extracting c vulnerability bug information from the a sample log files includes: deleting redundant information in each sample log file in the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
In some possible embodiments, the redundant information comprises any one or more of: time information, thread information, category information, location information.
In some possible embodiments, the hash algorithm may comprise any one of: the second version of the information digest algorithm MD2, the fourth version of the information digest algorithm MD4, the fifth version of the information digest algorithm MD5 and the secure hash algorithm SHA.
In some possible embodiments, the method further comprises: and if the number of the bugs of the target bug classification exceeds the preset number, sending bug notification information to a pre-stored contact person to notify the bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
In some possible embodiments, the method further comprises: and if the number of the bugs of the target bug classification exceeds the preset bug number, deleting the bug information of the bug number corresponding to the target bug classification so as to reserve one bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
In a second aspect, an embodiment of the present invention provides a server, where the server includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a sample log files which are respectively log files uploaded by b terminal devices;
the extracting unit is used for extracting c loophole bug information from the a sample log files;
the computing unit is used for respectively taking each piece of bug information in the c pieces of bug information as the input of a hash algorithm and obtaining c hash values through computing;
and the counting unit is used for counting the same hash value in the c hash values to obtain d bug classifications and the bug number of each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is less than or equal to c.
In some possible embodiments, the apparatus may further include means for performing any one of the methods of the first aspect, which is not described herein again.
In a third aspect, an embodiment of the present invention provides another server, where the server includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to the first aspect.
The method comprises the steps that a sample log files are obtained through a server, the sample log files are respectively log files uploaded by b terminal devices, then c loophole bug information is extracted from the sample log files, then each bug information in the c bug information is used as the input of a hash algorithm to obtain c hash values through calculation, finally the same hash values in the c hash values are counted to obtain d bug classifications and the number of bugs in each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is smaller than or equal to c; therefore, bug defects commonly occurring in the b terminal devices can be counted, and people can be helped to solve corresponding bug information more quickly and efficiently.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for processing a log file according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a log file containing redundant information according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of bug information provided by an embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram of a method for processing a log file according to another embodiment of the present invention;
FIG. 5 is a schematic block diagram of a server provided by an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a server provided by another embodiment of the present invention;
fig. 7 is a schematic block diagram of a server according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the terminals described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
Referring to fig. 1, it is a schematic flowchart of a method for processing a log file according to an embodiment of the present invention, where the method may include:
step S101, a server obtains a sample log files, wherein the a sample log files are respectively log files uploaded by b terminal devices.
In the embodiment of the invention, when the APP installed on the terminal equipment is abnormal, the user of the terminal agrees and confirms that the abnormal occurrence of the terminal can generate a corresponding log file, and the log file is uploaded to the server through the network. Or, the terminal device may directly generate a corresponding log file according to the running status (which may include an allowed exception) of the application program. Alternatively, the generated log file may be transmitted to a server through a network.
Accordingly, the server may receive log files transmitted by the terminals. Specifically, the server may receive a sample log files sent by b terminal devices, where a and b are positive integers and a is not less than b. I.e. one terminal device may generate/transmit one or more sample log files.
In order to save transmission resources, the sample log files sent by the terminal device are compressed sample log files. That is, the server can calculate a compressed sample log files sent by b terminal devices, and further can obtain a sample log files by decompression.
The terminal device includes, but is not limited to, a user device, a smart phone (such as an Android phone, an IOS phone, etc.), a personal computer, a tablet computer, a palmtop computer, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable smart device, and the like.
And S102, the server extracts c vulnerability bug information from the a sample log files.
In some embodiments, the sample log file may include bug information, normal operation information, such as startup information, shutdown information, transaction operation information, time information, log storage path information (i.e., location information), thread information (i.e., a thread to which the current operation belongs, which may be a number), category information (i.e., a category to which the current code line belongs), and may further include other information, which is not limited in the present invention.
In one embodiment of step S102, the server deletes redundant information in each sample log file of the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
Specifically, the server may delete redundant information in each of the a sample log files, and extract c pieces of bug information from the redundant information. Alternatively, one log file may have a plurality of error-reporting bug information. Multiple identical error-reporting bug information may appear in one or more log files. In order to avoid repeated recording, the server can clear factor information influencing deduplication, such as time information, thread information and other redundant information except bug information. Referring specifically to fig. 2, a schematic diagram of a log file containing redundant information is shown, wherein the information contained in the black-colored line frame is the removable redundant information.
Further, the server may segment the log file after removing the redundant information according to a keyword (e.g., "far export") to obtain c pieces of bug information, where each bug information may be presented in a text form with a set format, for example, each bug information is stored as a TXT text, that is, each segmented text with a set format includes one bug information. Specifically, fig. 3 shows a schematic diagram of bug information, which is stored and presented in txt text form.
In some embodiments, a and c are positive integers, and a may be greater than c or less than or equal to c. The redundant information may refer to information other than bug information, and may include time information, thread information, category information, location information, and the like, which is not limited in the embodiment of the present invention.
Step S103, the server takes each of the c pieces of bug information as the input of a hash algorithm respectively, and c hash values are obtained through calculation.
Specifically, the server may calculate each of the c pieces of bug information by using a hash algorithm, so as to obtain c hash values correspondingly. I.e. one bug information corresponds to one hash value. The hash value is unique, that is, the hash value calculated by the same bug information is the same, and the hash value calculated by different bug information is also different.
For example, referring to the bug information shown in fig. 3, as an input of a hash algorithm (e.g., MD5, fifth edition of information digest algorithm), the hash value calculated by the MD5 algorithm may be "fab 6750e0a5c743f5b9a426e7e636a8 e".
In some embodiments, the hash algorithm may include an information digest algorithm MD and a secure hash algorithm SHA, such as commonly used algorithms MD2, MD4, MD5, SHA-1, and the like, which are not limited in the embodiments of the present invention.
In some embodiments, the server may delete the bug information corresponding to the same hash value obtained by calculation, and reserve a copy of the bug information. That is, the server reserves a piece of corresponding bug information for each hash value, so as to save space and memory.
Step S104, the server counts the same hash value in the c hash values to obtain d bug classifications and the bug number of each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is smaller than or equal to c.
Specifically, the server may count the c hash values, search whether a record related to each hash value of the c hash values exists in a pre-stored database, and if a record related to a certain hash value exists, directly increase the number of corresponding records on the hash value record; if there is no record for a hash value, the hash value is recorded in the database. That is, the server may classify the same hash value into a bug classification according to the c hash values and the corresponding bug information, and count the number of times of occurrence of the same hash value as the bug number of the bug classification; if no identical hash value is classified as another bug classification, the number of bugs in the other bug classification is 1.
For example, it is assumed that the server extracts 10 pieces of bug information, wherein the first 5 pieces of bug information are the same bug information 1, the last 3 pieces of bug information are bug information 2, and the sixth and seventh pieces of bug information are bug information 3 and bug information 4, respectively. Correspondingly, the server sequentially calculates the 10 bug information by using the MD5 algorithm to obtain 10 hash values, which are: hash1, hash1, hash1, hash1, hash1, hash3, hash4, hash2, hash2, hash 2. The server can count accordingly: and 4 types of bugs appear on the terminal equipment, namely 4 bug classifications are obtained, namely bug information 1, bug information 2, bug information 3 and bug information 4. And the number of bugs of each type of bug can be obtained, namely the number of bugs of each bug classification in 4 bug classifications is respectively 5 times when the bug information 1 appears, 3 times when the bug information 2 appears, and 1 time when the bug information 3 and the bug information 4 appear.
In some embodiments, further comprising: and if the number of the bugs of the target bug classification exceeds the preset bug number, deleting the bug information of the bug number corresponding to the target bug classification so as to keep one bug information corresponding to the target bug classification. That is, in order to save memory resources, the server may reserve and store one copy of the bug information with the same hash value, and delete the redundant bug information to remove duplicate and save space memory.
In some embodiments, further comprising: and if the number of the bugs of the target bug classification exceeds a preset threshold value, sending bug notification information to a pre-stored contact person to notify the bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
Specifically, when target bug classifications corresponding to bug numbers exceeding a preset threshold exist, bug notification information is sent to a pre-stored contact person to notify the corresponding research and development of bug information corresponding to the target bug classifications. The pre-stored contacts here may comprise any one or more of the following: pre-storing a mailbox, a phone number, a QQ contact, a WeChat contact, etc., which is not limited in the present invention.
The method comprises the steps that a sample log files are obtained through a server, the sample log files are respectively log files uploaded by b terminal devices, then c loophole bug information is extracted from the sample log files, then each bug information in the c bug information is used as the input of a hash algorithm to obtain c hash values through calculation, finally the same hash values in the c hash values are counted to obtain d bug classifications and the number of bugs in each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is smaller than or equal to c; therefore, bug defects commonly occurring in the b terminal devices can be counted, and people can be helped to solve corresponding bug information more quickly and efficiently.
Referring to fig. 4, a schematic flowchart of a method for processing a log file according to another embodiment of the present invention is shown, where the method includes the following implementation steps:
step S201, the server obtains a sample log files, where the a sample log files are respectively log files uploaded by b terminal devices.
Step S202, the server deletes redundant information in each sample log file in the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
In some embodiments, the redundant information comprises any one or more of: time information, thread information, category information, location information.
Step S203, the server takes each of the c pieces of bug information as an input of a hash algorithm, and calculates c hash values.
In some embodiments, the hashing algorithm may comprise any one of: the second version of the information digest algorithm MD2, the fourth version of the information digest algorithm MD4, the fifth version of the information digest algorithm MD5 and the secure hash algorithm SHA.
Step S204, the server counts the same hash value in the c hash values to obtain d bug classifications and the bug number of each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is smaller than or equal to c.
Step S205, if the number of the bugs of the target bug classification exceeds a preset threshold, sending bug notification information to a pre-stored contact person to notify that the bug information corresponding to the target bug classification is solved, wherein the target bug classification is the bug classification in the d bug classifications.
It should be noted that, the content not described in fig. 4 may specifically refer to the related description in the embodiment of fig. 1, and is not described again here.
Referring to fig. 5, which is a schematic block diagram of a server according to an embodiment of the present invention, the server 50 may include an obtaining unit 501, an extracting unit 502, a calculating unit 503, and a counting unit 504; wherein,
the obtaining unit 501 is configured to obtain a sample log files, where the a sample log files are log files uploaded by b terminal devices respectively;
the extracting unit 502 is configured to extract c vulnerability bug information from the a sample log files;
the calculating unit 503 is configured to calculate c hash values by taking each of the c pieces of bug information as an input of a hash algorithm;
the counting unit 504 is configured to count the same hash value of the c hash values to obtain d bug classifications and the number of bugs in each of the d bug classifications, where a, b, c, and d are positive integers, and d is smaller than or equal to c.
Referring to fig. 6 together, which is a schematic block diagram of a server according to another embodiment of the present invention, the server 50 may include the obtaining unit 501, the extracting unit 502, the calculating unit 503, and the counting unit 504 in fig. 5; wherein,
the extracting unit 502 is specifically configured to delete redundant information in each sample log file of the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
In some possible embodiments, a notification unit 505 is further included, wherein:
the notifying unit 505 is configured to send bug notification information to a pre-stored contact if the number of bugs in the target bug classification exceeds a preset number, so as to notify that the bug information corresponding to the target bug classification is solved, where the target bug classification is a bug classification in the d bug classifications.
It should be noted that, the content not described in fig. 5 or fig. 6 may specifically refer to the description related to the embodiment described in fig. 1 and fig. 4, and is not described again here.
Fig. 7 is a schematic block diagram of a server according to another embodiment of the present invention. The server 50 in the present embodiment as shown in the figure may include: one or more processors 801; one or more input devices 802, one or more output devices 803, and memory 804. The processor 801, the input device 802, the output device 803, and the memory 804 described above are connected by a bus 805. The memory 802 is used to store instructions and the processor 801 is used to execute instructions stored by the memory 802. Wherein the processor 801 is configured to:
obtaining a sample log files, wherein the a sample log files are respectively log files uploaded by b terminal devices;
c loophole bug information is extracted from the a sample log files;
taking each of the c pieces of bug information as the input of a hash algorithm, and calculating to obtain c hash values;
and counting the same hash value in the c hash values to obtain d bug classifications and the number of bugs in each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is less than or equal to c.
In some possible embodiments, extracting c vulnerability bug information from the a sample log files includes: deleting redundant information in each sample log file in the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
In some possible embodiments, the redundant information comprises any one or more of: time information, thread information, category information, location information.
In some possible embodiments, the hash algorithm may comprise any one of: the second version of the information digest algorithm MD2, the fourth version of the information digest algorithm MD4, the fifth version of the information digest algorithm MD5 and the secure hash algorithm SHA.
In some possible embodiments, the processor 801 is further configured to: and if the number of the bugs of the target bug classification exceeds the preset number, sending bug notification information to a pre-stored contact person to notify the bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
In some possible embodiments, the processor 801 is further configured to: and if the number of the bugs of the target bug classification exceeds the preset bug number, deleting the bug information of the bug number corresponding to the target bug classification so as to reserve one bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
It should be understood that in the present embodiment, the Processor 801 may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 802 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 803 may include a display (LCD, etc.), a speaker, etc.
The memory 804 may include both read-only memory and random access memory, and provides instructions and data to the processor 801. A portion of the memory 804 may also include non-volatile random access memory. For example, the memory 804 may also store device type information.
In a specific implementation, the processor 801, the input device 802, and the output device 803 described in this embodiment of the present invention may execute the implementation manners described in the first embodiment and the second embodiment of the log file processing method provided in this embodiment of the present invention, and may also execute the implementation manners of the terminal described in this embodiment of the present invention, which is not described herein again.
In a further embodiment of the invention, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, performs any of the steps in the method embodiments described above.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for processing a log file, the method comprising:
obtaining a sample log files, wherein the a sample log files are respectively log files uploaded by b terminal devices;
c loophole bug information is extracted from the a sample log files;
taking each of the c pieces of bug information as the input of a hash algorithm, and calculating to obtain c hash values;
and counting the same hash value in the c hash values to obtain d bug classifications and the number of bugs in each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is less than or equal to c.
2. The method according to claim 1, wherein the extracting c vulnerability bug information from the a sample log files comprises:
deleting redundant information in each sample log file in the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
3. The method of claim 1, wherein the redundant information comprises any one or more of: time information, thread information, category information, location information.
4. The method of claim 1, wherein the hash algorithm comprises any one of the following: the second version of the information digest algorithm MD2, the fourth version of the information digest algorithm MD4, the fifth version of the information digest algorithm MD5 and the secure hash algorithm SHA.
5. The method according to any one of claims 1-4, further comprising:
and if the number of the bugs of the target bug classification exceeds a preset threshold value, sending bug notification information to a pre-stored contact person to notify the bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
6. A server, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a sample log files which are respectively log files uploaded by b terminal devices;
the extracting unit is used for extracting c loophole bug information from the a sample log files;
the computing unit is used for respectively taking each piece of bug information in the c pieces of bug information as the input of a hash algorithm and obtaining c hash values through computing;
and the counting unit is used for counting the same hash value in the c hash values to obtain d bug classifications and the bug number of each bug classification in the d bug classifications, wherein a, b, c and d are positive integers, and d is less than or equal to c.
7. The server according to claim 6,
the extraction unit is specifically configured to delete redundant information in each sample log file of the a sample log files to obtain c pieces of bug information; wherein the redundant information is information other than the bug information.
8. The server according to claim 6 or 7, further comprising:
and the notification unit is used for sending bug notification information to a pre-stored contact person if the number of the bugs of the target bug classification exceeds the preset number so as to notify the bug information corresponding to the target bug classification, wherein the target bug classification is the bug classification in the d bug classifications.
9. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710483339.5A CN107436836A (en) | 2017-06-22 | 2017-06-22 | The processing method and relevant device of a kind of journal file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710483339.5A CN107436836A (en) | 2017-06-22 | 2017-06-22 | The processing method and relevant device of a kind of journal file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107436836A true CN107436836A (en) | 2017-12-05 |
Family
ID=60458644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710483339.5A Withdrawn CN107436836A (en) | 2017-06-22 | 2017-06-22 | The processing method and relevant device of a kind of journal file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107436836A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111400185A (en) * | 2020-03-18 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Memory leak processing method and device, readable medium and electronic equipment |
CN111899097A (en) * | 2018-12-28 | 2020-11-06 | 创新先进技术有限公司 | Method and system for accepting block link deposit certificate transaction |
CN113254329A (en) * | 2021-04-30 | 2021-08-13 | 展讯通信(天津)有限公司 | Bug processing method, system, equipment and storage medium based on machine learning |
CN113342632A (en) * | 2021-07-07 | 2021-09-03 | 北京物芯科技有限责任公司 | Simulation data automatic processing method and device, electronic equipment and storage medium |
-
2017
- 2017-06-22 CN CN201710483339.5A patent/CN107436836A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111899097A (en) * | 2018-12-28 | 2020-11-06 | 创新先进技术有限公司 | Method and system for accepting block link deposit certificate transaction |
CN111899097B (en) * | 2018-12-28 | 2023-10-27 | 创新先进技术有限公司 | Method and system for accepting blockchain certification transaction |
CN111400185A (en) * | 2020-03-18 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Memory leak processing method and device, readable medium and electronic equipment |
CN113254329A (en) * | 2021-04-30 | 2021-08-13 | 展讯通信(天津)有限公司 | Bug processing method, system, equipment and storage medium based on machine learning |
CN113342632A (en) * | 2021-07-07 | 2021-09-03 | 北京物芯科技有限责任公司 | Simulation data automatic processing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160239724A1 (en) | Systems and methods for inferential sharing of photos | |
CN109376645B (en) | Face image data optimization method and device and terminal equipment | |
CN107181858B (en) | Method and terminal for displaying notification message | |
CN106951550B (en) | Data processing method and device and mobile terminal | |
CN107612908B (en) | Web page tampering monitoring method and device | |
CN107436836A (en) | The processing method and relevant device of a kind of journal file | |
CN106991179B (en) | Data deleting method and device and mobile terminal | |
CN108717516B (en) | File labeling method, terminal and medium | |
CN108304274A (en) | A kind of method of information exchange, server and computer-readable medium | |
CN108959565A (en) | Method, device and server for filtering webpage content | |
WO2015196981A1 (en) | Method and device for recognizing picture junk files | |
CN108520063B (en) | Event log processing method and device and terminal equipment | |
CN109783321B (en) | Monitoring data management method and device and terminal equipment | |
Riadi et al. | Forensic Mobile Analysis on Social Media Using National Institute Standard of Technology Method. | |
CN107332988A (en) | Information processing method, mobile terminal, and computer-readable storage medium | |
CN109104481B (en) | File integrity detection method, file integrity detection device and terminal equipment | |
CN107302617A (en) | A kind of data managing method and terminal | |
CN108536512B (en) | Interface switching method and device and terminal equipment | |
CN111309511A (en) | Application running data processing method and device and terminal | |
US9858413B1 (en) | Reduction of false positives in malware detection using file property analysis | |
CN106657316B (en) | Message withdrawing method and device | |
CN111124841B (en) | Alarm method and device for abnormal page and computer system | |
CN106202551A (en) | A file management method, device and mobile terminal | |
CN107580030B (en) | Data management method and device and server | |
CN111611417B (en) | Image de-duplication method, device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20171205 |
|
WW01 | Invention patent application withdrawn after publication |