A method, device, computer equipment and storage medium for determining fluency

By looping to obtain the frame data and vertical synchronization timestamp of the screen layer, combined with the frame rate and other parameters, the fluency determination model is used to solve the problem of low frame rate accuracy in the existing technology and achieve a more accurate measurement of fluency. Evaluation, suitable for non-continuous drawing applications.

CN117950927BActive Publication Date: 2024-09-10镁佳(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410116993.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2024-09-10
Estimated Expiration
2044-01-26

AI Technical Summary

Technical Problem

The existing technology determines fluency only based on the frame rate, resulting in low accuracy and cannot be applied to application scenarios of discontinuous rendering.

Method used

By cyclically obtaining the drawing frame data of the screen layer at a specified time interval, calculating the frame rate based on the frame number and vertical synchronization timestamp, and using the pre-established fluency to determine the model, taking into account the frame rate and other parameters such as maximum lag, human eye Persistence of vision and video-level freezing parameters are used to calculate more accurate smoothness.

Benefits of technology

It improves the accuracy of fluency determination, is suitable for non-continuous drawing application scenarios, and enhances the ability to evaluate fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117950927B
    Figure CN117950927B
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a method, device, computer equipment and storage medium for determining fluency. The method comprises: cyclically acquiring drawing frames of a specified layer in a screen at a specified time interval to obtain frame drawing data; the frame drawing data contains a vertical synchronization timestamp of each frame; according to the number of frames of the frame drawing data and the vertical synchronization timestamp of each frame, the frame rate data is calculated; the frame rate data is processed using a fluency determination model to obtain fluency data; the fluency determination model is a pre-established model for determining fluency. The above scheme has high accuracy when implementing the fluency determination method.
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 fluency determination method, device, computer equipment and storage medium. Background Art

[0002] Among the user experience related items of touch screen products, the smoothness experience is a very important one. Frame rate is the frequency at which bitmap images in frames appear continuously on the display. Frame rate = number of frames / time, and the unit is frames per second (fps). In related technologies, frame rate is used as the basis for smoothness evaluation. Frame rate can reflect smoothness more intuitively and has low performance requirements for the development environment. Combining frame rate with total number of frames and number of lost frames can calculate smoothness.

[0003] However, the above solution only determines the smoothness based on the frame rate, which has great limitations and leads to low accuracy. Summary of the invention

[0004] In view of this, the present invention provides a method, apparatus, computer device and storage medium for determining fluency to solve the problem of low accuracy caused by determining fluency only based on frame rate.

[0005] In a first aspect, the present invention provides a method for determining fluency, the method comprising: cyclically acquiring drawing frames of a specified layer in a screen at a specified time interval to obtain frame drawing data; the frame drawing data contains a vertical synchronization timestamp of each frame; calculating frame rate data based on the number of frames of the frame drawing data and the vertical synchronization timestamp of each frame; processing the frame rate data using a fluency determination model to obtain fluency data; the fluency determination model is a pre-established model for determining fluency.

[0006] In the above scheme, the time interval and layer are first specified, the drawing frame data is obtained in a loop, and the frame rate data is calculated based on the drawing frame data. Therefore, the specified layer can be looped multiple times to obtain multiple sets of drawing frame data, thereby obtaining more accurate frame rate data. When determining the fluency, the frame rate data is processed by a pre-established fluency determination model, and the fluency determination parameters other than the frame rate data can be set in the fluency determination model, thereby further improving the accuracy of the fluency determination.

[0007] In an optional implementation, the method further includes: receiving and parsing a frame drawing file transmitted by a terminal device; the frame drawing file is frame drawing data in a text format; or, in response to a user's adb command, accessing the terminal device, obtaining the frame drawing data and displaying it in a command line window.

[0008] The above scheme limits two ways of acquiring frame drawing data, which can be selected according to needs, thereby improving the flexibility of acquiring frame drawing data.

[0009] In an optional implementation, the calculating frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame includes: filtering and processing the frame drawing data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame to obtain valid frame drawing data; and calculating the frame rate data according to the frame number of the valid frame drawing data and the time interval from the first frame to the last frame.

[0010] The above solution obtains valid frame drawing data by screening and processing the frame drawing data, removes invalid data, and can further improve the accuracy of the frame rate data.

[0011] In an optional implementation, the screening and processing of the frame drawing data to obtain valid frame drawing data includes: if the number of frames included in the frame drawing data obtained in the current cycle is 1 frame, determining that the frame drawing data is valid frame drawing data, and determining that the current cycle is at a full frame rate; if the number of frames included in the frame drawing data obtained in the current cycle is greater than 1 frame, determining adjacent frames whose time interval is less than a preset time interval as continuous frames, and determining a plurality of continuous frames as a group of valid frame drawing data.

[0012] The above scheme further refines how to process the frame drawing data when the number of frames is 1 frame and when the number of frames is greater than 1 frame, and when the number of frames is greater than 1 frame, the time interval is compared with the preset time interval, and adjacent frames whose time interval is less than the preset time interval are determined as continuous frames, which can eliminate the situation where the picture is static and improve the accuracy of subsequent smoothness determination.

[0013] In an optional implementation, the vertical synchronization timestamp of the drawing frame includes a drawing start timestamp, a screen display timestamp and a drawing completion timestamp, and the method further includes: if the difference between the drawing completion timestamp and the drawing start timestamp of the drawing frame is greater than the vertical synchronization time interval, it is determined to be a frame drop, and optimization is performed.

[0014] The above scheme defines how to determine frame drops and performs optimization when frames are dropped, thus refining the scheme.

[0015] In an optional embodiment, the smoothness determination model is used to process the frame rate data to obtain the smoothness data, including: calculating a maximum stuttering parameter based on a maximum frame interval between each drawing frame; calculating a human eye visual persistence parameter based on the number of frames whose frame interval between each drawing frame is greater than a first time; calculating a game-level stuttering parameter based on the number of frames whose frame interval between each drawing frame is between a second time and a third time; the first time is greater than the third time and greater than the second time; calculating a video-level stuttering parameter based on the number of frames whose frame interval between each drawing frame is between a fourth time and a fifth time; the second time is greater than the fifth time and greater than the fourth time; assigning weight values ​​to the frame rate data, the maximum stuttering parameter, the human eye visual persistence parameter, the game-level stuttering parameter and the video-level stuttering parameter, and calculating the smoothness data.

[0016] The above scheme limits the determination of smoothness by combining frame rate data, maximum stuttering parameters, human eye visual persistence parameters, game-level stuttering parameters and video-level stuttering parameters, so that the determination of smoothness does not only rely on frame rate data, thereby improving the accuracy of smoothness determination.

[0017] In an optional embodiment, the method further includes: establishing a two-dimensional coordinate system with the vertical synchronization time interval as the horizontal axis and the frame rate, smoothness data, total number of frames and maximum frame interval as the vertical axes to visualize the screen smoothness.

[0018] The above solution limits the visual display of screen smoothness and refines the solution.

[0019] In a second aspect, the present invention provides a device for determining fluency, the device comprising: a data acquisition module, used to cyclically acquire drawing frames of a specified layer in a screen at specified time intervals to obtain frame drawing data; the frame drawing data contains a vertical synchronization timestamp of each frame; a frame rate calculation module, used to calculate frame rate data based on the number of frames of the frame drawing data and the vertical synchronization timestamp of each frame; a fluency determination module, used to process the frame rate data using a fluency determination model to obtain fluency data; the fluency determination model is a pre-established model for determining fluency.

[0020] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the fluency determination method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the fluency determination method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 is a flow chart of a method for determining fluency according to an embodiment of the present invention;

[0024] Figure 2 is a flow chart of another method for determining fluency according to an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of the data acquisition process involved in the embodiment of the present application is shown;

[0026] Figure 4 A schematic diagram showing a visual display involved in an embodiment of the present application is shown;

[0027] Figure 5 is a structural block diagram of a device for determining fluency according to an embodiment of the present invention;

[0028] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0030] Among the user experience related items of touch screen products, the smoothness experience is a very important one. The frame rate is the frequency at which bitmap images in frames appear continuously on the display. In related technologies, the frame rate is used as the basis for smoothness evaluation. When the picture keeps changing, the frame rate can more intuitively reflect the smoothness, and the performance requirements for the development environment are low. The frame rate is combined with the total number of frames and the number of lost frames to calculate the smoothness.

[0031] However, the above scheme only determines the smoothness based on the frame rate, and no image drawing is performed when the screen is still. The frame rate is low at this time, but it does not mean that the screen is not smooth. Therefore, the above scheme is not suitable for most non-continuous drawing applications, has great limitations, and leads to low accuracy.

[0032] Therefore, an embodiment of the present invention provides a method for determining fluency, which combines the frame rate with a fluency determination model to achieve a high accuracy effect of determining fluency.

[0033] According to an embodiment of the present invention, an embodiment of a method for determining fluency is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] In this embodiment, a method for determining fluency is provided, which can be used in mobile terminals, such as laptop computers, desktop computers, etc. Figure 1 is a flow chart of a method for determining fluency according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0035] Step S101, cyclically acquiring drawing frames of a specified layer on the screen at a specified time interval to obtain frame drawing data.

[0036] This screen is the screen of the terminal device for which the fluency needs to be determined, and the layer can be a layer from different applications used by the terminal device, such as a layer when using map software or a layer when running a game. The layer can be specified by entering the layer name according to actual needs. Furthermore, the specified layer can be looped multiple times to obtain the drawing frame, and the fluency can be determined separately, and finally the average value is taken as the fluency of the specified layer. Furthermore, multiple layers can be specified, and the fluency of multiple layers can be determined separately to obtain the fluency of the terminal device under multiple layers, so as to determine the fluency in different application scenarios.

[0037] The frame drawing data contains the vertical synchronization timestamp of each frame. Vertical synchronization is also called field synchronization. A single pixel constitutes a horizontal scan line, and the accumulation of horizontal scan lines in the vertical direction forms a complete picture.

[0038] Step S102, calculating frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame.

[0039] The total time of the frame drawing data can be calculated according to the vertical synchronization timestamp of the first frame and the vertical synchronization timestamp of the last frame. After the total number of frames and the total time of the frame drawing data are obtained, the frame rate data can be calculated according to frame rate = total number of frames / total time.

[0040] Step S103: Process the frame rate data using a fluency determination model to obtain fluency data.

[0041] The fluency determination model is a pre-established model for determining fluency. The fluency model can combine frame rate data and other data to comprehensively determine fluency. For example, the frame interval between frames is compared with a preset stuttering threshold. If the frame interval exceeds the stuttering threshold, it is judged as stuttering (i.e., poor fluency). Alternatively, the frame interval between frames is screened and counted based on the objective perception data of the human eye on the frames. If the frame interval exceeds the objective perception data of the human eye, it is judged as poor fluency. The fluency is determined in combination with the frame rate data.

[0042] The method for determining fluency provided in this embodiment first specifies the time interval and layer, loops to obtain drawing frame data, and calculates frame rate data based on the drawing frame data. Therefore, multiple loops can be performed on the specified layer to obtain multiple sets of drawing frame data, thereby obtaining relatively accurate frame rate data. When determining fluency, the frame rate data is processed by a pre-established fluency determination model, and fluency determination parameters other than frame rate data can be set in the fluency determination model, thereby further improving the accuracy of fluency determination.

[0043] In this embodiment, a method for determining fluency is provided, which can be used in mobile terminals, such as laptop computers, desktop computers, etc. Figure 2 is a flow chart of a method for determining fluency according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0044] Step S201, cyclically acquiring drawing frames of a specified layer on the screen at a specified time interval to obtain frame drawing data.

[0045] The screen is the screen of the terminal device whose fluency needs to be determined. The terminal device is a device configured with an Android system, such as a mobile phone, a tablet, etc. The specified layer can be the layer when the application software in the terminal device is running. For example, it is necessary to determine the fluency when the terminal device runs a game, so as to facilitate subsequent targeted optimization.

[0046] Figure 3 The following is a schematic diagram of the data acquisition process involved in the embodiment of the present application. Optionally, the frame drawing data of the terminal device is collected in the following manner:

[0047] (1) Receive and parse the frame drawing file transmitted by the terminal device. The terminal device can be connected via a data cable. After the data cable is connected, the terminal device can be controlled by the adb tool, so that the terminal device executes the data acquisition script to collect frame drawing data. Specifically, the data acquisition script is a shell script. First, the data acquisition script is pushed to the specified directory " / data / local / tmp" of the terminal device through the push command of the adb tool. After the adbd process is started in the terminal device to execute the data acquisition script, the collected frame drawing data is stored in a data file in csv format, and then the data file in csv format (i.e., the frame drawing file) is pulled through the pull command. In this way, the data cable connection with the terminal device can be disconnected when the adbd process is started and the adbd process is not restarted. The disconnection of the data cable connection does not affect the adbd process in the terminal device. The adbd process can continuously monitor and obtain and save the frame drawing data. The frame drawing file can be obtained from the terminal device after the adbd process is manually stopped. Among them, the adb (Android Debug Bridge) tool is a debugging bridge that connects the computer to the terminal device and manages the terminal device. The shell script is composed of multiple Linux commands to achieve the predetermined function. csv is a text file format, usually used to store data. The push command can copy files or folders from the computer to the terminal device, and the pull command can copy files or folders from the terminal device to the computer. Specifically, the shell script contains the adb command "dumpsys SurfaceFlinger-latency layer name", where dumpsys is a command line tool provided by the Android system for querying the return information of system services. SurfaceFlinger is the core service name responsible for drawing the UI, which is used to manage the Android frame buffer. Latency is an interface for specifying the layer name and obtaining the layer's historical drawing information, which can save up to 127 frames of historical drawing information. Since the commands used are all commands supported by Android by default, root permissions are not required and can be used by the Android system.

[0048] (2) In response to the user's adb command, access the terminal device, obtain the frame drawing data and display it in the command line window. Connect the terminal device via a data cable, and output the frame drawing data of the terminal device to the command line window through the adb command of the adb tool. This method cannot disconnect the data cable connection, and the data in the command line window can be processed in real time and stored and graphically displayed. Specifically, the adb command is "dumpsys SurfaceFlinger-latency layer name", which will not be repeated here.

[0049] The frame drawing file is frame drawing data in text format. The frame drawing data contains the vertical synchronization timestamp of each frame, including the start drawing timestamp, screen display timestamp and drawing completion timestamp. In this solution, the screen display timestamp of the drawing frame is used as the vertical synchronization timestamp of the drawing frame. Specifically, the frame drawing file contains 128 lines of text. The first line is the vertical synchronization (vsync) time interval in ns (nanoseconds). The vertical synchronization time interval is calculated by the screen hardware refresh rate of the terminal device, specifically the integer part of "1000000000 / screen refresh rate"; the second to the 128th lines are arrays with three columns in each line, all of which are time values ​​in ns. The number of frames is equal to the number of array rows. Among them, the first column is the screen hardware vertical synchronization time (HW-VSYNC), that is, the start drawing timestamp when the application starts to draw the image, the second column is the screen display timestamp when the drawing frame is displayed on the screen, that is, the vertical synchronization timestamp, and the third column is the drawing completion timestamp when the drawing is completed. When acquiring frame drawing data, historical frames are appended from top to bottom. Since the time of first acquiring drawing frame data does not necessarily coincide with the vertical synchronization time interval, the number of frames acquired may be less than 127 frames. In this case, the number 0 is used to fill the missing data to ensure that the frame drawing data acquired this time reaches 127 lines.

[0050] Optionally, the specified time interval is less than the full-frame drawing cycle of the screen. When the screen hardware draws 127 frames in full frame, the total time of 127 frames = vsync interval × 126. Therefore, if continuous monitoring is required, data must be acquired cyclically within the full-frame drawing cycle of the screen. For example, the full-frame drawing cycle of a 60-frame screen is 16.7ms × 126 ≈ 2.1 seconds. The specified time interval is 1.5 seconds for cyclic acquisition. Specifically, first use the dumpsys SurfaceFlinger-latency-clear command to clear historical data, then wait for 1.5 seconds, obtain the frame drawing data, calculate the frame rate, and then return to the step of using the dumpsysSurfaceFlinger-latency-clear command to clear historical data, so as to cyclically acquire frame drawing data.

[0051] Optionally, the drawing frames of several specified layers in the screen are obtained cyclically at a specified time interval to obtain the frame drawing data corresponding to each specified layer. When the layer names of multiple specified layers are the same, a blank line is added after 127 lines of frame drawing data, and 127 lines of frame drawing data are appended in sequence, that is, the 127 lines of frame drawing data corresponding to each specified layer with the same layer name are separated by blank lines.

[0052] Step S202, calculating frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame.

[0053] Specifically, the above step S202 includes:

[0054] Step S2021 , screening and processing the frame drawing data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame to obtain valid frame drawing data.

[0055] Optionally, if the number of frames contained in the frame drawing data obtained in the current cycle is 1 frame, the frame drawing data is determined to be valid frame drawing data, and the current cycle is determined to be at full frame rate. That is to say, if only one frame of data is obtained in the current cycle, resulting in the inability to calculate the interval time between adjacent frames, then the current cycle is calculated according to the full frame rate; if the number of frames contained in the frame drawing data obtained in the current cycle is greater than 1 frame, adjacent frames with a time interval less than a preset time interval are determined to be continuous frames, and several continuous frames are determined to be a group of valid frame drawing data. The preset time interval is set to exclude the situation where the picture is still. If the situation where the picture is still is not excluded, the frame rate data obtained will be too small as time goes by, and it will be impossible to distinguish whether the frame rate data is too small due to software performance problems or problems with the interactive design itself. Exemplarily, the preset time interval is 0.5 seconds, and adjacent frames with a time interval less than 0.5 seconds are determined to be continuous frames, and the continuous frames accumulate and calculate the frame rate data. If the time interval between adjacent frames is greater than 0.5 seconds, the previous frame and the next frame are divided into different data groups to calculate the frame rate. That is to say, the previous frame is the end point of the last cumulative calculation of the frame rate data, and the next frame starts to accumulate and calculate the frame rate data again.

[0056] Optionally, continuous frames whose total time interval is greater than the vertical synchronization time interval are determined as a set of valid frame drawing data, otherwise the frame whose difference with the vertical synchronization timestamp of the previous adjacent frame is a negative value is determined as a reused frame, and the vertical synchronization timestamp of the reused frame is added to the vertical synchronization time interval to obtain the corrected vertical synchronization timestamp of the reused frame. Since the same drawing frame may appear twice before and after in the actual picture, that is, the frame that has been drawn is reused, resulting in the same vertical synchronization timestamp corresponding to the two frames, which leads to the situation that the timestamp between the reused frame and the previous adjacent frame is negative. At this time, the vertical synchronization timestamp corresponding to the reused frame needs to be added to the vertical synchronization time interval for correction. For example, if the animation effect of the virtual red envelope contains multiple identical zooming in and out jittering effects, the same drawing frame will be drawn twice in succession, resulting in the same vertical synchronization timestamp appearing twice, which needs to be corrected.

[0057] It should be noted that if the value of the vertical synchronization timestamp is 9223372036854775807, it is judged as invalid data. For example, this invalid data will appear in the data obtained by Android version 6.0.

[0058] It should be noted that if a group of valid frame drawing data consists of multiple 127-line data separated by a blank line, it is the frame drawing data obtained by displaying multiple layers with the same name on the screen, and each group of data is named in sequence, for example, the first group of 127 lines of data is recorded as 1, and then the names are incremented by 1. This kind of data is often seen in the Android 6.0 version of multiple video small windows, and each small window layer is named SurfaceView, which generates this kind of data.

[0059] Optionally, if the difference between the drawing completion timestamp and the drawing start timestamp of the drawing frame is greater than the vertical synchronization time interval, it is determined to be a dropped frame and optimization is performed. The difference between the third column data and the first column data of each row of data is the time taken for the corresponding drawing frame to start drawing and complete drawing preparation, which can be used to evaluate whether the drawing performance needs to be optimized. If this time is greater than the vertical synchronization time interval, it means that the preparation time for a frame cannot be completed within the vertical synchronization time interval. In this case, the full frame drawing performance of the screen cannot be achieved, so targeted optimization is required. It should be noted that each frame drawn by the video hard decoding is not completed by Android SurfaceFlinger. The difference between the third column and the first column is always 0, which will make the dropped frame data always 0.

[0060] Step S2022, calculating the frame rate data according to the number of frames of the valid frame drawing data and the time interval from the first frame to the last frame.

[0061] The time interval from the first frame to the last frame can be obtained by accumulating the difference between the vertical synchronization timestamps of each adjacent frame of the continuous frames. The number of frames and the number of data rows, the frame rate is the quotient of the number of frames and the time interval from the first frame to the last frame.

[0062] Step S203: Process the frame rate data using a fluency determination model to obtain fluency data.

[0063] The fluency determination model is a pre-established model for determining fluency.

[0064] Specifically, the maximum stutter parameter is calculated based on the maximum frame interval between each drawn frame. The maximum stutter parameter is set according to the objective visual persistence time of the human eye. When the human eye looks at an object, the image is formed on the retina and input into the human brain by the optic nerve to feel the image of the object. However, when the object is removed, the impression of the object by the optic nerve will not disappear immediately, but will continue for about 1 / 24 seconds. This property of the human eye is called "visual persistence of the eye". The data source of 1 / 24 seconds is due to the fact that the film industry often uses 24 frames to shoot films. At this frame rate, the human eye can see continuous and smooth pictures in the film. Scientifically, the visual persistence time is generally considered to be 0.1 to 0.4 seconds. Exemplarily, if the visual persistence time is selected as 0.1 seconds, the maximum stutter parameter = 0.1 seconds / maximum frame interval. At this time, the maximum value of the maximum stutter parameter is 1. When the set continuous valid frame interval is within 0.5 seconds, the minimum value of the maximum stutter parameter is 0.2.

[0065] According to the number of frames whose frame intervals between the rendering frames are greater than the first time, the human eye visual persistence parameter is calculated. The human eye visual persistence parameter is also set according to the objective visual persistence time of the human eye. Exemplarily, if the visual persistence time is selected as 0.1 seconds, the first time can be set to 0.1 seconds, and the human eye visual persistence parameter is set to 1-the number of frames whose frame intervals in the valid frame rendering data are greater than the first time / the total number of frames.

[0066] The game-level stuttering parameter is calculated based on the number of frames whose frame intervals between each drawing frame are between the second time and the third time. Among them, the first time is greater than the third time and greater than the second time. According to statistical data, when the frame rate (FPS) of the game is low, the stuttering experience is completely unacceptable to users. For example, when the FPS is below 20 frames, that is, when the number of frames per second is below 20 frames, the second time is set to 50ms and the third time is set to 100ms, then the game-level stuttering parameter = 1-the number of frames whose frame intervals in the valid frame drawing data are between the second time and the third time / the total number of frames.

[0067] The video-level jamming parameter is calculated based on the number of frames whose frame intervals between the respective drawing frames are between the fourth time and the fifth time. The second time is greater than the fifth time and greater than the fourth time. According to statistical data, when the frame rate (FPS) of the video is low, the jamming experience is completely unacceptable to the user. For example, if the fourth time is set to 40ms and the fifth time is set to 50ms, the video-level jamming parameter = 1-the number of frames whose frame intervals in the valid frame drawing data are between the fourth time and the fifth time / the total number of frames.

[0068] Assign weight values ​​to the frame rate data, maximum stuttering parameters, human eye visual persistence parameters, game-level stuttering parameters, and video-level stuttering parameters, and calculate the fluency data. First, set the target frame rate to calculate the frame rate compliance parameters. The frame rate compliance parameters = frame rate data / target frame rate. The maximum value is 1. The target frame rate is set according to the screen refresh rate and actual project requirements. Then assign weight values ​​to the frame rate compliance parameters, maximum stuttering parameters, human eye visual persistence parameters, game-level stuttering parameters, and video-level stuttering parameters. The weight values ​​can be set according to actual needs, for example, set to 60%, 20%, 10%, 7%, and 3%, respectively, and finally the fluency data is obtained.

[0069] Exemplarily, after calculating the fluency data for each group of valid frame drawing data, the following output content is obtained: the first frame vsync, the value of the second column of the first frame (unit: ns), converted to seconds and retaining 3 decimal places; the last frame vsync, the value of the second column of the last frame, converted to seconds and retaining 3 decimal places; system time: the system time (floating point format) when the data acquisition command is executed, frame rate (FPS), total number of frames, dropped frames (jank), maximum frame interval, number of frames with a frame interval greater than 100ms, number of frames in the interval [50ms, 100ms), number of frames in the interval [40ms, 50ms), total number of frames with adjacent frame intervals greater than the vsync interval, fluency score, and layer name mark number.

[0070] Optionally, the frame rates of several designated layers are monitored respectively, and then the fluency is determined for the application scenarios corresponding to the different designated layers. Furthermore, the fluency of each application scenario is sorted to prioritize and optimize the product UI fluency in stages.

[0071] Step S204, establishing a two-dimensional coordinate system with the vertical synchronization time interval as the horizontal axis and the frame rate, fluency data, total number of frames and maximum frame interval as the vertical axes to visualize the screen fluency.

[0072] Figure 4 Schematic diagram of the visualization involved in the embodiment of the present application is shown. Since each frame rate data (FPS) is calculated based on a group of valid continuous frames, the situation of each group of valid continuous frames from the beginning to the end can be displayed by a line graph, specifically, the horizontal axis time of vsync from the first frame to the last frame ( Figure 4For frame rate data output line by line, if the vsync time of the first line of b minus the vsync time of the last line of a is greater than 0.5 seconds, the line will be disconnected, that is, no line will be drawn. In other words, a broken line means that the picture is still during this period of time. Among them, FPS (Frames Per Second) is the number of frames transmitted per second, Frames is the number of frames, MFS (Maximum Frame Size) is the maximum frame interval, and score is the smoothness data. Furthermore, the layer names can be named with marked numbers to draw separate graphs (for example Figure 4 OutputLayer1 in the figure) to obtain multiple visualizations corresponding to each layer. By drawing a line graph and disconnecting the line graph to indicate the static period of the picture, the changes in frame rate data and smoothness data can be more intuitively expressed.

[0073] The method for determining fluency provided in this embodiment first specifies the time interval and layer, loops to obtain drawing frame data, and calculates frame rate data based on the drawing frame data. Therefore, multiple loops can be performed on the specified layer to obtain multiple sets of drawing frame data, thereby obtaining relatively accurate frame rate data. When determining fluency, the frame rate data is processed by a pre-established fluency determination model, and fluency determination parameters other than frame rate data can be set in the fluency determination model, thereby further improving the accuracy of fluency determination.

[0074] Furthermore, when the number of frames is greater than 1 frame, the time interval is compared with the preset time interval, and adjacent frames whose time interval is less than the preset time interval are determined as continuous frames, which can eliminate the situation where the picture is static and improve the accuracy of subsequent smoothness determination.

[0075] In addition, the smoothness is determined by combining frame rate data, maximum stuttering parameters, human eye visual persistence parameters, game-level stuttering parameters and video-level stuttering parameters, so that the smoothness determination does not only rely on frame rate data, thereby improving the accuracy of the smoothness determination.

[0076] In this embodiment, a fluency determination device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0077] This embodiment provides a fluency determination device, such as Figure 5 As shown, including:

[0078] The data acquisition module 501 is used to cyclically acquire the drawing frames of the specified layer in the screen at a specified time interval to obtain frame drawing data; the frame drawing data contains the vertical synchronization timestamp of each frame;

[0079] A frame rate calculation module 502, used to calculate frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame;

[0080] The fluency determination module 503 is used to process the frame rate data using a fluency determination model to obtain fluency data; the fluency determination model is a pre-established model for determining fluency.

[0081] In an optional implementation, the data acquisition module is also used to receive and parse a frame drawing file transmitted by a terminal device; the frame drawing file is frame drawing data in text format; or, in response to a user's adb command, access the terminal device, obtain the frame drawing data and display it in a command line window.

[0082] In an optional implementation, the frame rate calculation module is further used to: filter and process the frame drawing data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame to obtain valid frame drawing data; calculate the frame rate data according to the frame number of the valid frame drawing data and the time interval from the first frame to the last frame.

[0083] In an optional implementation, the frame rate calculation module is further used to: if the number of frames included in the frame drawing data obtained in the current cycle is 1 frame, determine that the frame drawing data is valid frame drawing data, and determine that the current cycle is at full frame rate; if the number of frames included in the frame drawing data obtained in the current cycle is greater than 1 frame, determine adjacent frames with a time interval less than a preset time interval as continuous frames, and determine several continuous frames as a group of valid frame drawing data.

[0084] In an optional implementation, the vertical synchronization timestamp of the drawing frame includes a drawing start timestamp, a screen display timestamp and a drawing completion timestamp, and the frame rate calculation module is also used to: if the difference between the drawing completion timestamp and the drawing start timestamp of the drawing frame is greater than the vertical synchronization time interval, it is determined to be a dropped frame and optimization is performed.

[0085] In an optional embodiment, the fluency determination module is also used to: calculate the maximum stuttering parameter based on the maximum frame interval between each drawing frame; calculate the human eye visual persistence parameter based on the number of frames whose frame interval between each drawing frame is greater than the first time; calculate the game-level stuttering parameter based on the number of frames whose frame interval between each drawing frame is between the second time and the third time; the first time is greater than the third time and greater than the second time; calculate the video-level stuttering parameter based on the number of frames whose frame interval between each drawing frame is between the fourth time and the fifth time; the second time is greater than the fifth time and greater than the fourth time; assign weight values ​​to the frame rate data, the maximum stuttering parameter, the human eye visual persistence parameter, the game-level stuttering parameter and the video-level stuttering parameter, and calculate the fluency data.

[0086] In an optional embodiment, a visualization module is also included for establishing a two-dimensional coordinate system with the vertical synchronization time interval as the horizontal axis and the frame rate, smoothness data, total number of frames and maximum frame interval as the vertical axis to visualize the screen smoothness.

[0087] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0088] The fluency determination device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0089] The embodiment of the present invention also provides a computer device having the above Figure 5 The fluency determination device shown.

[0090] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0091] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0092] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0093] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0094] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0095] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0096] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0097] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0098] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for determining fluency, characterized in that: The method comprises: Circularly acquiring drawing frames of a specified layer in the screen at a specified time interval to obtain frame drawing data; the frame drawing data contains a vertical synchronization timestamp of each frame; Calculating frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame; Processing the frame rate data using a fluency determination model to obtain fluency data; the fluency determination model is a pre-established model for determining fluency; The using the fluency determination model to process the frame rate data to obtain the fluency data includes: According to the maximum frame interval between each drawing frame, the maximum jamming parameter is calculated; the maximum jamming parameter = 0.1 second / maximum frame interval; According to the number of frames whose frame intervals between the rendering frames are greater than the first time, a human eye visual persistence parameter is calculated; the human eye visual persistence parameter = 1 - the number of frames whose frame intervals in the valid frame rendering data are greater than the first time / the total number of frames; The game-level jamming parameter is calculated according to the number of frames whose frame intervals between the drawing frames are between the second time and the third time; the first time is greater than the third time and greater than the second time; the game-level jamming parameter = 1-the number of frames whose frame intervals in the valid frame drawing data are between the second time and the third time / the total number of frames; The video-level jamming parameter is calculated according to the number of frames whose frame intervals between the drawing frames are between the fourth time and the fifth time; the second time is greater than the fifth time and greater than the fourth time; the video-level jamming parameter = 1-the number of frames whose frame intervals in the valid frame drawing data are between the fourth time and the fifth time / the total number of frames; Set the target frame rate to calculate the frame rate target parameter. The frame rate target parameter = frame rate data / target frame rate. The maximum value is 1. The target frame rate is set according to the screen refresh rate. Weight values ​​are assigned to the frame rate data, maximum stuttering parameter, human eye visual persistence parameter, game-level stuttering parameter, and video-level stuttering parameter, and the smoothness data is calculated.

2. The method according to claim 1, characterized in that The method further comprises: Receiving and parsing a frame drawing file transmitted by a terminal device; the frame drawing file is frame drawing data in a text format; Alternatively, in response to the user's adb command, the terminal device is accessed to obtain the frame drawing data and display it in the command line window.

3. The method according to claim 2, characterized in that The calculating frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame includes: According to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame, the frame drawing data is screened and processed to obtain valid frame drawing data; The frame rate data is calculated according to the number of frames of valid frame drawing data and the time interval from the first frame to the last frame.

4. The method according to claim 3, characterized in that The screening and processing of the frame drawing data to obtain valid frame drawing data includes: If the number of frames included in the frame drawing data obtained in the current cycle is 1 frame, the frame drawing data is determined to be valid frame drawing data, and the current cycle is determined to be at full frame rate; If the number of frames included in the frame drawing data acquired in the current cycle is greater than 1 frame, adjacent frames whose time interval is less than a preset time interval are determined as continuous frames, and a plurality of continuous frames are determined as a group of valid frame drawing data.

5. The method according to claim 3, characterized in that: The vertical synchronization timestamp of the drawing frame includes a drawing start timestamp, a screen display timestamp and a drawing completion timestamp. The method further includes: If the difference between the drawing completion timestamp and the drawing start timestamp of the drawing frame is greater than the vertical synchronization time interval, it is determined to be a dropped frame and optimization is performed.

6. The method according to claim 1, characterized in that The method further comprises: A two-dimensional coordinate system is established with the vertical synchronization time interval as the horizontal axis and the frame rate, smoothness data, total number of frames and maximum frame interval as the vertical axes to visualize the screen smoothness.

7. A fluency determination device, characterized in that: The device comprises: A data acquisition module is used to cyclically acquire the drawing frames of a specified layer in the screen at a specified time interval to obtain frame drawing data; the frame drawing data contains a vertical synchronization timestamp of each frame; A frame rate calculation module, used to calculate frame rate data according to the frame number of the frame drawing data and the vertical synchronization timestamp of each frame; A fluency determination module, used to process the frame rate data using a fluency determination model to obtain fluency data; the fluency determination model is a pre-established model for determining fluency; The fluency determination module is also used for: According to the maximum frame interval between each drawing frame, the maximum jamming parameter is calculated; the maximum jamming parameter = 0.1 second / maximum frame interval; According to the number of frames whose frame intervals between the rendering frames are greater than the first time, a human eye visual persistence parameter is calculated; the human eye visual persistence parameter = 1 - the number of frames whose frame intervals in the valid frame rendering data are greater than the first time / the total number of frames; The game-level jamming parameter is calculated according to the number of frames whose frame intervals between the drawing frames are between the second time and the third time; the first time is greater than the third time and greater than the second time; the game-level jamming parameter = 1-the number of frames whose frame intervals in the valid frame drawing data are between the second time and the third time / the total number of frames; The video-level jamming parameter is calculated according to the number of frames whose frame intervals between the drawing frames are between the fourth time and the fifth time; the second time is greater than the fifth time and greater than the fourth time; the video-level jamming parameter = 1-the number of frames whose frame intervals in the valid frame drawing data are between the fourth time and the fifth time / the total number of frames; Set the target frame rate to calculate the frame rate target parameter. The frame rate target parameter = frame rate data / target frame rate. The maximum value is 1. The target frame rate is set according to the screen refresh rate. Weight values ​​are assigned to the frame rate data, maximum stuttering parameter, human eye visual persistence parameter, game-level stuttering parameter, and video-level stuttering parameter, and the smoothness data is calculated.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fluency determination method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the fluency determination method according to any one of claims 1 to 6.