CN106959899A - A kind of message blocking detection method, device and computer-readable storage medium - Google Patents

A kind of message blocking detection method, device and computer-readable storage medium Download PDF

Info

Publication number
CN106959899A
CN106959899A CN201710107990.2A CN201710107990A CN106959899A CN 106959899 A CN106959899 A CN 106959899A CN 201710107990 A CN201710107990 A CN 201710107990A CN 106959899 A CN106959899 A CN 106959899A
Authority
CN
China
Prior art keywords
message
time
expectation
execution
default
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710107990.2A
Other languages
Chinese (zh)
Other versions
CN106959899B (en
Inventor
杨磊磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710107990.2A priority Critical patent/CN106959899B/en
Publication of CN106959899A publication Critical patent/CN106959899A/en
Application granted granted Critical
Publication of CN106959899B publication Critical patent/CN106959899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/524Deadlock detection or avoidance

Abstract

The embodiment of the present application discloses a kind of message blocking detection method, device and computer-readable storage medium.This method includes:When handling the current message in message queue, the expectation start to process time of next message of the current message is set;Obtain the actual start to process time of next message;Calculate the expectation start to process time of next message and the time difference of actual start to process time;Detect whether the time difference is more than default blocking time threshold value;When detecting the time difference more than the default blocking time threshold value, it is determined that blocking in message queue described in the processing stage of the current message.The problem of using the embodiment of the present application, the position for blocking generation in outbound message queue can be accurately positioned, and then can solve to apply interim card on electronic equipment.

Description

A kind of message blocking detection method, device and computer-readable storage medium
Technical field
The application is related to technical field of electronic communication, more particularly to a kind of message blocking detection method, device and computer Storage medium.
Background technology
With the fast development of electronic communication, the electronic equipment such as mobile phone, flat board, computer the daily study of people, It is widely used in work and life, the day such as people can be managed money matters using electronic equipment, information browse, life affairs The processing of ordinary affair part.
At present, the event feedback of electronic equipment, interface is drawn, and broadcast processing etc. is typically all to be realized based on message mechanism, After user triggers a certain event, the event can enter in corresponding message queue in form of a message;Then, at processor Manage the message and return to the result of the message.But can typically exist in message queue in practical application multiple pending Message, and electronic equipment is usually multiple threads, thus can be because a certain message processing time is long, between thread Resource plunder etc. causes message queue to block, accordingly, and the application on electronic equipment can not just timely respond to user's operation, There is the phenomenon of application interim card, have a strong impact on Consumer's Experience.But it can not be accurately positioned in outbound message queue and block in the prior art The position of generation, causes to be improved using the phenomenon of interim card.
The content of the invention
The purpose of the embodiment of the present application is to provide a kind of message blocking detection method, device and computer-readable storage medium, with The problem of being accurately positioned the position for blocking generation in outbound message queue, and then can solve to apply interim card on electronic equipment.
In order to solve the above technical problems, what the embodiment of the present application was realized in:
A kind of message blocking detection method, including:
When handling the current message in message queue, the expectation beginning of next message of the current message is set The reason time;
Obtain the actual start to process time of next message;
Calculate the expectation start to process time of next message and the time difference of actual start to process time;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing of the current message Message queue blocks described in stage.
A kind of message blocking detection method, including:
When handling a message in completion message queue, set at the expectation end of next message of the message The reason time;
Obtain the actual start to process time of next message;
The expectation for calculating next message terminates the time difference that treatment time performs the time with physical end;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that at the place of next message Message queue described in the reason stage blocks.
A kind of message blocking detection means, including:
Time started setup module is expected, for when handling the current message in message queue, setting is described currently to disappear The expectation start to process time of next message of breath;
Actual time started acquisition module, the actual start to process time for obtaining next message;
First computing module, during for calculating the expectation start to process time of next message with actual start to process Between time difference;
First detection module, for detecting whether the time difference is more than default blocking time threshold value;
First closed position determining module, for detecting the time difference more than described pre- when the first detection module During handicapping plug time threshold, it is determined that blocking in message queue described in the processing stage of the current message.
A kind of message blocking detection means, including:
End time setup module is expected, for when handling a message in completion message queue, disappearing described in setting The expectation of next message of breath terminates treatment time;
Physical end time-obtaining module, the actual start to process time for obtaining next message;
Second computing module, when the expectation for calculating next message terminates treatment time with physical end execution Between time difference;
Second detection module, for detecting whether the time difference is more than default blocking time threshold value;
Second closed position determining module, for detecting the time difference more than described pre- when second detection module During handicapping plug time threshold, it is determined that blocking in message queue described in the processing stage of next message.
A kind of computer-readable storage medium, is stored thereon with computer program, is realized when the program is executed by processor following Step:
When handling the current message in message queue, the expectation beginning of next message of the current message is set The reason time;
Obtain the actual start to process time of next message;
Calculate the expectation start to process time of next message and the time difference of actual start to process time;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing of the current message Message queue blocks described in stage.
A kind of computer-readable storage medium, is stored thereon with computer program, is realized when the program is executed by processor following Step:
When handling a message in completion message queue, set at the expectation end of next message of the message The reason time;
Obtain the actual start to process time of next message;
The expectation for calculating next message terminates the time difference that treatment time performs the time with physical end;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that at the place of next message Message queue described in the reason stage blocks.
The technical scheme provided from above the embodiment of the present application, the embodiment of the present application is by handling in message queue During current message, is set, message is actual to be started obtaining the expectation start to process time of next message of the current message After treatment time, the expectation start to process time of next message and the time difference of actual start to process time are calculated, Then, whether the time difference of the expectation start to process time and actual start to process time by detecting message in message queue are big In the mode of default blocking time threshold value, it is determined that being more than the processing of the corresponding current message of default blocking time threshold value in the time difference Message queue blocks described in stage.Compared with prior art, the technical scheme provided using the application can be accurately positioned Go out because message processing time is long, the message position that message queue blocks caused by the resource between thread is grabbed etc., and then The problem of can solving to apply interim card on electronic equipment.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, are not paying the premise of creative labor Under, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the embodiment for the message blocking detection method that the application is provided;
Fig. 2 is the expectation start to process time and actual start to process time of message in the message queue that the application is provided, And a kind of statistics schematic diagram of embodiment of time difference;
Fig. 3 is the schematic flow sheet of another embodiment for the message blocking detection method that the application is provided;
Fig. 4 is a kind of structural representation of the embodiment for the message blocking detection means that the application is provided;
Fig. 5 is the structural representation of another embodiment for the message blocking detection means that the application is provided.
Embodiment
The embodiment of the present application provides a kind of message blocking detection method, device and computer-readable storage medium.
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation Example only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, this area is common The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to the application protection Scope.
Hereinafter implementing for the embodiment of the present application is described in detail with several specific examples.
Introduce a kind of embodiment of message blocking detection method of the application first below.Fig. 1 is the message that the application is provided A kind of schematic flow sheet of embodiment of occlusion detection method, this application provides the behaviour of the method as described in embodiment or flow chart Make step, but can include more or less operating procedures based on routine or without performing creative labour.Arranged in embodiment The step of act is sequentially only a kind of mode in numerous step execution sequences, and unique execution sequence is not represented.In practice System or during client production execution, can perform or parallel perform according to embodiment or method shown in the drawings order (environment of such as parallel processor or multiple threads).Specifically as shown in figure 1, methods described can include:
S110:When handling the current message in message queue, the expectation of next message of the current message is set The start to process time.
In the embodiment of the present application, when handling the current message in message queue, the current message can be set The expectation start to process time of next message.Specifically, the expectation start to process time can be default clog-free feelings Under condition, the time of message start to process, specifically, the time of message start to process can be to start to obtain execution thread for message (in practical application, can exist to grab because of the resource between thread causes repeatedly to obtain the message after execution thread and just obtain time Obtain execution thread).In addition, in actual applications, pressed during message in message queue according to the time order and function of inbound message queue Sequence arrangement processing, accordingly, the time of a certain message start to process can also be the previous message knot of a certain message The time of beam processing.
In a specific embodiment, when the expectation start to process time can expect start to process for setting is described Between current time add the first presetting message execution time after time.In actual applications, after the queue of message inbound message, In the case of clog-free, response processing message be typically all it is instant, accordingly, in another specific embodiment, institute State and it is expected that the start to process time could be arranged to the time of message inbound message queue plus after the first presetting message execution time Time.
Specifically, it can be to combine the default clog-free situation of practical situations that first presetting message, which performs the time, The time that lower message starts to go to end of message execution subtracts the current time when institute for setting the expectation start to process time State the time of current message executed.In addition, for different types of message, the execution of message needs the time to have not Together, accordingly, with reference to the type of the current message first presetting message can be set to perform the time.
Furthermore, it is necessary to which explanation, the expectation start to process time described in the embodiment of the present application is not limited in above-mentioned set Put the current time of the expectation start to process time needs the time after the time or message to enter plus the execution of default message The time of message queue performs plus default message needs the time after the time, in actual applications, can be combined with specific Application scenarios demand, other times are set, such as when user by predetermined registration operation triggers a certain event, for event correspondence The response of message is needed in the application scenarios after preset time period, and the expectation start to process time can be described to set It is expected that the current time of start to process time is performed plus default message needs time after time and preset time period etc., But expect that the start to process time is not limited with above-mentioned described in the embodiment of the present application.
In certain embodiments, the herein described expectation start to process time can be time point;In other embodiments In, the expectation start to process time can be relative duration, it is assumed for example that total handling duration of a certain message queue is 60ms, the first two message (message in message queue is handled according to the time order and function arranged in sequence of inbound message queue) exists In the case of not blocking, the total duration that processing needs is 8ms, accordingly, the phase of the 3rd message in the message queue The start to process time is hoped to could be arranged to 8ms.
S120:Obtain the actual start to process time of next message.
In the embodiment of the present application, the actual start to process time of next message can be obtained.In actual applications, The system external of electronic equipment can provide the interface of message processing time in statistics application, when need carry out message processing time During statistics, it can be carried out by the interface to statistical message treatment time after setting accordingly, the mode for carrying out daily record printing is obtained Take the message actual start to process time.
Specifically, by taking android system as an example, it is assumed that current message queue is a certain application program in android system Corresponding message queue, Android Looper classes are externally provided can be with the interface (Printer of statistical message treatment time Interface), accordingly, can be by being carried out to Printer interfaces after setting accordingly, the mode for carrying out daily record printing obtains message The actual start to process time.
Furthermore, it is necessary to which explanation, the acquisition modes of actual start to process time described in the embodiment of the present application are simultaneously not only limited In above-mentioned mode, in actual applications, other modes, actual start to process time described in the embodiment of the present application can also be included Acquisition modes be not limited with above-mentioned.
In certain embodiments, the herein described actual start to process time can be time point;In other embodiments In, the actual start to process time can be relative duration.
S130:Calculate the expectation start to process time of next message and the time difference of actual start to process time.
In actual applications, do not have in message queue in the case of blocking, the expectation of message starts in message queue Treatment time is identical with the actual start to process time;Accordingly, the actual start to process time of next message is being obtained Afterwards, the expectation start to process time of the message set can be combined, when calculating the expectation start to process of next message Between time difference with the actual start to process time.
In certain embodiments, the expectation start to process time of next message is calculated with actually opening in step S130 Before the time difference of beginning treatment time, methods described can also include:
Compare the expectation start to process time of next message and the size of actual start to process time, when the reality When the border start to process time is more than the expectation start to process time, the expectation start to process for calculating next message is performed The step of time difference of time and actual start to process time.
In certain embodiments, the actual start to process time and phase of message in message queue described in comparison can be first passed through The size of start to process time is hoped to judge corresponding message whether on time start to process, it is big when the actual start to process time When the expectation start to process time, it can be determined that corresponding message accordingly, can perform meter without start to process on time The step of calculating the time difference of expectation start to process time and actual start to process time of next message.In addition, here , can be with by the size of the actual start to process time and the expectation start to process time of message in the relatively message queue The message of start to process on time is excluded, reduces follow-up amount of calculation.
S140:Detect whether the time difference is more than default blocking time threshold value.
In the embodiment of the present application, the default blocking time threshold value can be pre-set can ensure the smoothness at interface Critical numerical value.In actual applications, when the refreshing frame per second applied on general electronic equipment is 60 frame, it is ensured that user uses The fluency of process median surface, accordingly, when refreshing frame per second for 60 frame, frame difference is 16.6ms, therefore, when in message queue When the expectation start to process time of message is more than 16.6ms with the time difference of actual start to process time, the Caton phenomenon of application is just Occur.Accordingly, in a specific embodiment, the default blocking time threshold value could be arranged to more than or equal to 0, small In the numerical value equal to 16.6ms.
Furthermore, it is necessary to explanation, default blocking time threshold value is not limited in above-mentioned big described in the embodiment of the present application In equal to 0, the numerical value less than or equal to 16.6ms in actual applications, can be combined with practical situations and electronic equipment The refreshing frame per second of application sets other can to ensure the numerical value of the fluency at interface, and blocking time is preset described in the embodiment of the present application Threshold value is not limited with above-mentioned.
Can be by detecting the expectation start to process time of message in message queue with actually starting in the embodiment of the present application Whether the time difference for the treatment of time is more than the mode of default blocking time threshold value, and message queue obstruction is oriented from message queue The position of generation, accordingly, when detecting the time difference more than the default blocking time threshold value, can perform step S150。
S150:When detecting the time difference more than the default blocking time threshold value, it is determined that in the current message Processing stage described in message queue block.
In actual applications, the message in message queue is handled according to the time order and function arranged in sequence of inbound message queue. In the embodiment of the present application, when detecting the time difference more than the default blocking time threshold value, it may be determined that more than described The not timely start to process of message corresponding to the time difference of default blocking time threshold value, the message queue before the Message Processing In occur in that obstruction, accordingly, it may be determined that in the message corresponding to the time difference more than the default blocking time threshold value Message queue described in the processing stage of a upper message blocks.
Specifically, the processing stage of a certain message can be understood as what is handled from the message start to process to the end of message Time.Specifically, can include starting to perform after obtaining execution thread resource, message acquisition execution thread resource for the message The message and the process for completing the message.
It can accurately be oriented from message queue using the application above-mentioned steps S110 to S150 and cause message queue The position of the message of obstruction, can be subsequently correspondingly improved, the problem of solving to apply interim card on electronic equipment.
In actual applications, because the reasons such as program logic complexity itself can cause corresponding message processing time long, And then the situation for causing message queue to block.Accordingly, in certain embodiments, methods described can also include:
Obtain the execution time that the message corresponding to obstruction occurs for the message queue;
Judge whether the execution time is more than default execution time threshold
When judging that the execution time is more than the default execution time threshold, it is determined that when being more than the default execution Between threshold value the execution time corresponding to the execution of message cause message queue to block.
Specifically, in a kind of embodiment, the default time threshold that performs can be the guarantee interface pre-set Smooth message critical processing time.Here by obtaining the treatment time for the message for causing obstruction, and judge that treatment time is It is no to be more than the default mode for performing time threshold, it may be determined that whether outbound message is because itself performing overlong time just causes journey Sequence is blocked, using Caton phenomenon.Accordingly, when the execution time for judging outbound message being more than the default execution time threshold, May determine that the execution of the message causes message queue to block, and causes to apply Caton phenomenon.
It start to perform after the completion of message arrives specifically, the execution time of message can obtain execution thread resource for message, Terminate the time of execution message.
In actual applications, being grabbed due to the resource between thread can cause message not start to perform in time, cause message The situation of queue obstruction.Accordingly, in certain embodiments, methods described can also include:
When judging that the execution time is less than or equal to the default execution time threshold, it is determined that less than or equal to described pre- If the resource between the thread that the processing stage for performing the message corresponding to the execution time of time threshold occurs, which is grabbed, causes institute Message queue is stated to block.
Specifically, when the execution time for judging outbound message being less than or equal to the default execution time threshold, it may be determined that Message is performed in itself can't cause message queue to block, accordingly, it may be determined that the line that the processing stage of the message occurs Resource between journey, which is grabbed, causes message queue to block, and causes to apply Caton phenomenon.
In certain embodiments, methods described can also include:
Obtain the time difference corresponding to the message in the message queue, to corresponding to message in the message queue when Between difference carry out statistical analysis processing, obtain the obstruction information of the message queue.
Specifically, the time difference to corresponding to message in the message queue carries out statistical analysis processing, institute is obtained Stating the obstruction information of message queue can include:The numerical values recited of the time difference in the message queue corresponding to message is counted, When the time difference is maximum, it can obtain being blocked most serious during the message start to process corresponding to the time difference, and resistance The Blocking message during the Message Processing of a processing in the message for be blocked most serious occurs for plug;And can include:System The numerical values recited of the time difference in the message queue corresponding to message is counted, can be with according to the variation tendency of the numerical values recited Obtain when increasing trend is presented in time difference, then the choking phenomenon of message queue tends to be serious, and passed when time difference is presented Subtract trend, then the choking phenomenon of message queue tends to the Blocking message extenuated.
As shown in Fig. 2 Fig. 2 be the application provide message queue in message the expectation start to process time with actually starting Treatment time, and a kind of embodiment of time difference statistics schematic diagram.It can be seen that d1=0ms, d2=12ms, d3= 18ms, d4=24ms, accordingly, it can be determined that message 2, message 3 and the not timely start to process of message 4, it is assumed that during default obstruction Between threshold value be 16ms, accordingly, it can be determined that message 2 and the processing stage of message 3 are blocked;Meanwhile, the expectation of message 4 is opened The time difference is maximum between beginning treatment time and actual start to process time, and description messages 3 treat stage blocking most serious;And disappear The variation tendency of the numerical values recited of breath corresponding time difference is increasing trend, and the choking phenomenon of description messages queue tends to be tight Weight.
As can be seen here, a kind of embodiment of message blocking detection method of the application is by handling currently disappearing in message queue During breath, is set, in acquisition message actual start to process the expectation start to process time of next message of the current message Between after, calculate the expectations start to process time of next message and the time difference of actual start to process time, it is then, logical The time difference of the expectation start to process time of message and actual start to process time in detection message queue are spent whether more than default The mode of blocking time threshold value, it is determined that being more than the processing stage institute of the corresponding current message of default blocking time threshold value in the time difference Message queue is stated to block.Subsequently, by obtaining the treatment time of Blocking message, and it is default to judge whether treatment time is more than Perform the mode of time threshold, can effectively distinguish obstruction be because message treatment time itself is long or thread between Resource grab and just cause, be easy to subsequently to be targetedly improved, the problem of on solution electronic equipment using interim card.With Prior art is compared, the technical scheme provided using the application can be accurately positioned out because message processing time is long, thread it Between resource grab etc. and to cause the message position that message queue blocks, and then can solve to apply interim card on electronic equipment Problem.
A kind of another embodiment of message blocking detection method of the application introduced below.Fig. 3 is the message that the application is provided The schematic flow sheet of another embodiment of occlusion detection method, this application provides the method as described in embodiment or flow chart Operating procedure, but can include more or less operating procedures based on routine or without performing creative labour.In embodiment The step of enumerating order is only a kind of mode in numerous step execution sequences, and unique execution sequence is not represented.In reality In system or client production execution when, can according to embodiment or method shown in the drawings order perform or hold parallel Row (environment of such as parallel processor or multiple threads).Specifically as shown in figure 3, methods described can include:
S310:When handling a message in completion message queue, the expectation of next message of the message is set Terminate treatment time.
In the embodiment of the present application, when handling a message in completion message queue, the message can be set The expectation of next message terminates treatment time.Specifically, described expect that it can be default clog-free feelings to terminate treatment time Under condition, the time of end of message processing.
In a specific embodiment, it can be when setting the expectation end processing that the expectation, which terminates treatment time, Between current time add the second presetting message execution time after time.In actual applications, after the queue of message inbound message, In the case of clog-free, response processing message is typically all instant, and accordingly, the expectation, which terminates treatment time, to be set The time of message inbound message queue is set to plus the time after the second presetting message execution time.Specifically, described second is pre- If message perform the time can be combine practical situations it is default it is clog-free in the case of message start to go to the end of message The time of execution.In addition, for different types of message, the treatment time of message can also have difference, accordingly, can combine The type of next message sets second presetting message to perform the time.
Furthermore, it is necessary to which explanation, expectation described in the embodiment of the present application terminates treatment time and is not limited in above-mentioned set The current time for expecting end treatment time is put plus the time after the second presetting message execution time or message entrance to disappear The time for ceasing queue adds the time after the second presetting message execution time, in actual applications, specifically should can be combined with Use scene demand, other times are set, such as when user by predetermined registration operation triggers a certain event, for event correspondence message Response need in the application scenarios after preset time period, the expectation start to process time could be arranged to set described It is expected that the current time for terminating treatment time performs the time after time and preset time period, but this plus the second presetting message Expect that terminate treatment time is not limited with above-mentioned described in application embodiment.
In certain embodiments, it is herein described it is expected that it is time point to terminate treatment time;In other embodiments In, it is described it is expected that it is relative duration to terminate treatment time, it is assumed for example that total handling duration of a certain message queue is 60ms, the first two message (message in message queue is the time order and function arranged in sequence according to inbound message queue) is not being sent out In the case of raw obstruction, the total duration that processing needs is 8ms, accordingly, and second message is expected to terminate in the message queue The expectation start to process time of processing could be arranged to 8ms.
S320:Obtain the actual start to process time of next message.
In the embodiment of the present application, the actual start to process time of next message can be obtained.In actual applications, The system external of electronic equipment can provide the interface of message processing time in statistics application, when need carry out message processing time During statistics, it can be carried out by the interface to statistical message treatment time after setting accordingly, the mode for carrying out daily record printing is obtained Take the message actual start to process time.
Specifically, by taking android system as an example, it is assumed that current message queue is a certain application program in android system Corresponding message queue, Android Looper classes are externally provided can be with the interface (Printer of statistical message treatment time Interface), accordingly, can be by being carried out to Printer interfaces after setting accordingly, the mode for carrying out daily record printing obtains message Physical end treatment time.
Furthermore, it is necessary to which explanation, the acquisition modes of physical end treatment time described in the embodiment of the present application are simultaneously not only limited In above-mentioned mode, in actual applications, other modes, physical end treatment time described in the embodiment of the present application can also be included Acquisition modes be not limited with above-mentioned.
In certain embodiments, herein described physical end treatment time can be time point;In other embodiments In, the physical end treatment time can be relative duration.
S330:The expectation for calculating next message terminates the time difference that treatment time performs the time with physical end.
In actual applications, do not have in message queue in the case of blocking, message can start on time in message queue Processing, and processing is completed on time, accordingly, it is identical with physical end treatment time that the expectation of message terminates treatment time;Accordingly , after the physical end treatment time of message in obtaining message queue, it can combine at the expectation end of the message set Reason time, the expectation for calculating next message terminates the time difference that treatment time performs the time with physical end.
In certain embodiments, terminate treatment time in the step S330 expectations for calculating next message to tie with actual Before the time difference of Shu Zhihang times, methods described can also include:
Compare the expectation start to process time of next message and the size of actual start to process time, when the reality When the border start to process time is more than the expectation start to process time, the expectation end processing for calculating next message is performed The step of time performs the time difference of time with physical end.
In certain embodiments, physical end treatment time and the phase of message in message queue described in comparison can be first passed through Hope and terminate treatment time to judge whether on time processing is completed corresponding message, when the physical end treatment time is more than described When expecting to terminate treatment time, it can be determined that corresponding message is completed without processing on time, accordingly, can perform calculating described The expectation of next message terminates the step for the treatment of time performs the time difference of time with physical end.In addition, here by than Size of the physical end treatment time of message with expecting end treatment time, can exclude and locate on time in the message queue The message completed is managed, reduces follow-up amount of calculation.
S340:Detect whether the time difference is more than default blocking time threshold value.
In the embodiment of the present application, the default blocking time threshold value can be pre-set can ensure the smoothness at interface Critical numerical value.In actual applications, when the refreshing frame per second applied on general electronic equipment is 60 frame, it is ensured that user uses The fluency of process median surface, accordingly, when refreshing frame per second for 60 frame, frame difference is 16.6ms, therefore, when in message queue When the time difference that the expectation of message terminates treatment time and physical end treatment time is more than 16.6ms, the Caton phenomenon of application is just Occur.Accordingly, in a specific embodiment, the default blocking time threshold value could be arranged to more than or equal to 0, small In the numerical value equal to 16.6ms.
Furthermore, it is necessary to explanation, default blocking time threshold value is not limited in above-mentioned big described in the embodiment of the present application In equal to 0, the numerical value less than or equal to 16.6ms in actual applications, can be combined with practical situations and electronic equipment The refreshing frame per second of application sets other can to ensure the numerical value of the fluency at interface, and blocking time is preset described in the embodiment of the present application Threshold value is not limited with above-mentioned.
Expectation that can be by detecting message in message queue in the embodiment of the present application terminates treatment time and physical end Whether the time difference for the treatment of time is more than the mode of default blocking time threshold value, and message queue can be oriented from message queue Block the position occurred, accordingly, when detecting the time difference more than the default blocking time threshold value, step can be performed Rapid S350.
S350:When detecting the time difference more than the default blocking time threshold value, it is determined that next disappearing described Message queue described in the processing stage of breath blocks.
In the embodiment of the present application, when detecting the time difference more than the default blocking time threshold value, it may be determined that More than the message corresponding to the time difference of the default blocking time threshold value, processing is not completed in time, accordingly, it may be determined that Block more than message queue described in the Message Processing stage corresponding to the time difference of the default blocking time threshold value.
Specifically, the processing stage of a certain message can be understood as what is handled from the message start to process to the end of message Time.Specifically, can include starting to perform after obtaining execution thread resource, message acquisition execution thread resource for the message The message and the process for completing the message
It can accurately be oriented from message queue using the application above-mentioned steps S310 to S350 and cause message queue The position of the message of obstruction, can be subsequently correspondingly improved, the problem of solving to apply interim card on electronic equipment.
In actual applications, because the reasons such as program logic complexity itself can cause corresponding message processing time long, And then the situation for causing program to be blocked.Accordingly, in certain embodiments, methods described can also include:
Obtain the execution time that the message corresponding to obstruction occurs for the message queue;
Judge whether the execution time is more than default execution time threshold;
When judging that the execution time is more than the default execution time threshold, it is determined that when being more than the default execution Between threshold value the execution time corresponding to the execution of message cause message queue to block.
Specifically, in a kind of embodiment, the default time threshold that performs can be the guarantee interface pre-set Smooth message critical processing time.Here by obtaining the treatment time for the message for causing obstruction, and judge that treatment time is It is no to be more than the default mode for performing time threshold, it may be determined that whether outbound message is because itself performing overlong time just causes journey Sequence is blocked, using Caton phenomenon.Accordingly, when the execution time for judging outbound message being more than the default execution time threshold, May determine that the execution of the message causes message queue to block, and causes to apply Caton phenomenon.
It start to perform after the completion of message arrives specifically, the execution time of message can obtain execution thread resource for message, Terminate the time of execution message.
In actual applications, being grabbed due to the resource between thread can cause message not start to perform in time, cause message The situation of queue obstruction.Accordingly, in certain embodiments, methods described can also include:
When judging that the execution time is less than or equal to the default execution time threshold, it is determined that less than or equal to described pre- If the resource between the thread that the processing stage for performing the message corresponding to the execution time of time threshold occurs, which is grabbed, causes institute Message queue is stated to block.
Specifically, when the execution time for judging outbound message being less than or equal to the default execution time threshold, it may be determined that Message is performed in itself can't cause message queue to block, accordingly, it may be determined that the line that the processing stage of the message occurs Resource between journey, which is grabbed, causes message queue to block, and causes to apply Caton phenomenon.
In certain embodiments, methods described can also include:
Obtain the time difference corresponding to the message in the message queue, to corresponding to message in the message queue when Between difference carry out statistical analysis processing, obtain the obstruction information of the message queue.
Specifically, the time difference to corresponding to message in the message queue carries out statistical analysis processing, institute is obtained Stating the obstruction information of message queue can include:The numerical values recited of the time difference in the message queue corresponding to message is counted, When the time difference is maximum, it can obtain being blocked most serious during the message start to process corresponding to the time difference, and resistance The Blocking message during the Message Processing of a processing in the message for be blocked most serious occurs for plug;And can include:System The numerical values recited of the time difference in the message queue corresponding to message is counted, can be with according to the variation tendency of the numerical values recited Obtain when increasing trend is presented in time difference, then the choking phenomenon of message queue tends to be serious, and passed when time difference is presented Subtract trend, then the choking phenomenon of message queue tends to the Blocking message extenuated.
As can be seen here, a kind of embodiment of message blocking detection method of the application is by handling in completion message queue one During message, set the expectation of next message of the message to terminate treatment time, obtain message physical end treatment time Afterwards, the expectation for calculating next message terminates the time difference that treatment time performs the time with physical end, then, detection When whether the expectation of message terminates the time difference for the treatment of time and physical end treatment time more than default obstruction in message queue Between threshold value, it is determined that the time difference be more than the default blocking time threshold value corresponding to next message processing stage institute Message queue is stated to block.Subsequently, by obtaining the execution time of Blocking message, and it is default to judge whether the execution time is more than The mode of time threshold is performed, it is because message is performed between overlong time or thread in itself that can effectively distinguish obstruction Resource grab and just cause, be easy to subsequently to be targetedly improved, the problem of on solution electronic equipment using interim card.With Prior art is compared, the technical scheme provided using the application can be accurately positioned out because message processing time is long, thread it Between resource grab etc. and to cause the message position that message queue blocks, and then can solve to apply interim card on electronic equipment Problem.
On the other hand the application also provides a kind of message blocking detection means, and Fig. 4 is the message blocking inspection that the application is provided A kind of structural representation of embodiment of device is surveyed, as shown in figure 4, shown device 400 can include:
Expect time started setup module 410, can be used for, when handling the current message in message queue, setting described The expectation start to process time of next message of current message;
Actual time started acquisition module 420, can be used for the actual start to process time for obtaining next message;
First computing module 430, can be used for the expectation start to process time for calculating next message with actually opening The time difference of beginning treatment time;
First detection module 440, can be used for detecting whether the time difference is more than default blocking time threshold value;
First closed position determining module 450, can be used for when the first detection module 440 detects the time difference During more than the default blocking time threshold value, it is determined that blocking in message queue described in the processing stage of the current message.
In another embodiment, described device 400 can also include:
First comparison module, can be used for opening in the expectation that first computing module 430 calculates next message Beginning treatment time is with before the time difference of actual start to process time, comparing the expectation start to process time of next message With the size of actual start to process time, when the actual start to process time being more than the expectation start to process time, institute State the first computing module 430 and calculate the expectation start to process time of next message and the time of actual start to process time Difference.
In another embodiment, described device 400 can also include:
First obstruction data obtaining module, can be used for obtaining the message team that the first computing module calculating is obtained The time difference of message in row, statistical analysis processing is carried out to the time difference corresponding to message in the message queue, institute is obtained State the obstruction information of message queue.
In another embodiment, described device 400 can also include:
First performs time-obtaining module, can be used for obtaining holding for the message corresponding to the message queue generation obstruction The row time;
First judge module, can be used for judging whether the execution time is more than default execution time threshold
First obstruction determining module, can be used for when first judge module judges the execution time more than described During default execution time threshold, it is determined that the execution more than the message corresponding to the default execution time for performing time threshold is led Message queue is caused to block.
In another embodiment, described device 400 can also include:
Second obstruction determining module, for judging the execution time less than or equal to described when first judge module During default execution time threshold, it is determined that less than or equal to the place of the message corresponding to the default execution time for performing time threshold Resource between the thread that the reason stage occurs, which is grabbed, causes the message queue to block.
The application also provides a kind of another embodiment of message blocking detection means, and Fig. 5 is the message resistance that the application is provided The structural representation of another embodiment of detection means is filled in, as shown in figure 5, shown device 500 can include:
Expect end time setup module 510, can be used for, when handling a message in completion message queue, setting The expectation of next message of the message terminates treatment time;
Physical end time-obtaining module 520, can be used for the actual start to process time for obtaining next message;
Second computing module 530, the expectation that can be used for calculating next message terminates treatment time and actual knot The time difference of Shu Zhihang times;
Second detection module 540, can be used for detecting whether the time difference is more than default blocking time threshold value;
Second closed position determining module 550, can be used for when second detection module 540 detects the time difference During more than the default blocking time threshold value, it is determined that being hindered in message queue described in the processing stage of next message Plug.
In another embodiment, described device 500 can also include:
4th detection module, can be used for the expectation knot that next message is calculated in second computing module 530 Beam treatment time was performed with physical end before the time difference of time, the expectation start to process time of relatively more described next message With the size of actual start to process time, when the actual start to process time being more than the expectation start to process time, institute Expectation end treatment time and the physical end execution time of next message can be calculated by stating the second computing module 530 Time difference.
In another embodiment, described device 500 can also include:
Second obstruction data obtaining module, can be used for obtaining the message team that the second computing module calculating is obtained The time difference corresponding to message in row, statistical analysis processing is carried out to the time difference corresponding to message in the message queue, Obtain the obstruction information of the message queue.
In another embodiment, described device 500 can also include:
Second performs time-obtaining module, can be used for obtaining holding for the message corresponding to the message queue generation obstruction The row time;
Second judge module, can be used for judging whether the execution time is more than default execution time threshold;
3rd obstruction determining module, can be used for when second judge module judges the execution time more than described During default execution time threshold, it is determined that the execution more than the message corresponding to the default execution time for performing time threshold is led Message queue is caused to block.
In another embodiment, described device 500 can also include:
4th obstruction determining module, can be used for when second judge module judges that the execution time is less than or equal to During the default execution time threshold, it is determined that less than or equal to the message corresponding to the default execution time for performing time threshold Processing stage occur thread between resource grab cause the message queue to block.
On the other hand the application also provides a kind of computer-readable storage medium, is stored thereon with computer program, the program quilt Following steps can be realized during computing device:
When handling the current message in message queue, the expectation beginning of next message of the current message is set The reason time;
Obtain the actual start to process time of next message;
Calculate the expectation start to process time of next message and the time difference of actual start to process time;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing of the current message Message queue blocks described in stage.
On the other hand the application also provides a kind of another embodiment of computer-readable storage medium, the computer-readable storage medium On be stored with computer program, following steps can be realized when the program is executed by processor:
When handling a message in completion message queue, set at the expectation end of next message of the message The reason time;
Obtain the actual start to process time of next message;
The expectation for calculating next message terminates the time difference that treatment time performs the time with physical end;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that at the place of next message Message queue described in the reason stage blocks.
As can be seen here, the embodiment of a kind of message blocking detection method of the application, device or computer-readable storage medium passes through When handling the current message in message queue, the expectation start to process time of next message of the current message is set, Obtain after the message actual start to process time, calculate the expectation start to process time of next message and actual beginning The time difference of reason time, then, during by detecting that the expectation start to process time of message in message queue is with actual start to process Between time difference whether be more than the mode of default blocking time threshold value, it is determined that being more than default blocking time threshold value correspondence in the time difference Current message processing stage described in message queue block.Compared with prior art, the technology provided using the application Message queue blocks caused by scheme can be accurately positioned out because message processing time is long, the resource between thread is grabbed etc. Message position, and then can solve on electronic equipment apply interim card the problem of.
In 1990s, for a technology improvement can clearly distinguish be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (for the improvement of method flow).So And, with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow is programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, PLD (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, its logic function is determined by user to device programming.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, without asking chip maker to design and make Special IC chip.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but have many kinds, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also should This understands, it is only necessary to slightly programming in logic and be programmed into method flow in integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be just readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing Device and storage can by the computer of the computer readable program code (such as software or firmware) of (micro-) computing device Read medium, gate, switch, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but is not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that except with Pure computer readable program code mode is realized beyond controller, can be made completely by the way that method and step is carried out into programming in logic Obtain controller and come real in the form of gate, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and various for realizing to including in it The device of function can also be considered as the structure in hardware component.Or even, will can be regarded for the device for realizing various functions For that not only can be the software module of implementation method but also can be the structure in hardware component.
Device, module or unit that above-described embodiment is illustrated, can specifically be realized, Huo Zheyou by computer chip or entity Product with certain function is realized.It is a kind of typically to realize that equipment is computer.Specifically, computer for example can be individual People's computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media player, navigation Any equipment in equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment Combination.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, device or computer program Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (device) and computer program product Figure and/or block diagram are described.It should be understood that every one stream in flow chart and/or block diagram can be realized by computer program instructions Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information Store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of key elements are not only including those key elements, but also wrap Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Also there is other identical element in process, method, commodity or the equipment of element.
It will be understood by those skilled in the art that embodiments herein can be provided as method, device or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes execution particular task or the routine for realizing particular abstract data type, program, object, group Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with Positioned at including in the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.Especially for device and For computer-readable storage medium embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, correlation Place illustrates referring to the part of embodiment of the method.
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (22)

1. a kind of message blocking detection method, it is characterised in that including:
When handling the current message in message queue, when the expectation start to process of next message of the current message is set Between;
Obtain the actual start to process time of next message;
Calculate the expectation start to process time of next message and the time difference of actual start to process time;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing stage of the current message The message queue blocks.
2. according to the method described in claim 1, it is characterised in that when calculating the expectation start to process of next message Between with before the time difference of actual start to process time, methods described also includes:
Compare the expectation start to process time of next message and the size of actual start to process time, actually opened when described When beginning treatment time is more than the expectation start to process time, the expectation start to process time for calculating next message is performed The step of with time difference of actual start to process time.
3. method according to claim 1 or 2, it is characterised in that methods described also includes:
The time difference of the message in the message queue is obtained, the time difference corresponding to message in the message queue is united Meter analyzing and processing, obtains the obstruction information of the message queue.
4. method according to claim 1 or 2, it is characterised in that methods described also includes:
Obtain the execution time that the message corresponding to obstruction occurs for the message queue;
Judge whether the execution time is more than default execution time threshold;
When judging that the execution time is more than the default execution time threshold, it is determined that more than the default execution time threshold The execution of message corresponding to the execution time of value causes message queue to block.
5. method according to claim 4, it is characterised in that methods described also includes:
When judging that the execution time is less than or equal to the default execution time threshold, it is determined that being held less than or equal to described preset Resource between the thread that the processing stage of message corresponding to the execution time of row time threshold occurs, which is grabbed, causes described disappear Breath queue is blocked.
6. a kind of message blocking detection method, it is characterised in that including:
When handling a message in completion message queue, when the expectation of next message of the setting message terminates processing Between;
Obtain the actual start to process time of next message;
The expectation for calculating next message terminates the time difference that treatment time performs the time with physical end;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing rank of next message Duan Suoshu message queues block.
7. method according to claim 6, it is characterised in that when the expectation for calculating next message terminates processing Between with physical end perform the time time difference before, methods described also includes:
Compare the expectation start to process time of next message and the size of actual start to process time, actually opened when described When beginning treatment time is more than the expectation start to process time, the expectation for performing calculating next message terminates treatment time The step of time difference of time being performed with physical end.
8. the method according to claim 6 or 7, it is characterised in that methods described also includes:
The time difference corresponding to the message in the message queue is obtained, to the time difference corresponding to message in the message queue Statistical analysis processing is carried out, the obstruction information of the message queue is obtained.
9. the method according to claim 6 or 7, it is characterised in that methods described also includes:
Obtain the execution time that the message corresponding to obstruction occurs for the message queue;
Judge whether the execution time is more than default execution time threshold;
When judging that the execution time is more than the default execution time threshold, it is determined that more than the default execution time threshold The execution of message corresponding to the execution time of value causes message queue to block.
10. method according to claim 9, it is characterised in that methods described also includes:
When judging that the execution time is less than or equal to the default execution time threshold, it is determined that being held less than or equal to described preset Resource between the thread that the processing stage of message corresponding to the execution time of row time threshold occurs, which is grabbed, causes described disappear Breath queue is blocked.
11. a kind of message blocking detection means, it is characterised in that including:
Time started setup module is expected, for when handling the current message in message queue, setting the current message The expectation start to process time of next message;
Actual time started acquisition module, the actual start to process time for obtaining next message;
First computing module, expectation start to process time and actual start to process time for calculating next message Time difference;
First detection module, for detecting whether the time difference is more than default blocking time threshold value;
First closed position determining module, for detecting the time difference more than the pre- handicapping when the first detection module When filling in time threshold, it is determined that blocking in message queue described in the processing stage of the current message.
12. device according to claim 11, it is characterised in that described device also includes:
First comparison module, for calculated in first computing module expectation start to process time of next message with Before the time difference of actual start to process time, the expectation start to process time of relatively more described next message and actual beginning The size of reason time, when the actual start to process time being more than the expectation start to process time, described first calculates mould Block calculates the expectation start to process time of next message and the time difference of actual start to process time.
13. the device according to claim 11 or 12, it is characterised in that described device also includes:
First obstruction data obtaining module, disappearing in the obtained message queue is calculated for obtaining first computing module The time difference of breath, statistical analysis processing is carried out to the time difference corresponding to message in the message queue, the message team is obtained The obstruction information of row.
14. the device according to claim 11 or 12, it is characterised in that described device also includes:
First performs time-obtaining module, occurs the execution time of the message corresponding to obstruction for obtaining the message queue;
First judge module, for judging whether the execution time is more than default execution time threshold
First obstruction determining module, for judging that the execution time is more than the default execution when first judge module During time threshold, it is determined that the execution more than the message corresponding to the default execution time for performing time threshold causes message team Row block.
15. device according to claim 14, it is characterised in that described device also includes:
Second obstruction determining module, for judging that the execution time is less than or equal to described preset when first judge module When performing time threshold, it is determined that less than or equal to the processing rank of the message corresponding to the default execution time for performing time threshold Resource between Duan Fasheng thread, which is grabbed, causes the message queue to block.
16. a kind of message blocking detection means, it is characterised in that including:
End time setup module is expected, for when handling a message in completion message queue, setting the message The expectation of next message terminates treatment time;
Physical end time-obtaining module, the actual start to process time for obtaining next message;
Second computing module, the expectation for calculating next message terminates treatment time and performs the time with physical end Time difference;
Second detection module, for detecting whether the time difference is more than default blocking time threshold value;
Second closed position determining module, for detecting the time difference more than the pre- handicapping when second detection module When filling in time threshold, it is determined that blocking in message queue described in the processing stage of next message.
17. device according to claim 16, it is characterised in that described device also includes:
4th detection module, the expectation for calculating next message in second computing module terminate treatment time with Physical end was performed before the time difference of time, the expectation start to process time of relatively more described next message and actual beginning The size of reason time, when the actual start to process time being more than the expectation start to process time, described second calculates mould The expectation that block calculates next message terminates the time difference that treatment time performs the time with physical end.
18. the device according to claim 16 or 17, it is characterised in that described device also includes:
Second obstruction data obtaining module, disappearing in the obtained message queue is calculated for obtaining second computing module The breath corresponding time difference, statistical analysis processing is carried out to the time difference corresponding to message in the message queue, obtain described The obstruction information of message queue.
19. the device according to claim 16 or 17, it is characterised in that described device also includes:
Second performs time-obtaining module, occurs the execution time of the message corresponding to obstruction for obtaining the message queue;
Second judge module, for judging whether the execution time is more than default execution time threshold;
3rd obstruction determining module, for judging that the execution time is more than the default execution when second judge module During time threshold, it is determined that the execution more than the message corresponding to the default execution time for performing time threshold causes message team Row block.
20. device according to claim 19, it is characterised in that described device also includes:
4th obstruction determining module, for judging that the execution time is less than or equal to described preset when second judge module When performing time threshold, it is determined that less than or equal to the processing rank of the message corresponding to the default execution time for performing time threshold Resource between Duan Fasheng thread, which is grabbed, causes the message queue to block.
21. a kind of computer-readable storage medium, is stored thereon with computer program, it is characterised in that the program is executed by processor Shi Shixian following steps:
When handling the current message in message queue, when the expectation start to process of next message of the current message is set Between;
Obtain the actual start to process time of next message;
Calculate the expectation start to process time of next message and the time difference of actual start to process time;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing stage of the current message The message queue blocks.
22. a kind of computer-readable storage medium, is stored thereon with computer program, it is characterised in that the program is executed by processor Shi Shixian following steps:
When handling a message in completion message queue, when the expectation of next message of the setting message terminates processing Between;
Obtain the actual start to process time of next message;
The expectation for calculating next message terminates the time difference that treatment time performs the time with physical end;
Detect whether the time difference is more than default blocking time threshold value;
When detecting the time difference more than the default blocking time threshold value, it is determined that in the processing rank of next message Duan Suoshu message queues block.
CN201710107990.2A 2017-02-27 2017-02-27 Message blocking detection method, device and computer storage medium Active CN106959899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710107990.2A CN106959899B (en) 2017-02-27 2017-02-27 Message blocking detection method, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710107990.2A CN106959899B (en) 2017-02-27 2017-02-27 Message blocking detection method, device and computer storage medium

Publications (2)

Publication Number Publication Date
CN106959899A true CN106959899A (en) 2017-07-18
CN106959899B CN106959899B (en) 2021-01-01

Family

ID=59469976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710107990.2A Active CN106959899B (en) 2017-02-27 2017-02-27 Message blocking detection method, device and computer storage medium

Country Status (1)

Country Link
CN (1) CN106959899B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324946A (en) * 2018-09-10 2019-02-12 天津字节跳动科技有限公司 Operational monitoring method, apparatus, electronic equipment and computer readable storage medium
CN109428915A (en) * 2017-08-25 2019-03-05 北京国双科技有限公司 Data capture method and device
CN110046045A (en) * 2019-04-03 2019-07-23 百度在线网络技术(北京)有限公司 The data package processing method and device that voice wakes up
CN110262878A (en) * 2019-05-06 2019-09-20 平安科技(深圳)有限公司 Timed task processing method, device, equipment and computer readable storage medium
CN111163018A (en) * 2019-12-02 2020-05-15 华为技术有限公司 Network equipment and method for reducing transmission delay thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105873123A (en) * 2016-03-21 2016-08-17 卡斯柯信号有限公司 Detecting method of GSM-R wireless message delay of interurban railway

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105873123A (en) * 2016-03-21 2016-08-17 卡斯柯信号有限公司 Detecting method of GSM-R wireless message delay of interurban railway

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苗浩等: "消息传递模型下的等待阻塞", 《小型微型计算机系统》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109428915A (en) * 2017-08-25 2019-03-05 北京国双科技有限公司 Data capture method and device
CN109428915B (en) * 2017-08-25 2021-06-29 北京国双科技有限公司 Data acquisition method and device
CN109324946A (en) * 2018-09-10 2019-02-12 天津字节跳动科技有限公司 Operational monitoring method, apparatus, electronic equipment and computer readable storage medium
CN110046045A (en) * 2019-04-03 2019-07-23 百度在线网络技术(北京)有限公司 The data package processing method and device that voice wakes up
CN110262878A (en) * 2019-05-06 2019-09-20 平安科技(深圳)有限公司 Timed task processing method, device, equipment and computer readable storage medium
CN110262878B (en) * 2019-05-06 2024-03-08 平安科技(深圳)有限公司 Timed task processing method, device, equipment and computer readable storage medium
CN111163018A (en) * 2019-12-02 2020-05-15 华为技术有限公司 Network equipment and method for reducing transmission delay thereof

Also Published As

Publication number Publication date
CN106959899B (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN106959899A (en) A kind of message blocking detection method, device and computer-readable storage medium
CN109189682A (en) A kind of script method for recording and device
US9262849B2 (en) Chart animation
CN108346139A (en) A kind of method for screening images and device
CN107024982A (en) A kind of method for safety monitoring of virtual reality device, device and virtual reality device
CN106657774A (en) Method and device for recording video
CN110288632A (en) A kind of image processing method, device, terminal and storage medium
CN108073346A (en) A kind of record screen method, terminal and computer readable storage medium
CN107066519A (en) A kind of task detection method and device
CN110496395A (en) It is a kind of for the assembly operating method of illusory engine, system and equipment
CN107943383A (en) Page info display methods, device and client
US20160179321A1 (en) Scroll speed control for document display device
TWI691206B (en) Watermark adding processing method, device and client
US9684445B2 (en) Mobile gesture reporting and replay with unresponsive gestures identification and analysis
US9990763B2 (en) Computerized systems and methods for layering content in a user interface
CN107590739A (en) A kind of method and device of information displaying
WO2022247935A1 (en) Display method and display apparatus
CN113139891B (en) Image processing method, device, electronic equipment and storage medium
CN109144844A (en) Method for tracing, device, equipment and machine readable media
TWI699670B (en) Electronic system and method of freezing screen
CN110503010B (en) Material display method, device, electronic device and storage medium
CN107580053A (en) Method for exhibiting data, device, client and system
CN110018872A (en) A kind of PUSH message treating method and apparatus
KR101944454B1 (en) Information processing program and information processing method
WO2017084307A1 (en) Browser control method and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201016

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201016

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant