Display signal prediction method and device, electronic equipment and storage medium

By acquiring the virtual synchronization signal prediction model to handle the frequency switching of display content, the inaccurate display signal prediction problem caused by resetting and reconstruction of the Vsync model in the prior art is solved, and more efficient and accurate display signal prediction is achieved.

CN119937954APending Publication Date: 2025-05-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311460878.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

When switching screens with different refresh rates, the Vsync model needs to be reset and reconstructed in the prior art, resulting in the calculated Vsync time being deviated from the ideal value, affecting the accuracy of display signal prediction.

Method used

By switching from the first frequency to the second frequency in response to the operating system updating the frequency of the displayed content, the second frequency is detected to have an association relationship with the first frequency, a designated virtual synchronization signal prediction model is obtained, and based on the model, the time when the image is started to be drawn when the displayed content is updated at the second frequency is determined.

Benefits of technology

It avoids building corresponding synchronous signal prediction models for display contents of different update frequencies, and improves the accuracy and efficiency of display signal prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119937954A_ABST
    Figure CN119937954A_ABST
Patent Text Reader

Abstract

The invention discloses a display signal prediction method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to the frequency of updating display content by an operating system, switching from a first frequency to a second frequency, and detecting that the second frequency and the first frequency have an association relationship, obtaining a specified virtual synchronization signal prediction model; and based on the virtual synchronization signal prediction model, determining the moment of starting to draw the image when the display content is updated at the second frequency. According to the method, under the condition that the frequency of updating the display content by the system is switched, the moment when the image starts to be drawn when the display content is updated at the second frequency is predicted through the specified virtual synchronization signal prediction model, so that the situation that corresponding synchronization signal prediction models are constructed for the display contents with different updating frequencies can be avoided; therefore, the accuracy and efficiency of display signal prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and more specifically, to a display signal prediction method, device, electronic device and storage medium. Background Art

[0002] The screen refresh process is from left to right (row refresh, horizontal refresh, Horizontal Scanning) and from top to bottom (screen refresh, vertical refresh, Vertical Scanning) for each line. When the entire screen is refreshed, that is, a vertical refresh cycle is completed, there will be a short blank period, at which time a VSync signal is sent. According to the signal, a suitable strategy can be selected to complete the screen refresh to avoid the mismatch between data refresh and screen scanning (tearing). However, the current synchronous refresh mechanism is prone to affect the accuracy of display signal prediction. Summary of the invention

[0003] The present application proposes a display signal prediction method, device, electronic device and storage medium to improve the above-mentioned problems.

[0004] In a first aspect, an embodiment of the present application provides a display signal prediction method that can be applied to an electronic device, wherein the electronic device includes an operating system, and the method includes: in response to the operating system updating a frequency of display content switching from a first frequency to a second frequency, and detecting that the second frequency has an associated relationship with the first frequency, obtaining a specified virtual synchronization signal prediction model; based on the virtual synchronization signal prediction model, determining the moment to start drawing an image when the display content is updated at the second frequency.

[0005] In a second aspect, an embodiment of the present application provides a display signal prediction device that can run on an electronic device, wherein the electronic device includes an operating system, and the device includes: a signal prediction model acquisition module, which is used to obtain a specified virtual synchronization signal prediction model in response to the operating system updating the display content frequency from a first frequency to a second frequency, and detecting that the second frequency has an associated relationship with the first frequency; and a display signal prediction module, which is used to determine, based on the virtual synchronization signal prediction model, the moment to start drawing an image when the display content is updated at the second frequency.

[0006] In a third aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method of the first aspect above.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium having program code stored therein, wherein the method of the first aspect is executed when the program code is run.

[0008] The present application provides a display signal prediction method, device, electronic device and storage medium. The method obtains a specified virtual synchronization signal prediction model in response to the operating system switching the frequency of updating the display content from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency; based on the virtual synchronization signal prediction model, determines the moment when the image is started to be drawn when the display content is updated with the second frequency. Thus, in the above manner, when the frequency of the system updating the display content switches, the moment when the image is started to be drawn when the display content is updated with the second frequency is predicted by the specified virtual synchronization signal prediction model, which can avoid constructing corresponding synchronization signal prediction models for display contents with different update frequencies, thereby improving the accuracy and efficiency of display signal prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A flow chart of a display signal prediction method provided by an embodiment of the present application is shown.

[0011] Figure 2 A flow chart of a display signal prediction method provided by another embodiment of the present application is shown.

[0012] Figure 3 A flowchart of a display signal prediction method provided by yet another embodiment of the present application is shown.

[0013] Figure 4 A structural block diagram of a display signal prediction device provided in an embodiment of the present application is shown.

[0014] Figure 5 A structural block diagram of an electronic device provided in an embodiment of the present application is shown.

[0015] Figure 6 A storage unit for storing or carrying a program code for implementing a display signal prediction method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0017] The screen refresh process is from left to right (row refresh, horizontal refresh, Horizontal Scanning) and from top to bottom (screen refresh, vertical refresh, Vertical Scanning) for each line. When the entire screen is refreshed, that is, a vertical refresh cycle is completed, there will be a short blank period, at which time a VSync signal is sent. According to the signal, a suitable strategy can be selected to complete the refresh of the screen to avoid the mismatch between data refresh and screen scanning (tearing). However, when switching between screens with different refresh frequencies, the current technology needs to reset and rebuild the Vsync model, which easily causes the calculated Vsync time to deviate from the ideal value, affecting the accuracy of the display signal prediction.

[0018] After long-term research, the inventors found that the specified virtual synchronization signal prediction model can be obtained by responding to the operating system switching the frequency of updating the display content from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency; based on the virtual synchronization signal prediction model, the moment when the image is started to be drawn when the display content is updated with the second frequency is determined. Thus, in the above manner, when the frequency of the system updating the display content is switched, the moment when the image is started to be drawn when the display content is updated with the second frequency can be predicted by the specified virtual synchronization signal prediction model, which can avoid constructing corresponding synchronization signal prediction models for display content with different update frequencies, thereby improving the accuracy and efficiency of display signal prediction.

[0019] Therefore, in order to improve the above problems, the inventor proposed the display signal prediction method, electronic device and computer-readable storage medium provided in the present application, which can avoid constructing corresponding synchronization signal prediction models for display contents with different update frequencies, thereby improving the accuracy and efficiency of display signal prediction.

[0020] In order to facilitate a better understanding of the solutions described in the embodiments of the present application, the relevant terms involved in the embodiments of the present application are briefly described below.

[0021] LTPO (Low-temperature Poly-Crystalline Silicon and Oxide): low-temperature polycrystalline silicon and oxide.

[0022] Vsync model (A mathematical model for predicting hardware TE signals by Android display framework): A mathematical model used by the Android display framework to predict hardware TE signals.

[0023] HW Vsync (Hardware Vsyunc): The synchronization signal provided by the display hardware.

[0024] TE: screen vertical synchronization signal.

[0025] DisplayMode (Android display FrameWork encapsulates different framerates into different display modes in the framework): Android display framework encapsulates different frame rates into different display modes at the FrameWork layer.

[0026] Linear regression equation: One of the statistical analysis methods that uses regression analysis in mathematical statistics to determine the quantitative relationship between two or more variables that are interdependent. Linear regression is also the first type of regression analysis that has been rigorously studied and widely used in practical applications. According to the number of independent variables, it can be divided into univariate linear regression analysis equation and multivariate linear regression analysis equation.

[0027] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0028] See also Figure 1 , showing a flow chart of a display signal prediction method provided by an embodiment of the present application, this embodiment provides a display signal prediction method, which can be applied to an electronic device, wherein the electronic device includes an operating system, and the specific type of the operating system may not be limited. In one embodiment, the electronic device may be a server, and the server may be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms; in another embodiment, the electronic device may be a mobile phone, a computer, a tablet or a wearable electronic device, and the specific type of the electronic device may not be limited. The method comprises:

[0029] Step S110: In response to the operating system switching the frequency of updating the display content from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency, obtaining a specified virtual synchronization signal prediction model.

[0030] The frequency of the system updating the displayed content can be understood as the time interval for the system to display different frames (here, the number of different frames is two or more). For example, if the time interval for the system to display two frames is 5 seconds, then the frequency (or frame rate) of the system updating the displayed content can be considered to be 5 seconds per frame.

[0031] In this embodiment, the first frequency and the second frequency are frequencies with different values. The association between the second frequency and the first frequency indicates that the second frequency and the first frequency have a common multiple.

[0032] As an implementation method, the display content can be understood as the content to be displayed, and the display content includes multiple frames of images. The type of display content may not be limited, and may be any data that needs to be displayed through a display screen, such as video data, application data, system data, etc. Since the display content is composed of many frames, and different frames may be updated at different frequencies, the frequency of updating the display content may be switched during the display of the display content. When the system generally initiates the action of switching the frequency of updating the display content in the prior art, the Vsync model must perform model clearing and model reconstruction operations, which may cause the Vsync time calculated at the first few frames of the switching frequency to deviate from the ideal value, thereby causing the Vsync time to deviate from the actual TE offset.

[0033] In the implementation manner of the present application, the virtual synchronization signal prediction model includes a virtual Vsync model. As an implementation manner for optimizing the above-mentioned problem, in response to the operating system updating the display content frequency switching from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency, the present implementation manner can obtain a specified virtual synchronization signal prediction model, where the specified virtual synchronization signal prediction model represents both a virtual synchronization signal prediction model corresponding to the first frequency and a virtual synchronization signal prediction model corresponding to the second frequency. The specified virtual synchronization signal prediction model can be pre-constructed so that when there is a frequency switching for updating the display content, the fixed virtual synchronization signal prediction model can be used to directly predict the moment of starting to draw the image for the content to be displayed.

[0034] As an implementation manner, it is possible to determine whether the second frequency is associated with the first frequency by comparing the numerical values ​​of the first frequency and the second frequency.

[0035] Step S120: Based on the virtual synchronization signal prediction model, determine the time to start drawing the image when updating the display content at the second frequency.

[0036] As a method, the time to start drawing the image when the display content is updated at the second frequency may be determined directly based on the virtual synchronization signal prediction model, that is, the time to start drawing the next frame of image may be predicted.

[0037] By unifying the virtual synchronization signal prediction models corresponding to different frequencies of updating the display content with common multiples, when the frequency of the system updating the display content switches, the unified virtual synchronization signal prediction model can be directly called to predict the moment when starting to draw the image when the display content is updated, thereby saving the time of resetting and rebuilding the Vsync model for each different frequency of updating the display content, thereby improving the efficiency of display signal prediction.

[0038] The display signal prediction method provided in this embodiment obtains a specified virtual synchronization signal prediction model in response to the operating system switching the frequency of updating the display content from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency; based on the virtual synchronization signal prediction model, determines the moment of starting to draw the image when the display content is updated with the second frequency. Thus, in the above manner, when the frequency of the system updating the display content switches, the moment of starting to draw the image when the display content is updated with the second frequency is predicted by the specified virtual synchronization signal prediction model, which can avoid constructing corresponding synchronization signal prediction models for display contents with different update frequencies, thereby improving the accuracy and efficiency of display signal prediction.

[0039] See also Figure 2 , shows a flow chart of a display signal prediction method provided by another embodiment of the present application, this embodiment provides a display signal prediction method, which can be applied to an electronic device, the electronic device includes an operating system, based on the content described in the previous embodiment, this embodiment will describe in detail how to obtain a virtual synchronization signal prediction model corresponding to the second frequency. The method includes:

[0040] Step S210: In response to the operating system updating the frequency of the displayed content, the frequency is switched from the first frequency to the second frequency.

[0041] The specific implementation of step S210 may refer to the relevant description in step S110 and will not be repeated here.

[0042] Step S221: if it is detected that the second frequency is associated with the first frequency, a specified virtual synchronization signal prediction model is obtained.

[0043] As an implementation mode, in response to the operating system updating the display content frequency switching from a first frequency to a second frequency, it is possible to detect whether the second frequency has an associated relationship with the first frequency. Optionally, if it is detected that the second frequency has an associated relationship with the first frequency, the specified virtual synchronization signal prediction model can be directly obtained to predict the moment when the subsequent screen starts to be displayed.

[0044] Step S222: Based on the virtual synchronization signal prediction model, determine the time to start drawing the image when updating the display content at the second frequency.

[0045] The specific implementation of step S222 may refer to the relevant description in step S120 and will not be repeated here.

[0046] Step S231: If it is not detected that the second frequency has an association relationship with the first frequency, a virtual synchronization signal prediction model corresponding to the second frequency is obtained.

[0047] Optionally, if it is not detected that the second frequency has an association with the first frequency, a virtual synchronization signal prediction model corresponding to the second frequency alone may be obtained to predict the moment when the subsequent picture starts to be displayed.

[0048] It should be noted that the execution order of step S231 can be executed at the same time as step S221. In this way, step S221 or step S231 will be selectively executed according to the detection result of whether the second frequency has an association relationship with the first frequency. That is, after executing step S210, if it is detected that the second frequency has an association relationship with the first frequency, step S221 is executed; if it is not detected that the second frequency has an association relationship with the first frequency, step S231 is executed.

[0049] Alternatively, the execution order of step S231 can also be executed after step S222. In this way, the second frequency in step S231 and the second frequency in step S221 are second frequencies with different values. That is, the second frequency in step S221 has a common multiple with the first frequency, so the virtual synchronization signal prediction model corresponding to each of them is the same; while the second frequency in step S231 does not have a common multiple with the first frequency, so it is necessary to obtain a virtual synchronization signal prediction model corresponding solely to the second frequency in step S231, that is, it is necessary to reset and rebuild the virtual synchronization signal prediction model corresponding solely to the second frequency in step S231, and the specific reset and reconstruction process will not be repeated here.

[0050] Step S232: determining, based on a virtual synchronization signal prediction model corresponding to the second frequency, a time to start drawing an image when updating display content at the second frequency.

[0051] As an embodiment, when a virtual synchronization signal prediction model corresponding solely to a second frequency that has no common multiple with the first frequency is obtained, the time to start drawing the image when updating the display content at the second frequency can be determined directly based on the virtual synchronization signal prediction model corresponding to the second frequency.

[0052] The display signal prediction method provided in this embodiment switches the frequency of updating the display content from the first frequency to the second frequency in response to the operating system; if it is detected that the second frequency has an association with the first frequency, obtain a specified virtual synchronization signal prediction model; based on the virtual synchronization signal prediction model, determine the moment to start drawing the image when the display content is updated with the second frequency; if it is not detected that the second frequency has an association with the first frequency, obtain a virtual synchronization signal prediction model corresponding to the second frequency; based on the virtual synchronization signal prediction model corresponding to the second frequency, determine the moment to start drawing the image when the display content is updated with the second frequency. Thus, in the above manner, when the frequency of the system updating the display content switches, the moment to start drawing the image when the display content is updated with the second frequency is predicted by the specified virtual synchronization signal prediction model, which can avoid constructing corresponding synchronization signal prediction models for display contents with different update frequencies, thereby improving the accuracy and efficiency of display signal prediction.

[0053] At the same time, by acquiring the virtual synchronization signal prediction model in a targeted manner according to the detection result of whether the second frequency has a correlation with the first frequency, the flexibility of display signal prediction can be improved.

[0054] See also Figure 3 , shows a flow chart of a display signal prediction method provided by another embodiment of the present application, this embodiment provides a display signal prediction method, which can be applied to an electronic device, the electronic device includes an operating system, based on the content described in the previous embodiment, this embodiment will describe in detail how to construct a specified virtual synchronization signal prediction model. The method includes:

[0055] Step S310: Obtain the time when the operating system reports the system synchronization signal.

[0056] As an implementation mode, the operating system includes a display framework, and the display framework relies on the Vsync model to perform application drawing and layer display, etc. This implementation mode is described by taking the display framework as an Android display framework as an example.

[0057] In the Android display framework, when it is necessary to send layers of content to be displayed, the operating system can report a TE signal to the surface flinger (SF, inter-process rendering). In order to facilitate the subsequent accurate unification of the virtual synchronization signal prediction model corresponding to the frequencies of updating different display content, the moment when the operating system reports the system synchronization signal can be obtained. For the sake of ease of description, the moment when the operating system reports the system synchronization signal is recorded as yi.

[0058] As an implementation method, the time when the operating system reports the system synchronization signal can be obtained while receiving the TE Time reported by the operating system. The TE Time data can carry the time when the operating system reports the system synchronization signal. In some implementation methods, the time when the operating system reports the system synchronization signal can also be understood as the time when the operating system generates the TE synchronization signal.

[0059] Step S320: Acquire statistical data of multiple different frequencies, wherein the statistical data includes the time when the display framework of the operating system receives the system synchronization signal.

[0060] Among them, different frequencies represent the frequency of the operating system updating different display contents. After the operating system reports the system synchronization signal, the time when the display framework receives the system synchronization signal will be delayed, so multiple statistical data of different frequencies can be obtained to calculate the difference between different times of reporting the system synchronization signal through the statistical data of multiple different frequencies.

[0061] For the convenience of description, the time when the display framework of the operating system receives the system synchronization signal can be recorded as zi.

[0062] Step S330: Acquire the periods corresponding to the multiple different frequencies respectively, to obtain multiple periods.

[0063] In this implementation manner, the reciprocal of the frequency may be used as the period corresponding to the frequency, and the periods corresponding to a plurality of different frequencies may be recorded as p1, p2 . . . pn, and the unit of the period is ns.

[0064] Step S340: Obtain common divisors corresponding to the multiple periods respectively.

[0065] It can be understood that there are common multiples of multiple different frequencies, and there are common divisors of the periods corresponding to the multiple different frequencies. Optionally, the common divisor here can be understood as the lowest common divisor.

[0066] Step S350: constructing a linear regression equation based on the time when the operating system reports the system synchronization signal, the time when the display framework receives the system synchronization signal, and the common divisor corresponding to the multiple periods.

[0067] As an implementation method, the rounded-down value of the common divisor at the moment when the display framework receives the system synchronization signal can be obtained; and then a linear regression equation is constructed based on the moment when the operating system reports the system synchronization signal and the rounded-down value. For ease of description, the rounded-down value of the common divisor at the moment when the display framework receives the system synchronization signal can be recorded as xi.

[0068] As a specific implementation method, all past xi and yi can be used as independent variables and dependent variables respectively, and a univariate linear regression algorithm can be used to simulate a prediction formula of y=kx+b, where k is a common divisor corresponding to the cycle.

[0069] As an implementation mode, in the process of constructing the linear regression equation, the time when the operating system reports the system synchronization signal and the entropy of the common divisor may be used as training samples of the independent variables of the linear regression equation.

[0070] For example, assume that y1i is the TE Time received after the system is switched to frame rate 1, in ns; x1i is the rounded-down value of the period corresponding to the system time z1i (representing the rounding down of the constraint, indicating the corresponding system time) of the TE Time received by SF after the system is switched to frame rate 1. Then the formulas of x1i (the time after rounding the actual received time) and z1i (the actual received time) of frame rate 1 are expressed as follows:

[0071] x1i = z1i / p1 (1)

[0072] Optionally, the common divisor corresponding to the period in this implementation is recorded as EM, that is, p1=n1*EM, then the relationship between x1i and EM is as follows:

[0073] x1i = z1i / (n1*EM) = 1 / n1 * z1i / EM (2)

[0074] By using x1i and y1i as data samples, we can get the linear regression equation y=k1x+b1, where the formulas for k1 and b1 can be expressed as follows:

[0075]

[0076]

[0077] Furthermore, we can define a1i=z1i / EM for frame rate 1, then a1i=1 / n1*x1i, x1i=n1*a1i. Then k1, b1 and a1i have the following relationship:

[0078]

[0079]

[0080] Then from the above relationship, we can get the linear regression equation simulated by x1i and y1i as follows:

[0081]

[0082] Since x1i=n1*a1i, the relationship between x and a can also be written as x=n1*a, then we can get:

[0083]

[0084] Optionally, if a1i and y1i are used as training samples, a linear regression equation y=ka+b can be obtained, where the relationship between k, b and a1i, y1i is as follows:

[0085]

[0086]

[0087] It can be seen from the above derivation that by using a1i and y1i as training samples, the linear regression equation y=ka+b of y and a can be obtained, so the above derivation can be applied to all frame rates (frequencies) with EM as a divisor.

[0088] Step S360: constructing a virtual synchronization signal prediction model based on the linear regression equation, and using the virtual synchronization signal prediction model as the designated virtual synchronization signal prediction model.

[0089] As an implementation manner, a virtual synchronization signal prediction model may be constructed based on the linear regression equation derived above, and the virtual synchronization signal prediction model may be used as a designated virtual synchronization signal prediction model.

[0090] Through the display signal prediction method described in this embodiment, when calculating the Vsync model of different frame rates, it is no longer necessary to divide the moment when SF receives TE by the period to obtain the training sample of the independent variable of the linear regression equation. Instead, it is possible to divide the moment when SF receives TE by the common divisor of the period to obtain the training sample of the independent variable of the linear regression equation.

[0091] Continuing with the above example, the linear regression equation is y=kx+b. Assume that the training sample yi is the i-th received TE Time, in ns; xi is the rounded down value of the system time corresponding to the i-th TE Time received by SF to the period divisor. Then the relationship between k and b and the training sample can be expressed as follows:

[0092]

[0093]

[0094] For example, in a specific application scenario, the frame rate values ​​of the Android system are 120, 90, 72, 60, 45, 40, 30, and 10, in units of hz. Correspondingly, their periods are 1 / 120 (referring to refreshing 120 images in one second, the interval between two images is 1 / 120), 1 / 90, 1 / 72, 1 / 60, 1 / 45, 1 / 40, 1 / 30, and 1 / 10. It can be seen that the periods of these frame rates (i.e., the inverse of the frame rates) have a least common multiple of 360, so the linear regression equation obtained by using the training sample yi as the i-th received TE Time, in units of ns; xi as the system time corresponding to the i-th TE Time received by SF, rounded down to 360, can be used to make a unified Vsync model for these frame rates. Then, when switching any frame rate with a common multiple, it is not necessary to reset and recalculate the Vsync model to improve the efficiency of display signal prediction.

[0095] The display signal prediction method provided in this embodiment obtains the moment when the operating system reports the system synchronization signal; obtains statistical data of multiple different frequencies, the statistical data includes the moment when the display frame of the operating system receives the system synchronization signal; obtains the periods corresponding to the multiple different frequencies, and obtains multiple periods; obtains the common divisor corresponding to the multiple periods; constructs a linear regression equation based on the moment when the operating system reports the system synchronization signal, the moment when the display frame receives the system synchronization signal, and the common divisor corresponding to the multiple periods; constructs a virtual synchronization signal prediction model based on the linear regression equation, and uses the virtual synchronization signal prediction model as the designated virtual synchronization signal prediction model. Thus, through the above method, a unified synchronization signal prediction model is constructed for display content with different update frequencies, which can shorten the frame rate switching time, reduce the frequency of Vsync calibration of the system, reduce the probability of screen freeze, and fix the problem of Vsync calculation deviation in the first few frames of each frame rate switch, thereby improving the efficiency of display signal prediction.

[0096] See also Figure 4 , is a structural block diagram of a display signal prediction device provided in an embodiment of the present application. This embodiment provides a display signal prediction device 400, which can be run on an electronic device. The electronic device includes an operating system. The device 400 includes a signal prediction model acquisition module 410 and a display signal prediction module 420:

[0097] The signal prediction model acquisition module 410 is used to acquire a specified virtual synchronization signal prediction model in response to the operating system switching the frequency of updating the display content from the first frequency to the second frequency and detecting that the second frequency is associated with the first frequency.

[0098] In the implementation manner of the present application, the association relationship between the second frequency and the first frequency represents that the second frequency and the first frequency have a common multiple.

[0099] As an implementation manner, the signal prediction model acquisition module 410 may be configured to acquire a virtual synchronization signal prediction model corresponding to the second frequency if it is not detected that the second frequency has an association relationship with the first frequency.

[0100] Optionally, the device 400 may also include a model building module, which is used to obtain the moment when the operating system reports the system synchronization signal before obtaining the specified virtual synchronization signal prediction model in response to the operating system updating the display content frequency switching from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency; obtaining statistical data of multiple different frequencies, the statistical data including the moment when the display framework of the operating system receives the system synchronization signal; obtaining the periods corresponding to the multiple different frequencies, respectively, to obtain multiple periods; obtaining the common divisor corresponding to the multiple periods; constructing a linear regression equation based on the moment when the operating system reports the system synchronization signal, the moment when the display framework receives the system synchronization signal, and the common divisor corresponding to the multiple periods; constructing a virtual synchronization signal prediction model based on the linear regression equation, and using the virtual synchronization signal prediction model as the specified virtual synchronization signal prediction model.

[0101] Among them, as an implementation method, the linear regression equation is constructed based on the moment when the operating system reports the system synchronization signal, the moment when the display framework receives the system synchronization signal, and the common divisor corresponding to the multiple periods, including: obtaining the floor-rounded value of the common divisor of the moment when the display framework receives the system synchronization signal; and constructing a linear regression equation based on the moment when the operating system reports the system synchronization signal and the floor-rounded value.

[0102] As an implementation mode, the method further includes, in the process of constructing the linear regression equation, using the time when the operating system reports the system synchronization signal and the entropy of the common divisor as training samples of the independent variables of the linear regression equation.

[0103] In the implementation manner of the present application, the virtual synchronization signal prediction model includes a virtual Vsync model.

[0104] The display signal prediction module 420 is used to determine, based on the virtual synchronization signal prediction model, a time to start drawing an image when updating the display content at a second frequency.

[0105] As an embodiment, the display signal prediction module 420 can be used to determine the time to start drawing the image when updating the display content with the second frequency based on a virtual synchronization signal prediction model corresponding to the second frequency when no association between the second frequency and the first frequency is detected.

[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0107] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0108] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0109] See also Figure 5 Based on the above display signal prediction method and device, the embodiment of the present application also provides an electronic device 100 that can execute the above display signal prediction method. The electronic device 100 includes a memory 102 and one or more (only one is shown in the figure) processors 104 coupled to each other, and the memory 102 and the processor 104 are connected by a communication line. The memory 102 stores a program that can execute the content of the above embodiment, and the processor 104 can execute the program stored in the memory 102.

[0110] Among them, the processor 104 may include one or more processing cores. The processor 104 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 104 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 104 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 104, but may be implemented separately through a communication chip.

[0111] The memory 102 may include a random access memory (RAM) or a read-only memory (ROM). The memory 102 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 102 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the aforementioned embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.

[0112] Please refer to Figure 6 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 500 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0113] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has storage space for program code 510 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 510 can be compressed, for example, in an appropriate form.

[0114] In summary, the embodiments of the present application provide a display signal prediction method, device, electronic device and storage medium. The method is applied to an electronic device, and the electronic device includes an operating system. The method obtains a specified virtual synchronization signal prediction model in response to the operating system switching the frequency of updating the display content from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency; based on the virtual synchronization signal prediction model, the moment of starting to draw the image when the display content is updated with the second frequency is determined. Thus, in the above manner, when the frequency of the system updating the display content switches, the moment of starting to draw the image when the display content is updated with the second frequency is predicted by the specified virtual synchronization signal prediction model, which can avoid constructing corresponding synchronization signal prediction models for display contents with different update frequencies, thereby improving the accuracy and efficiency of display signal prediction.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A display signal prediction method, characterized in that: Applied to an electronic device, the electronic device includes an operating system, and the method includes: In response to the operating system switching the frequency of updating the display content from the first frequency to the second frequency, and detecting that the second frequency has an associated relationship with the first frequency, acquiring a specified virtual synchronization signal prediction model; Based on the virtual synchronization signal prediction model, a time point for starting to draw an image when updating the display content at a second frequency is determined.

2. The method according to claim 1, characterized in that The method further comprises: If it is not detected that the second frequency has an association relationship with the first frequency, obtaining a virtual synchronization signal prediction model corresponding to the second frequency; Based on the virtual synchronization signal prediction model corresponding to the second frequency, a time to start drawing an image when updating the display content at the second frequency is determined.

3. The method according to claim 2, characterized in that The association relationship between the second frequency and the first frequency indicates that the second frequency and the first frequency have a common multiple.

4. The method according to claim 1, characterized in that In response to the operating system updating the display content frequency switching from the first frequency to the second frequency, and detecting that the second frequency has an association relationship with the first frequency, before acquiring the specified virtual synchronization signal prediction model, the method further includes: Get the time when the operating system reports the system synchronization signal; Acquire statistical data of a plurality of different frequencies, the statistical data including a time when a display framework of the operating system receives a system synchronization signal; Obtaining periods corresponding to the multiple different frequencies respectively, to obtain multiple periods; Obtain common divisors corresponding to the multiple periods respectively; Constructing a linear regression equation based on the time when the operating system reports the system synchronization signal, the time when the display framework receives the system synchronization signal, and the common divisor corresponding to the multiple periods; A virtual synchronization signal prediction model is constructed based on the linear regression equation, and the virtual synchronization signal prediction model is used as the designated virtual synchronization signal prediction model.

5. The method according to claim 4, characterized in that The constructing of a linear regression equation based on the time when the operating system reports the system synchronization signal, the time when the display framework receives the system synchronization signal, and the common divisor corresponding to the multiple periods respectively includes: Obtain a rounded-down value of the common divisor at the moment when the display framework receives the system synchronization signal; A linear regression equation is constructed based on the time when the operating system reports the system synchronization signal and the rounded-down value.

6. The method according to claim 4, characterized in that The method further comprises: In the process of constructing the linear regression equation, the time when the operating system reports the system synchronization signal and the entropy of the common divisor are used as training samples of the independent variables of the linear regression equation.

7. The method according to any one of claims 1 to 6, characterized in that: The virtual synchronization signal prediction model includes a virtual Vsync model.

8. A display signal prediction device, characterized in that: Running on an electronic device, the electronic device includes an operating system, and the device includes: A signal prediction model acquisition module, configured to acquire a specified virtual synchronization signal prediction model in response to the operating system switching a frequency of updating display content from a first frequency to a second frequency and detecting that the second frequency has an associated relationship with the first frequency; The display signal prediction module is used to determine the time to start drawing the image when updating the display content at the second frequency based on the virtual synchronization signal prediction model.

9. An electronic device, characterized in that: including one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 7 is executed.