CN108197013A - log processing method, device, terminal device and storage medium - Google Patents

log processing method, device, terminal device and storage medium Download PDF

Info

Publication number
CN108197013A
CN108197013A CN201711431937.4A CN201711431937A CN108197013A CN 108197013 A CN108197013 A CN 108197013A CN 201711431937 A CN201711431937 A CN 201711431937A CN 108197013 A CN108197013 A CN 108197013A
Authority
CN
China
Prior art keywords
daily record
configuration file
terminal device
crawl
running state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711431937.4A
Other languages
Chinese (zh)
Other versions
CN108197013B (en
Inventor
郑灿杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711431937.4A priority Critical patent/CN108197013B/en
Publication of CN108197013A publication Critical patent/CN108197013A/en
Application granted granted Critical
Publication of CN108197013B publication Critical patent/CN108197013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3409Recording 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 for performance assessment
    • G06F11/3414Workload generation, e.g. scripts, playback
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present application discloses a kind of log processing method, device, terminal device and storage medium, and this method includes monitoring the running state parameter of terminal device;If detecting that the running state parameter meets preset condition, daily record crawl configuration file corresponding with the running state parameter is obtained;Daily record crawl configuration file is parsed, carries out daily record crawl according to analysis result, this programme improves the treatment effeciency of daily record data, reduces the power consumption of terminal device.

Description

Log processing method, device, terminal device and storage medium
Technical field
The invention relates to computer technology more particularly to a kind of log processing method, device, terminal device and deposit Storage media.
Background technology
With the raising of terminal device popularity, more and more user's using terminal equipment perform various work( It can be to meet self-demand, such as using terminal equipment reads word, viewing video, listens to music, plays game, correspondingly, to end The stability of end equipment operation also proposed higher requirement.
In the prior art, log system records the operating status and operation information of various programs in the form of daily record, passes through The reason of its journal file generated can be found that program operation exception, however the log processing mode of existing log system is deposited In defect so that log processing inefficiency, it is impossible to meet analysis demand.
Invention content
The present invention provides a kind of log processing method, device, terminal device and storage medium, this programme improves daily record The treatment effeciency of data reduces the power consumption of terminal device.
In a first aspect, the embodiment of the present application provides a kind of log processing method, including:
The running state parameter of terminal device is monitored;
If detecting that the running state parameter meets preset condition, obtain corresponding with the running state parameter Daily record captures configuration file;
Daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
Second aspect, the embodiment of the present application additionally provide a kind of log processing device, including:
Module is monitored, is monitored for the running state parameter to terminal device;
If configuration module for detecting that the running state parameter meets preset condition, obtains and the operation The corresponding daily record crawl configuration file of state parameter;
For being parsed to daily record crawl configuration file, daily record crawl is carried out according to analysis result for handling module.
The third aspect, the embodiment of the present application additionally provide a kind of terminal device, including:Processor, memory and storage On a memory and the computer program that can run on a processor, the processor are realized such as when performing the computer program Log processing method described in the embodiment of the present application.
Fourth aspect, the embodiment of the present application additionally provide a kind of storage medium for including terminal device executable instruction, institute Terminal device executable instruction is stated when being performed by terminal device processor for performing the daily record described in the embodiment of the present application Reason method.
In the present solution, the running state parameter to terminal device is monitored, if detecting the running state parameter Meet preset condition, then obtain daily record crawl configuration file corresponding with the running state parameter, daily record crawl is matched It puts file to be parsed, carries out daily record crawl according to analysis result, this programme improves the treatment effeciency of daily record data, reduces The power consumption of terminal device.
Description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, of the invention is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of log processing method provided by the embodiments of the present application;
Fig. 2 is the flow chart of another log processing method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another log processing method provided by the embodiments of the present application;
Fig. 4 is the flow chart of another log processing method provided by the embodiments of the present application;
Fig. 5 is the flow chart of another log processing method provided by the embodiments of the present application;
Fig. 6 is a kind of structure diagram of log processing device provided by the embodiments of the present application;
Fig. 7 is a kind of structure diagram of terminal device provided by the embodiments of the present application.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used to explain the present invention rather than limitation of the invention.It also should be noted that for the ease of retouching It states, part related to the present invention rather than entire infrastructure is illustrated only in attached drawing.
Fig. 1 is a kind of flow chart of log processing method provided by the embodiments of the present application, is applicable to terminal device The situation that daily record data is handled, this method can be performed by terminal device provided by the embodiments of the present application, which sets Software can be used in standby log processing device and/or the mode of hardware is realized, as shown in Figure 1, specific side provided in this embodiment Case is as follows:
Step S101, the running state parameter of terminal device is monitored.
Wherein, the running state parameter include CPU operating statuses, memory operating status, display screen state, it is integrated not With the operating status of hardware and at least one of the operating status of application program of operation.
If step S102, detecting that the running state parameter meets preset condition, obtain and the operating status The corresponding daily record crawl configuration file of parameter.
Wherein, which can be that the system that detects interim card or screen blank screen occurs, application program without response simultaneously Sudden strain of a muscle is moved back or some hardware capability occur it is abnormal etc., illustratively, can be by using for interim card event in the present embodiment StickMode classes set thread inspection policies or virtual machine inspection policies to carry out interim card detection, such as:
It can also be by using TraceView, AndroidPerformanceMonitor or ANR-WatchDog detecting system Whether interim card is occurred.
Wherein, for daily record crawl configuration file for being captured to the journal file in terminal device, journal file is to use In the record file or file set of record system operatio event, event log and message logging can be divided into, there is processing to go through Important function, the research staff such as history data, the tracking for diagnosing problem and the activity for understanding system can pass through the daily record to packing File is analyzed the various functions to optimize terminal device.
In one embodiment, the mapping table according to the running state parameter and storage determines corresponding daily record Configuration file is captured, i.e. daily record crawl configuration file can be configured according to different running state parameters, can be grabbed by daily record The different parameters item in configuration file is taken to combine to realize.Specifically, parameter combination includes daily record switch arrange parameter, Log Types The various combination of parameter, daily record operating parameter and daily record debugging instruction.
Wherein, daily record switch arrange parameter is used to indicate the log switches for needing to open, and log switches can be corresponding after opening The permission progress log acquisitions for obtaining log are opened, specifically, being represented by:<LogKey type=" xxx " name=" xxx " Value=" xx "/>, wherein parameter type represent log switch type, parameter name represent log switch title, parameter Value represents the value (being turned on and off for setting) of log switches, wherein, the type of log switches is divided into opening for specific function It closes, attribute switch, dynamic log is switched and file Node Switch.The log types to be captured since different operating parameters are corresponding can Can be different, therefore Log Types parameter is contained in configuration process, it is represented by:<LogCollectType type= " xxx " name=" xxx " value=" true | false "/>, wherein, parameter type represents the log types to be collected, parameter Name represents typonym, and whether parameter value representatives collect, and log Log Types include routine log types, record screen log classes Type, the event type (critical event recorded in crucial log, not comprising detailed log contents) of key log, key log it is detailed Thin log types (the detailed Log contents recorded in crucial Log), tcpDump types (convenient for analysis network problem), state snapshot Type (operating status of reaction system), systrace types (being used for the problem of analytical performance is related), interim card monitoring log types (monitoring to interim card), power consumption log types (log needed for power consumption monitoring and power consumption class case study), tripartite log types (are divided Analyse the particular demands log of tripartite's application) etc..Wherein, daily record operating parameter is exemplary for specifically gatherer process to be configured , form is as follows:
Wherein, parameter typeName is represented calls corresponding resolver to parse configuration item according to title, optionally, includes solution The version information of parser, parameter configltem represent customized detailed configuration item, illustratively, corresponding log daily records class When type is systrace types, it is (corresponding that typeName, that is, systrace, configItem item include showToastTip ConfigItem value are true | false is used to indicate whether unlatching systrace suspended windows, and true shows suspended window, False is not shown then), continuousLog (corresponding configItem value be true | false is used to indicate whether Lasting cycle crawl systrace, true represents lasting and grabs that false is just automatically stopped crawl after then grabbing one time), (corresponding configItem value are the duration calculated by the second to durationTime, and being used to indicate every part of systrace will grab The duration taken, gives tacit consent to 10S, and maximum is no more than 30S).For another example when corresponding log Log Types are DeviceLog types, phase The typeName answered i.e. DeviceLog, configItem item include fileSize, and (corresponding configItem value are MB is the numerical value of unit, is used to indicate the largest amount of every part of device log), fileNumber (corresponding configItem Value is the file format of crawl, is not stopped actively if being used to indicate, and the log for having grabbed specified file quantity stops crawl), EnableNRT (corresponding configItem value are true | false, when being used to indicate crawl log, if open NRT moulds Formula) etc..Wherein, daily record debugging instruction can be embodied based on the form of combination script command, specifically, reference example is as follows:
Wherein, cmd is configured to the order that log tools is needed to perform.
Step S103, daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
After being parsed to daily record crawl configuration file, the daily record switch recorded in the configuration file obtained according to parsing is set Scene of the various combination of parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction based on configuration is put to carry out Daily record captures.Optionally, it is described to include according to analysis result progress daily record crawl:According to analysis result determine use one or Multiple log concentrators carry out daily record crawl by one or more of log concentrators.Wherein, log concentrator is inherited from AbsLogCollector, is set for different Log Types, and power consumption log types as the aforementioned correspond to log concentrator PowerLogCollector, systrace type correspond to log concentrator SystraceCollector, by these for not Specific daily record crawl is realized with the log concentrator that Log Types are separately provided, to improve daily record crawl efficiency.Optionally, institute State daily record crawl terminate after, further include:Automatic packaging is carried out to crawl content and is uploaded.
As shown in the above, log processing method disclosed in this programme can be directed to the different operating statuses of terminal device Parameter carries out targetedly daily record and captures, and log processing efficiency significantly improves, also allow for developer subsequently to journal file into Row analysis.
Fig. 2 is the flow chart of another log processing method provided by the embodiments of the present application, optionally, the acquisition and institute The corresponding daily record crawl configuration file of running state parameter is stated to include:It is closed according to the mapping of the running state parameter and storage It is that table determines corresponding daily record crawl configuration file, wherein, the mapping table record has different running state parameters and each Self-corresponding daily record captures configuration file, and the daily record crawl configuration file includes daily record switch arrange parameter, Log Types ginseng Number, daily record operating parameter and daily record debugging instruction.Match in acquisition daily record crawl corresponding with the running state parameter Before putting file, further include:Different function scene creation daily record crawl configuration file based on terminal device, and establish operation shape The matching relationship of state parameter and function scene.As shown in Fig. 2, technical solution is specific as follows:
Step S201, the different function scene creation daily record crawl configuration file based on terminal device.
Wherein, the different parameters combination captured by daily record in configuration file can set daily record crawl configuration file and terminal Standby different function scene is corresponding, such as " WLAN scenes ", " GPS scenes ", " audio scene ", " camera scene " or " bluetooth field Scape " etc., daily record crawl configuration file can be presented with xml formatted files, such as:LogConfig.xml.Illustratively, with " camera shooting For first show scape ", the different configuration groups conjunction in corresponding daily record crawl configuration file is used to indicate the daily record of crawl camera, camera Software log and the running log of app comprising camera function etc. and the associated hardware of camera (such as sensor, processing chip) With software (system camera, third party app) daily record.Different daily record configuration item combinations can be daily record switch arrange parameter, day The various combination of will type parameter, daily record operating parameter and daily record debugging instruction.
Step S202, running state parameter and the matching relationship of function scene are established.
Wherein, different running state parameters corresponds to different function scenes, as the running state parameter of camera corresponds to " camera scene ", wireless network operating parameter correspond to " WLAN scenes " etc., and the matching of running state parameter and function scene is closed System can pass through the formal definition of mapping table.
Step S203, the running state parameter of terminal device is monitored.
If step S204, detecting that the running state parameter meets preset condition, join according to the operating status Number and the mapping table of storage determine corresponding daily record crawl configuration file.
Step S205, daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
It can be seen from the above, it is monitored in this programme by the running state parameter to terminal device, different operation shapes State parameter and different function scenes are corresponding, and then targetedly journal file captures based on different function Scene realizations, Convenient for the analysis of journal file, crawl it is with strong points, treatment effeciency significantly improves.
Fig. 3 is the flow chart of another log processing method provided by the embodiments of the present application, optionally, described to be based on terminal The different function scene creation daily record crawl configuration file of equipment includes:The different hardware establishment integrated based on terminal device and institute State the daily record crawl configuration file of hardware context.As shown in figure 3, technical solution is specific as follows:
Step S301, it is created based on the different hardware that terminal device integrates and the daily record of hardware context crawl configuration is literary Part.
Illustratively, by taking the camera that terminal device integrates as an example, the daily record crawl configuration text based on camera can be established Part is simultaneously stored and is loaded and matched according to the daily record when corresponding running state parameter meets condition in case subsequently listening to Put file carry out daily record crawl, wherein, based on hardware can also be fingerprint module etc..It is corresponding in daily record configuration file Be configured based on the log parameters of camera and its associated software, corresponding daily record switch is set to open, Log Types Parameter can be the event type of crucial log and/or interim card monitoring log types.Thus during daily record crawl is carried out, only needle The daily record for opening (the opening daily record crawl permission) hardware device of daily record switch and the associated application program of setting is grabbed Take the realization targetedly log collection based on scene.
Step S302, the mapping table of hardware running state parameter and scene and storage are established.
Illustratively, can be that the running state parameter of " camera " and " camera scene " correspond to, " fingerprint module " Running state parameter and " fingerprint module scene ", the running state parameter of " wireless network card " and " WLAN scenes " are corresponding etc..
Step S303, the running state parameter of terminal device is monitored.
If step S304, detecting that the running state parameter meets preset condition, join according to the operating status Number and the mapping table of storage determine corresponding daily record crawl configuration file.
Step S305, daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
It can be seen from the above, the different hardware that this programme can be directed to terminal device carries out targetedly daily record crawl, improve Log processing efficiency, it is with strong points.
Fig. 4 is the flow chart of another log processing method provided by the embodiments of the present application, optionally, described to be based on terminal The different function scene creation daily record crawl configuration file of equipment includes:Obtain installing terminal equipment application program, based on should With the corresponding daily record crawl configuration file of the different classes of establishment of program.As shown in figure 4, technical solution is specific as follows:
Step S401, the application program of installing terminal equipment is obtained, the different classes of establishment based on application program is corresponding Daily record captures configuration file.
Wherein, different classes of can be classification that different function based on application program divides, and such as social class is applied, news Class application, game class application, office class application etc..By taking classification of playing as an example, the application program that can be directed to game class carries out daily record The setting of configuration file is captured, such as 5 game class app are installed in terminal device, then daily record switch arrange parameter respectively will The switches of this 5 applications are set to open state, and Log Types parameter can be state snapshot type and/or power consumption log types, thus To realize that the application for game class captures corresponding journal file for subsequent analysis.
Step S402, the running state parameter of different application and the mapping table of scene and storage are established.
Illustratively, by taking application program A as an example, after the classification for determining application program A, by the operating status of the application program Parameter and category scene are corresponded to, and such as detect that interim card occurs in application program A, then corresponding scene is application program A classes Other classification scene.
Step S403, the running state parameter of terminal device is monitored.
If step S404, detecting that the running state parameter meets preset condition, join according to the operating status Number and the mapping table of storage determine corresponding daily record crawl configuration file.
Step S405, daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
It can be seen from the above, carrying out corresponding daily record for application program different classes of in terminal device captures configuration file Setting, the journal file of the category thus can be captured based on different application classification, without all or carry out daily record one by one is adopted Collection improves daily record crawl efficiency.
Fig. 5 is the flow chart of another log processing method provided by the embodiments of the present application, optionally, described to be based on terminal The different function scene creation daily record crawl configuration file of equipment includes:The usage record of terminal device is obtained, is made based on described Corresponding daily record crawl configuration file is created with record.As shown in figure 5, technical solution is specific as follows:
Step S501, the usage record of terminal device is obtained, corresponding daily record crawl is created based on the usage record and matches Put file.
Wherein, which can be that the different hardware of user's using terminal equipment or the frequency of application record, according to Frequency record sets corresponding daily record crawl configuration file, illustratively, is set for before frequency collating 30% application program Put corresponding daily record configuration file.
Step S502, the running state parameter of terminal device is monitored.
If step S503, detecting that the running state parameter meets preset condition, join according to the operating status Number determines corresponding daily record crawl configuration file.
Illustratively, which can be that system interim card occurs, then is can determine accordingly based on usage record The daily record crawl configuration file of establishment is analysis object, and corresponding daily record crawl processing is performed after being parsed.
Step S504, daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
It can be seen from the above, the usage record according to terminal device carries out the configuration of daily record crawl configuration file accordingly, Targetedly daily record can be carried out during daily record crawl based on the usage record of user to capture, and only acquire the common program phase of user The daily record of pass improves daily record crawl efficiency.
Fig. 6 is a kind of structure diagram of log processing device provided by the embodiments of the present application, and the device is above-mentioned for performing The log processing method that embodiment provides, has the corresponding function module of execution method and advantageous effect.As shown in fig. 6, the dress It puts and specifically includes:Module 101, configuration module 102 and handling module 103 are monitored, wherein,
Module 101 is monitored, is monitored for the running state parameter to terminal device.
Wherein, the running state parameter include CPU operating statuses, memory operating status, display screen state, it is integrated not With the operating status of hardware and at least one of the operating status of application program of operation.
If configuration module 102 for detecting that the running state parameter meets preset condition, obtains and the fortune The corresponding daily record crawl configuration file of row state parameter.
Wherein, for daily record crawl configuration file for being captured to the journal file in terminal device, journal file is to use In the record file or file set of record system operatio event, event log and message logging can be divided into, there is processing to go through Important function, the research staff such as history data, the tracking for diagnosing problem and the activity for understanding system can pass through the daily record to packing File is analyzed the various functions to optimize terminal device.
In one embodiment, the mapping table according to the running state parameter and storage determines corresponding daily record Configuration file is captured, i.e. daily record crawl configuration file can be configured according to different running state parameters, can be grabbed by daily record The different parameters item in configuration file is taken to combine to realize.Specifically, parameter combination includes daily record switch arrange parameter, Log Types The various combination of parameter, daily record operating parameter and daily record debugging instruction.
Wherein, which can be that the system that detects interim card or screen blank screen occurs, application program without response simultaneously Sudden strain of a muscle is moved back or exception etc. occurs in some hardware capability.
Handling module 103 for being parsed to daily record crawl configuration file, carries out daily record according to analysis result and grabs It takes.
After being parsed to daily record crawl configuration file, the daily record switch recorded in the configuration file obtained according to parsing is set Scene of the various combination of parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction based on configuration is put to carry out Daily record captures.Optionally, it is described to include according to analysis result progress daily record crawl:According to analysis result determine use one or Multiple log concentrators carry out daily record crawl by one or more of log concentrators.Wherein, log concentrator is inherited from AbsLogCollector, is set for different Log Types, and power consumption log types as the aforementioned correspond to log concentrator PowerLogCollector, systrace type correspond to log concentrator SystraceCollector, by these for not Specific daily record crawl is realized with the log concentrator that Log Types are separately provided, to improve daily record crawl efficiency.Optionally, institute State daily record crawl terminate after, further include:Automatic packaging is carried out to crawl content and is uploaded.
As shown in the above, log processing method disclosed in this programme can be directed to the different operating statuses of terminal device Parameter carries out targetedly daily record and captures, and log processing efficiency significantly improves, also allow for developer subsequently to journal file into Row analysis.
In a possible embodiment, the configuration module 102 is specifically used for:
Mapping table according to the running state parameter and storage determines corresponding daily record crawl configuration file, In, the mapping table record has different running state parameters and corresponding daily record crawl configuration file, the daily record It captures configuration file and includes daily record switch arrange parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction.
In a possible embodiment, the configuration module 102 is additionally operable to:
Before acquisition daily record crawl configuration file corresponding with the running state parameter, based on terminal device The daily record of different function scene creation captures configuration file, and establishes running state parameter and the matching relationship of function scene.
In a possible embodiment, the configuration module 102 is specifically used for:
It is created based on the different hardware that terminal device integrates and the daily record of the hardware context captures configuration file.
In a possible embodiment, the configuration module 102 is specifically used for:
The application program of installing terminal equipment is obtained, the corresponding daily record crawl of the different classes of establishment based on application program is matched Put file.
In a possible embodiment, the configuration module 102 is specifically used for:
The usage record of terminal device is obtained, creates corresponding daily record crawl configuration file based on the usage record.
In a possible embodiment, the handling module 103 is specifically used for:
The one or more log concentrators used are determined according to analysis result, pass through one or more of log collections Device carries out daily record crawl;
The device further includes uploading module 104 and is used for:
After the progress daily record crawl according to analysis result, crawl content is packaged and is uploaded.
The present embodiment provides a kind of terminal device on the basis of the various embodiments described above, and Fig. 7 is that the embodiment of the present application carries The structure diagram of a kind of terminal device supplied, as shown in fig. 7, the terminal device 200 includes:Memory 201, processor (Central Processing Unit, CPU) 202, Peripheral Interface 203, RF (Radio Frequency, radio frequency) circuit 205, Voicefrequency circuit 206, loud speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch screen 212, other Input/control devices 210 and outside port 204, these components are led to by one or more communication bus or signal wire 207 Letter.
It should be understood that graphic terminal 200 is only an example of terminal device, and terminal device 200 Can have than more or less components shown in figure, two or more components can be combined or can be with It is configured with different components.Various parts shown in figure can be including one or more signal processings and/or special Hardware, software including integrated circuit are realized in the combination of hardware and software.
Just the terminal device of rights management provided in this embodiment for more opening application is described in detail below, should Terminal device is by taking smart mobile phone as an example.
Memory 201, the memory 201 can be by access such as CPU202, Peripheral Interfaces 203, and the memory 201 can To include high-speed random access memory, nonvolatile memory can also be included, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU202 and deposited by Peripheral Interface 203, the Peripheral Interface 203 Reservoir 201.
I/O subsystems 209, the I/O subsystems 209 can be by the input/output peripherals in equipment, such as touch screen 212 With other input/control devicess 210, it is connected to Peripheral Interface 203.I/O subsystems 209 can include 2091 He of display controller For controlling one or more input controllers 2092 of other input/control devicess 210.Wherein, one or more input controls Device 2092 processed receives electric signal from other input/control devicess 210 or sends electric signal to other input/control devicess 210, Other input/control devicess 210 can include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks idler wheel.What deserves to be explained is input controller 2092 can with it is following any one connect:Keyboard, infrared port, The indicating equipment of USB interface and such as mouse.
Touch screen 212, the touch screen 212 are the input interface and output interface between user terminal and user, can User is shown to depending on output, visual output can include figure, text, icon, video etc..
Display controller 2091 in I/O subsystems 209 receives electric signal from touch screen 212 or is sent out to touch screen 212 Electric signals.Touch screen 212 detects the contact on touch screen, and the contact detected is converted to and shown by display controller 2091 The interaction of user interface object on touch screen 212, that is, realize human-computer interaction, the user interface being shown on touch screen 212 Icon that object can be the icon of running game, be networked to corresponding network etc..What deserves to be explained is equipment can also include light Mouse, light mouse are the extensions for not showing the touch sensitive surface visually exported or the touch sensitive surface formed by touch screen.
RF circuits 205 are mainly used for establishing the communication of mobile phone and wireless network (i.e. network side), realize mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuits 205 receive and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 205 convert electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuits 205 can include performing The known circuit of these functions includes but not limited to antenna system, RF transceivers, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 206 is mainly used for receiving audio data from Peripheral Interface 203, which is converted to telecommunications Number, and the electric signal is sent to loud speaker 211.
Loud speaker 211 for the voice signal for receiving mobile phone from wireless network by RF circuits 205, is reduced to sound And play the sound to user.
Power management chip 208, the hardware for being connected by CPU202, I/O subsystem and Peripheral Interface are powered And power management.
The log processing device and terminal device of the terminal device provided in above-described embodiment can perform of the invention arbitrary real The log processing method for the terminal device that example is provided is applied, has and performs the corresponding function module of this method and advantageous effect.Not The technical detail of detailed description in the above-described embodiments, reference can be made to the daily record for the terminal device that any embodiment of the present invention is provided Processing method.
The embodiment of the present application also provides a kind of storage medium for including terminal device executable instruction, and the terminal device can When being performed by terminal device processor for performing a kind of log processing method, this method includes execute instruction:
The running state parameter of terminal device is monitored;
If detecting that the running state parameter meets preset condition, obtain corresponding with the running state parameter Daily record captures configuration file;
Daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
In a possible embodiment, it is described to obtain daily record crawl configuration file corresponding with the running state parameter Including:
Mapping table according to the running state parameter and storage determines corresponding daily record crawl configuration file, In, the mapping table record has different running state parameters and corresponding daily record crawl configuration file, the daily record It captures configuration file and includes daily record switch arrange parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction.
In a possible embodiment, daily record crawl configuration text corresponding with the running state parameter is obtained described Before part, further include:
Different function scene creation daily record crawl configuration file based on terminal device, and establish running state parameter and work( The matching relationship of energy scene.
In a possible embodiment, the different function scene creation daily record crawl configuration text based on terminal device Part includes:
It is created based on the different hardware that terminal device integrates and the daily record of the hardware context captures configuration file.
In a possible embodiment, the different function scene creation daily record crawl configuration text based on terminal device Part includes:
The application program of installing terminal equipment is obtained, the corresponding daily record crawl of the different classes of establishment based on application program is matched Put file.
In a possible embodiment, the different function scene creation daily record crawl configuration text based on terminal device Part includes:
The usage record of terminal device is obtained, creates corresponding daily record crawl configuration file based on the usage record.
In a possible embodiment, it is described to include according to analysis result progress daily record crawl:
The one or more log concentrators used are determined according to analysis result, pass through one or more of log collections Device carries out daily record crawl;
Correspondingly, after the progress daily record crawl according to analysis result, further include:
Crawl content is packaged and is uploaded.
Storage medium --- any various types of memory devices or storage device.Term " storage medium " is intended to wrap It includes:Install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (such as hard disk or optical storage);Memory component of register or other similar types etc..Storage medium can further include other The memory or combination of type.In addition, storage medium can be located at program in the first computer system being wherein performed, Or can be located in different second computer systems, second computer system is connected to the by network (such as internet) One computer system.Second computer system can provide program instruction and be used to perform to the first computer." storage is situated between term Matter " can include may reside in different location two of (such as in different computer systems by network connection) or More storage mediums.Storage medium can store the program instruction that can be performed by one or more processors and (such as implement For computer program).
Certainly, a kind of storage medium for including computer executable instructions that the embodiment of the present application is provided, computer The log processing method operation that executable instruction is not limited to the described above, can also be performed what any embodiment of the present invention was provided Relevant operation in log processing method.
Note that it above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The present invention is not limited to specific embodiment described here, can carry out for a person skilled in the art various apparent variations, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also It can include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

1. log processing method, which is characterized in that including:
The running state parameter of terminal device is monitored;
If detecting that the running state parameter meets preset condition, daily record corresponding with the running state parameter is obtained Capture configuration file;
Daily record crawl configuration file is parsed, daily record crawl is carried out according to analysis result.
2. according to the method described in claim 1, it is characterized in that, described obtain daily record corresponding with the running state parameter Crawl configuration file includes:
Mapping table according to the running state parameter and storage determines corresponding daily record crawl configuration file, wherein, The mapping table record has different running state parameters and corresponding daily record crawl configuration file, the daily record crawl Configuration file includes daily record switch arrange parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction.
3. according to the method described in claim 1, it is characterized in that, obtain day corresponding with the running state parameter described Before will crawl configuration file, further include:
Different function scene creation daily record crawl configuration file based on terminal device, and establish running state parameter and function field The matching relationship of scape.
4. the according to the method described in claim 3, it is characterized in that, different function scene creation day based on terminal device Will crawl configuration file includes:
It is created based on the different hardware that terminal device integrates and the daily record of the hardware context captures configuration file.
5. the according to the method described in claim 3, it is characterized in that, different function scene creation day based on terminal device Will crawl configuration file includes:
The application program of installing terminal equipment is obtained, the corresponding daily record crawl configuration text of the different classes of establishment based on application program Part.
6. the according to the method described in claim 3, it is characterized in that, different function scene creation day based on terminal device Will crawl configuration file includes:
The usage record of terminal device is obtained, creates corresponding daily record crawl configuration file based on the usage record.
7. according to the method described in any one of claim 1-6, which is characterized in that described to be grabbed according to analysis result progress daily record Take including:
The one or more log concentrators used are determined according to analysis result, by one or more of log concentrators into Row daily record captures;
Correspondingly, after the progress daily record crawl according to analysis result, further include:
Crawl content is packaged and is uploaded.
8. log processing device, which is characterized in that including:
Module is monitored, is monitored for the running state parameter to terminal device;
If configuration module for detecting that the running state parameter meets preset condition, obtains and the operating status The corresponding daily record crawl configuration file of parameter;
For being parsed to daily record crawl configuration file, daily record crawl is carried out according to analysis result for handling module.
9. a kind of terminal device, including:Processor, memory and storage are on a memory and the meter that can run on a processor Calculation machine program, which is characterized in that the processor is realized when performing the computer program such as any one of claim 1-7 institutes The log processing method stated.
A kind of 10. storage medium for including terminal device executable instruction, which is characterized in that the terminal device executable instruction Log processing method when being performed as terminal device processor for execution as described in any one of claim 1-7.
CN201711431937.4A 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium Active CN108197013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711431937.4A CN108197013B (en) 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711431937.4A CN108197013B (en) 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108197013A true CN108197013A (en) 2018-06-22
CN108197013B CN108197013B (en) 2022-03-08

Family

ID=62584139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711431937.4A Active CN108197013B (en) 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108197013B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969457A (en) * 2018-09-29 2020-04-07 中国移动通信集团浙江有限公司 Mobile application log collection method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs
CN104281515A (en) * 2013-07-09 2015-01-14 腾讯科技(深圳)有限公司 Adjustment method and device for log data
CN105279067A (en) * 2014-07-24 2016-01-27 腾讯科技(深圳)有限公司 Method and device for reporting information
CN105404576A (en) * 2015-12-02 2016-03-16 小米科技有限责任公司 Anomaly information acquisition method and apparatus
CN106201756A (en) * 2016-07-12 2016-12-07 努比亚技术有限公司 Log acquisition device, mobile terminal and method
CN106557410A (en) * 2016-10-25 2017-04-05 北京百度网讯科技有限公司 User behavior analysis method and apparatus based on artificial intelligence
CN106777371A (en) * 2017-01-23 2017-05-31 北京齐尔布莱特科技有限公司 Result collection system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281515A (en) * 2013-07-09 2015-01-14 腾讯科技(深圳)有限公司 Adjustment method and device for log data
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs
CN105279067A (en) * 2014-07-24 2016-01-27 腾讯科技(深圳)有限公司 Method and device for reporting information
CN105404576A (en) * 2015-12-02 2016-03-16 小米科技有限责任公司 Anomaly information acquisition method and apparatus
CN106201756A (en) * 2016-07-12 2016-12-07 努比亚技术有限公司 Log acquisition device, mobile terminal and method
CN106557410A (en) * 2016-10-25 2017-04-05 北京百度网讯科技有限公司 User behavior analysis method and apparatus based on artificial intelligence
CN106777371A (en) * 2017-01-23 2017-05-31 北京齐尔布莱特科技有限公司 Result collection system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969457A (en) * 2018-09-29 2020-04-07 中国移动通信集团浙江有限公司 Mobile application log collection method and system

Also Published As

Publication number Publication date
CN108197013B (en) 2022-03-08

Similar Documents

Publication Publication Date Title
CN108153647A (en) log processing method, device, terminal device and storage medium
CN108038231A (en) log processing method, device, terminal device and storage medium
EP3502880B1 (en) Method for preloading application, storage medium, and terminal device
CN108108284A (en) Log processing method, device, terminal device and storage medium
CN108509176A (en) A kind of method, apparatus of playing audio-fequency data, storage medium and intelligent terminal
KR20200027554A (en) Speech recognition method and apparatus, and storage medium
CN108170585A (en) log processing method, device, terminal device and storage medium
CN110876180B (en) Power consumption processing method and device, electronic equipment and computer readable medium
US20220358089A1 (en) Learning-Based Keyword Search Method and Electronic Device
CN105224462A (en) The recognition methods of control element and device
CN110389697B (en) Data interaction method and device, storage medium and electronic device
CN111338910A (en) Log data processing method, log data display method, log data processing device, log data display device, log data processing equipment and log data storage medium
WO2020103070A1 (en) Method and apparatus for processing application program, and electronic device
CN113742366A (en) Data processing method and device, computer equipment and storage medium
CN108287605A (en) charge control method, device, terminal device and storage medium
CN106528385A (en) System fluency monitoring method and apparatus, and terminal
CN108170576A (en) log processing method, device, terminal device and storage medium
CN108197013A (en) log processing method, device, terminal device and storage medium
CN106610476A (en) Charging and discharging process testing method, device and terminal
CN107908802A (en) log processing method, device, terminal device and storage medium
WO2021052489A1 (en) Method for determining fault computing core in multi-core processor and electronic device
CN111045641B (en) Electronic terminal and voice recognition method
CN114173286A (en) Method and device for determining test path, electronic equipment and readable storage medium
CN107463478A (en) The control method and device of terminal device
CN109658930B (en) Voice signal processing method, electronic device and computer readable 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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant