Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawingExemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth hereIt is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosureCompletely it is communicated to those skilled in the art.
Response often occurs in the process of running for application program slowly or without slow problems of cards such as responses.To improve application programOr repair and block slow problem, positioning is needed to block the occurrence cause of slow problem, but the hair of the slow phenomenon of card can not be accurately positioned in the prior artRaw reason.
In view of the above-mentioned problems, one embodiment of the application provides a kind of card slow abnormal alignment system, it is slow card is accurately positionedThe occurrence cause of phenomenon.As shown in Figure 1a, which includes:Server 10 and client 20.
Wherein, client 20 is deployed in pending application program one end.The pending application program refers to need to positionBlock the application program of the occurrence cause of slow phenomenon, for example, can be thousand Ns, Wang Wang, QQ, Taobao, Jingdone district, drop drop etc. is any hasThe application program of human-computer interaction interface.As shown in Figure 1a, a kind of realization structure of client 20, including:Monitoring module 21, crawlModule 22 and reporting module 23.
Monitoring module 21 for the operating status according to pending application program median surface thread, determines that card occurs slowly nowAs.Wherein, interface thread refers to the thread for being used to handle user's input, response events and message in pending application program.BoundaryUpper thread journey includes a message loop, and is associated with a main window.Message loop be main window and its child window dispatch messages, intoRow message-driven so that main window can respond the interactive operation of user and other system events.If in interface threadSomewhere can not return the result or even stop for a long time, this illustrates that interface thread even can not cannot handle window and disappear in timeIt ceases, just will appear the slow phenomenon of card.Therefore monitoring module 21 can determine to occur to block slow phenomenon by the operating status of interface thread.
Block slow phenomenon to be primarily referred to as in application program operational process, the problems such as response of generation is slowly or without response, it is describedResponse slowly or without response is primarily referred to as user can perceive and user without the slow phenomenon of slightly card significantly perceived, such asWith the relevant response problem of human-computer interaction interface.
The reason of causing card slow phenomenon have it is very much, for instance it can be possible that interface thread has been done than relatively time-consuming operation, because cannotIt returns the result the refreshing for leading to human-computer interaction interface in time and operation is affected, occur blocking slow phenomenon, but it is not limited to this.ItsIn, the relatively time-consuming operation of ratio that interface thread is done may be more complicated time-consuming operation or call I/O operation or hairNet requests are played, but not limited to this.
Handling module 22 is connect with monitoring module 21, for when monitoring module 21 determines to occur to block slow phenomenon, crawl to blockThe storehouse context of pending application program when slow phenomenon occurs.Reporting module 23 is connect with handling module 22, for that will captureThe stack files that module 22 is captured save as collapse (dump) file, and collapse file is sent to server 10.
Server 10, for receiving the collapse file of the transmission of reporting module 23, according to the collapse slow phenomenon of document alignment cardOccurrence cause, and abnormal location information, the slow abnormal location information of card include blocking the hair of slow phenomenon slowly to client sending cardRaw reason.Correspondingly, reporting module 23 is additionally operable to receive card that server 10 is sent abnormal location information slowly, to be directed to card slowlyThe occurrence cause of phenomenon carries out respective handling.
In an optional embodiment, monitoring module 21 can be with the responsive state of monitoring interface thread;According to interface threadResponsive state, determine to occur to block slow phenomenon.
For example, monitoring module 21 can send the message with timeout parameter to the window of interface thread;Normal condition, meetingReturning the result for the message is got in the time specified in the timeout parameter;If fail what is specified in the timeout parameterReturning the result for the message is got in time, it is believed that can not in the time that interface thread is specified in the timeout parameterThe message, i.e. interface thread response timeout are responded, it is slow that card occurs for program.
Optionally, server 10 is according to collapse file analysis positioning other than blocking the occurrence cause of slow phenomenon, can be withIt controls whether the operation of client 20 and operating parameter is set dynamically for client 20 so that developer can be according to programThe operation of the stage of version publication and number of users, in real time dynamic adjustment client 20.For example, server 10 can be to monitoring mould21 sending card of block abnormal locational decision information slowly.Correspondingly, it is different slowly to be additionally operable to the card that reception server 10 is sent for monitoring module 21Normal locational decision information.The slow abnormal locational decision information of card includes but not limited to:Block slow monitoring strategies (to monitor including controlThe switch start and stop of module 21, monitoring frequency, the slow condition of card etc.) and collapse file upload strategy etc..Uploading strategy can beIt uploads or periodically uploads in real time.In this way client 20 can according to the slow slow phenomenon of monitoring strategies monitor card of card whetherOccur, and collapse file is uploaded to server 10 according to strategy is uploaded, so that the generation of the slow phenomenon of 10 analyzing card of server is formerCause.
For example, server 10 can be set or adjusted the monitoring frequency of monitoring module 21 and be handed down to monitoring module 21.BaseIn this, monitoring module 21 periodically can send disappearing with timeout parameter according to monitoring frequency to the window of interface threadBreath, with periodic monitoring interface thread whether response timeout.Within each period, the knot of the message according to transmitted by the periodFruit return situation, judge interface thread whether response timeout.
In another example server 10 can also set the slow condition of card, and the slow condition of card is handed down to monitoring module 21, for prisonControl module 21 judges whether to occur to block slow phenomenon.Judge whether that generation blocks slow item based on blocking slow phenomenon as the setting of server 10Part can flexibly define the slow phenomenon of card, and flexibility is stronger, is adaptable to different application and application scenarios.
Optionally, the slow condition of the card can be in response to time-out, the number of response timeout be more than preset frequency threshold value orThe time interval between response timeout is less than preset interval threshold to person twice in succession.Based on this, monitoring module 21 is according to interfaceThe responsive state of thread, the mode for determining to occur to block slow phenomenon can be it is following any one:
The first:If monitoring module 21 determines the response timeout of interface thread, it is determined that occurs to block slow phenomenon.
Second:If monitoring module 21 determines interface thread response timeout, it is super can further to count the response of parting line journeyWhen number, if the number of interface thread response timeout is more than frequency threshold value, determine to occur to block slow phenomenon.
The third:If monitoring module 21 determines interface thread response timeout, can further observation interface thread whether connectContinuous response timeout twice;If interface thread response timeout twice in succession, statistics parting line journey is twice in succession between response timeoutTime interval;If the time interval between response timeout is less than interval threshold to interface thread twice in succession, determine card occurs slow existingAs.
After monitoring module 21 determines to occur to block slow phenomenon, handling module 22 can capture pending when the slow phenomenon of card occursThe storehouse context of application program, and save as collapse file;By reporting module 23 server 10 is sent to by file is collapsed.
Optionally, the analysis of server 10 collapse file may be used but be not limited in the following manner;
The output collapse file of server 10, analyzes collapse file by technical staff, feature extraction is carried out according to analysis result,Obtain the feature that collapse file has;Alternatively, server 10 can also be automatically analyzed and be collapsed according to preset analysis template or ruleRouted file simultaneously carries out feature extraction, obtains the feature that collapse file has.
After the feature that has of extraction collapse file, server 10 can will collapse feature that file has markedIt is matched in feature, the marked feature in the collapse file matching is obtained, by the marked feature pair in the matchingThe reason of answering, the reason of occurring to block slow phenomenon as pending application program.In the present embodiment, marked spy can constantly be collectedIt levies and corresponding can block slow reason, the marked feature refers to be known that the corresponding spy for blocking slow reason by this featureSign.
Optionally, server 10 can also be according to information such as the title of pending application program and versions, to collapsing fileAnd feature extracted etc. carries out classification storage and ranking, it is fixed so that developer analyzes collapse file on backstageBlock the occurrence cause of slow phenomenon in position.
In above-mentioned alternative embodiment mode, collected marked feature can be more and more, for collapse fileAnalysis will be more and more intelligent, is asked slowly convenient for quickly positioning the most card of the occurrence cause of the slow phenomenon of card, especially frequencyTopic, can quickly solve the problems, such as that card is slow, accelerate the treatment effeciency of problem.
In an optional embodiment, client 20 can be deployed in inside pending application program, i.e., monitoring module 21,Handling module 22 and reporting module 23 are run directly within pending application program, are realized in process and are monitored.With instant messagingFor tool is prosperous, illustrate the system structure of the optional embodiment, as shown in Figure 1 b.What deserves to be explained is due to and be not related toThe functions of Wang Wang in itself are noted, therefore the partial function modules of Wang Wang in itself are only shown in Fig. 1 b.Or
In an optional embodiment, client 20 can be an application of independent operating except pending application programProgram, i.e. monitoring module 21, handling module 22 and reporting module 23 are operated in except pending application program, are realized and are supervised outside processControl.The system structure of the optional embodiment can be found in shown in Fig. 1 a.Or
In an optional embodiment, the partial function of client 20 is deployed in inside pending application program, part work(It can be deployed in except pending application program.
It is realized for example, monitoring module 21 and reporting module 23 are deployed in inside pending application program, handling module 22It is deployed on except pending application program and realizes.Based on the deployment way, the operation principle of client 20 is as follows:
After pending application program launching, it can be configured according to monitoring and start monitoring module 21;Monitoring module 21 is activatedAfterwards, the operating status of pending application program median surface thread is monitored, the operating status based on interface thread, it is determined whether occurBlock slow phenomenon;When determining the slow phenomenon of genetic method card, when monitoring module 21 can call the crawl of handling module 22 to block slow phenomenon to occurThe storehouse context of pending application program;The crawl of handling module 22 blocks when slow phenomenon occurs on the storehouse of pending application programHereafter, it and is saved as collapsing file.Optionally, storehouse context can be saved as client 20 and specified by handling module 22Disk directory in collapse file.Reporting policy when reporting module 23 is activated or according to setting can check client 20Whether the collapse file that does not upload is had in the disk directory specified, if finding to have the collapse file not uploaded, on server 10Report collapse file.What deserves to be explained is collapse the upload of file, can be it is real-time or non real-time, can be by reportingStrategy decision.
The slow abnormal alignment system of card provided in this embodiment, client is according to the fortune of pending application program median surface threadRow state determines to occur to block slow phenomenon, and crawl in time blocks the storehouse context of pending application program when slow phenomenon occurs, and preservesFor collapse file and it is uploaded to server;Server solves existing according to the occurrence cause of the collapse slow phenomenon of document alignment cardThe problem of occurrence cause of the slow phenomenon of card can not be accurately positioned in technology.
The problem of for the occurrence cause that can not position the slow phenomenon of card in the prior art, the embodiment of the present application is in addition to providing cardExcept slow exception alignment system, from the angle of client, a kind of slow abnormal localization method of card is additionally provided, card is accurately positionedThe occurrence cause of slow phenomenon.As shown in Figure 2 a, this method includes the following steps:
201st, it according to the operating status of pending application program median surface thread, determines to occur to block slow phenomenon.
202nd, crawl blocks the storehouse context of pending application program when slow phenomenon occurs.
203rd, according to storehouse context, positioning blocks the occurrence cause of slow phenomenon.
Block slow phenomenon to be primarily referred to as in application program operational process, the problems such as response of generation is slowly or without response, it is describedResponse slowly or without response is primarily referred to as user can perceive and user without the slow phenomenon of slightly card significantly perceived, such asWith the relevant response problem of human-computer interaction interface.
Based on above-mentioned, the slow abnormal positioning function of card can be disposed in pending application program internally and/or externally.It is describedThe slow abnormal positioning function of card is mainly used for realizing method flow provided in this embodiment.Specifically, monitor pending application programThe operating status of median surface thread, according to the operating status of interface thread, it is determined whether occur to block slow phenomenon;Block when determiningDuring slow phenomenon, crawl in time blocks the storehouse context of pending application program when slow phenomenon occurs;It is recorded in the storehouse contextThere are the information such as operating status of pending application program at that time, therefore, can it is slow to be positioned according to the storehouse context captured for cardThe occurrence cause of phenomenon.
In an optional embodiment, can with monitoring interface thread whether response timeout, to determine to occur to block slow phenomenon.
Optionally, the message with timeout parameter can be sent to the window of interface thread;Judge whether in the time-outReturning the result for the message is got in the time that parameter is specified, if failing to obtain in the time specified in the timeout parameterTo returning the result for the message, interface thread response timeout is determined.
Further, it is possible to according to monitoring frequency, the message periodically is sent to the window of interface thread, in order to weekThe monitoring interface thread of phase property whether response timeout.Within each period, the result of the message according to transmitted by the periodReturn situation, judge interface thread whether response timeout.
Above-mentioned monitoring frequency can be set dynamically by server, alternatively, can also be by manually setting.The monitoring frequencyValue do not limit, depending on concrete application demand.
Optionally, according to application program and the difference of application demand, the implementation process for determining to occur to block slow phenomenon also hasInstitute is different.It illustrates:Server, which can be pre-set, to be judged whether to occur to block the slow condition of card based on slow phenomenon.The cardSlow condition include but not limited to it is following any one:Response timeout, the number of response timeout be more than preset frequency threshold value orThe time interval between response timeout is less than preset interval threshold twice in succession.
Based on the slow condition of above-mentioned card, determine that the embodiment for occurring to block slow phenomenon includes following at least one:
The first:If thread response in interface is super, it is determined that occurs to block slow phenomenon.
Second:If interface thread response timeout, the number of parting line journey response timeout is further counted, if interface threadThe number of response timeout is more than frequency threshold value, it is determined that occurs to block slow phenomenon.
The third:If thread response in interface is super, further observation interface thread whether twice in succession response timeout;If interfaceThread response timeout twice in succession, the statistics parting line journey time interval between response timeout twice in succession;If interface thread connectsTime interval between continuous response timeout twice is less than interval threshold, it is determined that occurs to block slow phenomenon.
When determining to occur to block slow phenomenon, crawl in time blocks when slow phenomenon occurs above and below the storehouse of pending application programText, in order to position the occurrence cause of the slow phenomenon of card.Optionally, storehouse context can be saved as to collapse file, based on instituteCollapse file is stated, positioning blocks the occurrence cause of slow phenomenon.The collapse file can be stored in the disk directory specified.ItsIn, storehouse context is saved as the collapse file in the disk directory specified so that it is existing slowly can to position card at any timeThe occurrence cause of elephant, flexibility are stronger.
In an optional embodiment, the operation that positioning blocks the occurrence cause of slow phenomenon can be completed by server.It is based onThis, can be sent to server by collapse file, so that server is according to the occurrence cause of the collapse slow phenomenon of document alignment card, andThe abnormal location information that server is sent is received, the exception location information includes the generation of the slow phenomenon of card that server selection arrivesReason.
In an optional embodiment, the abnormal locational decision information of server transmission can be also received, the card is slow abnormalLocational decision information include blocking slow monitoring strategies (start and stop, monitoring frequency, the slow condition of card including controlling monitoring process etc.) andCollapse upload strategy of file etc..Based on this, whether can be occurred, and according to upper according to the slow slow phenomenon of monitoring strategies monitor card of cardIt passes strategy and collapse file is uploaded to server, for the occurrence cause of the slow phenomenon of server analysis card.Uploading strategy can beIt uploads or periodically uploads in real time.Or
In an optional embodiment, the operation that positioning blocks the occurrence cause of slow phenomenon can be completed local.Based on this,It, can be directly in local according to the hair of the collapse slow phenomenon of document alignment card without being uploaded to server after collapse file is obtainedRaw reason.
Optionally, above-mentioned based on collapse file, the occurrence cause that positioning blocks slow phenomenon can include:Extraction collapse file toolSome features;The feature that collapse file has in marked feature is matched, is obtained in the collapse file matchingMarked feature the reason of the marked feature in the matching is corresponded to, occurs to block slow phenomenon as pending application programThe reason of.In the present embodiment, it can constantly collect marked feature and corresponding can block slow reason, the marked feature isRefer to and the corresponding feature for blocking slow reason is known that by this feature.
Optionally, the feature that has of said extracted collapse file can be:Output collapse file, is collapsed by technical staff's analysisRouted file carries out feature extraction according to analysis result, obtains the feature that collapse file has;It alternatively, can also be according to presetAnalysis template or rule automatically analyze collapse file and carry out feature extraction, obtain the feature that collapse file has.
The slow abnormal localization method of card provided in this embodiment, according to the operation shape of pending application program median surface threadState determines to occur to block slow phenomenon, and crawl in time blocks the storehouse context of pending application program when slow phenomenon occurs, according to storehouseContext positioning blocks the occurrence cause of slow phenomenon, solves the prior art occurrence cause of the slow phenomenon of card can not be accurately positioned and askTopic.
The problem of for the occurrence cause that can not position the slow phenomenon of card in the prior art, the embodiment of the present application is in addition to providing cardExcept slow exception alignment system, from the angle of server, a kind of slow abnormal localization method of card is additionally provided, card is accurately positionedThe occurrence cause of slow phenomenon.As shown in Figure 2 b, this method includes:
301st, server receives the collapse file that client is sent, and the collapse file is client according to pending applicationWhat storehouse context when slow phenomenon occurs to block for program generated.
Wherein, the description as described in client generates collapse file can be found in previous embodiment, and details are not described herein.
302nd, the feature that the server extraction collapse file has.
303rd, server matches the feature that the collapse file has in marked feature;Acquisition is collapsed by describedThe slow reason of card corresponding to marked feature in routed file matching, the occurrence cause as the slow phenomenon of card.
Optionally, server can also abnormal location information, the exception location information include slowly to client sending cardThe occurrence cause of the slow phenomenon of card that server selection arrives, so as to the occurrence cause of the slow phenomenon of client unfreezing, and then for cardThe occurrence cause of slow phenomenon carries out respective handling.
Optionally, server can also abnormal locational decision information, the slow exception of card position slowly to client sending cardDecision information include the slow monitoring strategies of server card (including controlling switch start and stop of monitoring module 21, monitoring frequency etc.) andUpload strategy of file etc. is collapsed, in order to which whether client occurs according to the slow slow phenomenon of monitoring strategies monitor card of card, and according toIt uploads strategy and collapse file is uploaded to server.
In the present embodiment, server can constantly collect marked feature and corresponding can block slow reason, described to have markedNote feature refers to be known that the corresponding feature for blocking slow reason by this feature.
The detailed description of this method can be found in previous embodiment, and details are not described herein.
In the present embodiment, collected marked feature can be more and more, and the analysis for collapsing file will be got overCome it is more intelligent, can be quick convenient for quickly positioning the slow problem of the most card of the occurrence cause of the slow phenomenon of card, especially frequencyIt solves the problems, such as that card is slow, accelerates the treatment effeciency of problem.
The problem of for the occurrence cause that can not position the slow phenomenon of card in the prior art, the embodiment of the present application is in addition to providing cardExcept slow exception alignment system, method, a kind of slow abnormal positioning device of card is additionally provided, the hair of the slow phenomenon of card is accurately positionedRaw reason.As shown in figure 3, the device includes:Monitoring module 31, handling module 32 and locating module 33.
Monitoring module 31 for the operating status according to pending application program median surface thread, determines that card occurs slowly nowAs.
Handling module 32, for capturing the storehouse context for blocking pending application program when slow phenomenon occurs.
Locating module 33, for the storehouse context captured according to handling module 32, the generation that positioning blocks slow phenomenon is formerCause.
In an optional embodiment, monitoring module 31 is specifically used for:The responsive state of monitoring interface thread;According to interfaceThe responsive state of thread determines to occur to block slow phenomenon.
Further, optionally, the responsive state of 31 monitoring interface thread of monitoring module, specially:To the window of interface threadMouth sends the message with timeout parameter;If fail to get the return of the message in the timeout parameter in the time specifiedAs a result, determine interface thread response timeout.
Further, optionally, monitoring module 31 sends message to the window of interface thread, specially:According to monitoring frequency,Periodically the message is sent to window handle.
In an optional embodiment, monitoring module 31 determines to occur to block slow phenomenon according to the responsive state of interface thread,Specially:
If interface thread response timeout, determine to occur to block slow phenomenon;Or
If the number of interface thread response timeout is more than frequency threshold value, determine to occur to block slow phenomenon;Or
If the time interval between response timeout is less than interval threshold to interface thread twice in succession, determine card occurs slow existingAs.
In an optional embodiment, for locating module 33 according to storehouse context, positioning blocks the occurrence cause of slow phenomenon, toolBody is:Storehouse context is saved as into collapse file;According to collapse file, positioning blocks the occurrence cause of slow phenomenon.
In an optional embodiment, locating module 33 can be local in the slow abnormal positioning device of card, according to collapse file,Positioning blocks the occurrence cause of slow phenomenon.
In an optional embodiment, collapse file can be sent to server by locating module 33, by server selectionBlock the occurrence cause of slow phenomenon, and receive the card of server transmission abnormal location information, the exception location information include clothes slowlyThe occurrence cause of the slow phenomenon of card that business device navigates to.
In an optional embodiment, monitoring module 31 can also be used to receiving card that server is sent abnormal locational decision slowlyInformation, the slow abnormal locational decision information of card include blocking slow monitoring strategies (switch start and stop, prison including controlling monitoring module 31Control frequency etc.) and collapse file upload strategy etc..Based on this, monitoring module 31 can be monitored according to the slow monitoring strategies of cardBlock whether slow phenomenon occurs, and collapse file is uploaded to server according to strategy is uploaded, for the slow phenomenon of server analysis cardOccurrence cause.
In an optional embodiment, locating module 33 blocks the occurrence cause of slow phenomenon according to collapse file, positioning, specificallyFor:The feature that the collapse file has is extracted, the feature that the collapse file has is matched in marked feature,It obtains by the slow reason of card corresponding to the marked feature in the collapse file matching, the generation as the slow phenomenon of card is formerCause.
The slow abnormal positioning device of card provided in this embodiment can perform the stream of above-mentioned card abnormal localization method embodiment slowlyJourney, related details can be found in preceding method embodiment, and details are not described herein.
The slow abnormal positioning device of card provided in this embodiment, according to the operation shape of pending application program median surface threadState determines to occur to block slow phenomenon, and crawl in time blocks the storehouse context of pending application program when slow phenomenon occurs, according to storehouseContext positioning blocks the occurrence cause of slow phenomenon, solves the prior art occurrence cause of the slow phenomenon of card can not be accurately positioned and askTopic.
The foregoing describe the built-in function and structure of the slow abnormal positioning device of card, as shown in figure 4, in practice, the card is different slowlyNormal positioning device can be realized as a kind of electronic equipment, including:Memory 41 and processor 42.
Memory 41, for storing pending application program.In the present embodiment, the pending application program is in addition to packetIt includes except business function code, is also embedded with the slow abnormal positioning function code of card.
In addition to above-mentioned pending application program, memory 41 is also configured to store other various data to supportOperation on electronic equipment.The example of these data is included for any application program for operating on an electronic device or methodInstruction, contact data, telephone book data, message, picture, video etc..
Memory 41 can realize by any kind of volatibility or non-volatile memory device or combination thereof, such asStatic RAM (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable is read-only to be depositedReservoir (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk orCD.
Processor 42, coupled to memory 41, for performing the pending application program in memory 41, specifically, oneAspect performs business function code and realizes service logic, on the other hand performs the slow abnormal positioning function code of card, for:
According to the operating status of pending application program median surface thread, determine to occur to block slow phenomenon;Crawl blocks slow phenomenonThe storehouse context of pending application program during generation;According to storehouse context, positioning blocks the occurrence cause of slow phenomenon.
In an optional embodiment, processor 42 is according to the operation shape of the pending application program median surface threadState determines to occur to block slow phenomenon, specially:
Monitor the responsive state of the interface thread;
According to the responsive state of the interface thread, determine that the slow phenomenon of card occurs.
Optionally, as shown in figure 4, electronic equipment further includes:Communication component 43.
Communication component 43 is configured to facilitate the communication of wired or wireless way between electronic equipment and other equipment.ElectronicsEquipment can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary realityIt applies in example, communication component 43 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channelBreath.In one exemplary embodiment, the communication component 43 further includes near-field communication (NFC) module, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) skill can be based in NFC moduleArt, bluetooth (BT) technology and other technologies are realized.
Based on communication component 43, processor 42 monitors the responsive state of the interface thread, specially:
Message with timeout parameter is sent to the window of the interface thread by communication component 43;And monitoring communicationWhether the returning the result of the message is received in the time that component 43 is specified in the timeout parameter, if monitoring communication component43 fail to receive returning the result for the message in the time specified in the timeout parameter, determine that interface thread response is superWhen.
Communication component 43 coupled to processor 42, for sending the message to the window of interface thread, and waits to be receivedThe message returns the result.
Further alternative, communication component 43 sends message to the window of the interface thread, specially:According to monitoring frequencyRate periodically sends the message to the window handle.
In an optional embodiment, processor 42 positions the occurrence cause of the slow phenomenon of card, specially:
If the interface thread response timeout, determine that the slow phenomenon of card occurs;Or
If the number of the interface thread response timeout is more than frequency threshold value, determine that the slow phenomenon of card occurs;Or
If the time interval between response timeout is less than interval threshold to the interface thread twice in succession, determine to occur described inBlock slow phenomenon.
In an optional embodiment, processor 42 positions the occurrence cause of the slow phenomenon of card, specially:By the heapStack context saves as collapse file;According to the collapse file, the occurrence cause of the slow phenomenon of card is positioned.
Further, processor 42 positions the occurrence cause of the slow phenomenon of card, specially according to the collapse file:
The feature that the collapse file has is extracted, the feature that the collapse file has is carried out in marked featureMatching is obtained by the slow reason of card corresponding to the marked feature in the collapse file matching, as the slow phenomenon of cardOccurrence cause.
In an optional embodiment, communication component 43 is additionally operable under the control of processor 42, by the collapse fileServer is sent to, for the occurrence cause of the slow phenomenon of card described in the server selection, and the card for receiving server transmission is slowAbnormal location information, the exception location information include the occurrence cause of the slow phenomenon of card that server selection arrives.
In an optional embodiment, communication component 43 is additionally operable to receive card that server is sent abnormal locational decision slowlyInformation.The slow abnormal locational decision information of card includes but not limited to:Block slow monitoring strategies (start and stop including monitoring, monitoring frequencyRate, the slow condition of card etc.) and collapse file upload strategy etc..
Further, as shown in figure 4, electronic equipment further includes:Power supply module 44, audio component 45, display 46 etc. are otherComponent.Members are only schematically provided in Fig. 4, are not meant to that electronic equipment only includes component shown in Fig. 4.
Power supply module 44, the various assemblies for electronic equipment provide electric power.Power supply module 44 can include power management systemSystem, one or more power supplys and other generate, manage and distribute electric power associated component with for electronic equipment.
Audio component 45 is configured as output and/or input audio signal.For example, audio component 45 includes a microphone(MIC), when electronic equipment is in operation mode, during such as call model, logging mode and speech recognition mode, microphone is configuredTo receive external audio signal.The received audio signal can be further stored in memory 41 or via communication component 43It sends.In some embodiments, audio component 45 further includes a loud speaker, for exports audio signal.
Display 46 includes screen, and screen can include liquid crystal display (LCD) and touch panel (TP).If screenIncluding touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes oneOr multiple touch sensors are to sense the gesture on touch, slide, and touch panel.The touch sensor can be sensed not onlyThe boundary of a touch or slide action, but also detect duration and pressure associated with the touch or slide operation.
Based on the built-in function and structure of the slow abnormal positioning device of card described above, as shown in figure 5, in practice, the cardSlow exception positioning device can be realized as another electronic equipment, including:Memory 51 and processor 52.
Memory 51, for storage card abnormal finder slowly.
In addition to above-mentioned card slowly abnormal finder, program's memory space be also configured to store other various data withSupport operation on an electronic device.The example of these data include for any application program for operating on an electronic device orThe instruction of method, contact data, telephone book data, message, picture, video etc..
Memory 51 can realize by any kind of volatibility or non-volatile memory device or combination thereof, such asStatic RAM (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable is read-only to be depositedReservoir (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk orCD.
Processor 52, coupled to memory 51, for performing the slow abnormal finder of the card, for:
According to the operating status of pending application program median surface thread, determine to occur to block slow phenomenon;
Capture the storehouse context of pending application program when the slow phenomenon of card occurs;
According to the storehouse context, the occurrence cause of the slow phenomenon of card is positioned.
In the present embodiment, the slow abnormal finder of card is realized independently of pending application program.
Optionally, memory 51 can also be used to store pending application program.Correspondingly, processor 52 can also be used to performThe pending application program, to realize the service logic of pending application program.
In an optional embodiment, processor 52 is according to the operation shape of the pending application program median surface threadState determines to occur to block slow phenomenon, specially:
Monitor the responsive state of the interface thread;
According to the responsive state of the interface thread, determine that the slow phenomenon of card occurs.
Optionally, as shown in figure 5, electronic equipment further includes:Communication component 53.
Communication component 53 is configured to facilitate the communication of wired or wireless way between electronic equipment and other equipment.ElectronicsEquipment can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary realityIt applies in example, communication component 53 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channelBreath.In one exemplary embodiment, the communication component 53 further includes near-field communication (NFC) module, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) skill can be based in NFC moduleArt, bluetooth (BT) technology and other technologies are realized.
Based on communication component 53, processor 52 monitors the responsive state of the interface thread, specially:
Message with timeout parameter is sent to the window of the interface thread by communication component 53;And monitoring communicationWhether the returning the result of the message is received in the time that component 53 is specified in the timeout parameter, if monitoring communication component53 fail to receive returning the result for the message in the time specified in the timeout parameter, determine that interface thread response is superWhen.
Communication component 53 coupled to processor 52, for sending the message to the window of interface thread, and waits to be receivedThe message returns the result.
Further alternative, communication component 53 sends message to the window of the interface thread, specially:According to monitoring frequencyRate periodically sends the message to the window handle.
In an optional embodiment, processor 52 positions the occurrence cause of the slow phenomenon of card, specially:
If the interface thread response timeout, determine that the slow phenomenon of card occurs;Or
If the number of the interface thread response timeout is more than frequency threshold value, determine that the slow phenomenon of card occurs;Or
If the time interval between response timeout is less than interval threshold to the interface thread twice in succession, determine to occur described inBlock slow phenomenon.
In an optional embodiment, processor 52 positions the occurrence cause of the slow phenomenon of card, specially:By the heapStack context saves as collapse file;According to the collapse file, the occurrence cause of the slow phenomenon of card is positioned.
Further, processor 52 positions the occurrence cause of the slow phenomenon of card, specially according to the collapse file:
The feature that the collapse file has is extracted, the feature that the collapse file has is carried out in marked featureMatching is obtained by the slow reason of card corresponding to the marked feature in the collapse file matching, as the slow phenomenon of cardOccurrence cause.
In an optional embodiment, communication component 53 is additionally operable under the control of processor 52, by the collapse fileServer is sent to, for the occurrence cause of the slow phenomenon of card described in the server selection, and the card for receiving server transmission is slowAbnormal location information, the exception location information include the occurrence cause of the slow phenomenon of card that server selection arrives.
In an optional embodiment, communication component 53 is additionally operable to receive card that server is sent abnormal locational decision slowlyInformation.The slow abnormal locational decision information of card includes but not limited to:Block slow monitoring strategies (start and stop including monitoring, monitoring frequencyRate, the slow condition of card etc.) and collapse file upload strategy etc..
Further, as shown in figure 5, electronic equipment further includes:Power supply module 54, audio component 55, display 56 etc. are otherComponent.Members are only schematically provided in Fig. 5, are not meant to that electronic equipment only includes component shown in Fig. 5.
Power supply module 54, the various assemblies for electronic equipment provide electric power.Power supply module 54 can include power management systemSystem, one or more power supplys and other generate, manage and distribute electric power associated component with for electronic equipment.
Audio component 55 is configured as output and/or input audio signal.For example, audio component 55 includes a microphone(MIC), when electronic equipment is in operation mode, during such as call model, logging mode and speech recognition mode, microphone is configuredTo receive external audio signal.The received audio signal can be further stored in memory 51 or via communication component 53It sends.In some embodiments, audio component 55 further includes a loud speaker, for exports audio signal.
Display 56 includes screen, and screen can include liquid crystal display (LCD) and touch panel (TP).If screenIncluding touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes oneOr multiple touch sensors are to sense the gesture on touch, slide, and touch panel.The touch sensor can be sensed not onlyThe boundary of a touch or slide action, but also detect duration and pressure associated with the touch or slide operation.
Fig. 6 is the structure diagram of server that the another embodiment of the application provides.As shown in fig. 6, the server includes:Memory 61, processor 62 and communication component 63.
Memory 61, for storing program.
Communication component 63, for receiving the collapse file of client transmission, the collapse file be the client according toWhat storehouse context when slow phenomenon occurs to block for pending application program generated.
Processor 62, coupled to the memory 61 and the communication component 63, for performing described program, for:
Extract the feature that the collapse file has;
The feature that the collapse file has is matched in marked feature;
It obtains by the slow reason of card corresponding to the marked feature in the collapse file matching, as the slow phenomenon of cardOccurrence cause.
Further, communication component 63 is additionally operable to, and to the client sending card, abnormal location information, the exception position slowlyInformation includes the occurrence cause of the slow phenomenon of card.
Further, communication component 63 is additionally operable to, and to client sending card, abnormal locational decision information, the card are slow abnormal slowlyLocational decision information includes but not limited to:Block slow monitoring strategies (including controlling the start and stop of monitoring process, monitoring frequency, blocking slow itemPart etc.) and collapse file upload strategy etc..In this way client can according to the slow slow phenomenon of monitoring strategies monitor card of card whetherOccur, and collapse file is uploaded to server according to strategy is uploaded, in order to the occurrence cause of the slow phenomenon of server analysis card.
Further, as shown in fig. 6, server further includes:Other groups of power supply module 64, audio component 65, display 66 etc.Part.Members are only schematically provided in Fig. 6, are not meant to that electronic equipment only includes component shown in Fig. 6.
Power supply module 64, the various assemblies for electronic equipment provide electric power.Power supply module 64 can include power management systemSystem, one or more power supplys and other generate, manage and distribute electric power associated component with for electronic equipment.
Audio component 65 is configured as output and/or input audio signal.For example, audio component 65 includes a microphone(MIC), when electronic equipment is in operation mode, during such as call model, logging mode and speech recognition mode, microphone is configuredTo receive external audio signal.The received audio signal can be further stored in memory 61 or via communication component 63It sends.In some embodiments, audio component 65 further includes a loud speaker, for exports audio signal.
Display 66 includes screen, and screen can include liquid crystal display (LCD) and touch panel (TP).If screenIncluding touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes oneOr multiple touch sensors are to sense the gesture on touch, slide, and touch panel.The touch sensor can be sensed not onlyThe boundary of a touch or slide action, but also detect duration and pressure associated with the touch or slide operation.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead toThe relevant hardware of program instruction is crossed to complete.Aforementioned program can be stored in a computer read/write memory medium.The journeySequence when being executed, performs the step of including above-mentioned each method embodiment;And aforementioned storage medium includes:ROM, RAM, magnetic disc orThe various media that can store program code such as person's CD.
Finally it should be noted that:The above various embodiments is only to illustrate the technical solution of the application, rather than its limitations;To the greatest extentPipe is described in detail the application with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according toCan so modify to the technical solution recorded in foregoing embodiments either to which part or all technical features intoRow equivalent replacement;And these modifications or replacement, each embodiment technology of the application that it does not separate the essence of the corresponding technical solutionThe range of scheme.