Jamming monitoring method, electronic equipment and storage medium

By setting the frame timeline information in the electronic device, the expected and actual completion time of the layer frame is obtained, which solves the problem of being unable to detect stuck in independent rendering applications, realizes full-scene stuck monitoring, and improves device fluency and user experience. .

CN118779190APending Publication Date: 2024-10-15WEILAI MOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310367069.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-06
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing technology cannot detect lag information in autonomous rendering applications without a vertical synchronization signal (Vsync), resulting in the inability to compare expected time and actual time, and inability to effectively detect lag situations.

Method used

By setting the frame timeline information in the electronic device, the expected time and actual completion time of the layer frame from rendering to synthesis are obtained, and whether the time difference is greater than the preset threshold is determined to determine whether there is lagging.

Benefits of technology

It realizes full-scenario, automated, and repeatable lag monitoring for independent rendering applications without Vsync, discovers more lag issues, and improves the fluency and user experience of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779190A_ABST
    Figure CN118779190A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, particularly provides a lagging monitoring method, electronic equipment and a storage medium, and aims to solve the problems of how to realize full-scene lagging monitoring and how to obtain lagging information. In order to achieve the purpose, the lagging monitoring method is applied to the electronic equipment, the electronic equipment at least comprises an application, and the method comprises the steps that in response to a request received by the application, the application draws and renders a layer frame corresponding to the request, whether the application is provided with frame timeline information or not is judged, if not, the frame timeline information is set, and if yes, the lagging monitoring is performed. And obtaining expected time and actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the frame timeline information, and judging whether lagging exists or not based on the expected time and the actual completion time. Through the above implementation mode, full-scene, automatic and repeatable layer lagging monitoring is realized, more lagging problems can be found conveniently, the electronic equipment can be used more smoothly, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a freeze monitoring method, an electronic device and a storage medium. Background Art

[0002] When the hardware user interface HWUI application layer is drawn, each frame will generate a corresponding expected time value, and each frame display will generate an actual time value for each stage. The detection of jamming is usually carried out by using the vertical synchronization signal (Vertical Sync, Vsync) of each application when the layer is drawn and the Vsync of the synthetic display system (Surface Flinger, SF) to generate the corresponding expected time value and actual time value, and comparing the expected time value with the actual time value to obtain the jamming information of the electronic device.

[0003] For non-autonomous rendering applications with Vsync, the APP Vsync id and expected time value can be easily obtained. However, for autonomous rendering applications without Vsync, the APP Vsync id cannot be obtained. Therefore, the expected time value and the actual time value cannot be compared to obtain the jamming information. In other words, the jamming information cannot be monitored for autonomous rendering applications.

[0004] Accordingly, a new solution is needed in the art to solve the above problems. Summary of the invention

[0005] In order to overcome the above-mentioned defects, the present invention is proposed to provide a jamming monitoring method, electronic device and storage medium that solve or at least partially solve the technical problem of how to implement full-scenario jamming monitoring and obtain jamming information.

[0006] In a first aspect, a jamming monitoring method is provided, which is applied to an electronic device, wherein the electronic device at least includes an application, and the method includes:

[0007] In response to the request received by the application, the application draws and renders the layer frame corresponding to the request;

[0008] Determining whether the application is provided with frame timeline information;

[0009] If not set, setting the frame timeline information;

[0010] Based on the frame timeline information, the expected time and actual completion time of the layer frame from rendering to synthesis to obtain a display frame are obtained;

[0011] Based on the expected time and the actual completion time, determine whether there is a jam.

[0012] In a technical solution of the above-mentioned jamming monitoring method, the method further includes:

[0013] If the application is provided with the frame timeline information, then "obtaining the expected time and actual completion time of obtaining the display frame from rendering to synthesis of the layer frame based on the frame timeline information" is directly executed.

[0014] In a technical solution of the above-mentioned jamming monitoring method, judging whether there is jamming based on the expected time and the actual completion time includes:

[0015] Subtract the actual completion time from the expected time to obtain a time difference, and determine whether the time difference is greater than a preset threshold;

[0016] If so, it is considered that there is a jam.

[0017] In a technical solution of the above-mentioned jamming detection method, the request received by the application includes a touch request and / or a network trigger request; and in response to the request received by the application, the application draws and renders the layer frame corresponding to the request, including:

[0018] In response to the touch request and / or the network trigger request received by the application, start a drawing thread, and draw the layer frame based on the drawing thread;

[0019] Sending the drawn layer frame to the rendering thread;

[0020] After the rendering process is ready for rendering, the rendered layer frame is stored in a cache queue;

[0021] The layer frames of the cache queue are rendered according to a preset order.

[0022] In a technical solution of the above-mentioned jamming monitoring method, the electronic device further includes a synthesis display system and a vertical synchronization module, and the obtaining of the expected time from rendering to synthesis of the layer frame to obtain the display frame based on the frame timeline information includes:

[0023] The application submits a request and the frame timeline information to the composite display system;

[0024] The synthetic display system feeds back the current vertical synchronization signal id to the application as the vertical synchronization signal id of the application, and uses the expected time corresponding to the current vertical synchronization signal id of the synthetic display system as the expected time for the layer frame to be rendered and synthesized to obtain a display frame.

[0025] In a technical solution of the above-mentioned jamming monitoring method, the method further includes:

[0026] In response to the request received by the application, the composite display system continuously issues a request to the vertical synchronization module;

[0027] The vertical synchronization module generates a current vertical synchronization signal ID of the composite display system and the corresponding expected time based on a request of the composite display system, and sends the ID to the composite display system.

[0028] In a technical solution of the above-mentioned jamming monitoring method, obtaining the actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the frame timeline information includes:

[0029] Acquire a first time when the rendering starts based on the frame timeline information, and acquire a second time when the display frame is synthesized;

[0030] The actual completion time of the layer frame from rendering to synthesis to obtain the display frame is obtained based on the difference between the first time and the second time.

[0031] In a technical solution of the above-mentioned jamming monitoring method, obtaining the first time of starting the rendering based on the frame timeline information includes:

[0032] After the frame timeline information is set, the time when the drawn layer frame is stored in the cache queue is used as the first time of the rendering start in the frame timeline information.

[0033] In a second aspect, an electronic device is provided, which includes a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute the jamming monitoring method described in any one of the technical solutions of the above-mentioned jamming monitoring method.

[0034] In a third aspect, a computer-readable storage medium is provided, which stores a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the jamming monitoring method described in any one of the technical solutions of the above-mentioned jamming monitoring method.

[0035] The above one or more technical solutions of the present invention have at least one or more of the following Beneficial effects:

[0036] In the technical solution for implementing the present invention, the jamming monitoring method is applied to an electronic device, and the electronic device includes at least an application. The method includes responding to a request received by the application, the application drawing and rendering the layer frame corresponding to the request, determining whether the application is set with frame timeline information, and if not, setting the frame timeline information, and obtaining the expected time and actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the frame timeline information, and determining whether there is jamming based on the expected time and actual completion time. Through the above implementation, jamming monitoring can be performed on autonomous rendering applications such as games and cameras in electronic devices that do not have Vsync, realizing full-scene, automated, and repeatable layer jamming monitoring, which is convenient for discovering more jamming problems, making the use of electronic devices smoother, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. Among them:

[0038] Figure 1 is a schematic flow chart of main steps of a jamming monitoring method according to an embodiment of the present invention;

[0039] Figure 2 It is a schematic flow chart of main steps of drawing and rendering a layer frame corresponding to a request in response to a request received by an application according to an embodiment of the present invention;

[0040] Figure 3 It is a flowchart diagram of main steps of obtaining the expected time of a layer frame from rendering to synthesis to obtain a display frame based on Frame Timeline Info according to an embodiment of the present invention;

[0041] Figure 4 is a flowchart of main steps of a jamming monitoring method according to another embodiment of the present invention;

[0042] Figure 5 It is a flowchart of main steps of obtaining the actual completion time of a layer frame from rendering to synthesis to obtain a display frame based on Frame Timeline Info according to an embodiment of the present invention;

[0043] Figure 6 is a flowchart of main steps of a jamming monitoring method according to another embodiment of the present invention;

[0044] Figure 7 It is a main structural diagram of an electronic device embodiment according to the present invention.

[0045] List of reference numerals:

[0046] 701: processor; 702: storage device. DETAILED DESCRIPTION

[0047] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0048] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.

[0049] Here we first explain some terms involved in the present invention.

[0050] SF: Surface Flinger, or display synthesis system, is the core of the GUI (graphical user interface). It exists as a system service and is responsible for mixing the graphics data of all apps in the set order and outputting it to the driver for display.

[0051] Vsync: Vertical Sync, which is the vertical synchronization signal. Vsync is used to synchronize the number of frames transmitted per second of the picture with the refresh rate of the display to avoid tearing of the display screen.

[0052] GPU: graphics processing unit, also known as display core, visual processor, display chip, is a microprocessor specially used for image and graphics related calculations on personal computers, workstations, game consoles and some mobile electronic devices (such as tablets, smart phones, etc.).

[0053] dequeuBuffer: The buffer queue of the application's rendering thread.

[0054] Buffer: The cache queue of the SF synthesis thread.

[0055] TokenManager: Token Manager is a Java-based framework component used to manage third-party tokens outside its own platform.

[0056] Call stack: A call stack is a list of methods that stores all methods called at runtime in the order in which they are called.

[0057] At present, the performance goal of developing applications is to maintain 60fps (frames per second), which means that each frame has only 1000 / 60=16.67ms to process all tasks. If the tasks of this frame cannot be completed within 16ms, frame loss will occur. The more frames are lost, the more severe the lag felt by the user.

[0058] When HWUI application layers are drawn, each frame will generate a corresponding expected time value, and each frame display will generate actual time values ​​for each stage. The detection of stuttering is usually carried out by using the vertical synchronization signal (Vertical Sync, Vsync) of each application when the layer is drawn and the Vsync of the synthetic display system (Surface Flinger, SF) to generate the corresponding expected time value and actual time value, and comparing the expected time value with the actual time value to obtain the stuttering information of the electronic device.

[0059] For non-autonomous rendering applications with Vsync, you can easily obtain the APP Vsync id and expected time value, and set the corresponding Frame Timeline Info according to the APP Vsync id to obtain the actual completion time.

[0060] However, for self-rendering applications without Vsync, it is impossible to obtain the APP Vsync id and expected time, that is, the Call stack method for setting Frame Timeline Info is not called, so it is impossible to compare the expected time value with the actual time value to obtain the jam information, that is, for self-rendering applications, jam information cannot be monitored.

[0061] In order to solve the above problems, the present invention provides a jam monitoring method, an electronic device and a storage medium, which optimizes the system's built-in monitoring solution Interaction Jank Monitor to achieve full-scenario jam monitoring.

[0062] The jamming monitoring method provided by the present invention is applied to electronic devices, and the electronic devices may not be limited to PCs, mobile phones, tablet computers, etc. The electronic devices at least include applications.

[0063] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of a jamming detection method according to an embodiment of the present invention. Figure 1 As shown, the jamming monitoring method in the embodiment of the present invention mainly includes the following steps S101 to S105.

[0064] Step S101: In response to a request received by an application, the application draws and renders a layer frame corresponding to the request.

[0065] Step S102: Determine whether the application is set with frame timeline information Frame Timeline Info.

[0066] In some implementations, if Frame Timeline Info is not set, step S103 is executed; if Frame Timeline Info is set, step S104 is directly executed.

[0067] Step S103: Set Frame Timeline Info.

[0068] Step S104: based on the Frame Timeline Info, the expected time and actual completion time of the layer frame from rendering to synthesis to obtain the display frame are obtained.

[0069] Step S105: Based on the expected time and the actual completion time, determine whether there is a jam.

[0070] Based on the method described in steps S101 to S105 above, stuttering monitoring can be performed on autonomous rendering applications such as games and cameras in electronic devices that do not have Vsync, achieving full-scene, automated, and repeatable layer stuttering monitoring, making it easier to discover more stuttering problems, making the use of electronic devices smoother, and improving the user experience.

[0071] The above steps S101 to S105 are further explained below.

[0072] In some implementations of the above step S101, the request received by the application of the electronic device includes a touch request and / or a network trigger request.

[0073] Among them, a touch request means that when a user touches the touch screen installed on the front end of an electronic device with a finger or other object, the touched position (in the form of coordinates) is detected by the touch screen controller and sent to the CPU through an interface (such as an RS-232 serial port), thereby determining the touch request corresponding to the user's touch operation.

[0074] A network trigger request refers to a corresponding network trigger request determined based on network data received from other applications or processes when an application in an electronic device interacts with other applications or processes.

[0075] Further, in some embodiments, see the attached Figure 2 , Figure 2 FIG. 1 is a flow chart of the main steps of drawing and rendering a layer frame corresponding to a request received by an application according to an embodiment of the present invention. Figure 2 As shown, step S101 mainly includes the following steps S1011 to S1015.

[0076] Step S1011: In response to a touch request and / or a network trigger request received by the application, a drawing thread is started, and a layer frame is drawn based on the drawing thread.

[0077] Specifically, after receiving the touch request and / or the network trigger request, the application starts the APP UI thread (such as DoFrame), and after making drawing preparations, starts drawing one or more layer frames corresponding to the request.

[0078] Step S1012: Send the drawn layer frame to the rendering thread.

[0079] Step S1013: After the rendering process is ready for rendering, the rendered layer frame is stored in the dequeuBuffer.

[0080] Step S1014: Rendering the layer frames of the dequeuBuffer according to a preset order.

[0081] In some implementations, after receiving one or more drawn layer frames and preparing for rendering, the rendering process (eg, Draw Frame) stores the layer frames in a dequeuBuffer of the application GPU and renders them in a preset order.

[0082] Furthermore, the rendered layer frame is returned to the rendering thread of the application.

[0083] The above is a further description of step S101 . The following is a further description of step S102 and step S103 .

[0084] In some implementations, for non-autonomous rendering applications with Vsync, the APP Vsync id and expected time value can be obtained, the corresponding Frame Timeline Info is set according to the APP Vsync id, and the actual completion time of the display frame is obtained through the Frame TimelineInfo.

[0085] However, for autonomous rendering applications without Vsync, it is impossible to obtain the APP Vsync id and expected time, that is, the Call stack method for setting the Frame Timeline Info is not called. The Frame Timeline Info records the time it takes for the application to draw, render, and synthesize the layer frame to obtain the display frame in response to the request after receiving the touch request and / or network trigger request.

[0086] Therefore, in some implementations of the above step S102, it can be determined whether the application is set with FrameTimeline Info. If Frame Timeline Info is set, step S104 is directly executed, that is, the expected time and actual completion time of the layer frame from rendering to synthesis to obtain the display frame are obtained based on FrameTimeline Info; if Frame Timeline Info is not set, step S103 is executed, that is, Frame Timeline Info is set.

[0087] In some implementations of the above step S103, the application can record the time point when the rendering thread stores the drawn layer frame into the dequeuBuffer. Therefore, in the set Frame Timeline Info, the start time is the time when the drawn layer frame is stored into the dequeuBuffer, and this time is recorded as the time to start rendering.

[0088] Furthermore, if only one layer frame is stored in dequeuBuffer, the time when the layer frame is stored in dequeuBuffer is recorded as the time when rendering starts in Frame Timeline Info; if multiple layer frames are stored in dequeuBuffer, the time when the first layer frame is stored in dequeuBuffer is recorded as the time when rendering starts in Frame Timeline Info.

[0089] The above is a further description of step S102 and step S103 , and the following is a further description of step S104 .

[0090] In some implementations, the electronic device further includes a SF and Vsync module.

[0091] Further, in some implementations of the above step S104, see the attached Figure 3 , Figure 3 FIG. 1 is a flow chart of the main steps of obtaining the expected time from rendering to synthesis of a layer frame to obtain a display frame based on Frame Timeline Info according to an embodiment of the present invention. Figure 3 As shown, it mainly includes the following steps S301 to S302.

[0092] Step S301: the application submits a request and Frame Timeline Info to the SF.

[0093] Step S302: the SF feeds back the current SF Vsync id to the application as the APP Vsync id of the application, and uses the expected time corresponding to the SF Vsync id as the expected time for the layer frame to be rendered and synthesized to obtain a display frame.

[0094] In some embodiments, after SF receives the request and Frame Timeline Info sent by the application, it starts the synthesis thread. After the synthesis thread is ready for synthesis, it stores the rendered layer frame into the Buffer, synthesizes one or more layer frames in a preset order, and records the time of synthesizing the display frame based on the Frame Timeline Info.

[0095] Further, in some embodiments, see the attached Figure 4 , Figure 4 FIG. 1 is a flow chart of the main steps of a jamming detection method according to another embodiment of the present invention. Figure 4 As shown, the jamming monitoring method in the embodiment of the present invention further includes steps S401 to S402.

[0096] Step S401: In response to the request received by the application, the SF continuously sends requests to the Vsync module.

[0097] When the application receives a touch request and / or a network trigger request, in response to the request, the SF will continue to send requests to the Vsync module.

[0098] Step S402: The Vsync module generates the current SF Vsync id and the corresponding expected time of the SF based on the request of the SF, and sends them to the SF.

[0099] In some embodiments, the SF continuously obtains the current SF Vsync id and the corresponding expected time through the Vsync module. When the SF receives the request sent by the application, it feeds back the current SF Vsync id to the application as the APP Vsyncid of the application, and uses the expected time corresponding to the SF Vsync id as the expected time for the layer frame to be rendered and synthesized to obtain the display frame.

[0100] In some implementations, after the Vsync module generates the current SF Vsync id and the corresponding expected time of the SF and sends them to the SF, it also sends the current SF Vsync id and the corresponding expected time to the Token Manager for storage, wherein the TokenManager is a token manager, which is a framework component developed based on Java and is used to manage third-party tokens outside its own platform.

[0101] In some other implementations of the above step S104, see the attached Figure 5 , Figure 5 1 is a flow chart of the main steps of obtaining the actual completion time of a layer frame from rendering to synthesis to obtain a display frame based on Frame Timeline Info according to an embodiment of the present invention. Figure 5 As shown, it mainly includes the following steps S501 to S502.

[0102] Step S501: based on the Frame Timeline Info, a first time of starting rendering is obtained, and a second time of synthesizing a display frame is obtained.

[0103] In some embodiments, the application may record the time point when the rendering thread stores the drawn layer frame into the dequeuBuffer. Therefore, for an application that has not set the Frame Timeline Info, after setting the Frame Timeline Info, the time when the drawn layer frame is stored into the dequeuBuffer is used as the first time when rendering starts in the Frame Timeline Info.

[0104] In some embodiments, after SF receives the request and Frame Timeline Info sent by the application, it starts the synthesis thread. After the synthesis thread is ready for synthesis, it stores the rendered layer frame into the Buffer, synthesizes one or more layer frames in a preset order, displays the synthesized display frame, and records the second time of the synthesized display frame based on the Frame Timeline Info.

[0105] Step S502: obtaining the actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the difference between the first time and the second time.

[0106] Specifically, the actual completion time of the layer frame from rendering to synthesis to obtain the display frame is obtained by subtracting the first time of the start of rendering in the Frame Timeline Info from the second time of synthesis to obtain the display frame.

[0107] The above is a further description of step S104. The following is a further description of step S105.

[0108] In some implementations of the above step S105, the actual completion time obtained is subtracted from the expected time to obtain a time difference, and it is determined whether the time difference is greater than a preset threshold.

[0109] Furthermore, if the time difference is greater than a preset threshold, it is considered that there is a freeze, and the freeze information is recorded, so that all freeze anomalies of the electronic device during use are recorded in detail, and the cause of the freeze and the log of occurrence are retained to discover more freeze problems, ultimately making the use of the electronic device smoother.

[0110] On the other hand, if the time difference is not greater than the preset threshold, it is considered that there is no lag and no need to record.

[0111] In practical applications, those skilled in the art can set the preset threshold value according to requirements, which is not limited here.

[0112] The above is a further explanation of step S105.

[0113] For autonomous rendering applications without Vsync, the jamming information can be obtained through the jamming monitoring method described in steps S101 to S105 above.

[0114] Furthermore, in other embodiments of the jam monitoring method provided by the present invention, for non-autonomous rendering applications with Vsync, that is, applications with Frame Timeline Info set, it is possible to easily obtain the APP Vsync id and expected time value, and obtain the actual completion time based on the Frame Timeline Info, thereby obtaining the jam information.

[0115] See attached Figure 6 , Figure 6 FIG. 1 is a flow chart of the main steps of a jamming detection method according to another embodiment of the present invention. Figure 6 As shown, it mainly includes the following steps S601 to S6011.

[0116] Step S601: In response to the request received by the application, the application sends a request to the Vsync module;

[0117] Step S602: The Vsync module generates the current App Vsync id of the application and the corresponding expected time based on the application's request;

[0118] Step S603: The Vsync module sends the current App Vsync id and the corresponding expected time to the application, and sends the Vsync event corresponding to the request to the display event receiver Display Event Receiver;

[0119] In some implementations, after the Vsync module generates the current App Vsync id and the corresponding expected time of the application and sends them to the application, it also sends the current App Vsync id and the corresponding expected time to the Token Manager for storage.

[0120] Step S604: Display Event Receiver dispatches a Vsync request event to the application main thread, and the application sets the corresponding Frame Timeline Info based on the current App Vsync id;

[0121] Step S605: the application starts a drawing thread, draws the layer frame based on the drawing thread, and sends the drawn layer frame to the rendering thread;

[0122] Step S606: After the rendering process is ready for rendering, the drawn layer frames are stored in the dequeuBuffer, and the drawn layer frames are rendered according to a preset order;

[0123] Step S607: After rendering is completed, the application submits a request to SF;

[0124] Step S608: After receiving the request, the SF sets the corresponding Frame TimelineInfo based on the current SF Vsync id and starts the synthesis thread;

[0125] In some implementations, in response to requests received by the application, the SF continuously sends requests to the Vsync module, and the Vsync module generates the current SF Vsync id and the corresponding expected time of the SF based on the request of the SF, and sends them to the SF and / or Token Manager for storage.

[0126] Step S609: After the synthesis thread is ready for synthesis, the rendered layer frames are stored in the Buffer, and the rendered layer frames are synthesized according to a preset order to obtain a display frame;

[0127] Step S6010: obtaining the expected time and actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the Frame Timeline Info;

[0128] Step S6011: Based on the expected time and the actual completion time, determine whether there is a lag.

[0129] The above is a further explanation of obtaining stutter information for non-autonomous rendering applications with Vsync.

[0130] The method provided by the present invention can monitor the jamming of non-autonomous rendering applications with Vsync in electronic devices, as well as autonomous rendering applications such as games and cameras without Vsync, thereby realizing full-scene, automatic, and repeatable layer jamming monitoring, making it easier to discover more jamming problems, making the use of electronic devices smoother, and improving the user experience.

[0131] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, object information corresponding to electronic device usage data, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, electronic device usage data, etc.) involved in the embodiments of the present disclosure are all information and data authorized by the user or fully authorized by all parties.

[0133] The data acquisition, collection and other actions involved in the embodiments of the present disclosure are all performed after authorization by the user or the object or after full authorization by all parties.

[0134] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0135] Furthermore, the present invention also provides an electronic device. Figure 7 , Figure 7 1 is a schematic diagram of the main structure of an electronic device according to an embodiment of the present invention. Figure 7As shown, the electronic device in the embodiment of the present invention mainly includes a processor 701 and a storage device 702. The storage device 702 can be configured to store a program for executing the jam monitoring method of the above method embodiment, and the processor 701 can be configured to execute the program in the storage device 702, which includes but is not limited to the program for executing the jam monitoring method of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention.

[0136] In some possible implementations of the present invention, the electronic device may include multiple processors 701 and multiple storage devices 702. The program for executing the jamming monitoring method of the above method embodiment may be divided into multiple subprograms, and each subprogram may be loaded and run by the processor 701 to execute different steps of the jamming monitoring method of the above method embodiment. Specifically, each subprogram may be stored in different storage devices 702, and each processor 701 may be configured to execute the programs in one or more storage devices 702 to jointly implement the jamming monitoring method of the above method embodiment, that is, each processor 701 executes different steps of the jamming monitoring method of the above method embodiment, to jointly implement the jamming monitoring method of the above method embodiment.

[0137] The above-mentioned multiple processors 701 may be processors deployed on the same device. For example, the above-mentioned electronic device may be a high-performance device composed of multiple processors, and the above-mentioned multiple processors 701 may be processors configured on the high-performance device. In addition, the above-mentioned multiple processors 701 may also be processors deployed on different devices. For example, the above-mentioned electronic device may be a server cluster, and the above-mentioned multiple processors 701 may be processors on different servers in the server cluster; the above-mentioned electronic device may be a driving device cluster, and the above-mentioned multiple processors 701 may be processors on different driving devices in the driving device cluster.

[0138] Furthermore, the present invention also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program for executing the jam monitoring method of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the above-mentioned jam monitoring method. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-temporary computer-readable storage medium.

[0139] So far, the technical solution of the present invention has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

Claims

1. A jamming monitoring method, applied to electronic equipment, It is characterized in that The electronic device includes at least an application, and the method includes: In response to the request received by the application, the application draws and renders the layer frame corresponding to the request; Determining whether the application is provided with frame timeline information; If not set, setting the frame timeline information; Based on the frame timeline information, the expected time and actual completion time of the layer frame from rendering to synthesis to obtain a display frame are obtained; Based on the expected time and the actual completion time, determine whether there is a jam.

2. The jamming detection method according to claim 1, It is characterized in that The method further comprises: If the application is provided with the frame timeline information, then "obtaining the expected time and actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the frame timeline information" is directly executed.

3. The jamming monitoring method according to claim 1, It is characterized in that The determining whether there is a jam based on the expected time and the actual completion time includes: Subtract the actual completion time from the expected time to obtain a time difference, and determine whether the time difference is greater than a preset threshold; If so, it is considered that there is a jam.

4. The jamming monitoring method according to claim 1, It is characterized in that The request received by the application includes a touch request and / or a network trigger request; In response to the request received by the application, the application draws and renders the layer frame corresponding to the request, including: In response to the touch request and / or the network trigger request received by the application, start a drawing thread, and draw the layer frame based on the drawing thread; Sending the drawn layer frame to the rendering thread; After the rendering process is ready for rendering, the rendered layer frame is stored in a cache queue; The layer frames of the cache queue are rendered according to a preset order.

5. The jamming monitoring method according to claim 4, It is characterized in that The electronic device further includes a synthesis display system and a vertical synchronization module, and the obtaining of the expected time from rendering to synthesis of the layer frame to obtain a display frame based on the frame timeline information includes: The application submits a request and the frame timeline information to the composite display system; The synthetic display system feeds back the current vertical synchronization signal id to the application as the vertical synchronization signal id of the application, and uses the expected time corresponding to the current vertical synchronization signal id of the synthetic display system as the expected time for the layer frame to be rendered and synthesized to obtain a display frame.

6. The jamming monitoring method according to claim 5, It is characterized in that The method further comprises: In response to the request received by the application, the composite display system continuously issues a request to the vertical synchronization module; The vertical synchronization module generates a current vertical synchronization signal ID of the composite display system and the corresponding expected time based on a request of the composite display system, and sends the ID to the composite display system.

7. The jamming monitoring method according to claim 4, It is characterized in that The obtaining of the actual completion time of the layer frame from rendering to synthesis to obtain the display frame based on the frame timeline information includes: Acquire a first time when the rendering starts based on the frame timeline information, and acquire a second time when the display frame is synthesized; The actual completion time of the layer frame from rendering to synthesis to obtain the display frame is obtained based on the difference between the first time and the second time.

8. The jamming monitoring method according to claim 7, It is characterized in that The acquiring the first time of starting the rendering based on the frame timeline information comprises: After the frame timeline information is set, the time when the drawn layer frame is stored in the cache queue is used as the first time of the rendering start in the frame timeline information.

9. An electronic device comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, It is characterized in that The program code is suitable for being loaded and run by the processor to execute the jam monitoring method described in any one of claims 1 to 8.

10. A computer-readable storage medium having a plurality of program codes stored therein, It is characterized in that The program code is suitable for being loaded and run by a processor to execute the jam monitoring method described in any one of claims 1 to 8.