CN108170576A - 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
CN108170576A
CN108170576A CN201711431936.XA CN201711431936A CN108170576A CN 108170576 A CN108170576 A CN 108170576A CN 201711431936 A CN201711431936 A CN 201711431936A CN 108170576 A CN108170576 A CN 108170576A
Authority
CN
China
Prior art keywords
configuration file
terminal device
scene
log
click event
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
CN201711431936.XA
Other languages
Chinese (zh)
Other versions
CN108170576B (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 CN201711431936.XA priority Critical patent/CN108170576B/en
Publication of CN108170576A publication Critical patent/CN108170576A/en
Application granted granted Critical
Publication of CN108170576B publication Critical patent/CN108170576B/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/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3096Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • 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)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (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 click event at journalizing interface;When listening to the click event and being triggered, the corresponding scene configuration file of the click event is determined, the scene configuration file is configured for the different function scene of terminal device;The scene configuration file is parsed, the daily record crawl based on different scenes is carried out 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 mediums, improve daily record data Treatment effeciency 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 click event at journalizing interface is monitored;
When listening to the click event and being triggered, the corresponding scene configuration file of the click event is determined, it is described Scene configuration file is configured for the different function scene of terminal device;
The scene configuration file is parsed, the daily record crawl based on different scenes 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 click event to journalizing interface;
Configuration module, for when listening to the click event and being triggered, determining the corresponding scene of the click event Configuration file, the scene configuration file are configured for the different function scene of terminal device;
Handling module for being parsed to the scene configuration file, is carried out according to analysis result based on different scenes Daily record crawl.
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 click event to journalizing interface is monitored, it is triggered when listening to the click event When, determine the corresponding scene configuration file of the click event, the scene configuration file is directed to the different function of terminal device Scene is configured, and the scene configuration file is parsed, and carrying out the daily record based on different scenes according to analysis result grabs It takes, which thereby enhances the treatment effeciency of daily record data, reduce 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 click event at journalizing interface is monitored.
Wherein, journalizing interface handles associated operation interface for terminal device screen display and daily record data.It should Operation interface shows the interface control comprising different literals content and clicks, selects for user.
In one embodiment, it before the click event to journalizing interface is monitored, further includes:It detects whether Receive the control instruction at triggering journalizing interface that system is sent when meeting preset condition.Wherein, which can To be restarted after detecting terminal device system crash;Alternatively, the application program sudden strain of a muscle of operation is moved back;Alternatively, terminal device screen The anomalous events such as curtain blank screen.When the system of detecting meets the preset condition of aforementioned definitions, it is corresponding send a control instruction with Trigger journalizing interface.In another embodiment, which can also touch according to the manual clicking operation of user Hair.
When terminal device display interface is journalizing interface, the click event at journalizing interface is monitored. Optionally, the monitoring of click event is realized by using the mode of anonymous inner classes, such as:For Button object binding monitors Botton.setOnClickListener (), the OnClickListener defined in setOnClickListener () method Anonymous inner classes, rewrite the onClick methods in inner classes, the click affair logic of monitoring realized in onClick methods. Optionally, the monitoring of click event is realized by using the mode of outer category, such as:A self-defined outer category is realized OnClickListener interfaces rewrite onClick methods, are Button object binding monitors Botton.setOnClickListener () uses above-mentioned self-defined outer category in setOnClickListener () method Realize the monitoring of click event.Optionally, event handling side is clicked directly defined in Activity by using interface mode Method or the monitoring that click event is realized by the way of label is directly bound.
Step S102, when listening to the click event and being triggered, the corresponding scene configuration of the click event is determined File.
In one embodiment, journalizing interface includes multiple buttons clicked for user, and each button is shown Corresponding text information, when the user clicks on a button, click event are accordingly triggered.Wherein, each button and terminal device Different function scene relating, illustratively, journalizing interface can show 5 buttons, and the word in each button is followed successively by " WLAN scenes ", " GPS scenes ", " audio scene, " camera scene " and " bluetooth scene ".Specifically, when detecting user's click During " GPS scenes " button, then the needs that the corresponding scene configuration file of GPS scenes is determined as in the secondary daily record processing procedure are made Scene configuration file.
Wherein, different function scene of the scene configuration file based on terminal device is configured and is created, in daily record In processing procedure, log system carries out daily record crawl, the scene configuration file based on the configuration parameter in the scene configuration file It can be presented with xml formatted files, such as:LogConfig.xml.Illustratively, by taking " camera scene " as an example, scene configuration text The journal file that the needs set in part capture includes camera daily record, camera software log and the app comprising camera function Running log etc. and the associated hardware of camera (such as sensor, processing chip) and software (system camera, third party app) day Will.
In one embodiment, the configuration parameter in the scene configuration file includes daily record switch arrange parameter, daily record class Shape 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.Since the log types that different scenes needs capture may be different, Therefore Log Types parameter is contained in configuration process, be represented by:<LogCollectType type=" xxx " name= " xxx " value=" true | false "/>, wherein, parameter type represents the log types to be collected, and parameter name represents type Whether title, parameter value representatives collect, and log Log Types include routine log types, record screen log types, the thing of key log Part type (critical event recorded in crucial log, not comprising detailed log contents), the detailed log types of key log are (crucial The detailed Log contents recorded in Log), tcpDump types (convenient for analysis network problem), state snapshot type (reaction system Operating status), systrace types (for analytical performance it is related the problem of), interim card monitoring log types (monitoring to interim card), (analysis tripartite applies specific for power consumption log types (log needed for power consumption monitoring and power consumption class case study), tripartite log types Demand log) etc..Wherein, daily record operating parameter is for being specifically configured gatherer process, and illustratively, 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, the scene configuration file is parsed, the day based on different scenes is carried out according to analysis result Will captures.
After being parsed to configuration file, according to the daily record switch arrange parameter recorded in the obtained configuration file of parsing, Scene of the various combination of Log Types parameter, daily record operating parameter and daily record debugging instruction based on configuration carries out daily record and grabs It takes.Optionally, the daily record crawl based on different scenes is carried out according to analysis result to include:Use one is determined according to analysis result A or multiple log concentrators carry out daily record crawl by one or more of log concentrators.Wherein, log concentrator after It holds from AbsLogCollector, is set for different Log Types, 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, this programme clearly specifies daily record crawl strategy by scene configuration file, can be directed to Different scenes combine different configuration items so that user may be selected to carry out the crawl of journal file based on different scenes, improve Daily record captures efficiency, while works convenient for the subsequent log analysis for different scenes, corresponding upload file size also by Reduction improves the whole efficiency of log processing.
Fig. 2 is the flow chart of another log processing method provided by the embodiments of the present application, optionally, described to daily record Before the click event of operation interface is monitored, further include:Detect whether that receive system sends when meeting preset condition Triggering journalizing interface control instruction;Include correspondingly, the click event to journalizing interface monitor: If detecting the control instruction, the journalizing interface is called, the click event at journalizing interface is supervised It listens.As shown in Fig. 2, technical solution is specific as follows:
Step S201, the control instruction at triggering journalizing interface that system is sent when meeting preset condition is supervised It listens.
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 such as moves back at the anomalous events, illustratively, thread can be set to examine by using StickMode classes for interim card event in the present embodiment It surveys strategy or virtual machine inspection policies carries out interim card detection, such as:
It can also be by using TraceView, AndroidPerformanceMonitor or ANR-WatchDog detecting system Whether interim card is occurred, after interim card event is detected, corresponding send triggers the control instruction at journalizing interface to show day Will operation interface.
Step S202, judge whether to receive the control instruction for triggering journalizing interface, if it is, performing step Otherwise S203 continues to monitor.
Step S203, the click event at journalizing interface is monitored
Step S204, judge whether click event triggers, if it is, step S205 is performed, if it is not, then continuing to supervise It listens.
Step S205, the corresponding scene configuration file of the click event is determined.
Step S206, the scene configuration file is parsed, the day based on different scenes is carried out according to analysis result Will captures.
It can be seen from the above, after interim card occurs in the system of detecting, show log operation interface can be directly invoked and selected for user It selects different scenes and captures corresponding daily record, obtain targetedly log content convenient for developer, also save the operation of user Step improves efficiency.
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 scene configuration file of equipment includes:It is created based on the different hardware that terminal device integrates and described hard The associated scene configuration file of part.As shown in figure 3, technical solution is specific as follows:
Step S301, the different hardware integrated based on terminal device creates and the scene configuration file of the hardware context.
Illustratively, by taking the camera that terminal device integrates as an example, the scene configuration file based on camera can be established simultaneously Stored in case subsequent user select to be loaded during the scene and according to the scene configuration file carry out daily record crawl, In, based on hardware can also be fingerprint module etc..It is carried out accordingly based on camera and its pass in scene configuration file The log parameters configuration of the software of connection, setting corresponding daily record switch, Log Types parameter can be the thing of crucial log to open Part type and/or interim card monitoring log types.Thus during daily record crawl is carried out, only for (the opening for opening daily record switch Daily record capture permission) hardware device and setting associated application program daily record carry out crawl realize targetedly be based on scene Log collection.
Step S302, the control instruction at triggering journalizing interface that system is sent when meeting preset condition is supervised It listens.
Step S303, judge whether to receive the control instruction for triggering journalizing interface, if it is, performing step Otherwise S304 continues to monitor.
Step S304, the click event at journalizing interface is monitored.
Step S305, judge whether click event triggers, if it is, step S305 is performed, if it is not, then continuing to supervise It listens.
Step S306, the corresponding scene configuration file of the click event is determined.
Step S307, the scene configuration file is parsed, the day based on different scenes is carried out according to analysis result Will captures.
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 scene configuration file of equipment includes:It is created based on the different hardware that terminal device integrates and described hard The associated scene configuration file of part.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 Scene 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 scene The setting of configuration file, such as 5 game class app are installed in terminal device, then daily record switchs arrange parameter respectively by this 5 The switch of application is set to open state, and Log Types parameter can be state snapshot type and/or power consumption log types, thus with reality Now corresponding journal file is captured for subsequent analysis for the application of game class.
Step S402, the control instruction at triggering journalizing interface that system is sent when meeting preset condition is supervised It listens.
Step S403, judge whether to receive the control instruction for triggering journalizing interface, if it is, performing step Otherwise S404 continues to monitor.
Step S404, it is monitored for 225 to the click thing at journalizing interface
Step S405, judge whether click event triggers, if it is, step S405 is performed, if it is not, then continuing to supervise It listens.
Step S406, the corresponding scene configuration file of the click event is determined.
Step S407, the scene configuration file is parsed, the day based on different scenes is carried out according to analysis result Will captures.
It can be seen from the above, carry out setting for corresponding scene configuration file for application program different classes of in terminal device It puts, the journal file of the category thus can be captured based on different application classification, without carry out log collection all or one by one, is carried High 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 scene configuration file of equipment includes:It is created based on the different hardware that terminal device integrates and described hard The associated scene configuration file of part.As shown in figure 5, technical solution is specific as follows:
Step S501, the usage record of terminal device is obtained, creates corresponding scene configuration text based on the usage record Part.
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 scene configuration file, illustratively, for before frequency collating 30% application program setting pair The scene configuration file answered, the title of corresponding journalizing interface display can be " common programs ", be pressed when user clicks this During button, corresponding scene configuration file is loaded, parses.
Step S502, the control instruction at triggering journalizing interface that system is sent when meeting preset condition is supervised It listens.
Step S503, judge whether to receive the control instruction for triggering journalizing interface, if it is, performing step Otherwise S504 continues to monitor.
Step S504, the click event at journalizing interface is monitored
Step S505, judge whether click event triggers, if it is, step S505 is performed, if it is not, then continuing to supervise It listens.
Step S506, the corresponding scene configuration file of the click event is determined.
Step S507, the scene configuration file is parsed, the day based on different scenes is carried out according to analysis result Will captures.
It can be seen from the above, the usage record according to terminal device carries out the configuration of scene configuration file accordingly, in daily record Targetedly daily record can be carried out during crawl based on the usage record of user to capture, and it is relevant only to acquire the common program of user Daily record 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 click event to journalizing interface.
In one embodiment, it before the click event to journalizing interface is monitored, further includes:It detects whether Receive the control instruction at triggering journalizing interface that system is sent when meeting preset condition.Wherein, which can To be restarted after detecting terminal device system crash;Alternatively, the application program sudden strain of a muscle of operation is moved back;Alternatively, terminal device screen The anomalous events such as curtain blank screen.When the system of detecting meets the preset condition of aforementioned definitions, it is corresponding send a control instruction with Trigger journalizing interface.In another embodiment, which can also touch according to the manual clicking operation of user Hair.
When terminal device display interface is journalizing interface, the click event at journalizing interface is monitored. Optionally, the monitoring of click event is realized by using the mode of anonymous inner classes, such as:For Button object binding monitors Botton.setOnClickListener (), the OnClickListener defined in setOnClickListener () method Anonymous inner classes, rewrite the onClick methods in inner classes, the click affair logic of monitoring realized in onClick methods. Optionally, the monitoring of click event is realized by using the mode of outer category, such as:A self-defined outer category is realized OnClickListener interfaces rewrite onClick methods, are Button object binding monitors Botton.setOnClickListener () uses above-mentioned self-defined outer category in setOnClickListener () method Realize the monitoring of click event.Optionally, event handling side is clicked directly defined in Activity by using interface mode Method or the monitoring that click event is realized by the way of label is directly bound.
Configuration module 102, for when listening to the click event and being triggered, determining the corresponding field of the click event Scape configuration file, the scene configuration file are configured for the different function scene of terminal device.
In one embodiment, journalizing interface includes multiple buttons clicked for user, and each button is shown Corresponding text information, when the user clicks on a button, click event are accordingly triggered.Wherein, each button and terminal device Different function scene relating, illustratively, journalizing interface can show 5 buttons, and the word in each button is followed successively by " WLAN scenes ", " GPS scenes ", " audio scene, " camera scene " and " bluetooth scene ".Specifically, when detecting user's click During " GPS scenes " button, then the needs that the corresponding scene configuration file of GPS scenes is determined as in the secondary daily record processing procedure are made Scene configuration file.
Wherein, different function scene of the scene configuration file based on terminal device is configured and is created, in daily record In processing procedure, log system carries out daily record crawl, the scene configuration file based on the configuration parameter in the scene configuration file It can be presented with xml formatted files, such as:LogConfig.xml.Illustratively, by taking " camera scene " as an example, scene configuration text The journal file that the needs set in part capture includes camera daily record, camera software log and the app comprising camera function Running log etc. and the associated hardware of camera (such as sensor, processing chip) and software (system camera, third party app) day Will.
In one embodiment, the configuration parameter in the scene configuration file includes daily record switch arrange parameter, daily record class Shape parameter, daily record operating parameter and daily record debugging instruction.
Handling module 103 for being parsed to the scene configuration file, is carried out according to analysis result based on different fields The daily record crawl of scape.
After being parsed to configuration file, according to the daily record switch arrange parameter recorded in the obtained configuration file of parsing, Scene of the various combination of Log Types parameter, daily record operating parameter and daily record debugging instruction based on configuration carries out daily record and grabs It takes.Optionally, the daily record crawl based on different scenes is carried out according to analysis result to include:Use one is determined according to analysis result A or multiple log concentrators carry out daily record crawl by one or more of log concentrators.Wherein, log concentrator after It holds from AbsLogCollector, is set for different Log Types, 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, this programme clearly specifies daily record crawl strategy by scene configuration file, can be directed to Different scenes combine different configuration items so that user may be selected to carry out the crawl of journal file based on different scenes, improve Daily record captures efficiency, while works convenient for the subsequent log analysis for different scenes, corresponding upload file size also by Reduction improves the whole efficiency of log processing.
In a possible embodiment, trigger module 104 is further included, is used for:
Before the click event to journalizing interface is monitored, detect whether that receiving system is meeting in advance If the control instruction at triggering journalizing interface sent during condition;
The monitoring module 101 is specifically used for:
If detecting the control instruction, the journalizing interface is called, to the click thing at journalizing interface Part is monitored.
In a possible embodiment, configuration load-on module 105 is further included, is used for:
It is described determine the corresponding scene configuration file of the click event before, the different function field based on terminal device Scape creates scene configuration file and stores, wherein, the scene configuration file includes daily record switch arrange parameter, Log Types ginseng Number, daily record operating parameter and daily record debugging instruction.
In a possible embodiment, the configuration load-on module 105 is specifically used for:
The scene configuration file with the hardware context is created based on the different hardware that terminal device integrates.
In a possible embodiment, the configuration load-on module 105 is specifically used for:
The application program of installing terminal equipment is obtained, the corresponding scene configuration text of the different classes of establishment based on application program Part.
In a possible embodiment, the configuration load-on module 105 is specifically used for:
The usage record of terminal device is obtained, creates corresponding scene 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 106, is used for:
After daily record crawl terminates, 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 click event at journalizing interface is monitored;
When listening to the click event and being triggered, the corresponding scene configuration file of the click event is determined, it is described Scene configuration file is configured for the different function scene of terminal device;
The scene configuration file is parsed, the daily record crawl based on different scenes is carried out according to analysis result.
In a possible embodiment, it before the click event to journalizing interface is monitored, also wraps It includes:
It detects whether to receive the control instruction at triggering journalizing interface that system is sent when meeting preset condition;
Include correspondingly, the click event to journalizing interface monitor:
If detecting the control instruction, the journalizing interface is called, to the click thing at journalizing interface Part is monitored.
In a possible embodiment, it is described determine the corresponding scene configuration file of the click event before, also Including:
Different function scene creation scene configuration file based on terminal device simultaneously stores, wherein, the scene configuration text Part includes daily record switch arrange parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction.
In a possible embodiment, the different function scene creation scene configuration file packet based on terminal device It includes:
The scene configuration file with the hardware context is created based on the different hardware that terminal device integrates.
In a possible embodiment, the different function scene creation scene configuration file packet based on terminal device It includes:
The application program of installing terminal equipment is obtained, the corresponding scene configuration text of the different classes of establishment based on application program Part.
In a possible embodiment, the different function scene creation scene configuration file packet based on terminal device It includes:
The usage record of terminal device is obtained, creates corresponding scene configuration file based on the usage record.
In a possible embodiment, it is described according to analysis result carry out based on different scenes daily record crawl include:
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 daily record crawl terminates, 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 click event at journalizing interface is monitored;
When listening to the click event and being triggered, the corresponding scene configuration file of the click event, the scene are determined Configuration file is configured for the different function scene of terminal device;
The scene configuration file is parsed, the daily record crawl based on different scenes is carried out according to analysis result.
2. it according to the method described in claim 1, it is characterized in that, is supervised in the click event to journalizing interface Before listening, further include:
It detects whether to receive the control instruction at triggering journalizing interface that system is sent when meeting preset condition;
Include correspondingly, the click event to journalizing interface monitor:
If detecting the control instruction, call the journalizing interface, to the click event at journalizing interface into Row is monitored.
3. method according to claim 1 or 2, which is characterized in that determine the corresponding scene of the click event described Before configuration file, further include:
Different function scene creation scene configuration file based on terminal device simultaneously stores, wherein, the scene configuration file packet Include daily record switch arrange parameter, Log Types parameter, daily record operating parameter and daily record debugging instruction.
4. the according to the method described in claim 3, it is characterized in that, different function scene creation field based on terminal device Scape configuration file includes:
The scene configuration file with the hardware context is created based on the different hardware that terminal device integrates.
5. the according to the method described in claim 3, it is characterized in that, different function scene creation field based on terminal device Scape configuration file includes:
Obtain the application program of installing terminal equipment, the corresponding scene configuration file of different classes of establishment based on application program.
6. the according to the method described in claim 3, it is characterized in that, different function scene creation field based on terminal device Scape configuration file includes:
The usage record of terminal device is obtained, creates corresponding scene configuration file based on the usage record.
7. according to the method described in claim 1, it is characterized in that, described carry out the day based on different scenes according to analysis result Will crawl includes:
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 daily record crawl terminates, 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 click event to journalizing interface;
Configuration module, for when listening to the click event and being triggered, determining the corresponding scene configuration of the click event File, the scene configuration file are configured for the different function scene of terminal device;
For being parsed to the scene configuration file, the day based on different scenes is carried out according to analysis result for handling module Will captures.
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.
CN201711431936.XA 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium Active CN108170576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711431936.XA CN108170576B (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
CN201711431936.XA CN108170576B (en) 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108170576A true CN108170576A (en) 2018-06-15
CN108170576B CN108170576B (en) 2021-12-07

Family

ID=62520934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711431936.XA Active CN108170576B (en) 2017-12-26 2017-12-26 Log processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108170576B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835893A (en) * 2021-09-28 2021-12-24 阿波罗智联(北京)科技有限公司 Data processing method, device, equipment, storage medium and program product
CN116708063A (en) * 2022-12-23 2023-09-05 荣耀终端有限公司 Log reporting method, electronic equipment, cloud server and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516807A (en) * 2013-10-14 2014-01-15 中国联合网络通信集团有限公司 Cloud computing platform server load balancing system and method
CN103577443A (en) * 2012-07-30 2014-02-12 ***股份有限公司 Log processing system
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs
CN104092575A (en) * 2014-07-29 2014-10-08 中国联合网络通信集团有限公司 Resource monitoring method and system
CN106161074A (en) * 2015-04-21 2016-11-23 中兴通讯股份有限公司 A kind of cloud terminal log processing method, Apparatus and system
CN106485465A (en) * 2016-09-22 2017-03-08 济南浪潮高新科技投资发展有限公司 A kind of configurable timing data synchronous method
US20170331895A1 (en) * 2016-05-13 2017-11-16 Honeywell International Inc. Aircraft data interface function implementation using aircraft condition monitoring function and data gathering application architecture

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577443A (en) * 2012-07-30 2014-02-12 ***股份有限公司 Log processing system
CN103516807A (en) * 2013-10-14 2014-01-15 中国联合网络通信集团有限公司 Cloud computing platform server load balancing system and method
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs
CN104092575A (en) * 2014-07-29 2014-10-08 中国联合网络通信集团有限公司 Resource monitoring method and system
CN106161074A (en) * 2015-04-21 2016-11-23 中兴通讯股份有限公司 A kind of cloud terminal log processing method, Apparatus and system
US20170331895A1 (en) * 2016-05-13 2017-11-16 Honeywell International Inc. Aircraft data interface function implementation using aircraft condition monitoring function and data gathering application architecture
CN106485465A (en) * 2016-09-22 2017-03-08 济南浪潮高新科技投资发展有限公司 A kind of configurable timing data synchronous method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835893A (en) * 2021-09-28 2021-12-24 阿波罗智联(北京)科技有限公司 Data processing method, device, equipment, storage medium and program product
CN113835893B (en) * 2021-09-28 2022-07-22 阿波罗智联(北京)科技有限公司 Data processing method, device, equipment, storage medium and program product
CN116708063A (en) * 2022-12-23 2023-09-05 荣耀终端有限公司 Log reporting method, electronic equipment, cloud server and storage medium
CN116708063B (en) * 2022-12-23 2024-06-11 荣耀终端有限公司 Log reporting method, electronic equipment, cloud server and storage medium

Also Published As

Publication number Publication date
CN108170576B (en) 2021-12-07

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
US20230041287A1 (en) Interaction Method for Cross-Device Task Processing, Electronic Device, and Storage Medium
CN104063305B (en) The method for testing pressure of intelligent terminal software, device and system
CN108538291A (en) Sound control method, terminal device, cloud server and system
CN106598630A (en) Key control method and apparatus, and terminal
US20230216990A1 (en) Device Interaction Method and Electronic Device
CN108108284A (en) Log processing method, device, terminal device and storage medium
CN108170585A (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
CN107168905A (en) A kind of document display method, device, storage medium and mobile terminal
CN110876180B (en) Power consumption processing method and device, electronic equipment and computer readable medium
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
CN113422794A (en) Traffic recording and playback processing method and device and electronic equipment
CN111722993A (en) Method and system for monitoring abnormal power consumption of communication terminal, terminal device and storage medium
WO2022253158A1 (en) User privacy protection method and apparatus
CN108170576A (en) log processing method, device, terminal device and storage medium
CN114339419B (en) Video stream pulling processing method, device and storage medium
CN108287605A (en) charge control method, device, terminal device and storage medium
CN116614453B (en) Image transmission bandwidth selection method and device based on cloud interconnection
CN109213580A (en) Using exchange method and device
CN108021301A (en) A kind of volume adjusting method, terminal device and computer-readable recording medium
CN108197013A (en) log processing method, device, terminal device and storage medium
CN102881303A (en) Play method and play device of multimedia file

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