CN107491383A - Catching method, device and the mobile terminal of application crashes Operation Log - Google Patents

Catching method, device and the mobile terminal of application crashes Operation Log Download PDF

Info

Publication number
CN107491383A
CN107491383A CN201710706953.3A CN201710706953A CN107491383A CN 107491383 A CN107491383 A CN 107491383A CN 201710706953 A CN201710706953 A CN 201710706953A CN 107491383 A CN107491383 A CN 107491383A
Authority
CN
China
Prior art keywords
operation log
application
mobile terminal
stream information
event stream
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.)
Pending
Application number
CN201710706953.3A
Other languages
Chinese (zh)
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.)
Hangzhou Normal University
Original Assignee
Hangzhou Normal University
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 Hangzhou Normal University filed Critical Hangzhou Normal University
Priority to CN201710706953.3A priority Critical patent/CN107491383A/en
Publication of CN107491383A publication Critical patent/CN107491383A/en
Pending legal-status Critical Current

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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The invention provides a kind of catching method, device and the mobile terminal of application crashes Operation Log, is related to Internet technical field, and this method is applied to mobile terminal, including:When application starts, destination folder is obtained, wherein, the destination folder is empty folder;The event stream information of all incoming events on the mobile terminal is captured, and the event stream information of capture is preserved to the destination folder as Operation Log;When the application is collapsed, the Operation Log currently preserved is sent to monitoring server.Catching method, device and the mobile terminal of application crashes Operation Log provided by the invention, the Operation Log for reproduction application Crash can be captured, in order to reduce scene when Crash occurs, and then it is easy to determine the reason for Crash occurs for application and repair to apply Crash.

Description

Catching method, device and the mobile terminal of application crashes Operation Log
Technical field
The present invention relates to Internet technical field, more particularly, to a kind of catching method of application crashes Operation Log, dress Put and mobile terminal.
Background technology
At present, in intelligent terminal, the quantity of the application of user installation is more and more, the source of application be also it is different, The degree of stability of these applications is also different.For many Android applications, inevitably collapse (Crash).When Crash occurs, android system can kill program, and performance is exactly that sudden strain of a muscle is moved back or program is out of service, This is disagreeableness for user, and developer is unwilling what is seen.
Detection of the developer for Crash information is largely to rely on comment and the feedback of user with reappearing, Collect the collapse report informations such as stack information and some facility informations when Crash occurs.Because the user of Android applications hands over Mutually it is usually directed to gesture or sensor interaction, the reproduction of these steps is generally and sequential has close relation, relies solely on nature Language description can not completely reappear Crash, therefore the collapse report information obtained is typically incomplete, be not used to also Scene when former Crash occurs.
The content of the invention
In view of this, it is an object of the invention to provide a kind of catching method, device and the shifting of application crashes Operation Log Dynamic terminal, to capture the Operation Log for reproduction application Crash, in order to reduce scene when Crash occurs, and then it is easy to It is determined that occurs for application and repairs to apply Crash the reason for Crash.
In a first aspect, the embodiments of the invention provide a kind of catching method of application crashes Operation Log, applied to movement Terminal, methods described include:
When application starts, destination folder is obtained, wherein, the destination folder is empty folder;
Capture the event stream information of all incoming events on the mobile terminal, and by the event stream information of capture Preserved as Operation Log to the destination folder;
When the application is collapsed, the Operation Log currently preserved is sent to monitoring server.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the first of first aspect, wherein, when When the mobile terminal uses Android android system, methods described also includes:
When monitoring that the android system creates Application object for the application, determine that the application is opened It is dynamic.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of second of first aspect, wherein, institute State when application starts, obtain destination folder, including:
When application starts, detect the mobile terminal and whether there is destination folder;
If it is, empty the destination folder;
If it is not, then new folder, and using newly-built file as destination folder.
With reference to the first possible embodiment of first aspect, the embodiments of the invention provide the third of first aspect Possible embodiment, wherein, the event stream information of all incoming events on the capture mobile terminal, including:
Using Android SDK getevent instruments, record described using described in running on mobile terminal The event stream information of all incoming events.
With reference to the first possible embodiment of first aspect, the embodiments of the invention provide the 4th of first aspect kind Possible embodiment, wherein, methods described also includes:
When monitoring that the android system performed in Thread classes During setDefaultUncaughtExceptionHandler, determine that the application is collapsed.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the 5th of first aspect kind, wherein, institute State when the application is collapsed, the Operation Log currently preserved is sent to monitoring server, including:
When the application is collapsed, the Operation Log currently preserved is transferred from the destination folder;
The Operation Log is sent to monitoring server.
With reference to the 5th kind of possible embodiment of first aspect, the embodiments of the invention provide the 6th of first aspect kind Possible embodiment, wherein, described to send the Operation Log to before monitoring server, methods described also includes:
Scan the event stream information in the Operation Log;
The standardization of time field is carried out to the event stream information, obtains the Operation Log after standardization.
Second aspect, the embodiment of the present invention also provides a kind of acquisition equipment of application crashes Operation Log, applied to movement Terminal, described device include:
First acquisition module, for when application starts, obtaining destination folder, wherein, the destination folder is sky File;
Second acquisition module, for capturing the event stream information of all incoming events on the mobile terminal, and it will catch The event stream information obtained is preserved to the destination folder as Operation Log;
Sending module, for when the application is collapsed, the Operation Log currently preserved to be sent to monitoring service Device.
The third aspect, the embodiment of the present invention also provide a kind of mobile terminal, including memory, processor, the memory In be stored with the computer program that can be run on the processor, described in the computing device during computer program realize on The step of stating the method described in first aspect.
Fourth aspect, the embodiment of the present invention also provide a kind of meter for the non-volatile program code that can perform with processor Calculation machine computer-readable recording medium, described program code make the above-mentioned first aspect methods described of the computing device.
The embodiment of the present invention brings following beneficial effect:
In the embodiment of the present invention, when application starts, destination folder is obtained, wherein, the destination folder is empty file Folder;The event stream information of all incoming events on mobile terminal is captured, and using the event stream information of capture as Operation Log Preserve to destination folder;When this is using collapsing, the Operation Log currently preserved is sent to monitoring server.Due to It has recorded all incoming events on mobile terminal in the form of bottom event stream information, and comprising can be as accurate as microsecond Sequential relationship, i.e. event stream information can completely embody the specific mistake of the gesture interaction that user mutual is related to and sensor interaction Journey, therefore the Operation Log comprising event stream information can be used for the complete scene reappeared when Crash occurs.Therefore, it is of the invention Catching method, device and the mobile terminal of the application crashes Operation Log of offer, when Crash occurs for application, use can be captured In reappearing the Operation Log for applying Crash, in order to reduce scene when Crash occurs, and then it is easy to determine application Crash is applied in the reason for Crash and reparation.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages are in specification, claims And specifically noted structure is realized and obtained in accompanying drawing.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Brief description of the drawings
, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical scheme of the prior art The required accompanying drawing used is briefly described in embodiment or description of the prior art, it should be apparent that, in describing below Accompanying drawing is some embodiments of the present invention, for those of ordinary skill in the art, before creative work is not paid Put, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the first schematic flow sheet of the catching method of application crashes Operation Log provided in an embodiment of the present invention;
Fig. 2 is second of schematic flow sheet of the catching method of application crashes Operation Log provided in an embodiment of the present invention;
Fig. 3 is the module composition schematic diagram of the acquisition equipment of application crashes Operation Log provided in an embodiment of the present invention;
Fig. 4 is the structural representation of mobile terminal provided in an embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with accompanying drawing to the present invention Technical scheme be clearly and completely described, it is clear that described embodiment is part of the embodiment of the present invention, rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premise Lower obtained every other embodiment, belongs to the scope of protection of the invention.
Detection of the developer for Crash information at present with reappear largely be to rely on the comment of user with it is anti- Feedback, collect stack information when Crash occurs and some facility informations etc. and collapse report information, but the collapse report letter obtained Breath is typically incomplete, is not used to reduce scene when Crash occurs.Based on this, one kind provided in an embodiment of the present invention Catching method, device and the mobile terminal of application crashes Operation Log, the operation day for reproduction application Crash can be captured Will, in order to reduce scene when Crash occurs, and then it is easy to determine the reason for Crash occurs for application and repairs application Crash。
For ease of understanding the present embodiment, are first operated to a kind of application crashes disclosed in the embodiment of the present invention day The catching method of will describes in detail.
Embodiment one:
The catching method of application crashes Operation Log provided in an embodiment of the present invention is applied to mobile terminal, the mobile terminal Can be that mobile phone, tablet personal computer, PDA (Personal Digital Assistant, personal digital assistant), vehicle-mounted computer etc. are appointed Meaning can be downloaded and using the equipment of application.
Fig. 1 is the first schematic flow sheet of the catching method of application crashes Operation Log provided in an embodiment of the present invention, As shown in figure 1, using mobile terminal as mobile phone, and using exemplified by Android android system, this method includes following steps:
Step S101, when application starts, destination folder is obtained, wherein, the destination folder is empty folder.
Monitor whether application to be monitored starts on the mobile phone of user in real time.In a possible embodiment, prison is worked as When the android system for measuring mobile phone is that the application creates Application object, determine that the application starts.Specifically, in hand In the android system of machine, the life cycle of Application object is most long in whole program, its life cycle etc. In the life cycle entirely applied;As Activity, Service, be Android frameworks one is Application System component, when application starts, system can be application one Application object of establishment, for some letters of storage system Breath.Therefore, when the android system for monitoring mobile phone is that application creates Application object, it is possible to determine the application Start.
When starting the application, detect in the mobile phone and whether there is destination folder;If it is, empty target text Part presss from both sides;If it is not, then new folder, and using newly-built file as destination folder.The destination folder is to be used to deposit Operation Log corresponding to the event stream information of subsequent acquisition is put, when the application crashes, to be only related to this collapse To Operation Log be sent to monitoring server.
Step S102, the event stream information of all incoming events on mobile phone is captured, and the event stream information of capture is made Preserved for Operation Log to above-mentioned destination folder.
After getting destination folder, during user uses above-mentioned application, Android SDK are utilized The getevent instruments of (Software Development Kit, SDK), pass through reading/dev/input/ Event* files, in real time record apply the event stream information of all incoming events on mobile phone in running, and by capture Event stream information is preserved to above-mentioned destination folder as Operation Log.The event stream information is the bottom event of time series The Action Events stream information of all applications on stream information, including mobile phone, it not only have recorded user and pass through caused by handset touch panel Incoming event, it is also recorded for all events for coming from the triggering of mobile phone inner sensor.The mobile end due to flow of event information record All incoming events on end, and can completely be embodied comprising the sequential relationship that can be as accurate as microsecond, i.e. event stream information The detailed process for gesture interaction and the sensor interaction that user mutual is related to, therefore the Operation Log comprising event stream information can For the complete scene reappeared when Crash occurs.
Specifically, android system has carried getevent instruments, and event stream information is being obtained using getevent instruments During, the performance of application program is unaffected.The event stream information is five-tuple form, successively including time field, input Device field (DFLD), input equipment type field, key scan code field and additional code field.Such as:[100.119269]/dev/ input/event4:0002 0004 000000ef represent an event five-tuple coding (i.e. event stream information), wherein: [100.119269] it is time field, represents the incident distance cell phone system (android system) the last time started At intervals of 100.119269 seconds;/dev/input/event4:For input equipment field, expression input equipment is event4;0002 0004 000000ef is respectively input equipment type field, key scan code field, adds code field, difference self-explanatory characters' part Type (input equipment type), code (key scan code), value (extra-code).
The other complicated events of Android are formed by above-mentioned flow of event format combination.Touch-screen gesture coding is as follows:
[100.119269]/dev/input/event0:0003 0039 000002a5 represent touch beginning;
[100.119278]/dev/input/event0:0003 0,030 00000004 expression clicks start;
[100.119286]/dev/input/event0:0003 0035 0000017b represent touch point x coordinate;
[100.119295]/dev/input/event0:0003 0036 000001cf represent touch point y-coordinate;
[100.119363]/dev/input/event0:0003 003a 0000001c represent touch point size;
[100.119562]/dev/input/event0:0000 0,000 00000000 represent that event synchronization (clicks on knot Beam);
[100.119967]/dev/input/event0:0003 0039 ffffffff represent that a touch terminates;
[100.119269]/dev/input/event0:0000 0,000 00000000 represent event synchronization (event knot Beam).
Step S103, when above-mentioned application is collapsed, the Operation Log currently preserved is sent to monitoring server.
Monitor whether above-mentioned application collapses in real time.In a possible embodiment, when monitoring mobile phone Android system performs the setDefaultUncaughtExceptionHandler in Thread classes When (UncaughtExceptionHandler handler), determine this using collapsing.After application crashes, pass through execution What the present invention designed realizes the category code of UncaughtExceptionHandler interfaces, and Operation Log transfers after completion collapse And the operation such as upload.
When above-mentioned application is collapsed, the Operation Log currently preserved is transferred from above-mentioned destination folder, and should Operation Log is sent to monitoring server.Specifically, when Crash occurs for application, to mesh before application process terminates Mark file is scanned, and searches the Operation Log file uploaded recently, and obtains title and the path of the Operation Log file, Finally carry out the upload of Operation Log.The upload of Operation Log is specially:Service end (monitoring server) uses Tomcat+ Servlet, client (mobile terminal such as mobile phone) use OKhttp, wherein, OKhttp is the open source projects of processing network request.
, can be with collecting device information and stack information, and by the facility information in addition, when above-mentioned application is collapsed Device file and stack files are saved as with stack information, monitoring server is uploaded to simultaneously with Operation Log.Wherein, equipment is believed Breath includes the operating system and version (such as Android 4.0), network environment (4G environment or Wi-Fi using operation (WIreless-Fidelity, Wireless Fidelity) environment), memory information etc.;Stack information mainly includes the position of error code row With the call stack of function.The facility information and stack information of collection are easy to subsequently preferably reduce the running environment of application, more preferably Ground reproduction application Crash.
In the embodiment of the present invention, when application starts, destination folder is obtained, wherein, the destination folder is empty file Folder;The event stream information of all incoming events on mobile terminal is captured, and using the event stream information of capture as Operation Log Preserve to destination folder;When this is using collapsing, the Operation Log currently preserved is sent to monitoring server.Due to It has recorded all incoming events on mobile terminal in the form of bottom event stream information, and comprising can be as accurate as microsecond Sequential relationship, i.e. event stream information can completely embody the specific mistake of the gesture interaction that user mutual is related to and sensor interaction Journey, therefore the Operation Log comprising event stream information can be used for the complete scene reappeared when Crash occurs.Therefore, it is of the invention The catching method of the application crashes Operation Log of offer, when Crash occurs for application, it can capture for reappearing the application Crash Operation Log, in order to reduce Crash occur when scene, and then be easy to determine application occur Crash the reason for And repair and apply Crash.
Further, due to different vendor, flow of event that Android phone collects difference, different hands The event stream format of type number represents inconsistent, as the event stream format of certain brand mobile phone A is:
[17928.197972]/dev/input/event4:0002 0009 00000799
The event stream format of certain brand mobile phone B is:
[1492524733.054756]/dev/input/event2:0002 0001 00000001
Time field record in the event stream information of certain brand mobile phone A is current time apart from cell phone system nearest one The time interval of secondary startup, and time field record corresponding to certain brand mobile phone B is timestamp, i.e., from Greenwich Mean Time 00 divides rise to current time 00 second (00 divides 00 second during 01 day 08 Beijing time 1970 year 01 month) at 1970 01 month 01 day 00 Total number of seconds.In addition, in time field, some uses strigula, and some uses decimal point;Some uses bracket, and some is adopted With braces (brace) etc..
Disunity is represented in view of event stream format corresponding to different Android types, and mainly time field is not It is unified, follow-up Crash can be influenceed and reappeared, sent by aforesaid operations daily record to before monitoring server, the above method also wraps Include:
Event stream information in scan operation daily record, the event stream information is represented with unified five-tuple form:Time Field, input equipment field, input equipment type field, key scan code field and additional code field.
Specifically, Operation Log is scanned, for the every event stream information scanned, replaced using character string Method, the bracket in the time field of the event stream information is replaced with into space, and the strigula in time field is replaced with Decimal point;The space in the time field after replacement is cut away again, you can obtain the event stream information after standardization, mark Event stream information after quasi-ization processing forms the Operation Log after standardization.Wherein, bracket is included in time field The various types of brackets being likely to occur, such as braces, bracket etc..Such as:For " [99.578741] ", replaced through bracket It is changed into " 99.578741 " after changing, then is changed into " 99.578741 " after being cut to space;For " 40-764251/dev/ input/event4:The event stream information of this forms of 0003 0030 0000001e ", after "-" is replaced with into " ", its time Field is changed into " 40.764251 ".Most all time field is changed into unified form, such as " 99.578741/dev/ at last input/event4:0003 0030 0000001e”。
So, by the standardization to event stream format, unified flow of event five-tuple form can be obtained, is solved The problem of different Android device event stream format are inconsistent, possibility is provided for automation reproduction application Crash.
Fig. 2 is second of schematic flow sheet of the catching method of application crashes Operation Log provided in an embodiment of the present invention, As shown in Fig. 2 second of flow of this method includes following steps:
Step S201, when application starts, judge whether destination folder.If it is, perform step S2021; If it is not, then perform step S2022.
Step S2021, empties destination folder.
Step S2022, new folder, and using newly-built file as destination folder.
Step S203, capturing events stream information, and preserved the event stream information as Operation Log to above-mentioned target text Part presss from both sides.
Step S204, judges whether above-mentioned application occurs Crash.If it is, perform step S2051;If it is not, then hold Row step S2052.
Step S2051, the Operation Log currently preserved is sent to monitoring server.Implementation procedure terminates.
Step S2052, judges whether above-mentioned application is exited.If it is not, then re-execute step S203;If it is, hold Row process terminates.
In summary, the catching method of application crashes Operation Log provided in an embodiment of the present invention, can be with capturing events stream Information, and the performance of application program is unaffected during capturing events stream information, can be with collecting device information and heap Stack information, technical support is provided for follow-up Crash reproduction and positioning.
Embodiment two:
Fig. 3 is the module composition schematic diagram of the acquisition equipment of application crashes Operation Log provided in an embodiment of the present invention, should Device is applied to mobile terminal, as shown in figure 3, the device includes:
First acquisition module 31, for when application starts, obtaining destination folder, wherein, the destination folder is sky File;
Second acquisition module 32, for capturing the event stream information of all incoming events on mobile terminal, and will capture Event stream information preserved as Operation Log to above-mentioned destination folder;
Sending module 33, for when above-mentioned application being collapsed, the Operation Log currently preserved being sent to monitoring and taken Business device.
In the embodiment of the present invention, when application starts, destination folder is obtained, wherein, the destination folder is empty file Folder;The event stream information of all incoming events on mobile terminal is captured, and using the event stream information of capture as Operation Log Preserve to destination folder;When this is using collapsing, the Operation Log currently preserved is sent to monitoring server.Due to It has recorded all incoming events on mobile terminal in the form of bottom event stream information, and comprising can be as accurate as microsecond Sequential relationship, i.e. event stream information can completely embody the specific mistake of the gesture interaction that user mutual is related to and sensor interaction Journey, therefore the Operation Log comprising event stream information can be used for the complete scene reappeared when Crash occurs.Therefore, it is of the invention The acquisition equipment of the application crashes Operation Log of offer, when Crash occurs for application, it can capture for reappearing the application Crash Operation Log, in order to reduce Crash occur when scene, and then be easy to determine application occur Crash the reason for And repair and apply Crash.
Embodiment three:
Referring to Fig. 4, the embodiment of the present invention also provides a kind of mobile terminal 100, including:Processor 40, memory 41, bus 42 and communication interface 43, the processor 40, communication interface 43 and memory 41 connected by bus 42;Processor 40 is used to hold The executable module stored in line storage 41, such as computer program.
Wherein, memory 41 may include high-speed random access memory (RAM, Random Access Memory), Non-labile memory (non-volatile memory), for example, at least a magnetic disk storage may also be included.By extremely A few communication interface 43 (can be wired or wireless) is realized logical between the system network element and at least one other network element Letter connection, can use internet, wide area network, LAN, Metropolitan Area Network (MAN) etc..
Bus 42 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, data Bus, controlling bus etc..Only represented for ease of representing, in Fig. 4 with a four-headed arrow, it is not intended that an only bus or A type of bus.
Wherein, memory 41 is used for storage program, and the processor 40 performs the journey after execute instruction is received Sequence, the method performed by device that the stream process that foregoing any embodiment of the embodiment of the present invention discloses defines can apply to handle In device 40, or realized by processor 40.
Processor 40 is probably a kind of IC chip, has the disposal ability of signal.In implementation process, above-mentioned side Each step of method can be completed by the integrated logic circuit of the hardware in processor 40 or the instruction of software form.Above-mentioned Processor 40 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network Processor (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), application specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or other are programmable Logical device, discrete gate or transistor logic, discrete hardware components.It can realize or perform in the embodiment of the present invention Disclosed each method, step and logic diagram.General processor can be microprocessor or the processor can also be appointed What conventional processor etc..The step of method with reference to disclosed in the embodiment of the present invention, can be embodied directly in hardware decoding processing Device performs completion, or performs completion with the hardware in decoding processor and software module combination.Software module can be located at Machine memory, flash memory, read-only storage, programmable read only memory or electrically erasable programmable memory, register etc. are originally In the ripe storage medium in field.The storage medium is located at memory 41, and processor 40 reads the information in memory 41, with reference to Its hardware completes the step of above method.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description And the specific work process of mobile terminal, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
The acquisition equipment and mobile terminal of application crashes Operation Log provided in an embodiment of the present invention, are carried with above-described embodiment The catching method of the application crashes Operation Log of confession has identical technical characteristic, so can also solve identical technical problem, Reach identical technique effect.
Flow chart and block diagram in accompanying drawing show device, method and the computer journey of multiple embodiments according to the present invention Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for the module, program segment or code include one or more use In the executable instruction of logic function as defined in realization.It should also be noted that marked at some as in the realization replaced in square frame The function of note can also be with different from the order marked in accompanying drawing generation.For example, two continuous square frames can essentially base Originally it is performed in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.It is also noted that It is the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, can uses and perform rule Fixed function or the special hardware based system of action are realized, or can use the group of specialized hardware and computer instruction Close to realize.
The computer program product of the catching method for the carry out application crashes Operation Log that the embodiment of the present invention is provided, bag The computer-readable recording medium for storing the executable non-volatile program code of processor is included, described program code includes Instruction can be used for performing the method described in previous methods embodiment, and specific implementation can be found in embodiment of the method, no longer superfluous herein State.
In several embodiments provided herein, it should be understood that disclosed method, device and mobile terminal, It can realize by another way.Device embodiment described above is only schematical, for example, the unit is drawn Point, only a kind of division of logic function, there can be other dividing mode when actually realizing, in another example, multiple units or group Part can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown Or the mutual coupling discussed or direct-coupling or communication connection can be by some communication interfaces, device or unit INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can be with It is stored in the executable non-volatile computer read/write memory medium of a processor.Based on such understanding, the present invention The part that is substantially contributed in other words to prior art of technical scheme or the part of the technical scheme can be with software The form of product is embodied, and the computer software product is stored in a storage medium, including some instructions are causing One computer equipment (can be personal computer, server, or network equipment etc.) performs each embodiment institute of the present invention State all or part of step of method.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read- Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with The medium of store program codes.
Finally it should be noted that:Embodiment described above, it is only the embodiment of the present invention, to illustrate the present invention Technical scheme, rather than its limitations, protection scope of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, it will be understood by those within the art that:Any one skilled in the art The invention discloses technical scope in, it can still modify to the technical scheme described in previous embodiment or can be light Change is readily conceivable that, or equivalent substitution is carried out to which part technical characteristic;And these modifications, change or replacement, do not make The essence of appropriate technical solution departs from the spirit and scope of technical scheme of the embodiment of the present invention, should all cover the protection in the present invention Within the scope of.Therefore, protection scope of the present invention described should be defined by scope of the claims.

Claims (10)

1. a kind of catching method of application crashes Operation Log, it is characterised in that applied to mobile terminal, methods described includes:
When application starts, destination folder is obtained, wherein, the destination folder is empty folder;
Capture the event stream information of all incoming events on the mobile terminal, and using the event stream information of capture as Operation Log is preserved to the destination folder;
When the application is collapsed, the Operation Log currently preserved is sent to monitoring server.
2. according to the method for claim 1, it is characterised in that when the mobile terminal uses Android android system, Methods described also includes:
When monitoring that the android system creates Application object for the application, determine that the application starts.
3. according to the method for claim 1, it is characterised in that it is described when application starts, obtain destination folder, bag Include:
When application starts, detect the mobile terminal and whether there is destination folder;
If it is, empty the destination folder;
If it is not, then new folder, and using newly-built file as destination folder.
4. according to the method for claim 2, it is characterised in that all incoming events on the capture mobile terminal Event stream information, including:
Using Android SDK getevent instruments, record described using all on mobile terminal described in running The event stream information of incoming event.
5. according to the method for claim 2, it is characterised in that methods described also includes:
When monitoring that the android system performs the setDefaultUncaughtExceptionHandler in Thread classes When, determine that the application is collapsed.
6. according to the method for claim 1, it is characterised in that it is described when the application is collapsed, will currently it preserve Operation Log send to monitoring server, including:
When the application is collapsed, the Operation Log currently preserved is transferred from the destination folder;
The Operation Log is sent to monitoring server.
7. according to the method for claim 6, it is characterised in that it is described by the Operation Log send to monitoring server it Before, methods described also includes:
Scan the event stream information in the Operation Log;
The standardization of time field is carried out to the event stream information, obtains the Operation Log after standardization, wherein, Event stream information in Operation Log after the standardization is represented with unified five-tuple form.
8. a kind of acquisition equipment of application crashes Operation Log, it is characterised in that applied to mobile terminal, described device includes:
First acquisition module, for when application starts, obtaining destination folder, wherein, the destination folder is empty file Folder;
Second acquisition module, for capturing the event stream information of all incoming events on the mobile terminal, and by capture The event stream information is preserved to the destination folder as Operation Log;
Sending module, for when the application is collapsed, the Operation Log currently preserved to be sent to monitoring server.
9. a kind of mobile terminal, including memory, processor, it is stored with what can be run on the processor in the memory Computer program, it is characterised in that realize in the claims 1 to 7 and appoint during computer program described in the computing device The step of method described in one.
10. a kind of computer-readable medium for the non-volatile program code that can perform with processor, it is characterised in that described Program code makes any methods described in the computing device the claims 1 to 7.
CN201710706953.3A 2017-08-17 2017-08-17 Catching method, device and the mobile terminal of application crashes Operation Log Pending CN107491383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710706953.3A CN107491383A (en) 2017-08-17 2017-08-17 Catching method, device and the mobile terminal of application crashes Operation Log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710706953.3A CN107491383A (en) 2017-08-17 2017-08-17 Catching method, device and the mobile terminal of application crashes Operation Log

Publications (1)

Publication Number Publication Date
CN107491383A true CN107491383A (en) 2017-12-19

Family

ID=60645403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710706953.3A Pending CN107491383A (en) 2017-08-17 2017-08-17 Catching method, device and the mobile terminal of application crashes Operation Log

Country Status (1)

Country Link
CN (1) CN107491383A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009073A (en) * 2017-12-21 2018-05-08 深圳市金立通信设备有限公司 By method, terminal and the computer-readable recording medium of daily record reproduction touch trajectory
CN108021491A (en) * 2017-12-28 2018-05-11 宇龙计算机通信科技(深圳)有限公司 Terminal daily record grasping means, device and terminal log analysis method, device
CN109086157A (en) * 2018-08-02 2018-12-25 北京达佳互联信息技术有限公司 Log method for tracing, device, electronic equipment and storage medium
CN109408345A (en) * 2018-09-25 2019-03-01 深圳壹账通智能科技有限公司 Operate replay method, device, computer equipment and storage medium
CN109697145A (en) * 2018-12-19 2019-04-30 国云科技股份有限公司 A method of automatically analyzing cloud desktop blue screen
CN110519126A (en) * 2019-09-19 2019-11-29 山东爱城市网信息技术有限公司 A kind of mobile terminal behavior monitoring method
CN110765007A (en) * 2019-09-29 2020-02-07 南京大学 Crash information online analysis method for android application
CN111290871A (en) * 2018-12-10 2020-06-16 北京京东尚科信息技术有限公司 Method and device for acquiring crash information of application program
CN111427621A (en) * 2018-12-24 2020-07-17 北京奇虎科技有限公司 Network monitoring method and device based on plug-in, computing equipment and storage medium
CN111435326A (en) * 2019-01-15 2020-07-21 北京京东尚科信息技术有限公司 Method and device for analyzing crash logs
CN112559277A (en) * 2019-09-25 2021-03-26 北京百度网讯科技有限公司 Crash information processing method, system, vehicle-mounted device, server, electronic device and storage medium
CN114785676A (en) * 2022-03-02 2022-07-22 深圳市优必选科技股份有限公司 Method, device and equipment for extracting log and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544096A (en) * 2013-10-21 2014-01-29 Tcl集团股份有限公司 Method and system for feeding back information in case of operational failure of Android terminal
CN104216811A (en) * 2013-05-30 2014-12-17 腾讯科技(深圳)有限公司 Log collecting method and system of application program
CN104331662A (en) * 2013-07-22 2015-02-04 深圳市腾讯计算机系统有限公司 Method and device for detecting Android malicious application
CN105068881A (en) * 2015-08-19 2015-11-18 北京奇虎科技有限公司 Method, device and system for repairing abnormal operation of application program
CN105512015A (en) * 2015-12-15 2016-04-20 北京奇虎科技有限公司 Android target application crash calculation method and device
CN105868083A (en) * 2015-01-21 2016-08-17 中兴通讯股份有限公司 User operation playback method and apparatus
CN106126397A (en) * 2016-06-19 2016-11-16 乐视控股(北京)有限公司 The processing method of program crashing message and system
CN106557402A (en) * 2016-10-31 2017-04-05 努比亚技术有限公司 Mobile terminal and abnormal information processing method
CN106776245A (en) * 2016-11-18 2017-05-31 维沃移动通信有限公司 A kind of abnormal application processing method, device and mobile terminal
CN107045607A (en) * 2016-12-13 2017-08-15 全球能源互联网研究院 Using abnormal behaviour identification model method for building up and device, recognition methods and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216811A (en) * 2013-05-30 2014-12-17 腾讯科技(深圳)有限公司 Log collecting method and system of application program
CN104331662A (en) * 2013-07-22 2015-02-04 深圳市腾讯计算机系统有限公司 Method and device for detecting Android malicious application
CN103544096A (en) * 2013-10-21 2014-01-29 Tcl集团股份有限公司 Method and system for feeding back information in case of operational failure of Android terminal
CN105868083A (en) * 2015-01-21 2016-08-17 中兴通讯股份有限公司 User operation playback method and apparatus
CN105068881A (en) * 2015-08-19 2015-11-18 北京奇虎科技有限公司 Method, device and system for repairing abnormal operation of application program
CN105512015A (en) * 2015-12-15 2016-04-20 北京奇虎科技有限公司 Android target application crash calculation method and device
CN106126397A (en) * 2016-06-19 2016-11-16 乐视控股(北京)有限公司 The processing method of program crashing message and system
CN106557402A (en) * 2016-10-31 2017-04-05 努比亚技术有限公司 Mobile terminal and abnormal information processing method
CN106776245A (en) * 2016-11-18 2017-05-31 维沃移动通信有限公司 A kind of abnormal application processing method, device and mobile terminal
CN107045607A (en) * 2016-12-13 2017-08-15 全球能源互联网研究院 Using abnormal behaviour identification model method for building up and device, recognition methods and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009073A (en) * 2017-12-21 2018-05-08 深圳市金立通信设备有限公司 By method, terminal and the computer-readable recording medium of daily record reproduction touch trajectory
CN108021491A (en) * 2017-12-28 2018-05-11 宇龙计算机通信科技(深圳)有限公司 Terminal daily record grasping means, device and terminal log analysis method, device
CN109086157A (en) * 2018-08-02 2018-12-25 北京达佳互联信息技术有限公司 Log method for tracing, device, electronic equipment and storage medium
CN109408345A (en) * 2018-09-25 2019-03-01 深圳壹账通智能科技有限公司 Operate replay method, device, computer equipment and storage medium
CN111290871A (en) * 2018-12-10 2020-06-16 北京京东尚科信息技术有限公司 Method and device for acquiring crash information of application program
CN109697145A (en) * 2018-12-19 2019-04-30 国云科技股份有限公司 A method of automatically analyzing cloud desktop blue screen
CN111427621A (en) * 2018-12-24 2020-07-17 北京奇虎科技有限公司 Network monitoring method and device based on plug-in, computing equipment and storage medium
CN111435326A (en) * 2019-01-15 2020-07-21 北京京东尚科信息技术有限公司 Method and device for analyzing crash logs
CN110519126A (en) * 2019-09-19 2019-11-29 山东爱城市网信息技术有限公司 A kind of mobile terminal behavior monitoring method
CN112559277A (en) * 2019-09-25 2021-03-26 北京百度网讯科技有限公司 Crash information processing method, system, vehicle-mounted device, server, electronic device and storage medium
CN110765007A (en) * 2019-09-29 2020-02-07 南京大学 Crash information online analysis method for android application
CN114785676A (en) * 2022-03-02 2022-07-22 深圳市优必选科技股份有限公司 Method, device and equipment for extracting log and storage medium

Similar Documents

Publication Publication Date Title
CN107491383A (en) Catching method, device and the mobile terminal of application crashes Operation Log
US20180329690A1 (en) Converting visual diagrams into code
CN109561117B (en) Data acquisition method and device
CN110889056B (en) Page marking method and device
CN107609437A (en) A kind of targeted graphical code recognition methods and device
CN107391357A (en) Application crashes replay method, device and mobile terminal
CN110362483A (en) Performance data acquisition method, device, equipment and storage medium
CN104346267A (en) Method and device for generating program bug positioning information
CN112000563A (en) User behavior recording method, device and equipment
CN111367976A (en) Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN104598570A (en) Resource fetching method and device
CN107678872A (en) The processing method and processing device of electronic whiteboard
CN113268243B (en) Memory prediction method and device, storage medium and electronic equipment
CN112015626A (en) User behavior recording method, device and equipment
CN108984339A (en) Data reconstruction method and Related product
CN108241676A (en) Realize the method and apparatus that data synchronize
CN109828759A (en) Code compiling method, device, computer installation and storage medium
CN112307386A (en) Information monitoring method, system, electronic device and computer readable storage medium
CN111026945B (en) Multi-platform crawler scheduling method, device and storage medium
CN109933260A (en) Know screen method, apparatus, terminal and storage medium
CN113064895B (en) Incremental updating method, device and system for map
CN108153655A (en) The detection method and storage medium of the draw call quantity of virtual reality software
CN111026657B (en) Method, computing device and medium for testing application in mobile terminal
CN108132883A (en) A kind of software test data analysis method, device, system and storage medium
CN114548040A (en) Note processing method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171219