Frame rate processing method and device based on Android system, equipment and medium

By setting up preprocessing and detection modules in the Android system, parsing layer and periodic information, calculating frame rate, and generating frame rate distribution curves, the problem of insufficient frame rate refinement in existing technologies is solved, and refined frame rate statistics and system performance optimization are achieved.

CN121704795BActive Publication Date: 2026-08-25ALLWINNER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411301705.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2026-08-25
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

The existing Android system has a problem with low precision when calculating the display frame rate. It cannot accurately count the distribution and fluctuation of the number of frames within one second, resulting in an insufficiently precise display frame rate.

Method used

By setting up preprocessing and detection modules in the Android system, the system version information is identified, layer and period information is parsed, frame information is obtained, statistical frame rate and real-time frame rate are calculated, and frame rate distribution curves are generated. It supports interval statistics and dynamic real-time frame rate, and realizes frame count analysis and positioning and security and confidentiality measures.

Benefits of technology

It improves the precision of the display frame rate, enabling real-time statistics of the frame start time and frame rate within each layer window, reducing image tearing and misalignment, optimizing system performance, and ensuring smooth playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121704795B_ABST
    Figure CN121704795B_ABST
Patent Text Reader

Abstract

The application provides a frame rate processing method based on an Android system, which comprises the following steps: a preprocessing module identifies version information of the current Android system; input parameters are input into the preprocessing module, the preprocessing module analyzes the input parameters, obtains multiple first layers and cycle information of the Android system, and inputs the multiple first layers and the cycle information into a display manager; the display manager is adaptive to different graphic composition managers of the Android system, and obtains layer information of the Android system; the input parameters, the cycle information and the layer information are input into a detection module, the detection module obtains frame information of specified or all first layers, and calculates and counts frame rates and real-time frame rates. According to the technical scheme of the embodiment, display and drawing arrays are distinguished, a time point of finally being displayed on a screen is taken as a frame number representative, a first time stamp of each layer is analyzed in the form of multiple layers, interval statistics and dynamic real-time frame rates are supported, analysis positioning of the frame number is realized, and security and secrecy measures are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of frame rate detection technology, and in particular to a frame rate processing method, apparatus, device and medium based on the Android system. Background Technology

[0002] In existing technologies, since GPU rendering on the display path is an asynchronous pipeline behavior, the performance of rendering and compositing is affected by factors such as the different content being rendered and the current Android system load. Therefore, the calculation of display frame rate is not entirely accurate. At the same time, the frame rate statistics simply show how many frames are in one second, without refining the distribution and fluctuation of the frame rate within one second, resulting in a low level of refinement in display frame rate. Summary of the Invention

[0003] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a frame rate processing method, apparatus, device, and medium based on the Android system, which can statistically display the frame start time and frame rate within each layer window period in real time, thereby improving the fineness of the displayed frame rate.

[0004] In a first aspect, embodiments of the present invention provide a frame rate processing method based on an Android system, applied in a display frame rate acquisition device. The display frame rate acquisition device includes a preprocessing module and a detection module, the preprocessing module and the detection module being connected. The preprocessing module is configured with a display manager and a graphics composition manager. The method includes:

[0005] The preprocessing module identifies the version information of the current Android system;

[0006] The input parameters are input to the preprocessing module so that the preprocessing module can parse the input parameters to obtain multiple first layers and periodic information of the Android system;

[0007] The version information and multiple first layers are input to the display manager, so that the display manager adapts to different graphics composition managers of the Android system according to the version information and multiple first layers to obtain the layer information of the Android system;

[0008] The input parameters, period information, and layer information are input to the detection module so that the detection module can obtain frame information of a specified or all first layers;

[0009] The detection module calculates the statistical frame rate and real-time frame rate based on the frame information.

[0010] In some embodiments of the present invention, the detection module is provided with a frame information acquisition unit and a frame rate calculation unit. The detection module acquires frame information of a specified or all first layers, including:

[0011] The frame start time, timing count, and frame arrival time on the display device are obtained from the layer information.

[0012] Based on the periodic information, the frame start time, the timing count, and the time the frame arrives at the display device, the statistical frame rate and real-time frame rate of the first layer are calculated.

[0013] In some embodiments of the present invention, calculating the statistical frame rate and real-time frame rate of the first layer includes:

[0014] The statistical frame rate is calculated based on the ratio of the number of displays to the interval duration.

[0015] The real-time frame rate is calculated based on the ratio of the frame start time to the frame arrival time on the display device.

[0016] In some embodiments of the present invention, the display frame rate acquisition device is further provided with a security control module, and after the detection module calculates the statistical frame rate and real-time frame rate based on the frame information, the method further includes:

[0017] Obtain the first timestamp of the statistical frame rate, and organize multiple first timestamps into a frame rate distribution curve;

[0018] The security management module obtains the encryption status of the first layer and the frame rate distribution curve, wherein the first layer and the frame rate distribution curve are both input into the security management module in the form of a script;

[0019] When the first layer and the frame rate distribution curve are in an unencrypted state, they are directly pushed to the target device;

[0020] When the first layer and the frame rate distribution curve are in an encrypted state, the root privileges of the target device are obtained, and the first layer and the frame rate distribution curve are input into the target device according to the root privileges, so that the development kit of the target device can perform operations on the first layer and the frame rate distribution curve.

[0021] In some embodiments of the present invention, obtaining the layer information of the Android system includes:

[0022] Obtain the second layer carrying the refresh display from the first layer, and the second timestamp displayed on the device screen according to the period information;

[0023] Get the layer name and layer order value of the second layer;

[0024] The display manager extracts the second layer based on the layer name and the layer order value, and records the second timestamp.

[0025] In some embodiments of the present invention, after calculating the statistical frame rate and real-time frame rate of the first layer, the method further includes:

[0026] Get the layer to be updated in the first layer or a single layer;

[0027] Based on the periodic information, determine whether to calculate the statistical frame rate or the real-time frame rate;

[0028] Obtain the first output value of the statistical frame rate and the second output value of the real-time frame rate, and save the first output value or the second output value to a file or output it to the terminal.

[0029] In some embodiments of the present invention, after the detection module acquires frame information of a specified or all first layers, the method further includes:

[0030] The frame buffer and image storage area of ​​the first layer are determined based on the frame information, wherein the frame buffer is provided with multiple Fence signal timestamps;

[0031] When the display device retrieves the image storage area, the image storage area of ​​the first layer is updated to the current Fence signal timestamp time according to the frame rate of the screen displayed on the display device.

[0032] Secondly, embodiments of the present invention provide a display frame rate acquisition device based on an Android system, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the frame rate processing method based on the Android system as described in the first aspect above.

[0033] Thirdly, embodiments of the present invention provide an electronic device including a display frame rate acquisition device based on the Android system as described in the second aspect above.

[0034] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the frame rate processing method based on the Android system as described in the first aspect above.

[0035] The frame rate processing method based on the Android system according to embodiments of the present invention has at least the following beneficial effects:

[0036] The preprocessing module identifies the current Android system version information; input parameters are input into the preprocessing module so that it can parse the input parameters to obtain multiple first layers and periodic information of the Android system; the version information and multiple first layers are input into the display manager so that the display manager can adapt to different graphics composition managers of the Android system according to the version information and multiple first layers to obtain the layer information of the Android system; the input parameters, periodic information, and layer information are input into the detection module so that the detection module can obtain the frame information of a specified or all first layers; the detection module calculates the statistical frame rate and real-time frame rate based on the frame information. According to the technical solution of this embodiment, the frame rate is counted in the form of system layers, while distinguishing between display and drawing arrays. The time point of final display on the screen is used as the frame number representative. The first timestamp of each layer is parsed in the form of multiple layers. The frame rate is displayed by counting and timing, and interval statistics and dynamic real-time frame rate are supported, thereby realizing frame number analysis and positioning as well as security and confidentiality measures. Attached Figure Description

[0037] Figure 1 This is a flowchart of a frame rate processing method based on the Android system provided in an embodiment of the present invention;

[0038] Figure 2 This is a flowchart of a detection module that calculates statistical frame rate and real-time frame rate based on the frame information, according to an embodiment of the present invention;

[0039] Figure 3 This is a flowchart of calculating the statistical frame rate and real-time frame rate of the first layer according to an embodiment of the present invention;

[0040] Figure 4 This is a flowchart of the detection module calculating the statistical frame rate and real-time frame rate based on frame information, according to one embodiment of the present invention;

[0041] Figure 5 This is a flowchart of obtaining layer information of an Android system provided in one embodiment of the present invention;

[0042] Figure 6 This is a flowchart of the calculation of the statistical frame rate and real-time frame rate of the first layer provided in one embodiment of the present invention;

[0043] Figure 7 This is a flowchart provided by an embodiment of the present invention after the detection module obtains frame information of a specified or all first layers;

[0044] Figure 8 This is a structural diagram of a display frame rate acquisition device based on the Android system provided in another embodiment of the present invention. Detailed Implementation

[0045] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0046] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0047] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0048] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0049] This invention provides a frame rate processing method based on the Android system, applied in a display frame rate acquisition device. The display frame rate acquisition device includes a preprocessing module and a detection module, which are connected. The preprocessing module is equipped with a display manager and a graphics composition manager. The method includes: the preprocessing module identifying the version information of the current Android system; inputting input parameters into the preprocessing module to parse the input parameters and obtain the first layer of the Android system; inputting the version information and the first layer into the display manager to adapt to different graphics composition managers of the Android system according to the version information and the first layer, thereby obtaining the layer information of the Android system; inputting the period information and layer information of the input parameters into the detection module to obtain the frame information of a specified or all first layers; the detection module obtaining the cumulative frame count and time elapsed based on the frame information, and calculating the frame rate based on the cumulative frame count and time elapsed; and the detection module obtaining multiple first timestamps of the frame rate and organizing the multiple first timestamps into a frame rate distribution curve. According to the technical solution of this embodiment, the frame rate is counted in the form of system layers, while distinguishing between display and drawing arrays. The time point when the frame rate is finally displayed on the screen is used as the frame number representative. The first timestamp of each layer is parsed in the form of multiple layers. The frame rate is displayed in a time-counting and counting display method. It also supports interval statistics and dynamic real-time frame rate, and generates a frame rate distribution curve to realize the analysis and positioning of frame number and security and confidentiality measures.

[0050] The control method of the present invention will be further described below with reference to the accompanying drawings.

[0051] Reference Figure 1 , Figure 1 A flowchart of a frame rate processing method based on the Android system provided in this embodiment of the invention. The frame rate processing method based on the Android system includes, but is not limited to, the following steps:

[0052] Step S11: The preprocessing module identifies the version information of the current Android system;

[0053] It should be noted that when the preprocessing module obtains the Android system version information, it adjusts the frame rate processing strategy of the display frame rate acquisition device according to the characteristics and limitations of the version information. When the display frame rate acquisition device encounters frame rate-related problems, it corrects and adjusts them using the Android system version information.

[0054] Step S12: Input parameters are input into the preprocessing module so that the preprocessing module can parse the input parameters and obtain multiple first layers of the Android system;

[0055] It should be noted that the preprocessing module parses the input parameters, and the display frame rate acquisition device determines whether to detect a single layer or the entire system layer based on the input parameters, and sets the window period to be detected and whether the detection information is output to the terminal or saved to a file.

[0056] Furthermore, when the display frame rate acquisition device is running, it detects, waits, reads, and parses the output parameters, and sets them according to the parsed input parameters; when the display frame rate acquisition device does not acquire input parameters, it uses the default values ​​to process the Android system.

[0057] Step S13: Input the version information and multiple first layers into the display manager so that the display manager can adapt to the different graphics composition managers of the Android system according to the version information and the first layers, and obtain the layer information of the Android system.

[0058] It should be noted that the display manager uses version information and multiple first layers to enable the preprocessing module to adapt to different graphics composition managers in the Android system, so that the correct layer information can be extracted according to the input parameters. The layer information includes, but is not limited to, the layer name and the layer order value, which are used to identify the actual upper and lower layer positions of multiple first layers.

[0059] Step S14: Input parameters, periodic information and layer information are input to the detection module so that the detection module can obtain frame information of a specified or all first layers;

[0060] It should be noted that the display frame rate acquisition device can acquire or specify the frame information of all layers according to the input information and the recorded layer information, based on the periodic information. By precisely controlling the frame rate of the first layer and the system layer and the actual frame rate based on the input information, it reduces image tearing and layer misalignment caused by layer frame rate mismatch. In addition, by acquiring or specifying the frame information of all first layers, it can effectively reduce the time and resource consumption required for the system to process layers while ensuring image clarity. Furthermore, the time interval before and after acquiring frame information is positively correlated with the actual time interval of the Android system display device.

[0061] In step S15, the detection module calculates the statistical frame rate and real-time frame rate based on the frame information.

[0062] It should be noted that by calculating and analyzing the frame rate and real-time frame rate, performance bottlenecks in the Android system can be identified and optimized in a timely manner, ensuring smooth playback on Android display devices, and allocating computing resources reasonably to avoid latency and stuttering.

[0063] It should be noted that by accurately obtaining the actual display frame rate used on the display device, and utilizing the time point of the present / draw fence singal in the asynchronous pipeline of the graphics buffer as the precise moment for statistical drawing / display frame rate (i.e., real-time frame rate), the display frame rate is defined and detected separately by layer (i.e., statistical frame rate). By hierarchically decomposing the application drawing-compositing series of actions in the form of layers from the display perspective, the focus is on the display frame rate seen on the screen by the end user, while also being able to see the actual drawn frame rate, thereby enabling frame count analysis and positioning, as well as security and confidentiality measures.

[0064] Additionally, in one embodiment, reference is made to Figure 2 ,exist Figure 1 Step S14 of the illustrated embodiment also includes, but is not limited to, the following steps:

[0065] Step S21: The frame information acquisition unit acquires the frame start time, timing count, and frame arrival time of the layer information;

[0066] In step S22, the frame rate calculation unit calculates the statistical frame rate and real-time frame rate of the first layer based on the period information, frame start time, timing count, and the time when the frame arrives at the display device.

[0067] It should be noted that, based on the input parameters and periodic information, the frame information of all layers is obtained or specified. Since the Linux sleep interval has errors due to scheduling wake-up, it affects the accuracy of frame rate statistics. Therefore, the time interval for obtaining frame information needs to take into account the time interval between the screen display frame rate and the real-time drawing frame rate. By obtaining the frame start time, timer count, the time point when the frame arrives at the display device, the time point when the frame is drawn, the number of times it is displayed, and the interval duration, the statistical frame rate and real-time frame rate are calculated according to actual needs.

[0068] Furthermore, based on the target layer in the preparation stage, the period information is obtained through dumpsys SurfaceFlinger --latency, and the layer frame information is parsed to obtain the frame start time within the period, as well as the present fence signal time marker actualPresentTime for each subsequent frame, count the number of present frames, the draw fence signal time marker frameReadyTime (i.e., timing count), and the time point when the frame arrives at the display device, count the number of frames drawn, and complete the acquisition of the first layer frame information.

[0069] Additionally, in one embodiment, reference is made to Figure 3 ,exist Figure 2 Step S22 of the illustrated embodiment also includes, but is not limited to, the following steps:

[0070] Step S31: Calculate the statistical frame rate based on the ratio of the number of displays to the interval duration;

[0071] Step S32: Calculate the real-time frame rate based on the ratio of the frame start time to the frame arrival time on the display device.

[0072] It should be noted that the statistical frame rate is the actual duration of frame information within one cycle, where frame rate = number of displays / interval duration; the real-time frame rate is the timer starting from the first frame in one cycle until the timer ends at the last frame in the cycle, where real-time frame rate = number of frames / duration. By calculating the statistical frame rate and the real-time frame rate, the smoothness changes of video or animation in the Android system are reflected. The calculated statistical frame rate and real-time frame rate are then organized into a frame rate distribution curve. The stability of the frame rate distribution curve is used to determine whether the current performance bottleneck is in the compositing stage, thereby ensuring the analysis and localization of frame rate.

[0073] Additionally, in one embodiment, reference is made to Figure 4 ,exist Figure 1 Following step S16 in the illustrated embodiment, the following steps are included, but are not limited to:

[0074] Step S41: Obtain the first timestamp of the statistical frame rate, and organize multiple first timestamps into a frame rate distribution curve;

[0075] Step S42: The security management module obtains the encryption status of the first layer and the frame rate distribution curve. The first layer and the frame rate distribution curve are both input into the security management module in the form of a script.

[0076] Step S43: When the first layer and frame rate distribution curve are in an unencrypted state, they are directly pushed to the target device;

[0077] Step S44: When the first layer and frame rate distribution curve are in an encrypted state, obtain root privileges for the target device. The first layer and frame rate distribution curve are input into the target device according to the root privileges, so that the target device's development toolkit can perform operations on the first layer and frame rate distribution curve.

[0078] It should be noted that both the preprocessing module's processing method and the detection module's detection method exist in the form of scripts. When the first layer and frame rate distribution curve of the display frame rate acquisition device are in an unencrypted state, they can be pushed to the target device. The target device can run normally regardless of whether it has root privileges, thus enhancing versatility. Furthermore, when the first layer and frame rate distribution curve are in an encrypted state, the security management module encrypts and compresses them (gzexe) into plaintext, and then integrates them into the Android system SDK. The security management module can only run normally on the target device's ADB terminal to acquire the frame rate if it has root privileges, thus ensuring security and confidentiality.

[0079] Additionally, in one embodiment, reference is made to Figure 5 ,exist Figure 1 Step S14 of the illustrated embodiment also includes, but is not limited to, the following steps:

[0080] Step S51: Obtain the second layer carrying the refresh display from the first layer, and the second timestamp displayed on the device screen according to the period information;

[0081] Step S52: Obtain the layer name and layer order value of the second layer;

[0082] In step S53, the display manager extracts the second layer based on the layer name and layer order value, and records the second timestamp.

[0083] It should be noted that by obtaining the second layer in the first layer that carries the information about the refreshed display, as well as the new display values ​​of the display device within a certain period of time and the second timestamp information of the completed drawing, and by pre-acquiring and storing the layer name and order value, the Android system can quickly locate and operate on specific layers, reducing the search time in multiple first layers. Furthermore, using a unique layer name and order value can ensure accurate referencing and operation of the correct layer. In addition, the second timestamp of the display device is displayed with periodic information. By recording the second timestamp of accessing or modifying the layer, the usage status of the layer can be provided.

[0084] Furthermore, the preprocessing module completes the adaptation of layer information in different display managers of the Android system version. The layer information includes the layer name and the layer order value. Based on the layer name and the layer order value, the second layer carrying the refresh display is extracted, thereby completing the matching of the second timestamp with the second layer.

[0085] Additionally, in one embodiment, reference is made to Figure 6 ,exist Figure 2 Following step S22 in the illustrated embodiment, the following steps are included, but are not limited to:

[0086] Step S61: Obtain the layer to be updated in the first layer or specify a single layer;

[0087] Step S62: Based on the period information, determine whether to calculate the statistical frame rate or the real-time frame rate.

[0088] Step S63: Obtain the first output value of the statistical frame rate and the second output value of the real-time frame rate, and save the first output value or the second output value to a file or output it to the terminal.

[0089] It should be noted that, based on different input parameters, all layers to be updated in the first layer are obtained, or the frame rate of a single layer is specified. Depending on the detection period, it is determined whether to obtain statistical frame rate or real-time frame rate. When obtaining statistical frame rate, the first output value of statistical frame rate is obtained; when obtaining real-time frame rate, the second output value of real-time frame rate is obtained. After confirming the first and / or second output values, it is determined whether to save the first and / or second output values ​​to a file or output them to the terminal device.

[0090] Furthermore, the display frame rate acquisition device detects, waits, reads, and parses the user's input parameters, and then sets the above options according to the parsed input parameters. If there is no additional input, the default value is used.

[0091] Additionally, in one embodiment, reference is made to Figure 7 ,exist Figure 1 Following step S14 in the illustrated embodiment, the following steps are included, but are not limited to:

[0092] Step S71: Determine the frame buffer and image storage area of ​​the first layer based on the frame information. The frame buffer is set with multiple Fence signal timestamps.

[0093] Step S72: When the display device retrieves the image storage area, the image storage area of ​​the first layer is updated to the current Fence signal timestamp time according to the frame rate of the screen displayed in front of the display device.

[0094] It should be noted that when the display frame rate acquisition device captures the actual frame rate displayed by the device, it determines the frame buffer and image storage area of ​​the first layer based on the frame information, as well as the multiple Fencesignal timestamps set in the frame buffer, and then updates the Fence signal timestamp. Specifically, the display frame rate acquisition device acquires the Fence signal timestamp of the display buffer, and only updates the Fence signal timestamp when that frame of the image buffer is finally to be used by the LCD screen.

[0095] like Figure 8 As shown, Figure 8 This is a structural diagram of a frame rate processing device for an Android system provided in one embodiment of the present invention. The present invention also provides a frame rate processing device for an Android system, comprising:

[0096] The processor 801 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0097] The memory 802 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 802 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 802 and is called and executed by the processor 801 using the frame rate processing method of the Android system in the embodiments of this application.

[0098] The 803 input / output interface is used to implement information input and output.

[0099] The communication interface 804 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0100] Bus 805 transmits information between various components of the device (e.g., processor 801, memory 802, input / output interface 803, and communication interface 804);

[0101] The processor 801, memory 802, input / output interface 803, and communication interface 804 are connected to each other within the device via bus 805.

[0102] This application also provides an electronic device, including a frame rate processing device for the Android system as described above.

[0103] This application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the frame rate processing method of the Android system described above.

[0104] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0105] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0106] The above provides a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A frame rate processing method based on the Android system, characterized in that, The method is applied in a display frame rate acquisition device, which includes a preprocessing module and a detection module connected to each other. The preprocessing module includes a display manager and a graphics composition manager. The preprocessing module identifies the version information of the current Android system; The input parameters are input to the preprocessing module so that the preprocessing module can parse the input parameters to obtain multiple first layers and periodic information of the Android system; The version information and multiple first layers are input to the display manager, so that the display manager adapts to different graphics composition managers of the Android system according to the version information and multiple first layers to obtain the layer information of the Android system; The input parameters, period information, and layer information are input to the detection module so that the detection module can obtain frame information of a specified or all first layers; The detection module calculates the statistical frame rate and real-time frame rate based on the frame information; The display frame rate acquisition device is further equipped with a security control module. After the detection module calculates and statistically analyzes the frame rate and real-time frame rate based on the frame information, the method further includes: Obtain the first timestamp of the statistical frame rate, and organize multiple first timestamps into a frame rate distribution curve; The security management module obtains the encryption status of the first layer and the frame rate distribution curve, wherein the first layer and the frame rate distribution curve are both input into the security management module in the form of a script; When the first layer and the frame rate distribution curve are in an unencrypted state, they are directly pushed to the target device; When the first layer and the frame rate distribution curve are in an encrypted state, the root privileges of the target device are obtained, and the first layer and the frame rate distribution curve are input into the target device according to the root privileges, so that the development kit of the target device can perform operations on the first layer and the frame rate distribution curve.

2. The frame rate processing method based on the Android system according to claim 1, characterized in that, The detection module calculates the statistical frame rate and real-time frame rate based on the frame information, including: The layer information includes the frame start time, timer count, frame arrival time on the display device, frame completion time, display count, and interval duration. Based on the periodic information, the frame start time, the timing count, the time the frame arrives at the display device, the time the frame is completed, the number of displays, and the interval duration, calculate the statistical frame rate and real-time frame rate of the first layer.

3. The frame rate processing method based on the Android system according to claim 2, characterized in that, The calculation of the statistical frame rate and real-time frame rate of the first layer includes: The statistical frame rate is calculated based on the ratio of the number of displays to the interval duration. The real-time frame rate is calculated based on the ratio of the frame start time to the frame arrival time on the display device.

4. The frame rate processing method based on the Android system according to claim 1, characterized in that, Obtaining the layer information of the Android system includes: Obtain the second layer carrying the refresh display from the first layer, and the second timestamp displayed on the device screen according to the period information; Get the layer name and layer order value of the second layer; The display manager extracts the second layer based on the layer name and the layer order value, and records the second timestamp.

5. The frame rate processing method based on the Android system according to claim 2, characterized in that, After calculating the statistical frame rate and real-time frame rate of the first layer, the method further includes: Get the layer to be updated in the first layer or a single layer; Based on the periodic information, determine whether to calculate the statistical frame rate or the real-time frame rate; Obtain the first output value of the statistical frame rate and the second output value of the real-time frame rate, and save the first output value or the second output value to a file or output it to the terminal.

6. The frame rate processing method based on the Android system according to claim 1, characterized in that, After the detection module acquires frame information of a specified or all first layers, the method further includes: The frame buffer and image storage area of ​​the first layer are determined based on the frame information, wherein the frame buffer is provided with multiple Fence signal timestamps; When the display device retrieves the image storage area, the image storage area of ​​the first layer is updated to the current Fence signal timestamp time according to the frame rate of the screen displayed on the display device.

7. A display frame rate acquisition device based on the Android system, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform the frame rate processing method based on the Android system as described in any one of claims 1 to 6.

8. An electronic device, characterized in that, Includes the display frame rate acquisition device based on the Android system as described in claim 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the frame rate processing method based on the Android system as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for acquiring frame rate through Android debugging bridge command and computer readable storage medium

    CN115982020A

  • Smooth determination method and device, computer equipment and storage medium

    CN117950927A