WO2019000233A1 - 一种卡顿检测方法及装置 - Google Patents

一种卡顿检测方法及装置 Download PDF

Info

Publication number
WO2019000233A1
WO2019000233A1 PCT/CN2017/090376 CN2017090376W WO2019000233A1 WO 2019000233 A1 WO2019000233 A1 WO 2019000233A1 CN 2017090376 W CN2017090376 W CN 2017090376W WO 2019000233 A1 WO2019000233 A1 WO 2019000233A1
Authority
WO
WIPO (PCT)
Prior art keywords
duration
terminal
target task
task
reference value
Prior art date
Application number
PCT/CN2017/090376
Other languages
English (en)
French (fr)
Inventor
蔺振超
阚彬
丁超
许顺
卢冬
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2017/090376 priority Critical patent/WO2019000233A1/zh
Priority to EP17916409.0A priority patent/EP3617889B1/en
Priority to CN201780008008.4A priority patent/CN109074303B/zh
Publication of WO2019000233A1 publication Critical patent/WO2019000233A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0715Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a system implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • 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/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a card detection method and apparatus.
  • the terminal can monitor whether there is a jam in the terminal through a Watchdog mechanism or an Application Not Responsive (ANR) mechanism.
  • ANR Application Not Responsive
  • the terminal may prompt the user that the current application is not responding, and the user may choose to continue waiting or forcibly closing the application.
  • the terminal can pass the watchdog mechanism or the application does not respond (Application Not responding) , ANR) mechanism to monitor whether there is a stuck in the terminal.
  • ANR Application Not responding
  • the terminal may prompt the user that the current application is not responding, and the user may choose to continue waiting or forcibly closing the application.
  • the embodiment of the present application provides a method and device for detecting a carton, which can detect a specific link that occurs when an application runs, so as to accurately locate the cause of the jam, thereby reducing the probability of occurrence of a stuck or dead phenomenon and improving the user experience.
  • the embodiment of the present application provides a card detection method, including: when detecting a trigger operation on a target application, the terminal performs a target task corresponding to the trigger operation; and the terminal records from generating the target task to starting execution.
  • the size of the reference value determines whether the location of the occurrence of the stuck is in the process of executing other tasks before the target task or in the process of executing the target task.
  • the terminal determines that the location of the occurrence of the jam is performed by comparing the magnitude of the first duration with the preset first reference value, and comparing the magnitude of the second duration with the preset second reference value.
  • the method includes: when the first duration is greater than the first reference value, indicating that the target task waits too long in the target application's task queue.
  • the triggering operation caused by the user to perform the target application is delayed, so the terminal can determine that the location of the occurrence of the jam is in the process of executing other tasks before the target task; when the second duration is greater than the second reference value, It is indicated that the terminal takes too long to perform the above-mentioned target task, and the trigger operation performed by the user on the target application is delayed, and therefore, the terminal can determine that the location of the occurrence of the stuck is in the process of executing the target task.
  • the method further includes: when the triggering operation for the target application is detected again, the terminal will be located At least one task before the current target task is used as a sub-thread for offload processing, thereby speeding up the processing of the target task and avoiding the occurrence of a jamming phenomenon in the same application scenario.
  • the method further includes: when the triggering operation for the target application is detected again, the terminal will be located At least one task before the current target task is a candidate target task waiting to be closed; when the candidate target task selected by the user is acquired, the terminal deletes the candidate target task selected by the user. In this way, the terminal does not need to execute the deleted candidate tasks, so that the target task corresponding to the triggering operation can be moved to the queue of the task queue as soon as possible, thereby speeding up the processing of the target task and avoiding the same application scenario again. There is a phenomenon of stagnation.
  • the method further includes: when the trigger operation of the target application is detected again, the terminal deletes All tasks generated by the current target application are restarted and the target application is restarted.
  • the method further includes: when the triggering operation of the target application by the user is detected again, the terminal increases the execution of the target task. Time running resources, thereby speeding up the processing of the target task in the task queue, and avoiding the occurrence of jamming again in the same application scenario.
  • the method further includes: the terminal will be the first The duration and the second duration are sent to the server, and the first reference value and the second reference value are refreshed by the server according to the first duration and the second duration reported by the terminal.
  • the method further includes: the terminal acquiring the first reference value and the second reference value from the server, where the first reference value is used to indicate a median value of the duration of time that the target task waits for execution, The second reference value is used to indicate the median value of the length of time spent performing the target task.
  • the location of the target is determined in determining where the occurrence of the jam is occurring.
  • the terminal further includes: the terminal prompting the user in the display interface that the location of the occurrence of the jam is in the process of executing other tasks before the target task or in executing the In the process of the target task, the user is informed of the specific cause of the occurrence of the stuck, and the user is prevented from mistakenly thinking that the terminal is stuck at this time.
  • the embodiment of the present application provides a method for detecting a card, comprising: acquiring, by a server, a first duration and a second duration sent by a first terminal, where the first duration is used to instruct the first terminal to start executing the target task The duration of the target task, the second duration is used to indicate the length of time taken by the first terminal to execute the target task, the target task is generated in response to the triggering operation on the target application; the server determines to wait for execution according to the first duration a first reference value at the target task; the server determines a second reference value when the target task is executed according to the second duration.
  • the method further includes: acquiring, by the server, a third duration and a fourth duration sent by the second terminal, where the third duration is used to instruct the second terminal to start executing the target task from generating the target task The duration of time taken to indicate the length of time taken by the second terminal to execute the target task, the target task being generated in response to a triggering operation on the target application; the server updating the first reference according to the third duration a value; the server updates the second reference value according to the fourth duration.
  • the method further includes: the server transmitting the first reference value and the second reference value to the first terminal.
  • the method further includes: acquiring, by the server, the fifth duration and the sixth duration sent by the first terminal, the fifth The duration is used to indicate the length of time taken by the first terminal to re-generate the target task to start executing the target task, and the second duration is used to indicate the length of time taken by the first terminal to perform the target task again, the target task is in response to the target
  • the triggering operation of the application is generated; the server updates the first reference value according to the fifth duration; the server updates the second reference value according to the sixth duration.
  • the embodiment of the present application provides a terminal, including: an executing unit, configured to: when detecting a triggering operation on a target application, perform a target task corresponding to the triggering operation; and a recording unit, configured to: record from Generating a first duration of the target task to start executing the target task, and a second duration of time for executing the target task; determining unit, configured to: compare the first duration with a preset first reference value by comparing And comparing the size of the second duration with the preset second reference value, determining whether the location of the occurrence of the stuck is in the process of executing other tasks before the target task or in the process of executing the target task.
  • the determining unit is specifically configured to: when the first duration is greater than the first reference value, determine that the location of the occurrence of the jam is in the process of performing other tasks before the target task; When the duration is greater than the second reference value, it is determined that the location of the occurrence of the jam is in the process of performing the target task.
  • the execution unit is further configured to: when the triggering operation on the target application is detected again, at least one task that is located before the current target task is offloaded as a child thread.
  • the execution unit is further configured to: when the target is detected again When the triggering operation of the target application is performed, at least one task located before the current target task is regarded as a candidate target task waiting to be closed; when the candidate target task selected by the user is acquired, the candidate target task selected by the user is deleted.
  • the execution unit is further configured to: when the triggering operation of the target application by the user is detected again, delete all tasks generated by the current target application, and restart the target application.
  • the execution unit is further configured to: when the triggering operation on the target application is detected again, increase the running resource when the target task is executed.
  • the terminal further includes: a sending unit, configured to: send the first duration and the second duration to the server.
  • the terminal further includes: an obtaining unit, configured to: acquire a first reference value and a second reference value from the server, where the first reference value is used to indicate the length of time that the target task waits for execution The bit value, the second reference value is used to indicate the median value of the time taken to execute the target task.
  • the terminal further includes: a display unit, configured to: in the display interface, prompt the user that the location of the occurrence of the jam is in the process of executing other tasks before the target task or in performing the target task; In the process.
  • a display unit configured to: in the display interface, prompt the user that the location of the occurrence of the jam is in the process of executing other tasks before the target task or in performing the target task; In the process.
  • the embodiment of the present application provides a server, including: an acquiring unit, configured to: acquire a first duration and a second duration sent by a first terminal, where the first duration is used to indicate that the first terminal starts from generating a target task The length of time taken to execute the target task, the second duration is used to indicate the length of time taken by the first terminal to execute the target task, the target task is generated in response to a triggering operation on the target application, and the determining unit is configured to: For a period of time, determining a first reference value when waiting to execute the target task; and determining, according to the second duration, a second reference value when the target task is executed.
  • the acquiring unit is further configured to: acquire a third duration and a fourth duration sent by the second terminal, where the third duration is used to indicate that the second terminal starts from generating the target task to start executing the target The duration of the task, the fourth duration is used to indicate the length of time taken by the second terminal to execute the target task, and the target task is generated in response to the triggering operation on the target application; the determining unit is further configured to: according to the The third duration updates the first reference value; and updates the second reference value according to the fourth duration.
  • the server further includes a sending unit, configured to: send the first reference value and the second reference value to the first terminal.
  • the acquiring unit is further configured to: acquire a fifth duration and a sixth duration sent by the first terminal, where the fifth duration is used to indicate that the first terminal starts to execute the target task again The duration of the target task, the second duration is used to indicate the length of time taken by the first terminal to execute the target task again, the target task is generated in response to the triggering operation on the target application; the determining unit is further configured to: The fifth duration updates the first reference value; and updates the second reference value according to the sixth duration.
  • an embodiment of the present application provides a terminal, including: an input device, a processor, a display, and a communication interface connected by a bus, where the input device is configured to: detect a target a triggering operation of the application; the processor is configured to: execute a target task corresponding to the triggering operation; record a first time period from the generation of the target task to the start of executing the target task, and the first time spent executing the target task
  • the second time length is determined by comparing the first time length with the preset first reference value, and comparing the second time length with the preset second reference value, determining that the position of the occurrence of the stuck is located before other tasks before the target task is executed. In the process or in the process of performing the target task.
  • the processor is specifically configured to: when the first duration is greater than the first reference value, determine that the location of the occurrence of the jam is in the process of executing other tasks before the target task; When the duration is greater than the second reference value, it is determined that the location of the occurrence of the jam is in the process of performing the target task.
  • the input device is further configured to: detect a trigger operation on the target application again; the processor is further configured to: offload at least one task that is located before the current target task as a child thread deal with.
  • the input device is further configured to: detect a trigger operation of the target application again; acquire a candidate target task selected by the user; and the processor is further configured to: be located before the current target task At least one task is a candidate target task waiting to be closed; deleting the candidate target task selected by the user.
  • the input device is further configured to: detect a trigger operation on the target application again; the processor is further configured to: delete all tasks generated by the current target application, and restart the target application. .
  • the input device is further configured to: detect a trigger operation on the target application again; the processor is further configured to: increase a running resource when the target task is executed.
  • the communication interface is configured to: send the first duration and the second duration to the server.
  • the communication interface is further configured to: obtain a first reference value and a second reference value from the server, where the first reference value is used to indicate a median value of a duration of time that the target task waits for execution The second reference value is used to indicate the median value of the time taken to execute the target task.
  • the display is configured to prompt the user in the display interface that the location of the occurrence of the jam is in the process of executing other tasks before the target task or in the process of executing the target task.
  • the embodiment of the present application provides a server, including: a processor and a communication interface connected by a bus, where the communication interface is configured to: acquire a first duration and a second duration sent by the first terminal, where The duration is used to indicate the length of time taken by the first terminal from the generation of the target task to start the execution of the target task, and the second duration is used to indicate the length of time taken by the first terminal to execute the target task, the target task being responsive to the target application.
  • the triggering operation is generated by the processor, configured to: determine, according to the first duration, a first reference value when the target task is waiting to be executed; and determine, according to the second duration, a second reference value when the target task is executed.
  • the communication interface is further configured to: acquire a third duration and a fourth duration sent by the second terminal, where the third duration is used to indicate that the second terminal starts from generating the target task to start executing the target The duration of the task, the fourth duration is used to instruct the second terminal to perform the target The time spent by the task is generated in response to a triggering operation on the target application; the processor is further configured to: update the first reference value according to the third duration; and update the second reference value according to the fourth duration .
  • the communication interface is further configured to: send the first reference value and the second reference value to the first terminal.
  • the communication interface is further configured to: acquire a fifth duration and a sixth duration sent by the first terminal, where the fifth duration is used to instruct the first terminal to start generating the target task again The duration of the target task, the second duration is used to indicate the length of time taken by the first terminal to execute the target task again, the target task is generated in response to the triggering operation on the target application; the processor is further configured to: The fifth duration updates the first reference value; and updates the second reference value according to the sixth duration.
  • the embodiment of the present application provides a graphical user interface (GUI) displayed in a touch screen of the terminal, where the graphical user interface includes: displaying a first GUI in a touch screen of the terminal; when detecting the user When the first gesture triggered by the target application is touched on the touch screen, the second GUI is displayed in the touch screen, and the second GUI includes a first interface element for prompting the user for the location where the jam occurs.
  • GUI graphical user interface
  • the second GUI further includes a second interface element for indicating the processing progress of the stuck.
  • the second GUI further includes a third interface element for prompting the carton optimization.
  • an embodiment of the present application provides a terminal, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the terminal is running The processor executes the computer-executed instructions stored in the memory to cause the terminal to perform any of the above-described stuck detection methods.
  • an embodiment of the present application provides a server, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the server is running The processor executes the computer-executed instructions stored by the memory to cause the server to perform any of the above-described stuck detection methods.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when the instruction is run on any of the foregoing terminals, causing the terminal to perform any of the foregoing Detection method.
  • an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when the instruction is run on any of the foregoing servers, causing the server to execute any of the foregoing cards Test method.
  • the embodiment of the present application provides a computer program product including instructions, when the terminal is run on any of the foregoing terminals, causing the terminal to perform any of the foregoing carton detection methods.
  • the embodiment of the present application provides a computer program product comprising instructions, which when executed on any of the above servers, causes the server to perform any of the above-described carton detection methods.
  • the name of the terminal or the server is not limited to the device itself. In actual implementations, these devices can appear under other names. As long as the functions of the respective devices are similar to the embodiments of the present application, they are within the scope of the claims and their equivalents.
  • FIG. 1 is a schematic structural diagram 1 of a terminal according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of an Android operating system according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram 1 of an application scenario of a carton detection method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a method for detecting a carton according to an embodiment of the present application
  • FIG. 5 is a schematic diagram 2 of an application scenario of a carton detection method according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram 3 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram 4 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram 5 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram 6 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram 7 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram 8 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic diagram 9 of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic diagram of an application scenario of a carton detection method according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic diagram of an application scenario of a carton detection method according to an embodiment of the present application.
  • FIG. 15 is a schematic diagram of an application scenario of a carton detection method according to an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram 2 of a terminal according to an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram 1 of a server according to an embodiment of the present disclosure.
  • FIG. 18 is a schematic structural diagram 3 of a terminal according to an embodiment of the present disclosure.
  • FIG. 19 is a schematic structural diagram 2 of a server according to an embodiment of the present application.
  • first and second are used for descriptive purposes only, and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining “first” and “second” may include one or more of the features either explicitly or implicitly. In the description of the embodiments of the present application, “multiple” means two or more unless otherwise stated.
  • Embodiments of the present application provide a method for detecting a card, which can be applied to a mobile phone, a wearable device, an AR (Augmented Reality) VR (Virtual Reality) device, a tablet computer, a notebook computer, a UMPC (Super Mobile Personal Computer), and a netbook.
  • the PDA Personal Digital Assistant
  • the PDA can operate any terminal of the APP, and the embodiment of the present application does not impose any limitation on this.
  • the terminal in the embodiment of the present application may be the mobile phone 100.
  • the embodiment will be specifically described below by taking the mobile phone 100 as an example. It should be understood that the illustrated mobile phone 100 is only one example of a terminal, and the mobile phone 100 may have more or fewer components than those shown in the figures, two or more components may be combined, or may have Different component configurations.
  • the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, one or more sensors 106, and a Wi-Fi device. 107, positioning device 108, audio circuit 109, peripheral interface 110 and power system 111 and other components. These components can communicate over one or more communication buses or signal lines (not shown in Figure 1). It will be understood by those skilled in the art that the hardware structure shown in FIG. 1 does not constitute a limitation to a mobile phone, and the mobile phone 100 may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • RF radio frequency
  • the processor 101 is a control center of the mobile phone 100, and connects various parts of the mobile phone 100 by using various interfaces and lines, by running or executing an application stored in the memory 103 (hereinafter referred to as App), and calling the memory stored in the memory 103. Data, performing various functions and processing data of the mobile phone 100.
  • the processor 101 may include one or more processing units; for example, the processor 101 may be a Kirin 960 chip manufactured by Huawei Technologies Co., Ltd.
  • the radio frequency circuit 102 can be used to receive and transmit wireless signals during transmission or reception of information or calls.
  • the radio frequency circuit 102 can process the downlink data of the base station and then process it to the processor 101; in addition, transmit the data related to the uplink to the base station.
  • radio frequency circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency circuit 102 can also communicate with other devices through wireless communication.
  • the wireless communication can use any communication standard or protocol, including but not limited to global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
  • the memory 103 is used to store applications and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running applications and data stored in the memory 103.
  • the memory 103 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); the storage data area can be stored according to the use of the mobile phone. Data created at 100 o'clock (such as audio data, phone book, etc.).
  • the memory 103 may include a high speed random access memory, and may also include a nonvolatile memory such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
  • the memory 103 can store various operating systems, such as an iOS operating system developed by Apple Inc., an Android operating system developed by Google Inc., and the like.
  • the touch screen 104 can include a touch panel 104-1 and a display 104-2.
  • the touch panel 104-1 can collect touch events on or near the user of the mobile phone 100 (for example, the user uses any suitable object such as a finger, a stylus, or the like on the touch panel 104-1 or on the touchpad 104. The operation near -1), and the collected touch information is transmitted to other devices such as the processor 101.
  • the touchpad 104-1 and the display 104-2 are implemented as two separate components to implement the input and output functions of the handset 100, in some embodiments, the touchpad 104- 1 is integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100.
  • the touch screen 104 is formed by stacking a plurality of layers of materials. In the embodiment of the present application, only the touch panel (layer) and the display screen (layer) are shown, and other layers are not described in the embodiment of the present application. .
  • the touch panel 104-1 may be overlaid on the display 104-2, and the size of the touch panel 104-1 is larger than the size of the display 104-2, so that the display 104- 2 is completely covered under the touchpad 104-1, or the touchpad 104-1 may be disposed on the front side of the mobile phone 100 in the form of a full-board, that is, the user is on the front of the mobile phone 100.
  • the touch can be sensed by the mobile phone, so that the full touch experience on the front of the mobile phone can be achieved.
  • the touch panel 104-1 is disposed on the front side of the mobile phone 100 in the form of a full-board
  • the display screen 104-2 may also be disposed on the front side of the mobile phone 100 in the form of a full-board, so that the front side of the mobile phone is Can achieve a borderless structure.
  • the mobile phone 100 may further have a fingerprint recognition function.
  • the fingerprint reader 112 can be configured on the back of the handset 100 (eg, below the rear camera) or on the front side of the handset 100 (eg, below the touch screen 104).
  • the fingerprint collection device 112 can be configured in the touch screen 104 to implement the fingerprint recognition function, that is, the fingerprint collection device 112 can be integrated with the touch screen 104 to implement the fingerprint recognition function of the mobile phone 100.
  • the fingerprint capture device 112 is disposed in the touch screen 104 and may be part of the touch screen 104 or may be otherwise disposed in the touch screen 104.
  • the main component of the fingerprint collection device 112 in the embodiment of the present application is a fingerprint sensor, which can employ any type of sensing technology, including but not limited to optical, capacitive, piezoelectric or ultrasonic sensing technologies.
  • the mobile phone 100 may further include a Bluetooth device 105 for implementing data exchange between the mobile phone 100 and other short-distance terminals (such as mobile phones, smart watches, etc.).
  • the Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip or the like.
  • the Wi-Fi device 107 is configured to provide the mobile phone 100 with network access complying with the Wi-Fi related standard protocol, and the mobile phone 100 can access the Wi-Fi access point through the Wi-Fi device 107, thereby helping the user to send and receive emails, Browsing web pages and accessing streaming media, etc., it provides users with wireless broadband Internet access.
  • the Wi-Fi device 107 can also function as a Wi-Fi wireless access point, and can provide Wi-Fi network access to other terminals.
  • the handset 100 can also include at least one type of sensor 106, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor may turn off the power of the display when the mobile phone 100 moves to the ear.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the mobile phone 100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 can be specifically a receiver of a positioning system such as a Global Positioning System (GPS) or a Beidou satellite navigation system, or a Russian GLONASS. After receiving the geographical location transmitted by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends it to the memory 103 for storage.
  • GPS Global Positioning System
  • Beidou satellite navigation system Beidou satellite navigation system
  • Russian GLONASS Russian GLONASS
  • the positioning device 108 may also be a receiver that assists the Global Positioning System (AGPS), which assists the positioning device 108 in performing ranging and positioning services by acting as a secondary server, in which case
  • the secondary location server provides location assistance over a wireless communication network in communication with a location device 108, such as a GPS receiver, of the handset 100.
  • the positioning device 108 can also be based on a Wi-Fi access point. Positioning technology. Since each Wi-Fi access point has a globally unique MAC address, the terminal can scan and collect the broadcast signals of the surrounding Wi-Fi access points when Wi-Fi is turned on, so that Wi- can be obtained.
  • the geographic location combined with the strength of the Wi-Fi broadcast signal, calculates the geographic location of the terminal and sends it to the location device 108 of the terminal.
  • the audio circuit 109, the speaker 113, and the microphone 114 can provide an audio interface between the user and the handset 100.
  • the audio circuit 109 can transmit the converted electrical data of the received audio data to the speaker 113 for conversion to the sound signal output by the speaker 113; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal by the audio circuit 109. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for transmission to, for example, another mobile phone, or the audio data is output to the memory 103 for further processing.
  • the peripheral interface 110 is used to provide various interfaces for external input/output devices (such as a keyboard, a mouse, an external display, an external memory, a subscriber identity module card, etc.).
  • external input/output devices such as a keyboard, a mouse, an external display, an external memory, a subscriber identity module card, etc.
  • a universal serial bus (USB) interface is connected to the mouse, and a metal contact on the card slot of the subscriber identification module is connected to a subscriber identity module card (SIM) card provided by the telecommunications carrier.
  • SIM subscriber identity module card
  • Peripheral interface 110 can be used to couple the external input/output peripherals described above to processor 101 and memory 103.
  • the mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) that supplies power to the various components.
  • the battery may be logically connected to the processor 101 through the power management chip to manage charging, discharging, and power management through the power supply device 111. And other functions.
  • the mobile phone 100 may further include a camera (front camera and/or rear camera), a flash, a micro projection device, a near field communication (NFC) device, and the like, and details are not described herein.
  • a camera front camera and/or rear camera
  • a flash a flash
  • micro projection device a micro projection device
  • NFC near field communication
  • the above-mentioned mobile phone 100 can be operated in an operating system such as Android or IOS, and the embodiment of the present application does not impose any limitation on this.
  • the Android operating system can be divided into four layers, from the upper layer to the lower layer, respectively, the application layer 201 (ie, the APP layer), the application framework layer 202 (ie, the Framework layer), and the system.
  • the runtime layer 203 i.e., the Libraries layer
  • the Linux kernel layer 204 are run.
  • the Linux kernel layer 204 can be used to control the security, memory management, process management, network stack, and driver model of the mobile phone 100.
  • the Linux kernel layer 204 also serves as an abstraction layer between hardware (eg, CPU, network card, memory, etc.) and the software stack, which hides specific hardware details for the upper layer (system runtime layer 203, application framework layer 202, and applications).
  • Program layer 201) provides a unified service.
  • the system runtime layer 203 includes some C/C++ libraries, for example, a media library, a system C library, and a display management library (Surface Manager). These libraries can be used by different components in the Android system, and the system runtime layer 203 can pass.
  • the Framework layer 202 provides services to developers.
  • the Framework layer 202 provides developers with an API framework for full access to applications. Specifically, the Framework layer 202 provides a very large number of APIs for developing applications, and an APP that satisfies related business needs can be constructed by calling the corresponding API.
  • the application layer 201 mainly includes an APP running in a virtual machine written in a Java language.
  • the user runs the library layer 203 or the Linux kernel layer 204 by calling the related API in the Framework layer 202. Interact and implement the functions corresponding to the operation interface.
  • the application layer 201 of the mobile phone 100 is installed with the application A.
  • the application A is triggered to call the Framework layer 202.
  • the corresponding API generates an action event (ActionEvent) indicating that the icon in application A has been clicked.
  • the Framework layer 202 can generate one or more target tasks for processing the action event, for example, launching related components of the application A, loading advertisements, and displaying the contents of the homepage, and the target task is sent after being generated. Waiting for processing in the task queue of application A.
  • the mobile phone 100 sequentially executes each task in the task queue according to the principle of first-in-first-out, and after performing all the tasks in the task queue before the target task, the target task moves from the tail of the task queue to the team leader.
  • the mobile phone 100 starts executing the target task, thereby implementing the startup process of the application A corresponding to the triggering operation of the icon of the user clicking the application A.
  • the terminal in order to determine a specific link in the application running, may obtain a reference value for determining whether a jam occurs in advance.
  • the reference value may include: indicating that a task is in the task.
  • the reference duration ie, the first reference value
  • the reference duration ie, the second reference value
  • the first reference value is 10 ms
  • the second reference value is 20 ms.
  • the terminal can monitor the actual duration (ie, the first duration) that each task in the task queue waits for execution in the task queue, and the actual duration (ie, the second duration) that is spent when the task is executed.
  • the terminal may determine whether the task is stuck when waiting for execution in the task queue, for example, when detecting the first duration is 15 ms (greater than the first reference value) At 10ms), it can be determined that the task is stuck when it waits for execution in the task queue.
  • the terminal may determine whether the task is stuck during actual execution, for example, when detecting the second duration is 25 ms (greater than the second reference value of 20 ms) When it is determined, the task may be stuck during execution.
  • the method for detecting the carton provided by the embodiment of the present application can detect that the application runs when the first time duration of each task generated by the application runtime is waiting for execution and the second duration of the actual execution time.
  • the specific part of Caton for example, the Carton occurs during the execution of the task, or during the process of waiting for execution. In this way, according to the specific link of the occurrence of the Caton, the performance of the terminal can be optimized, thereby reducing the probability of the terminal crashing and improving the user experience.
  • a method for detecting a carton provided by an embodiment of the present application is described in detail below with reference to a specific embodiment. As shown in FIG. 4, the method includes:
  • the terminal acquires a first reference value and a second reference value from the server.
  • the first reference value may specifically be a median value of a duration that the server waits for execution in a task queue according to a task generated by an application (for example, application A) reported by each terminal; correspondingly, the second reference value Specifically, it may be a median value of the duration that the server spends according to an application (for example, application A) reported by each terminal in actual execution.
  • the card detection method provided by the embodiment of the present application can be applied to the detection system shown in FIG. 5, which includes a server 51 and N terminals 52 connected to the server 51.
  • the application A is installed in each of the above-mentioned N terminals. Then, each terminal, when running the application A, can record the waiting time T1 of each task generated by the application A in the task queue, and the execution time T2 of each task, and further, the waiting time T1 of each task. And the execution time T2 is reported to the server 51.
  • the terminal can also send the identifier of each task and the identifier of the application A (for example, the package name of the application A) to the server.
  • the server 51 can acquire the waiting time T1 and the execution time T2 when each of the above tasks is executed in different terminals 52. Further, for each task, the server 51 can acquire the waiting time T1 of all the tasks acquired. The bit value is sent to each terminal 52 as the first reference value, and the acquired median value of the execution time T2 of all the tasks is transmitted to each terminal 52 as the second reference value. In this way, the terminal can obtain the first reference value and the second reference value corresponding to each task when the application A is executed.
  • the terminal 52 may determine, according to the first reference value, that the task 1 of the application A is in the task. Whether the card is stuck in the queue, or the second reference value is used as a criterion to determine whether the task 1 of the application A is stuck during execution, thereby determining the specific link of the task 1 during the running process.
  • the server 51 can also calculate the first reference value and the second reference value according to the waiting time T1 and the execution time T2 reported by each terminal 52, and the first reference value and the second reference value are not limited by the embodiment of the present application.
  • the terminal 52 may report the device type of the device, the waiting time T1 and the execution time T2 corresponding to different device types, when the terminal device 52 reports the waiting time T1 and the execution time T2.
  • the weights are different.
  • the server 51 may perform the weighted average of the N waiting times T1 according to the device information of each terminal to obtain the first reference value, and may The device information of the terminal performs weighted averaging of the N execution times T2 to obtain the second reference value, thereby improving the accuracy of the subsequent positioning jam position.
  • first reference value and second reference value are a real-time update process. That is, the server 51 may refresh the first reference value and the second reference value according to the waiting time T1 and the execution time T2 reported by the different terminals 52 in real time, and send the refreshed first reference value and the second reference value to the Terminal 52.
  • the terminal When detecting a trigger operation of the target application by the user, the terminal generates a target task corresponding to the trigger operation.
  • the terminal detects a trigger operation performed by the user on the target application (for example, application A), for example, the user clicks the search button of the contact application, and triggers the application A to call the generation of the corresponding API in the Framework layer 202.
  • An ActionEvent and in turn, the Framework layer 202 generates one or more target tasks for processing the action event, for example, loading a local contact task, a search task, and displaying a search result, etc., and the target task is sent after being generated. Waiting for processing in the task queue to application A.
  • the target task may specifically be one or more message objects.
  • parameters of related events may be transmitted through a message processing mechanism. Specifically, when an application starts, the terminal starts a main thread (ie, a UI thread) to manage the UI (interface), and listens for events such as user clicks. Then, when detecting a trigger operation performed by the user on the application A, the terminal may generate a corresponding one or more message objects as target tasks to be sent to the message queue (ie, the task queue) for execution, and when the target task is dequeued, the terminal You can call the handleMessage() method of the handler object corresponding to the message object above to process it, that is, execute the target task.
  • the tasks in the task queue of the application A can also be associated with the tasks in the task queue of the tasks of other applications (for example, the application B).
  • the application A is a shopping application
  • the application B is a payment application.
  • the application A can generate a target task 1 for refreshing the payment page and a target task for displaying the payment result. 2.
  • the generation of the target task 1 may trigger the application B to generate a corresponding payment task, for example, the target task 3.
  • the application B sends the target task 3 to the tail of the task queue 2 corresponding to the application B for processing.
  • the above target tasks include the target task 1 and the target task 2 of the application A, and the target task 3 of the application B.
  • the terminal records a first duration that the target task takes from entering the task queue to moving to the opposite end of the task queue.
  • the target task is added to the tail of the task queue of the target application, as shown in (a) of FIG. 7 , in the task queue of the target application, There are also 6 pending tasks in Task 1 - Task 6 before the target task.
  • the terminal can also obtain the current system time C1 by calling the function: getCurrentTime().
  • getCurrentTime() For example, the current system time C1 returned by this getCurrentTime() is: 21 points. 10 minutes, 10 seconds, 25 milliseconds.
  • the terminal can continue to perform each task in the task queue according to the principle of first-in-first-out, as shown in (b) of FIG. 7 , when the terminal executes the task 1 - task 6 before the target task in the task queue.
  • the target task moves from the tail of the task queue to the opposite end of the task queue.
  • the terminal can obtain the current system time C2 by calling the function: getCurrentTime(), for example, the current system time returned by this getCurrentTime().
  • C2 is: 21:10:10:45.
  • the terminal When the target task moves to the opposite end of the task queue, the terminal records a second duration of time for executing the target task.
  • step 403 when the target task moves to the opposite end of the task queue, the terminal starts executing the target task, and after executing the target task, the terminal returns a response message for completing the target task to the target application.
  • the current system time C3 returned by this getCurrentTime() is: 21:10:11:01.
  • the terminal sends the first duration and the second duration of the foregoing record to the server.
  • the terminal may further use the acquired first duration as the waiting time T1 in step 400, and send the acquired second duration as the execution time T2 in step 400 to the server, where the server refreshes the first The reference value and the second reference value are sent to the terminal after the refreshed first reference value and the second reference value.
  • the terminal may determine whether a jam occurs when the target task is run by comparing a size between the first duration and the first reference value, and a size between the second duration and the second reference value, if a jam occurs. Then, the terminal can further locate the specific location where the jam occurs.
  • the terminal may further carry the package name of the application to which the target task belongs, the identifier of the target task, and the like, so that the server may use the task of the application as the granularity and different applications.
  • the task determines a corresponding first reference value and second reference value.
  • the terminal determines that the location of the occurrence of the jam is in the process of performing other tasks before the target task.
  • the first reference value of the target task sent by the server to the terminal in advance is 10 milliseconds.
  • the first duration is greater than the first reference value, indicating that the foregoing The target task waits too long in the target application's task queue, causing the user's triggering operation on the target application to be delayed.
  • the terminal can determine that the cause of the stuck is caused by the excessive time taken to process other tasks in the task queue before the target task, so that the terminal can accurately locate the occurrence of the target application running. specific reason.
  • the terminal may also prompt the user through a prompt box as shown in (a) of FIG. 8 .
  • the terminal is processing the target task. For example, the terminal may calculate the waiting time of the user according to the number of tasks waiting to be processed in the current task queue and prompt the user, or calculate the current progress of completing the target task according to the number of tasks waiting to be processed in the current task queue. And prompt the user.
  • the terminal may also prompt the user through a prompt box for the specific cause of the jam, and the user is patiently waiting to prevent the user from mistakenly thinking that the terminal is stuck at this time. Elephant.
  • the terminal may further prompt the user through a prompt box whether to optimize the occurrence of the stuck. If the user confirms that the card is optimized, the terminal may continue to perform the following implementation.
  • the Carton optimization method provided in the example.
  • the developer may obtain the first duration and the second duration by inserting a log (log) in the running code of the application. .
  • log1 can be inserted, and log1 is used to record the end of the task queue that adds the target task to the target application.
  • the system time C1 of this action as shown in (b) of FIG. 9, before the terminal starts executing the above-mentioned target task, a log can be inserted again, for example, log2, log2 is used to record the system time C2 at which the above-mentioned target task is started.
  • a log can be inserted again, such as log3, which is used to record the system time C3 at which the target task is executed.
  • the developer can print the above-mentioned log1-log3 to determine the first time C2-C1 taken by the target task from entering the task queue to moving to the task queue, and the first time spent performing the above-mentioned target task. Two hours C3-C2. Further, by comparing the size between the first duration and the first reference value, and the magnitude between the second duration and the second reference value, the developer can determine the specific location at which the stall occurs when the target task is run.
  • the developer may determine that the specific cause of the occurrence of the jam is caused by the excessive time spent in the task queue in the other tasks before the target task, and therefore, development
  • the person can streamline the running code of task 1 - task 6 before the target task in FIG. 7( a ), so that the user can improve other tasks in the task queue before the target task in the subsequent execution of the same triggering operation.
  • the efficiency of execution which slows down the phenomenon of stuttering.
  • the terminal may insert the log to record the first duration and the second duration after the terminal determines the first duration (C2-C1) and the second duration (C3-C2), and the specific value is inserted in the embodiment of the present application.
  • the specific content of the log is not subject to any restrictions.
  • the target application since the terminal has determined that the specific link of the occurrence of the jam occurs when executing other tasks in the task queue before the target task, when the user is detected again, the target application is executed.
  • the same triggering operation for example, when the user clicks the search button of the contact application again, the terminal also generates a target task corresponding to the triggering operation (ie, the current target task), and it can be understood that the current target task is generated.
  • the time and the generation time of the last target task in the step 401 are different, but the scenes triggered by the same are the same. Therefore, the content of the current target task and the target task generated in step 401 are the same, for example, both of them are A contact search task.
  • the terminal may perform at least one task in the current task queue that is located before the target task as a sub-thread.
  • the terminal may establish two sub-thread processing task queues located in the destination. Tasks 1 - Task 6 before the task, where child thread 1 is used to process task 1, task 3, and task 5, and child thread 2 is used to process task 2, task 4, and task 6.
  • the target application sends the generated target task to the task queue in response to the triggering operation.
  • other tasks in the task queue have been branched to the child thread 1 and the child thread 2, and then the main thread of the target application can be processed immediately.
  • the target task thereby speeding up the processing of the target task, and avoiding the occurrence of jamming again in the same application scenario.
  • the terminal may present one or more tasks in the task queue that are located before the target task, for example, task 1 - task 3 located before the target task as a candidate task. The user manually selects whether to close one or more of the tasks. Then, when the terminal acquires the candidate task selected by the user, the terminal may delete the candidate task selected by the user from the task queue.
  • the terminal does not need to execute the deleted candidate tasks, so that the target task corresponding to the triggering operation can be moved to the queue of the task queue as soon as possible, thereby speeding up the processing of the target task and avoiding the same application scenario again.
  • the terminal may automatically delete one or more tasks in the task queue that are located before the target task, thereby speeding up the target task in the task queue. Processing speed.
  • the terminal when it is detected again that the user performs the same triggering operation on the target application, as shown in FIG. 12, if the terminal detects that the target task waits in the task queue for longer than the first reference value, the terminal has not started executing yet.
  • the terminal may prompt the user to close the application, restart the application, etc., and the embodiment of the present application does not impose any limitation on this.
  • the terminal may also prompt the user to close other applications except the target application, thereby releasing the current terminal memory. Resources, the terminal can use this part of the released memory resources to speed up the execution of each task in the task queue, thereby speeding up the processing speed of the target task in the task queue.
  • the terminal since the terminal has determined in step 405a that the specific link of the occurrence of the jam is occurring in the execution of other tasks in the task queue before the target task, and the terminal can monitor the task The duration of each task in the queue is executed. Therefore, the terminal can determine that the task queue runs slower before the target task according to the duration of execution of each task in the task queue before the target task.
  • One or more Caton tasks are one or more Caton tasks.
  • the terminal can simultaneously monitor and perform the task while monitoring the first time period that the target task takes from entering the task queue to moving to the opposite end of the task queue.
  • the terminal may be Task 3 is one of the above-mentioned Caton tasks.
  • the terminal may automatically delete the cardon task in the task queue (for example, the above task 3), thereby speeding up the processing speed of the target task in the task queue; or, the terminal may also allocate more running resources to the cardon task in the task queue, for example, to improve the CPU The running frequency, the memory resources when processing the above-mentioned stuckon task, and the like, so that the terminal can perform the Karton task before the target task faster, thereby speeding up the processing speed of the target task in the task queue.
  • the cardon task in the task queue For example, the above task 3
  • the terminal may also allocate more running resources to the cardon task in the task queue, for example, to improve the CPU The running frequency, the memory resources when processing the above-mentioned stuckon task, and the like, so that the terminal can perform the Karton task before the target task faster, thereby speeding up the processing speed of the target task in the task queue.
  • the terminal determines that the location where the jam occurs is located in the process of performing the target task.
  • the second reference value of the target task sent by the server to the terminal in advance is 20 milliseconds.
  • the second duration is greater than the second reference value, indicating that the terminal The time taken to perform the above-mentioned target task is too long, and the triggering operation performed by the user on the target application is delayed.
  • the terminal can determine that the cause of the stuck is caused by the excessive time taken to execute the target task, so that the terminal can accurately locate the specific cause of the occurrence of the stuck when the target application is running.
  • the terminal sends the target task generated by the target application to its task queue.
  • the terminal starts executing the target task.
  • the terminal can allocate more running resources to the target task when performing the target task, for example, increasing the running frequency of the CPU, increasing the memory resources when processing the cardon task, etc., thereby speeding up the target. The processing speed of the task in the task queue to avoid the occurrence of jamming again in the same application scenario.
  • the terminal may further divide the tasks in the task queue according to the task type.
  • a display class task eg, task 1 - task 3
  • a search class task eg, task 4 - task 6 and the current target task
  • the second reference value sent by the server may include two reference values K1 and K2, where K1 may be used to indicate that the terminal performs the display task.
  • K1 may be used to indicate that the terminal performs the display task.
  • the median value of the time spent for example 15 milliseconds
  • K2 can be used to indicate the median value of the time it takes the terminal to perform a search-like task, such as 10 milliseconds.
  • the second duration that is actually executed by the target task is compared with the corresponding second reference value according to the type to which the target task belongs, so as to more accurately determine that the target task is executed. Whether a carton occurs.
  • the target task shown in FIG. 15 is a search class task
  • the second reference value K2 of the search class task is 10 milliseconds.
  • the second duration can be compared with 10 milliseconds.
  • the target task can be determined to be executed.
  • the terminal is detected when the card is detected. Authenticity.
  • the server may also update the values of K1 and K2 in the second reference value according to the length of time that each terminal reports when performing different types of tasks, and send the updated values of K1 and K2 to the terminal, so that The terminal obtains a more accurate reference value for detecting different types of tasks, thereby improving the accuracy of the terminal detecting the jam.
  • GUI graphical user interface
  • the first GUI is displayed on the touch screen of the terminal.
  • the first GUI may be a launch interface of the terminal, or any interface of an application running.
  • the terminal may display the second GUI in the touch screen, where the second GUI includes The first interface element that prompts the user for the location of the jam, for example, the first interface element may be the prompt box shown in FIG. 8(b).
  • the second GUI may further include a second interface element for indicating the progress of the processing of the stuck.
  • the second GUI may further include a third interface element for prompting the implementation of the carton optimization, which is not limited in this embodiment of the present application.
  • the above terminal and the like include hardware structures and/or software modules corresponding to each function.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
  • the embodiment of the present application may perform the division of the function modules on the terminal or the like according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 16 is a schematic diagram of a possible structure of a terminal involved in the foregoing embodiment, where the terminal includes: an obtaining unit 1101, an executing unit 1102, a recording unit 1103, and The determining unit 1104, the transmitting unit 1105, and the display unit 1106.
  • the obtaining unit 1101 is configured to support the terminal to perform the process 400 in FIG. 4; the executing unit 1102 is configured to support the terminal to execute the process 401 in FIG. 4; the recording unit 1103 is configured to support the terminal to execute the processes 402 and 403 in FIG. 4; the determining unit 1104 Used to support the terminal to perform the process 405a in FIG. 4 and 405b; the sending unit 1105 is configured to support the terminal to execute the process 404 in FIG. 4; the display unit 1106 is configured to prompt the user in the display interface that the location of the occurrence of the jam is in the process of executing other tasks before the target task or in the execution of the target task. in the process of. All the related content of each step involved in the foregoing method embodiments may be referred to the functional description in the corresponding invention content, and details are not described herein again.
  • FIG. 17 shows a possible structural diagram of the server involved in the above embodiment, the server includes: an obtaining unit 1201, a determining unit 1202, and a sending Unit 1203.
  • the acquiring unit 1201 is configured to: acquire a first duration and a second duration sent by the first terminal, where the first duration is used to indicate, by the first terminal, from generating a target task to starting to execute the target task. a duration of time, the second duration is used to indicate a duration of time that the first terminal spends executing the target task, and the target task is generated in response to a triggering operation on the target application;
  • the determining unit 1202 is configured to: determine, according to the first duration, a first reference value when waiting to execute the target task; and determine, according to the second duration, a second reference value when the target task is executed.
  • the acquiring unit 1201 is further configured to: acquire a third duration and a fourth duration sent by the second terminal, where the third duration is used to indicate that the second terminal starts from generating a target task to starting to execute the target task a duration of time, the fourth duration is used to indicate a length of time taken by the second terminal to execute the target task, the target task being generated in response to a triggering operation on the target application;
  • the determining unit 1202 is further configured to: update the first reference value according to the third duration; and update the second reference value according to the fourth duration.
  • the sending unit 1203 is configured to: send the first reference value and the second reference value to the first terminal.
  • the acquiring unit 1201 is further configured to: acquire a fifth duration and a sixth duration sent by the first terminal, where the fifth duration is used to indicate that the first terminal starts to perform the target task again The length of time taken to indicate the length of time taken by the first terminal to perform the target task again, the target task being generated in response to a triggering operation on the target application;
  • the determining unit 1202 is further configured to: update the first reference value according to the fifth duration; and update the second reference value according to the sixth duration.
  • FIG. 18 shows a possible structural diagram of the terminal involved in the above embodiment.
  • the terminal includes a processing module 1302 and a communication module 1303.
  • the processing module 1302 is configured to control and manage the actions of the terminal.
  • the communication module 1303 is configured to support communication between the terminal and other network entities.
  • the terminal may further include a storage module 1301 for storing program codes and data of the terminal.
  • FIG. 19 shows a possible structural diagram of the server involved in the above embodiment.
  • the server includes a processing module 1402 and a communication module 1403.
  • the processing module 1402 is configured to control and manage the actions of the server.
  • the communication module 1403 is for supporting communication between the server and other network entities.
  • the server may further include a storage module 1401, Program code and data used to store the server.
  • the processing module 1302/1402 may be a processor or a controller, and may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application). -Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 1303/1403 may be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 1301/1401 may be a memory.
  • the terminal provided by the embodiment of the present application may be the mobile phone 100 shown in FIG. 1.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请的实施例提供一种卡顿检测方法及装置,涉及通信技术领域,可检测应用运行时发生卡顿的具体环节,以便准确定位卡顿原因,从而降低发生死机现象的几率提高用户体验。该方法包括:当检测到对目标应用的触发操作时,终端执行与该触发操作对应的目标任务;终端记录从生成该目标任务到开始执行该目标任务所花费的第一时长,以及执行该目标任务所花费的第二时长;终端通过比较第一时长与预设的第一参考值的大小,以及比较第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中。

Description

一种卡顿检测方法及装置 技术领域
本申请实施例涉及通信技术领域,尤其涉及一种卡顿检测方法及装置。
背景技术
目前,用户对手机、可穿戴设备以及平板电脑等终端中应用运行时的流畅度要求越来越高。而随着终端实现的功能越来越多,应用在运行时占用的资源越来越碎片化,导致用户在使用终端时会出现卡顿的现象,极大地影响了用户体验。
通常,终端可以通过看门狗(Watchdog)机制或应用程序未响应(Application Not responding,ANR)机制来监控终端内是否出现卡顿。示例性的,如果在预设时间内没有收到应用的响应消息,终端可向用户提示当前应用未响应,用户可以选择继续等待或者强制关闭该应用。
那么,如果用户选择强制关闭该应用,则终端正在执行的该应用的所有场景将会丢失,用户体验较差。如果用户选择继续等待,则终端将会继续停留在发生卡顿的界面,甚至发生死机现象,用户体验感较差通常,终端可以通过看门狗(Watchdog)机制或应用程序未响应(Application Not responding,ANR)机制来监控终端内是否出现卡顿。示例性的,如果在预设时间内没有收到应用的响应消息,终端可向用户提示当前应用未响应,用户可以选择继续等待或者强制关闭该应用。
那么,如果用户选择强制关闭该应用,则终端正在执行的该应用的所有场景将会丢失,用户体验较差。如果用户选择继续等待,则终端将会继续停留在发生卡顿的界面,甚至发生死机现象,用户体验感较差。
发明内容
本申请的实施例提供一种卡顿检测方法及装置,可检测应用运行时发生卡顿的具体环节,以便准确定位卡顿原因,从而降低发生卡顿或死机现象的几率提高用户体验。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,本申请实施例提供一种卡顿检测方法,包括:当检测到对目标应用的触发操作时,终端执行与该触发操作对应的目标任务;终端记录从生成该目标任务到开始执行该目标任务所花费的第一时长,以及执行该目标任务所花费的第二时长;终端通过比较第一时长与预设的第一参考值的大小,以及比较第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中。
可以看出,通过获取目标应用的目标任务在等待执行时的第一时长和在实际执行时的第二时长,可以检测出运行该目标应用的目标任务时发生卡顿的具体环节,例如,该卡顿发生在任务执行过程中,或者发生在任务等待执 行的过程中。这样,根据发生卡顿的具体环节可以有针对性的对终端进行性能优化,从而降低终端发生卡顿或死机现象的几率,同时可提高用户体验。
在一种可能的设计方法中,终端通过比较第一时长与预设的第一参考值的大小,以及比较第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中,包括:当第一时长大于第一参考值时,说明上述目标任务在目标应用的任务队列中等待的时间过长,造成用户对目标应用执行的触发操作迟迟得不到响应,因此,终端可确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中;当第二时长大于第二参考值时,说明终端在执行上述目标任务时花费的时间过长,造成用户对目标应用执行的触发操作迟迟得不到响应,因此,终端可确定发生卡顿的位置位于执行该目标任务的过程中。
在一种可能的设计方法中,在终端确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中之后,还包括:当再次检测到对该目标应用的触发操作时,终端将位于当前目标任务之前的至少一个任务作为子线程进行分流处理,从而加快该目标任务的处理速度,避免在相同的应用场景下再次出现卡顿现象。
在一种可能的设计方法中,在终端确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中之后,还包括:当再次检测到对该目标应用的触发操作时,终端将位于当前目标任务之前的至少一个任务作为等待关闭的候选目标任务;当获取到用户选择的候选目标任务时,终端删除该用户选择的候选目标任务。这样,终端便无需执行这些被删除的候选任务,使得与上述触发操作对应的目标任务可以尽快的移动至任务队列的队头,从而加快该目标任务的处理速度,避免在相同的应用场景下再次出现卡顿现象。
在一种可能的设计方法中,在终端确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中之后,还包括:当再次检测到用户对该目标应用的触发操作时,终端删除当前目标应用生成的所有任务,并重新启动该目标应用。
在一种可能的设计方法中,在终端确定发生卡顿的位置位于执行该目标任务的过程中之后,还包括:当再次检测到用户对该目标应用的触发操作时,终端增加执行该目标任务时的运行资源,从而加快该目标任务在任务队列中的处理速度,避免在相同的应用场景下再次出现卡顿现象。
在一种可能的设计方法中,在终端记录从生成该目标任务到开始执行该目标任务所花费的第一时长,以及执行该目标任务所花费的第二时长之后,还包括:终端将第一时长和第二时长发送给服务器,由服务器根据终端上报的第一时长和第二时长,刷新上述第一参考值和第二参考值。
在一种可能的设计方法中,该方法还包括:终端从服务器获取第一参考值和第二参考值,第一参考值用于指示该目标任务等待执行时所花费时长的中位值,第二参考值用于指示执行该目标任务时所花费时长的中位值。
在一种可能的设计方法中,在确定发生卡顿的位置位于执行该目标任务 之前的其他任务的过程中或者位于执行该目标任务的过程中之后,还包括:终端在显示界面中向用户提示发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中,以便用户获知发生卡顿的具体原因,避免用户误以为终端此时发生卡死现象。
第二方面,本申请实施例提供一种卡顿检测方法,包括:服务器获取第一终端发送的第一时长和第二时长,第一时长用于指示第一终端从生成目标任务到开始执行该目标任务所花费的时长,第二时长用于指示第一终端执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该服务器根据第一时长,确定等待执行该目标任务时的第一参考值;该服务器根据第二时长,确定执行该目标任务时的第二参考值。
在一种可能的设计方法中,该方法还包括:该服务器获取第二终端发送的第三时长和第四时长,该第三时长用于指示第二终端从生成目标任务到开始执行该目标任务所花费的时长,该第四时长用于指示第二终端执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该服务器根据该第三时长更新第一参考值;该服务器根据该第四时长更新第二参考值。
在一种可能的设计方法中,该方法还包括:该服务器将第一参考值和第二参考值发送给第一终端。
在一种可能的设计方法中,在该服务器将第一参考值和第二参考值发送给第一终端之后,还包括:服务器获取第一终端发送的第五时长和第六时长,该第五时长用于指示第一终端从再次生成目标任务到开始执行该目标任务所花费的时长,第二时长用于指示第一终端再次执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该服务器根据该第五时长更新第一参考值;该服务器根据该第六时长更新第二参考值。
第三方面,本申请实施例提供一种终端,包括:执行单元,用于:当检测到对目标应用的触发操作时,执行与该触发操作对应的目标任务;记录单元,用于:记录从生成该目标任务到开始执行该目标任务所花费的第一时长,以及执行该目标任务所花费的第二时长;确定单元,用于:通过比较第一时长与预设的第一参考值的大小,以及比较第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中。
在一种可能的设计方法中,该确定单元,具体用于:当第一时长大于第一参考值时,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中;当第二时长大于第二参考值时,确定发生卡顿的位置位于执行该目标任务的过程中。
在一种可能的设计方法中,该执行单元,还用于:当再次检测到对该目标应用的触发操作时,将位于当前目标任务之前的至少一个任务作为子线程进行分流处理。
在一种可能的设计方法中,该执行单元,还用于:当再次检测到对该目 标应用的触发操作时,将位于当前目标任务之前的至少一个任务作为等待关闭的候选目标任务;当获取到用户选择的候选目标任务时,删除该用户选择的候选目标任务。
在一种可能的设计方法中,该执行单元,还用于:当再次检测到用户对该目标应用的触发操作时,删除当前目标应用生成的所有任务,并重新启动该目标应用。
在一种可能的设计方法中,该执行单元,还用于:当再次检测到对该目标应用的触发操作时,增加执行该目标任务时的运行资源。
在一种可能的设计方法中,终端还包括:发送单元,用于:将第一时长和第二时长发送给服务器。
在一种可能的设计方法中,终端还包括:获取单元,用于:从服务器获取第一参考值和第二参考值,第一参考值用于指示该目标任务等待执行时所花费时长的中位值,第二参考值用于指示执行该目标任务时所花费时长的中位值。
在一种可能的设计方法中,终端还包括:显示单元,用于:在显示界面中向用户提示发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中。
第四方面,本申请实施例提供一种服务器,包括:获取单元,用于:获取第一终端发送的第一时长和第二时长,第一时长用于指示第一终端从生成目标任务到开始执行该目标任务所花费的时长,第二时长用于指示第一终端执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;确定单元,用于:根据第一时长,确定等待执行该目标任务时的第一参考值;根据第二时长,确定执行该目标任务时的第二参考值。
在一种可能的设计方法中,该获取单元,还用于:获取第二终端发送的第三时长和第四时长,该第三时长用于指示第二终端从生成目标任务到开始执行该目标任务所花费的时长,该第四时长用于指示第二终端执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该确定单元,还用于:根据该第三时长更新第一参考值;根据该第四时长更新第二参考值。
在一种可能的设计方法中,该服务器还包括发送单元,用于:将第一参考值和第二参考值发送给第一终端。
在一种可能的设计方法中,该获取单元,还用于:获取第一终端发送的第五时长和第六时长,该第五时长用于指示第一终端从再次生成目标任务到开始执行该目标任务所花费的时长,第二时长用于指示第一终端再次执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该确定单元,还用于:根据该第五时长更新第一参考值;根据该第六时长更新第二参考值。
第五方面,本申请实施例提供一种终端,包括:通过总线连接的输入设备、处理器、显示器以及通信接口,其中,该输入设备,用于:检测对目标 应用的触发操作;该处理器,用于:执行与该触发操作对应的目标任务;记录从生成该目标任务到开始执行该目标任务所花费的第一时长,以及执行该目标任务所花费的第二时长;通过比较第一时长与预设的第一参考值的大小,以及比较第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中。
在一种可能的设计方法中,该处理器,具体用于:当第一时长大于第一参考值时,确定发生卡顿的位置位于执行该目标任务之前的其他任务的过程中;当第二时长大于第二参考值时,确定发生卡顿的位置位于执行该目标任务的过程中。
在一种可能的设计方法中,该输入设备,还用于:再次检测对该目标应用的触发操作;该处理器,还用于:将位于当前目标任务之前的至少一个任务作为子线程进行分流处理。
在一种可能的设计方法中,该输入设备,还用于:再次检测对该目标应用的触发操作;获取用户选择的候选目标任务;该处理器,还用于:将位于当前目标任务之前的至少一个任务作为等待关闭的候选目标任务;删除该用户选择的候选目标任务。
在一种可能的设计方法中,该输入设备,还用于:再次检测对该目标应用的触发操作;该处理器,还用于:删除当前目标应用生成的所有任务,并重新启动该目标应用。
在一种可能的设计方法中,该输入设备,还用于:再次检测对该目标应用的触发操作;该处理器,还用于:增加执行该目标任务时的运行资源。
在一种可能的设计方法中,该通信接口,用于:将第一时长和第二时长发送给服务器。
在一种可能的设计方法中,该通信接口,还用于:从服务器获取第一参考值和第二参考值,第一参考值用于指示该目标任务等待执行时所花费时长的中位值,第二参考值用于指示执行该目标任务时所花费时长的中位值。
在一种可能的设计方法中,该显示器,用于:在显示界面中向用户提示发生卡顿的位置位于执行该目标任务之前的其他任务的过程中或者位于执行该目标任务的过程中。
第六方面,本申请实施例提供一种服务器,包括:通过总线连接的处理器和通信接口,其中,该通信接口,用于:获取第一终端发送的第一时长和第二时长,第一时长用于指示第一终端从生成目标任务到开始执行该目标任务所花费的时长,第二时长用于指示第一终端执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该处理器,用于:根据第一时长,确定等待执行该目标任务时的第一参考值;根据第二时长,确定执行该目标任务时的第二参考值。
在一种可能的设计方法中,该通信接口,还用于:获取第二终端发送的第三时长和第四时长,该第三时长用于指示第二终端从生成目标任务到开始执行该目标任务所花费的时长,该第四时长用于指示第二终端执行该目标任 务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该处理器,还用于:根据该第三时长更新第一参考值;根据该第四时长更新第二参考值。
在一种可能的设计方法中,该通信接口,还用于:将第一参考值和第二参考值发送给第一终端。
在一种可能的设计方法中,该通信接口,还用于:获取第一终端发送的第五时长和第六时长,该第五时长用于指示第一终端从再次生成目标任务到开始执行该目标任务所花费的时长,第二时长用于指示第一终端再次执行该目标任务所花费的时长,该目标任务为响应于对目标应用的触发操作生成的;该处理器,还用于:根据该第五时长更新第一参考值;根据该第六时长更新第二参考值。
第七方面,本申请实施例提供一种显示在终端的触摸屏中的图形用户界面(Graphical User Interface,GUI),所述图形用户界面包括:在终端的触摸屏中显示第一GUI;当检测到用户在触摸屏上对目标应用触发的第一手势时,在触摸屏中显示第二GUI,该第二GUI中包括用于向用户提示发生卡顿的位置的第一界面元素。
在一种可能的设计方法中,上述第二GUI中还包括用于指示卡顿的处理进度的第二界面元素。
在一种可能的设计方法中,上述第二GUI中还包括用于提示进行卡顿优化的第三界面元素。
第八方面,本申请的实施例提供一种终端,包括:处理器、存储器、总线和通信接口;该存储器用于存储计算机执行指令,该处理器与该存储器通过该总线连接,当终端运行时,该处理器执行该存储器存储的该计算机执行指令,以使终端执行上述任一项卡顿检测方法。
第九方面,本申请的实施例提供一种服务器,包括:处理器、存储器、总线和通信接口;该存储器用于存储计算机执行指令,该处理器与该存储器通过该总线连接,当服务器运行时,该处理器执行该存储器存储的该计算机执行指令,以使服务器执行上述任一项卡顿检测方法。
第十方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在上述任一项终端上运行时,使得终端执行上述任一项卡顿检测方法。
第十一方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在上述任一项服务器上运行时,使得服务器执行上述任一项卡顿检测方法。
第十二方面,本申请实施例提供一种包含指令的计算机程序产品,当其在上述任一项终端上运行时,使得终端执行上述任一项卡顿检测方法。
第十三方面,本申请实施例提供一种包含指令的计算机程序产品,当其在上述任一项服务器上运行时,使得服务器执行上述任一项卡顿检测方法。
本申请的实施例中,上述终端或服务器的名字对设备本身不构成限定, 在实际实现中,这些设备可以以其他名称出现。只要各个设备的功能和本申请的实施例类似,即属于本申请权利要求及其等同技术的范围之内。
另外,第二方面至第十三方面中任一种设计方式所带来的技术效果可参见上述第一方面中不同设计方法所带来的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种终端的结构示意图一;
图2为本申请实施例提供的一种安卓操作系统架构示意图;
图3为本申请实施例提供的一种卡顿检测方法的应用场景示意图一;
图4为本申请实施例提供的一种卡顿检测方法的流程示意图;
图5为本申请实施例提供的一种卡顿检测方法的应用场景示意图二;
图6为本申请实施例提供的一种卡顿检测方法的应用场景示意图三;
图7为本申请实施例提供的一种卡顿检测方法的应用场景示意图四;
图8为本申请实施例提供的一种卡顿检测方法的应用场景示意图五;
图9为本申请实施例提供的一种卡顿检测方法的应用场景示意图六;
图10为本申请实施例提供的一种卡顿检测方法的应用场景示意图七;
图11为本申请实施例提供的一种卡顿检测方法的应用场景示意图八;
图12为本申请实施例提供的一种卡顿检测方法的应用场景示意图九;
图13为本申请实施例提供的一种卡顿检测方法的应用场景示意图十;
图14为本申请实施例提供的一种卡顿检测方法的应用场景示意图十一;
图15为本申请实施例提供的一种卡顿检测方法的应用场景示意图十二;
图16为本申请实施例提供的一种终端的结构示意图二;
图17为本申请实施例提供的一种服务器的结构示意图一;
图18为本申请实施例提供的一种终端的结构示意图三;
图19为本申请实施例提供的一种服务器的结构示意图二。
具体实施方式
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本申请的实施例提供一种卡顿检测方法,可应用于手机、可穿戴设备、AR(增强现实)\VR(虚拟现实)设备、平板电脑、笔记本电脑、UMPC(超级移动个人计算机)、上网本、PDA(个人数字助理)等可以运行APP的任意终端,本申请实施例对此不作任何限制。
如图1所示,本申请实施例中的终端可以为手机100。下面以手机100为例对实施例进行具体说明。应该理解的是,图示手机100仅是终端的一个范例,并且手机100可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。
如图1所示,手机100具体可以包括:处理器101、射频(RF)电路102、存储器103、触摸屏104、蓝牙装置105、一个或多个传感器106、Wi-Fi装置 107、定位装置108、音频电路109、外设接口110以及电源系统111等部件。这些部件可通过一根或多根通信总线或信号线(图1中未示出)进行通信。本领域技术人员可以理解,图1中示出的硬件结构并不构成对手机的限定,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对手机100的各个部件进行具体的介绍:
处理器101是手机100的控制中心,利用各种接口和线路连接手机100的各个部分,通过运行或执行存储在存储器103内的应用程序(以下可以简称App),以及调用存储在存储器103内的数据,执行手机100的各种功能和处理数据。在一些实施例中,处理器101可包括一个或多个处理单元;举例来说,处理器101可以是华为技术有限公司制造的麒麟960芯片。
射频电路102可用于在收发信息或通话过程中,无线信号的接收和发送。特别地,射频电路102可以将基站的下行数据接收后,给处理器101处理;另外,将涉及上行的数据发送给基站。通常,射频电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频电路102还可以通过无线通信和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、电子邮件、短消息服务等。
存储器103用于存储应用程序以及数据,处理器101通过运行存储在存储器103的应用程序以及数据,执行手机100的各种功能以及数据处理。存储器103主要包括存储程序区以及存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等);存储数据区可以存储根据使用手机100时所创建的数据(比如音频数据、电话本等)。此外,存储器103可以包括高速随机存取存储器,还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他易失性固态存储器件等。存储器103可以存储各种操作系统,例如,苹果公司所开发的iOS操作系统,谷歌公司所开发的Android操作系统等。
触摸屏104可以包括触控板104-1和显示器104-2。其中,触控板104-1可采集手机100的用户在其上或附近的触摸事件(比如用户使用手指、触控笔等任何适合的物体在触控板104-1上或在触控板104-1附近的操作),并将采集到的触摸信息发送给其他器件例如处理器101。虽然在图1中,触控板104-1与显示屏104-2是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,可以将触控板104-1与显示屏104-2集成而实现手机100的输入和输出功能。可以理解的是,触摸屏104是由多层的材料堆叠而成,本申请实施例中只展示出了触控板(层)和显示屏(层),其他层在本申请实施例中不予记载。另外,在本申请其他一些实施例中,触控板104-1可以覆盖在显示器104-2之上,并且触控板104-1的尺寸大于显示屏104-2的尺寸,使得显示屏104-2全部覆盖在触控板104-1下面,或者,上述触控板104-1可以以全面板的形式配置在手机100的正面,也即用户在手机100正面 的触摸均能被手机感知,这样就可以实现手机正面的全触控体验。在其他一些实施例中,触控板104-1以全面板的形式配置在手机100的正面,显示屏104-2也可以以全面板的形式配置在手机100的正面,这样在手机的正面就能够实现无边框的结构。
在本申请实施例中,手机100还可以具有指纹识别功能。例如,可以在手机100的背面(例如后置摄像头的下方)配置指纹识别器112,或者在手机100的正面(例如触摸屏104的下方)配置指纹识别器112。又例如,可以在触摸屏104中配置指纹采集器件112来实现指纹识别功能,即指纹采集器件112可以与触摸屏104集成在一起来实现手机100的指纹识别功能。在这种情况下,该指纹采集器件112配置在触摸屏104中,可以是触摸屏104的一部分,也可以以其他方式配置在触摸屏104中。本申请实施例中的指纹采集器件112的主要部件是指纹传感器,该指纹传感器可以采用任何类型的感测技术,包括但不限于光学式、电容式、压电式或超声波传感技术等。
在本申请实施例中,手机100还可以包括蓝牙装置105,用于实现手机100与其他短距离的终端(例如手机、智能手表等)之间的数据交换。本申请实施例中的蓝牙装置可以是集成电路或者蓝牙芯片等。
Wi-Fi装置107,用于为手机100提供遵循Wi-Fi相关标准协议的网络接入,手机100可以通过Wi-Fi装置107接入到Wi-Fi接入点,进而帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。在其他一些实施例中,该Wi-Fi装置107也可以作为Wi-Fi无线接入点,可以为其他终端提供Wi-Fi网络接入。
手机100还可以包括至少一种传感器106,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节触摸屏104的显示器的亮度,接近传感器可在手机100移动到耳边时,关闭显示器的电源。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
定位装置108,用于为手机100提供地理位置。可以理解的是,该定位装置108具体可以是全球定位系统(GPS)或北斗卫星导航系统、俄罗斯GLONASS等定位系统的接收器。定位装置108在接收到上述定位系统发送的地理位置后,将该信息发送给处理器101进行处理,或者发送给存储器103进行保存。在另外的一些实施例中,该定位装置108还可以是辅助全球卫星定位系统(AGPS)的接收器,AGPS系统通过作为辅助服务器来协助定位装置108完成测距和定位服务,在这种情况下,辅助定位服务器通过无线通信网络与终端例如手机100的定位装置108(即GPS接收器)通信而提供定位协助。在另外的一些实施例中,该定位装置108也可以是基于Wi-Fi接入点 的定位技术。由于每一个Wi-Fi接入点都有一个全球唯一的MAC地址,终端在开启Wi-Fi的情况下即可扫描并收集周围的Wi-Fi接入点的广播信号,因此可以获取到Wi-Fi接入点广播出来的MAC地址;终端将这些能够标示Wi-Fi接入点的数据(例如MAC地址)通过无线通信网络发送给位置服务器,由位置服务器检索出每一个Wi-Fi接入点的地理位置,并结合Wi-Fi广播信号的强弱程度,计算出该终端的地理位置并发送到该终端的定位装置108中。
音频电路109、扬声器113、麦克风114可提供用户与手机100之间的音频接口。音频电路109可将接收到的音频数据转换后的电信号,传输到扬声器113,由扬声器113转换为声音信号输出;另一方面,麦克风114将收集的声音信号转换为电信号,由音频电路109接收后转换为音频数据,再将音频数据输出至RF电路102以发送给比如另一手机,或者将音频数据输出至存储器103以便进一步处理。
外设接口110,用于为外部的输入/输出设备(例如键盘、鼠标、外接显示器、外部存储器、用户识别模块卡等)提供各种接口。例如通过通用串行总线(USB)接口与鼠标连接,通过用户识别模块卡卡槽上的金属触点与电信运营商提供的用户识别模块卡(SIM)卡进行连接。外设接口110可以被用来将上述外部的输入/输出外围设备耦接到处理器101和存储器103。
手机100还可以包括给各个部件供电的电源装置111(比如电池和电源管理芯片),电池可以通过电源管理芯片与处理器101逻辑相连,从而通过电源装置111实现管理充电、放电、以及功耗管理等功能。
尽管图1未示出,手机100还可以包括摄像头(前置摄像头和/或后置摄像头)、闪光灯、微型投影装置、近场通信(NFC)装置等,在此不再赘述。
进一步地,上述手机100中可以运行在Android或IOS等操作系统中,本申请实施例对此不作任何限制。
以Android操作系统为例,如图2所示,Android操作系统可以划分为四层,从高层到低层分别是应用程序层201(即APP层)、应用程序框架层202(即Framework层)、系统运行库层203(即Libraries层)和Linux内核层204。
其中,Linux内核层204可用于控制手机100的安全(Security),存储器管理(Memory Management),程序管理(Process Management),网络堆栈(Network Stack),驱动程序模型(Driver Model)等功能。Linux内核层204同时也作为硬件(例如,CPU、网卡以及内存等)和软件栈之间的抽象层,它可隐藏具体硬件细节从而为上层(系统运行库层203、应用程序框架层202以及应用程序层201)提供统一的服务。
系统运行库层203中包含一些C/C++库,例如,媒体库、系统C库以及显示管理库(Surface Manager)等,这些库能被Android系统中不同的组件使用,系统运行库层203可通过Framework层202为开发人员提供服务。
Framework层202为开发人员提供了一个可以完全访问应用程序所使用的API框架。具体的,Framework层202为开发应用程序提供了非常多的API,通过调用相应的API可以构造满足相关业务需求的APP。
应用程序层201主要包括用java语言编写的运行在虚拟机上的APP,用户在操作APP上的操作界面时,通过调用Framework层202中的相关API,与系统运行库层203或Linux内核层204进行交互,实现与该操作界面相对应的功能。
示例性的,如图3所示,手机100的应用程序层201中安装有应用A,当手机100检测到用户点击桌面上应用A的图标这一触发操作时,触发应用A调用Framework层202中的相应API生成一个动作事件(ActionEvent),该动作事件表示应用A中图标被点击了。进而,如图3所示,Framework层202为处理该动作事件可生成一个或多个目标任务,例如,启动应用A的相关组件、加载广告以及显示首页内容等任务,上述目标任务生成后被送至应用A的任务队列(task queue)中等待处理。
后续,手机100按照先进先出的原则依次执行上述任务队列中的各个任务,当执行完任务队列中位于上述目标任务之前的所有任务后,该目标任务从任务队列的队尾移动至队头。当目标任务位于任务队列的队头时,手机100开始执行该目标任务,从而实现与用户点击应用A的图标这一触发操作对应的应用A的启动过程。
在本申请实施例中,为了确定应用运行时发生卡顿的具体环节,终端可以预先获取到用于判断是否发生卡顿的参考值,例如,该参考值可包括:用于指示一个任务在任务队列中等待执行时所花费的参考时长(即第一参考值),以及用于指示执行一个任务时所花费的参考时长(即第二参考值)。示例性的,该第一参考值为10ms,该第二参考值为20ms。
那么,终端可以监控上述任务队列中的每个任务在任务队列中等待执行时所花费的实际时长(即第一时长),以及执行该任务时所花费的实际时长(即第二时长)。这样,通过对比上述第一参考值和上述第一时长,终端可以确定出该任务在任务队列内等待执行时是否发生卡顿,例如,当检测出上述第一时长为15ms(大于第一参考值10ms)时,可确定该任务在任务队列内等待执行时发生卡顿。相应的,通过对比上述第二参考值和上述第二时长,终端可以确定出该任务在实际执行过程中是否发生卡顿,例如,当检测出上述第二时长为25ms(大于第二参考值20ms)时,可确定该任务在执行过程中发生卡顿。
可以看出,本申请实施例提供的卡顿检测方法,通过获取应用运行时生成的各个任务在等待执行时的第一时长和在实际执行时的第二时长,可以检测出该应用运行时发生卡顿的具体环节,例如,该卡顿发生在任务执行过程中,或者发生在任务等待执行的过程中。这样,根据发生卡顿的具体环节可以有针对性的对终端进行性能优化,从而降低终端发生死机现象的几率,同时可提高用户体验。
以下将结合具体实施例详细阐述本申请实施例提供的一种卡顿检测方法,如图4所示,该方法包括:
400、终端从服务器获取第一参考值和第二参考值。
其中,该第一参考值具体可以为服务器根据各个终端上报的某个应用(例如,应用A)生成的任务在任务队列中等待执行时所花费时长的中位值;相应的,第二参考值具体可以为服务器根据各个终端上报的某个应用(例如,应用A)生成的任务在实际执行时所花费时长的中位值。
具体的,如图5所示,本申请实施例提供的卡顿检测方法可应用于图5所示的检测系统中,该系统中包括服务器51以及与服务器51相连的N个终端52。
示例性的,上述N个终端中每个终端52内都安装有应用A。那么,每个终端在运行应用A时,可以记录应用A生成的每个任务在任务队列中的等待时间T1,以及执行每个任务花费的执行时间T2,进而,将每个任务的等待时间T1和执行时间T2上报给服务器51。当然,终端还可以将每个任务的标识以及应用A的标识(例如应用A的包名)一并发给服务器。
那么,服务器51可以获取到在不同终端52中执行上述每个任务时的等待时间T1和执行时间T2,进而,对于每一个任务,服务器51可以将获取到的所有该任务的等待时间T1的中位值作为上述第一参考值发送给每一个终端52,并将获取到的所有该任务的执行时间T2的中位值作为上述第二参考值发送给每一个终端52。这样,终端可以得到执行应用A时每一个任务所对应的第一参考值和第二参考值。
后续,以应用A的任务1为例,终端52接收到服务器发送的任务1的第一参考值和第二参考值后,可以以该第一参考值为标准,判断应用A的任务1在任务队列中等待时是否发生卡顿,还可以以上述第二参考值为标准,判断应用A的任务1在执行时是否发生卡顿,从而确定出任务1在运行过程中发生卡顿的具体环节。
当然,服务器51也可以根据各个终端52上报的等待时间T1和执行时间T2,使用相应的数学模型或算法计算上述第一参考值和第二参考值,本申请实施例对此不作任何限制。
例如,由于不同设备类型的终端的处理能力不同,因此,终端52在上报上述等待时间T1和执行时间T2时还可以上报自身的设备类型,不同设备类型所对应的等待时间T1和执行时间T2的权值不同。这样,服务器51在计算上述第一参考值和第二参考值时,可以根据每个终端的设备信息将上述N个等待时间T1进行加权平均后得到上述第一参考值,并且,可以根据每个终端的设备信息将上述N个执行时间T2进行加权平均后得到上述第二参考值,从而提高后续定位卡顿位置的准确性。
可以理解的是,上述第一参考值和第二参考值是一个实时更新的过程。也就是说,服务器51可以根据不同的终端52实时上报的等待时间T1和执行时间T2刷新上述第一参考值和第二参考值,并将刷新后的第一参考值和第二参考值发送给终端52。
401、当检测到用户对目标应用的触发操作时,终端生成与该触发操作对应的目标任务。
如图3所示,当终端检测到用户对目标应用(例如应用A)执行的触发操作时,例如,用户点击联系人应用的搜索按钮,可触发应用A调用Framework层202中相应API的生成一个动作事件(ActionEvent),进而,Framework层202为处理该动作事件会生成一个或多个目标任务,例如,加载本地联系人任务、搜索任务、以及显示搜索结果等任务,上述目标任务生成后被送至应用A的任务队列中等待处理。
其中,上述目标任务具体可以为一个或多个message(消息)对象,在安卓操作系统中,可以通过消息处理机制传递相关事件的参数。具体的,当一个应用启动时,终端会开启一个主线程(即UI线程)来管理UI(界面),监听用户点击等事件。那么,当检测到用户对应用A执行的触发操作时,终端可生成相应的一个或多个message对象作为目标任务送入消息队列(即任务队列)中等待执行,当目标任务出队后,终端便可调用与上述message对象对应的handler对象的handleMessage()方法对其进行处理,即执行该目标任务。
可以理解的是,应用A的任务队列中的任务也可以与其他应用的任务(例如,应用B)的任务队列中的任务相关联。例如,应用A为购物应用,应用B为支付应用,当用户触发应用A中的支付按钮时,如图6所示,应用A可以生成一个刷新支付页面的目标任务1和显示支付结果的目标任务2,并将任务1和任务2送至与应用A对应的任务队列1的队尾。同时,目标任务1的生成可触发应用B生成相应的支付任务,例如,目标任务3,此时,应用B将目标任务3送至与应用B对应的任务队列2的队尾中等待处理。此时,上述目标任务包括应用A的目标任务1和目标任务2,以及应用B的目标任务3。
402、终端记录上述目标任务从进入任务队列到移动至该任务队列的对头所花费的第一时长。
示例性的,终端生成与上述触发操作对应的目标任务后,将该目标任务加入目标应用的任务队列的队尾,如图7中的(a)所示,在目标应用的任务队列中,在目标任务之前还有任务1-任务6共6个待处理的任务。将该目标任务加入目标应用的任务队列的队尾时,终端还可以通过调用函数:getCurrentTime()获取当前的系统时间C1,例如,本次getCurrentTime()返回的当前的系统时间C1为:21点10分10秒25毫秒。
后续,终端可以按照先进先出的原则继续执行上述任务队列中的各个任务,如图7中的(b)所示,当终端执行完任务队列中位于上述目标任务之前的任务1-任务6后,上述目标任务从任务队列的队尾移动至任务队列的对头,此时,终端可以再次通过调用函数:getCurrentTime()获取当前的系统时间C2,例如,本次getCurrentTime()返回的当前的系统时间C2为:21点10分10秒45毫秒。
那么,终端根据上述两次获取到的系统时间,可以确定出上述目标任务从进入任务队列到移动至该任务队列的对头所花费的第一时长为C2-C1=20 毫秒,该第一时长可以反映出从生成上述目标任务到开始执行该目标任务所花费的时长。
403、当上述目标任务移动至任务队列的对头时,终端记录执行该目标任务所花费的第二时长。
在步骤403中,当上述目标任务移动至任务队列的对头时,终端开始执行上述目标任务,当执行完上述目标任务后,终端会将执行完成该目标任务的响应消息返回给目标应用,此时,可以触发终端可以再次调用函数:getCurrentTime()获取当前的系统时间C3,例如,本次getCurrentTime()返回的当前的系统时间C3为:21点10分11秒01毫秒。
那么,终端可以确定出执行上述目标任务所花费的第二时长为C3-C2=26毫秒。
404、终端将上述记录的第一时长和第二时长发送给服务器。
可选的,终端还可以将获取到的上述第一时长作为步骤400中的等待时间T1,将获取到的上述第二时长作为步骤400中的执行时间T2发送给服务器,由服务器刷新上述第一参考值和第二参考值,并将刷新后的第一参考值和第二参考值发送给终端。
后续,终端可以通过比较上述第一时长与第一参考值之间的大小,以及上述第二时长与第二参考值之间的大小,确定运行上述目标任务时是否发生卡顿,如果发生卡顿,则终端可进一步定位发生卡顿的具体位置。
当然,终端在发送上述第一时长和第二时长时还可以携带上述目标任务所属的应用的包名,上述目标任务的标识等信息,这样服务器可以以应用的任务为粒度,为不同应用的不同任务确定出对应的第一参考值和第二参考值。
405a、当上述第一时长大于第一参考值时,终端确定发生卡顿的位置位于执行上述目标任务之前的其他任务的过程中。
示例性的,上述第一时长为C2-C1=20毫秒,而服务器预先发送给终端的上述目标任务的第一参考值为10毫秒,此时,第一时长大于该第一参考值,说明上述目标任务在目标应用的任务队列中等待的时间过长,造成用户对目标应用执行的触发操作迟迟得不到响应。
此时,终端可以确定发生卡顿的原因是因为处理该任务队列中位于目标任务之前的其他任务时花费的时间过长导致的,从而使得终端可以准确的定位出目标应用运行时发生卡顿的具体原因。
另外,当终端检测到上述目标任务在任务队列中等待的时长大于上述第一参考值还未开始执行时,如图8中的(a)所示,终端还可以通过一个提示框向用户提示当前终端正在处理该目标任务。例如,终端可以根据目前任务队列中等待处理的任务的个数计算出用户等待的时间并提示给用户,或者,根据目前任务队列中等待处理的任务的个数计算出完成该目标任务的当前进度并提示给用户。
或者,如图8中的(b)所示,终端还可以通过一个提示框向用户提示发生卡顿的具体原因,请用户耐心等待,避免用户误以为终端此时发生卡死现 象。
又或者,如图8中的(c)所示,终端还可以通过一个提示框向用户提示是否对出现的卡顿进行优化,如果用户确认对卡顿进行优化,则终端可继续执行下述实施例中提供的卡顿优化方法。
具体的,为了降低后续用户对该目标应用再次执行上述触发操作时发生卡顿现象的几率,开发人员可以通过在应用的运行代码中插入日志(log)的方法获取上述第一时长和第二时长。
例如,如图9中的(a)所示,当终端将上述目标任务加入目标应用的任务队列的队尾时可插入log1,log1用于记录将上述目标任务加入目标应用的任务队列的队尾这一动作的系统时间C1;如图9中的(b)所示,在终端开始执行上述目标任务之前,可再次插入一条日志,例如log2,log2用于记录开始执行上述目标任务的系统时间C2;如图9中的(c)所示,当终端执行完上述目标任务后,可再次插入一条日志,例如log3,log3用于记录执行完上述目标任务的系统时间C3。
这样,开发人员可以通过打印上述log1-log3,便可以确定出上述目标任务从进入任务队列到移动至该任务队列的对头所花费的第一时长C2-C1,以及执行上述目标任务所花费的第二时长C3-C2。进而,通过比较上述第一时长与第一参考值之间的大小,以及上述第二时长与第二参考值之间的大小,开发人员便可以确定运行上述目标任务时发生卡顿的具体位置。
例如,当上述第一时长大于该第一参考值时,开发人员可以确定发生卡顿的具体原因是因为任务队列中位于上述目标任务之前的其他任务时花费的时间过长导致的,因此,开发人员可以对图7(a)中位于上述目标任务之前的任务1-任务6的运行代码进行精简,使得用户在后续执行相同的触发操作时,可以提高任务队列中位于上述目标任务之前的其他任务的执行效率,从而减缓卡顿现象。
当然,也可以在终端确定出上述第一时长(C2-C1)和上述第二时长(C3-C2)之后插入log记录该第一时长和第二时长时具体取值,本申请实施例对插入的log中的具体内容不作任何限制。
在本申请的一些实施例中,由于终端已经确定了发生卡顿的具体环节是在执行任务队列中位于上述目标任务之前的其他任务时发生的,因此,当再次检测到用户对上述目标应用执行相同的触发操作,例如,用户再次点击联系人应用的搜索按钮时,终端同样会生成与这次触发操作对应的目标任务(即当前的目标任务),可以理解的是,当前的目标任务生成的时间与步骤401中最近一次目标任务的生成时间虽然不同,但是其触发的场景是相同的,因此,上述当前目标任务与步骤401中生成的目标任务的内容是相同的,例如,二者均为一个联系人搜索任务。
此时,终端可以将当前的任务队列中位于上述目标任务之前的至少一个任务作为子线程进行分流处理。如图10所示,当再次检测到用户对上述目标应用执行相同的触发操作时,终端可建立两个子线程处理任务队列中位于目 标任务之前的任务1-任务6,其中,子线程1用于处理任务1、任务3和任务5,子线程2用于处理任务2、任务4和任务6。这样,目标应用响应于上述触发操作,将生成的目标任务送入任务队列,此时,任务队列中的其他任务都已经分流至子线程1和子线程2,那么,目标应用的主线程可立即处理该目标任务,从而加快该目标任务的处理速度,避免在相同的应用场景下再次出现卡顿现象。
在本申请的另一些实施例中,当再次检测到用户对上述目标应用执行相同的触发操作时,由于终端已经确定了发生卡顿的具体环节是在执行任务队列中位于上述目标任务之前的其他任务时发生的,因此,如图11所示,终端可以将上述任务队列中位于上述目标任务之前的一个或多个任务,例如,位于上述目标任务之前的任务1-任务3作为候选任务提示给用户,由用户手动的选择是否关闭其中的一个或多个任务。那么,当终端获取到用户选择的候选任务时,终端可以从上述任务队列中将用户选择的候选任务删除。这样,终端便无需执行这些被删除的候选任务,使得与上述触发操作对应的目标任务可以尽快的移动至任务队列的队头,从而加快该目标任务的处理速度,避免在相同的应用场景下再次出现卡顿现象。
又或者,当再次检测到用户对上述目标应用执行相同的触发操作时,终端可以自动为删除上述任务队列中位于上述目标任务之前的一个或多个任务,从而加快该目标任务在任务队列中的处理速度。
又或者,当再次检测到用户对上述目标应用执行相同的触发操作时,如图12所示,如果终端检测到上述目标任务在任务队列中等待的时长大于上述第一参考值还未开始执行时,终端可以提示用户关闭该应用后重新启动该应用等,本申请实施例对此不作任何限制。
当然,如果终端检测到上述目标任务在任务队列中等待的时长大于上述第一参考值还未开始执行时,终端还可以提示用户关闭除上述目标应用之外的其他应用,从而释放当前终端的内存资源,终端可以利用这部分被释放的内存资源加速执行任务队列中的各个任务,从而加快该目标任务在任务队列中的处理速度。
在本申请的另一些实施例中,由于终端在步骤405a中已经确定了发生卡顿的具体环节是在执行任务队列中位于上述目标任务之前的其他任务时发生的,并且,终端可以监测到任务队列中每一个任务在执行时花费的时长,因此,终端可以根据上述任务队列中位于上述目标任务之前的每个任务执行时花费的时长,确定出任务队列中位于上述目标任务之前运行较慢的一个或多个卡顿任务。
示例性的,仍如图7中的(a)所示,终端在监测上述目标任务从进入任务队列到移动至该任务队列的对头所花费的第一时长的同时,还可以同时监测执行该任务队列中的任务1-任务6中每一个任务时所花费的时长。当执行某个任务(例如任务3)花费的时长大于上述第二参考值时,说明终端在执行任务3时运行速度较慢,导致终端运行目标任务时发生卡顿,因此,可以将 任务3作为上述卡顿任务之一。
那么,当再次检测到用户对上述目标应用执行相同的触发操作时,为了避免在相同的应用场景下再次出现卡顿现象,如图13所示,终端可以自动删除任务队列中的卡顿任务(例如,上述任务3),从而加快该目标任务在任务队列中的处理速度;或者,终端还可以在执行上述任务队列中的卡顿任务时为其分配更多的运行资源,例如,提高CPU的运行频率、增加处理上述卡顿任务时的内存资源等,这样,终端可以更快的执行完位于目标任务之前的卡顿任务,从而加快该目标任务在任务队列中的处理速度。
405b、当上述第二时长大于第二参考值时,终端确定发生卡顿的位置位于执行上述目标任务的过程中。
示例性的,上述第二时长为C3-C2=26毫秒,而服务器预先发送给终端的上述目标任务的第二参考值为20毫秒,此时,第二时长大于该第二参考值,说明终端在执行上述目标任务时花费的时间过长,造成用户对目标应用执行的触发操作迟迟得不到响应。
此时,终端可以确定发生卡顿的原因是因为执行该目标任务时花费的时间过长导致的,使得终端可以准确的定位出目标应用运行时发生卡顿的具体原因。
此时,为了避免后续用户对目标应用再次执行上述触发操作时再次发生卡顿,当再次检测到用户对上述目标应用执行相同的触发操作时,终端将目标应用生成的目标任务送入其任务队列的队尾,当该目标任务移动至任务队列的队头时,终端开始执行该目标任务。此时,如图14所示,终端可以在执行该目标任务时为其分配更多的运行资源,例如,提高CPU的运行频率、增加处理上述卡顿任务时的内存资源等,从而加快该目标任务在任务队列中的处理速度,避免在相同的应用场景下再次出现卡顿现象。
另外,在本申请实施例中,如图15所示,终端还可以根据任务类型对任务队列中的任务进行划分。示例性的,可以将显示类任务(例如,任务1-任务3)作为第一类任务,将搜索类任务(例如,任务4-任务6以及当前的目标任务)作为第二类任务。由于终端在执行不同种类任务时花费的时间会有所差距,因此,服务器发送的上述第二参考值中具体可以包括2个参考值K1和K2,其中,K1可用于指示终端执行显示类任务时所花费时间的中位值,例如15毫秒,K2可用于指示终端执行搜索类任务时所花费时间的中位值,例如10毫秒。
这样,当终端执行上述目标任务时,可以根据目标任务所属的种类,将实际执行该目标任务花费的第二时长与相应的第二参考值进行比较,从而更加准确的确定出在执行目标任务时是否发生卡顿。
例如,图15中所示的目标任务为搜索类任务,而搜索类任务的第二参考值K2为10毫秒。那么,终端获取到执行上述目标任务所花费的第二时长(C3-C2)后,可将该第二时长与10毫秒进行比较,当第二时长大于10毫秒时,可以确定在执行该目标任务时发生卡顿,从而提高终端检测卡顿时的准 确性。
当然,终端在向服务器上报上述第一时长和第二时长时,还可以一并上报上述目标任务所属的种类的标识,例如,标识0代表上述第一类任务,标识1代表上述第二类任务。这样,服务器也可以根据各个终端上报在执行不同种类任务时所花费的时长,更新上述第二参考值中K1和K2的取值,并将更新后的K1和K2的取值发送给终端,使得终端获取到对不同种类任务检测卡顿时更加准确的参考值,从而提高终端检测卡顿时的准确性。
另外,本申请实施例还提供一种显示在终端的触摸屏中的图形用户界面(GUI),示例性的,该图形用户界面包括:
在终端的触摸屏中显示第一GUI,例如,该第一GUI可以为终端的桌面(launch)界面,或者为某一应用运行时的任意界面,本申请实施例对此不做任何限制。进而,当检测到用户在触摸屏上对目标应用触发的第一手势时,例如,点击目标应用图标的手势,响应于该手势,终端可在触摸屏中显示第二GUI,该第二GUI中包括用于向用户提示发生卡顿的位置的第一界面元素,例如,该第一界面元素可以为图8(b)中所示的提示框。
又或者,如图8(a)中所示,上述第二GUI中还可以包括用于指示卡顿的处理进度的第二界面元素。
又或者,如图8(c)中所示,上述第二GUI中还可以包括用于提示进行卡顿优化的第三界面元素,本申请实施例对此不作任何限制。
可以理解的是,上述终端等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述终端等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图16示出了上述实施例中所涉及的终端的一种可能的结构示意图,该终端包括:获取单元1101、执行单元1102、记录单元1103、确定单元1104、发送单元1105以及显示单元1106。
获取单元1101用于支持终端执行图4中的过程400;执行单元1102用于支持终端执行图4中的过程401;记录单元1103用于支持终端执行图4中的过程402和403;确定单元1104用于支持终端执行图4中的过程405a和 405b;发送单元1105用于支持终端执行图4中的过程404;显示单元1106用于在显示界面中向用户提示发生卡顿的位置位于执行目标任务之前的其他任务的过程中或者位于执行目标任务的过程中。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应发明内容中的功能描述,在此不再赘述。
相应的,在采用对应各个功能划分各个功能模块的情况下,图17示出了上述实施例中所涉及的服务器的一种可能的结构示意图,该服务器包括:获取单元1201、确定单元1202以及发送单元1203。
其中,获取单元1201,用于:获取第一终端发送的第一时长和第二时长,所述第一时长用于指示所述第一终端从生成目标任务到开始执行所述目标任务所花费的时长,所述第二时长用于指示所述第一终端执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
确定单元1202,用于:根据所述第一时长,确定等待执行所述目标任务时的第一参考值;根据所述第二时长,确定执行所述目标任务时的第二参考值。
进一步地,获取单元1201,还用于:获取第二终端发送的第三时长和第四时长,所述第三时长用于指示所述第二终端从生成目标任务到开始执行所述目标任务所花费的时长,所述第四时长用于指示所述第二终端执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
确定单元1202,还用于:根据所述第三时长更新所述第一参考值;根据所述第四时长更新所述第二参考值。
进一步地,发送单元1203,用于:将所述第一参考值和所述第二参考值发送给所述第一终端。
进一步地,获取单元1201,还用于:获取第一终端发送的第五时长和第六时长,所述第五时长用于指示所述第一终端从再次生成目标任务到开始执行所述目标任务所花费的时长,所述第二时长用于指示所述第一终端再次执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
确定单元1202,还用于:根据所述第五时长更新所述第一参考值;根据所述第六时长更新所述第二参考值。
在采用集成的单元的情况下,图18示出了上述实施例中所涉及的终端的一种可能的结构示意图。该终端包括:处理模块1302和通信模块1303。处理模块1302用于对终端的动作进行控制管理。通信模块1303用于支持终端与其他网络实体的通信。该终端还可以包括存储模块1301,用于存终端的程序代码和数据。
类似的,在采用集成的单元的情况下,图19示出了上述实施例中所涉及的服务器的一种可能的结构示意图。该服务器包括:处理模块1402和通信模块1403。处理模块1402用于对服务器的动作进行控制管理。通信模块1403用于支持服务器与其他网络实体的通信。该服务器还可以包括存储模块1401, 用于存服务器的程序代码和数据。
其中,处理模块1302/1402可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块1303/1403可以是收发器、收发电路或通信接口等。存储模块1301/1401可以是存储器。
当处理模块1302为处理器,通信模块1303为RF收发电路,存储模块1301为存储器时,本申请实施例所提供的终端可以为图1所示的手机100。
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (30)

  1. 一种卡顿检测方法,其特征在于,包括:
    当检测到对目标应用的触发操作时,终端执行与所述触发操作对应的目标任务;
    所述终端记录从生成所述目标任务到开始执行所述目标任务所花费的第一时长,以及执行所述目标任务所花费的第二时长;
    所述终端通过比较所述第一时长与预设的第一参考值的大小,以及比较所述第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中或者位于执行所述目标任务的过程中。
  2. 根据权利要求1所述的方法,其特征在于,所述终端通过比较所述第一时长与预设的第一参考值的大小,以及比较所述第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中或者位于执行所述目标任务的过程中,包括:
    当所述第一时长大于所述第一参考值时,所述终端确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中;
    当所述第二时长大于所述第二参考值时,所述终端确定发生卡顿的位置位于执行所述目标任务的过程中。
  3. 根据权利要求2所述的方法,其特征在于,在所述终端确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中之后,还包括:
    当再次检测到对所述目标应用的触发操作时,所述终端将位于当前目标任务之前的至少一个任务作为子线程进行分流处理。
  4. 根据权利要求2所述的方法,其特征在于,在所述终端确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中之后,还包括:
    当再次检测到对所述目标应用的触发操作时,所述终端将位于当前目标任务之前的至少一个任务作为等待关闭的候选目标任务;
    当获取到用户选择的候选目标任务时,所述终端删除所述用户选择的候选目标任务。
  5. 根据权利要求2所述的方法,其特征在于,在所述终端确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中之后,还包括:
    当再次检测到用户对所述目标应用的触发操作时,所述终端删除当前目标应用生成的所有任务,并重新启动所述目标应用。
  6. 根据权利要求2-5中任一项所述的方法,其特征在于,在所述终端确定发生卡顿的位置位于执行所述目标任务的过程中之后,还包括:
    当再次检测到对所述目标应用的触发操作时,所述终端增加执行所述目标任务时的运行资源。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,在所述终端记录从生成所述目标任务到开始执行所述目标任务所花费的第一时长,以及执行所述目标任务所花费的第二时长之后,还包括:
    所述终端将所述第一时长和所述第二时长发送给服务器。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述方法还包括:
    所述终端从服务器获取所述第一参考值和所述第二参考值,所述第一参考值用于指示所述目标任务等待执行时所花费时长的中位值,所述第二参考值用于指示执行所述目标任务时所花费时长的中位值。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,在确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中或者位于执行所述目标任务的过程中之后,还包括:
    所述终端在显示界面中向用户提示发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中或者位于执行所述目标任务的过程中。
  10. 一种卡顿检测方法,其特征在于,包括:
    服务器获取第一终端发送的第一时长和第二时长,所述第一时长用于指示所述第一终端从生成目标任务到开始执行所述目标任务所花费的时长,所述第二时长用于指示所述第一终端执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
    所述服务器根据所述第一时长,确定等待执行所述目标任务时的第一参考值;
    所述服务器根据所述第二时长,确定执行所述目标任务时的第二参考值。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    所述服务器获取第二终端发送的第三时长和第四时长,所述第三时长用于指示所述第二终端从生成目标任务到开始执行所述目标任务所花费的时长,所述第四时长用于指示所述第二终端执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
    所述服务器根据所述第三时长更新所述第一参考值;
    所述服务器根据所述第四时长更新所述第二参考值。
  12. 根据权利要求10或11所述的方法,其特征在于,所述方法还包括:
    所述服务器将所述第一参考值和所述第二参考值发送给所述第一终端。
  13. 根据权利要求12所述的方法,其特征在于,在所述服务器将所述第一参考值和所述第二参考值发送给所述第一终端之后,还包括:
    服务器获取第一终端发送的第五时长和第六时长,所述第五时长用于指示所述第一终端从再次生成目标任务到开始执行所述目标任务所花费的时长,所述第二时长用于指示所述第一终端再次执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
    所述服务器根据所述第五时长更新所述第一参考值;
    所述服务器根据所述第六时长更新所述第二参考值。
  14. 一种终端,其特征在于,包括:通过总线连接的输入设备、处理器、显示器以及通信接口,其中,
    所述输入设备,用于:检测对目标应用的触发操作;
    所述处理器,用于:执行与所述触发操作对应的目标任务;记录从生成所 述目标任务到开始执行所述目标任务所花费的第一时长,以及执行所述目标任务所花费的第二时长;通过比较所述第一时长与预设的第一参考值的大小,以及比较所述第二时长与预设的第二参考值的大小,确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中或者位于执行所述目标任务的过程中。
  15. 根据权利要求14所述的终端,其特征在于,
    所述处理器,具体用于:当所述第一时长大于所述第一参考值时,确定发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中;当所述第二时长大于所述第二参考值时,确定发生卡顿的位置位于执行所述目标任务的过程中。
  16. 根据权利要求15所述的终端,其特征在于,
    所述输入设备,还用于:再次检测对所述目标应用的触发操作;
    所述处理器,还用于:将位于当前目标任务之前的至少一个任务作为子线程进行分流处理。
  17. 根据权利要求15所述的终端,其特征在于,
    所述输入设备,还用于:再次检测对所述目标应用的触发操作;获取用户选择的候选目标任务;
    所述处理器,还用于:将位于当前目标任务之前的至少一个任务作为等待关闭的候选目标任务;删除所述用户选择的候选目标任务。
  18. 根据权利要求15所述的终端,其特征在于,
    所述输入设备,还用于:再次检测对所述目标应用的触发操作;
    所述处理器,还用于:删除当前目标应用生成的所有任务,并重新启动所述目标应用。
  19. 根据权利要求15-18中任一项所述的终端,其特征在于,
    所述输入设备,还用于:再次检测对所述目标应用的触发操作;
    所述处理器,还用于:增加执行所述目标任务时的运行资源。
  20. 根据权利要求14-19中任一项所述的终端,其特征在于,
    所述通信接口,用于:将所述第一时长和所述第二时长发送给服务器。
  21. 根据权利要求14-20中任一项所述的终端,其特征在于,
    所述通信接口,还用于:从服务器获取所述第一参考值和所述第二参考值,所述第一参考值用于指示所述目标任务等待执行时所花费时长的中位值,所述第二参考值用于指示执行所述目标任务时所花费时长的中位值。
  22. 根据权利要求14-21中任一项所述的终端,其特征在于,
    所述显示器,用于:在显示界面中向用户提示发生卡顿的位置位于执行所述目标任务之前的其他任务的过程中或者位于执行所述目标任务的过程中。
  23. 一种服务器,其特征在于,包括:通过总线连接的处理器和通信接口,其中,
    所述通信接口,用于:获取第一终端发送的第一时长和第二时长,所述第一时长用于指示所述第一终端从生成目标任务到开始执行所述目标任务所花 费的时长,所述第二时长用于指示所述第一终端执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
    所述处理器,用于:根据所述第一时长,确定等待执行所述目标任务时的第一参考值;根据所述第二时长,确定执行所述目标任务时的第二参考值。
  24. 根据权利要求23所述的服务器,其特征在于,
    所述通信接口,还用于:获取第二终端发送的第三时长和第四时长,所述第三时长用于指示所述第二终端从生成目标任务到开始执行所述目标任务所花费的时长,所述第四时长用于指示所述第二终端执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
    所述处理器,还用于:根据所述第三时长更新所述第一参考值;根据所述第四时长更新所述第二参考值。
  25. 根据权利要求23或24所述的服务器,其特征在于,
    所述通信接口,还用于:将所述第一参考值和所述第二参考值发送给所述第一终端。
  26. 根据权利要求25所述的服务器,其特征在于,
    所述通信接口,还用于:获取第一终端发送的第五时长和第六时长,所述第五时长用于指示所述第一终端从再次生成目标任务到开始执行所述目标任务所花费的时长,所述第二时长用于指示所述第一终端再次执行所述目标任务所花费的时长,所述目标任务为响应于对目标应用的触发操作生成的;
    所述处理器,还用于:根据所述第五时长更新所述第一参考值;根据所述第六时长更新所述第二参考值。
  27. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在终端上运行时,使得所述终端执行如权利要求1-9中任一项所述的卡顿检测方法。
  28. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在服务器上运行时,使得所述服务器执行如权利要求10-13中任一项所述的卡顿检测方法。
  29. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端上运行时,使得所述终端执行如权利要求1-9中任一项所述的卡顿检测方法。
  30. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在服务器上运行时,使得所述服务器执行如权利要求10-13中任一项所述的卡顿检测方法。
PCT/CN2017/090376 2017-06-27 2017-06-27 一种卡顿检测方法及装置 WO2019000233A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2017/090376 WO2019000233A1 (zh) 2017-06-27 2017-06-27 一种卡顿检测方法及装置
EP17916409.0A EP3617889B1 (en) 2017-06-27 2017-06-27 Stutter detection method and device
CN201780008008.4A CN109074303B (zh) 2017-06-27 2017-06-27 一种卡顿检测方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/090376 WO2019000233A1 (zh) 2017-06-27 2017-06-27 一种卡顿检测方法及装置

Publications (1)

Publication Number Publication Date
WO2019000233A1 true WO2019000233A1 (zh) 2019-01-03

Family

ID=64676050

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090376 WO2019000233A1 (zh) 2017-06-27 2017-06-27 一种卡顿检测方法及装置

Country Status (3)

Country Link
EP (1) EP3617889B1 (zh)
CN (1) CN109074303B (zh)
WO (1) WO2019000233A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069194B (zh) * 2019-03-21 2021-05-11 北京三快在线科技有限公司 页面卡顿确定方法、装置、电子设备及可读存储介质
CN110532100B (zh) * 2019-09-02 2022-04-15 Oppo广东移动通信有限公司 调度资源的方法、装置、终端及存储介质
CN111324512A (zh) * 2020-02-25 2020-06-23 北京云途腾科技有限责任公司 用于生成文本的方法、装置、电子设备和计算机可读介质
CN111475363B (zh) * 2020-04-28 2021-10-19 华为技术有限公司 卡死识别方法及电子设备
CN113032232B (zh) * 2021-03-09 2023-06-20 广州虎牙科技有限公司 设备的性能检测的相关方法以及相关装置、设备
CN113886201A (zh) * 2021-09-17 2022-01-04 厦门立林科技有限公司 基于通信数据包的多节点系统性能分析方法及系统、存储介质
CN114077529B (zh) * 2022-01-19 2022-06-21 荣耀终端有限公司 日志上传方法、装置、电子设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130115553A (ko) * 2012-04-12 2013-10-22 한국전자통신연구원 동적 자원 관리를 위한 2단계 자원 관리 방법 및 장치
CN103473345A (zh) * 2013-09-23 2013-12-25 深圳市融创天下科技股份有限公司 一种预估时长的方法
CN104965763A (zh) * 2015-07-21 2015-10-07 国家计算机网络与信息安全管理中心 一种老化感知的任务调度系统
CN105824705A (zh) * 2016-04-01 2016-08-03 广州唯品会网络技术有限公司 一种任务分配方法和电子设备
CN106681913A (zh) * 2016-12-08 2017-05-17 武汉斗鱼网络科技有限公司 一种应用卡顿定位系统及方法

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6907146B2 (en) * 2000-12-11 2005-06-14 Affymetrix, Inc. Methods, systems and computer software for detecting pixel stutter
US6892331B2 (en) * 2002-01-17 2005-05-10 International Business Machines Corporation Method and system for error detection in a managed application environment
US7890388B2 (en) * 2004-11-09 2011-02-15 Sap Ag Systems and methods for remote validation
JP2010211596A (ja) * 2009-03-11 2010-09-24 Panasonic Corp マルチタスクシステムにおけるシステム起動方法
CN101599027B (zh) * 2009-06-30 2013-02-13 中兴通讯股份有限公司 一种线程池管理方法及其系统
KR20110065067A (ko) * 2009-12-09 2011-06-15 삼성전자주식회사 멀티 쓰레드 테스팅시 발생되는 에러 정보에 대한 비주얼 인터페이스를 제공하는 장치 및 방법
US9321387B2 (en) * 2013-02-27 2016-04-26 Kona Ice, Inc. Liquid toppings dispensing system
CN103678526A (zh) * 2013-11-29 2014-03-26 贝壳网际(北京)安全技术有限公司 浏览器解码图片的方法、装置和客户端
CN104038806B (zh) * 2014-06-11 2017-09-29 深圳市九洲电器有限公司 一种应用界面显示方法及机顶盒
CN104199643B (zh) * 2014-08-08 2017-12-29 可牛网络技术(北京)有限公司 进度条加载的控制方法、装置和电子设备
CN104267965B (zh) * 2014-10-14 2018-05-04 北京国双科技有限公司 一种数据处理方法、装置及服务器
US9430750B2 (en) * 2014-10-27 2016-08-30 International Business Machines Corporation Predictive approach to environment provisioning
CN105589783A (zh) * 2014-11-18 2016-05-18 广州市动景计算机科技有限公司 应用程序卡顿问题数据获取方法及装置
CN104375912B (zh) * 2014-11-28 2017-09-15 广东欧珀移动通信有限公司 移动终端卡顿的测量方法与装置
CN104869203B (zh) * 2015-06-18 2017-09-22 广东欧珀移动通信有限公司 卡顿的测试方法、装置及测试设备
CN105468523B (zh) * 2015-11-20 2018-11-27 广东欧珀移动通信有限公司 一种移动终端响应时间的自动化测试方法及装置
CN105389258B (zh) * 2015-12-10 2020-08-14 腾讯科技(深圳)有限公司 一种程序检测方法及装置
CN105740326B (zh) * 2016-01-21 2021-01-15 腾讯科技(深圳)有限公司 浏览器的线程状态监测方法及装置
CN106776253B (zh) * 2016-12-08 2020-08-04 武汉斗鱼网络科技有限公司 一种界面卡顿监测方法及装置
CN106775985A (zh) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 一种批处理任务调度方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130115553A (ko) * 2012-04-12 2013-10-22 한국전자통신연구원 동적 자원 관리를 위한 2단계 자원 관리 방법 및 장치
CN103473345A (zh) * 2013-09-23 2013-12-25 深圳市融创天下科技股份有限公司 一种预估时长的方法
CN104965763A (zh) * 2015-07-21 2015-10-07 国家计算机网络与信息安全管理中心 一种老化感知的任务调度系统
CN105824705A (zh) * 2016-04-01 2016-08-03 广州唯品会网络技术有限公司 一种任务分配方法和电子设备
CN106681913A (zh) * 2016-12-08 2017-05-17 武汉斗鱼网络科技有限公司 一种应用卡顿定位系统及方法

Also Published As

Publication number Publication date
CN109074303A (zh) 2018-12-21
EP3617889B1 (en) 2021-08-11
CN109074303B (zh) 2021-08-20
EP3617889A1 (en) 2020-03-04
EP3617889A4 (en) 2020-06-17

Similar Documents

Publication Publication Date Title
WO2019000233A1 (zh) 一种卡顿检测方法及装置
CN109891392B (zh) 一种系统服务超时的处理方法及装置
WO2018227398A1 (zh) 一种显示方法及装置
CN109891390B (zh) 一种应用切换方法及装置
US11144195B2 (en) Fast data copying method and electronic device
EP3159839A1 (en) Electronic device and method for processing message
US11989383B2 (en) Application window display method and terminal
WO2019061040A1 (zh) 一种文件管理方法及装置
WO2018223400A1 (zh) 一种显示方法及装置
WO2018209635A1 (zh) 一种搜索方法及装置
WO2019071619A9 (zh) 应用管理方法及终端
CN108780400B (zh) 数据处理方法及电子设备
CN107818036B (zh) 黑屏检测方法、移动终端及计算机可读存储介质
CN111918386A (zh) 定位方法、装置、存储介质及电子设备
US11336714B1 (en) Queue-based distributed timer
US11783084B2 (en) Sampling of telemetry events to control event volume cost and address privacy vulnerability
WO2018133313A1 (zh) 运动记录的方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17916409

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017916409

Country of ref document: EP

Effective date: 20191125

NENP Non-entry into the national phase

Ref country code: DE