Dynamic Frequency Adjustment Method and Related Devices
Through the dynamic frequency adjustment method, the display input frequency is adjusted based on the cached data volume of the display buffer area through the dynamic frequency adjustment method, and the problem of high power consumption when displaying multiple videos in the prior art is solved, and the effect of reducing power consumption while ensuring display performance is achieved.
Patent Information
- Application Number
- CN202110112222.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-01-27
AI Technical Summary
The existing display technology has high power consumption when displaying multiple videos, which affects the performance of the display device.
The dynamic frequency adjustment method is adopted to obtain the cache data amount of the display buffer area at the current and previous time points, and weighted processing is performed, the display input frequency is adjusted based on the weighted value, and the power consumption of the display device is adjusted dynamically by dynamic frequency regulation.
While ensuring display performance, the power consumption of the display device is reduced, and the input frequency is stable through filtering processing to avoid the influence of short-term fluctuations.
Smart Images

Figure CN114816288B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technologies, and in particular to a dynamic frequency adjustment method and related devices thereof. Background Art
[0002] With the continuous development of display technologies, display devices can display multiple video streams simultaneously. In the long-term R & D process, the inventors of this application found that the current methods for displaying multiple video streams still have certain limitations, which also affect the power consumption of display devices to a certain extent. Summary of the Invention
[0003] This application provides a dynamic frequency adjustment method and related devices thereof, which can dynamically adjust the frequency to regulate the power consumption of display devices.
[0004] To solve the above problems, this application provides a dynamic frequency adjustment method, which includes:
[0005] Obtain the buffer data volume of the display buffer at the current time point and the previous time point;
[0006] Weight the buffer data volume at the current time point and the previous time point to obtain a weighted value;
[0007] Adjust the display input frequency based on the weighted value.
[0008] Among them, weighting the buffer data volume at the current time point and the previous time point to obtain a weighted value includes:
[0009] Calculate the difference between the buffer data volume at the current time point and the previous time point;
[0010] Determine the first weighting coefficient corresponding to the range where the difference is located;
[0011] Weight the buffer data volume at the current time point and the previous time point with the first weighting coefficient to obtain a weighted value.
[0012] Among them, determining the first weighting coefficient corresponding to the range where the difference is located includes:
[0013] If the difference is less than the first lower limit value, the first weighting coefficient is the first value;
[0014] If the difference is greater than or equal to the first lower limit value and less than or equal to the first upper limit value, the first weighting coefficient is the second value;
[0015] If the difference is greater than the first upper limit value, the first weighting coefficient is the third value;
[0016] Weight the cache data volume at the current time point and the cache data volume at the previous time point with a first weighting coefficient, including: calculating the sum of a first product and a second product to obtain a weighted value, where the first product is the product of the first weighting coefficient and the cache data volume at the current time point, the second product is the product of the second weighting coefficient and the cache data volume at the previous time point, and the sum of the first weighting coefficient and the second weighting coefficient is 1.
[0017] Among them, adjusting the display input frequency based on the weighted value includes:
[0018] If the weighted value is lower than a second lower limit value, increase the display input frequency;
[0019] If the weighted value is higher than a second upper limit value, decrease the display input frequency.
[0020] Among them, adjusting the display input frequency based on the weighted value includes:
[0021] Obtain an adjustment value;
[0022] If the weighted value is lower than a second lower limit value, increase the display input frequency, including: if the weighted value is lower than a second lower limit value, update the display input frequency to the sum of the current display input frequency and the adjustment value;
[0023] If the weighted value is higher than a second upper limit value, decrease the display input frequency, including: if the weighted value is higher than a second upper limit value, update the display input frequency to the difference between the current display input frequency and the adjustment value.
[0024] Among them, obtaining the cache data volumes of the display buffer at the current time point and the previous time point includes:
[0025] Obtain the cache data volumes of the display buffers of multiple channels at the current time point, and obtain the minimum value of the cache data volumes of the display buffers of multiple channels at the previous time point;
[0026] Weight the cache data volume at the current time point and the cache data volume at the previous time point to obtain a weighted value, including: weighting the minimum value of the cache data volumes of the display buffers of multiple channels at the current time point and the minimum value of the cache data volumes of the display buffers of multiple channels at the previous time point to obtain a weighted value.
[0027] Among them, the method further includes:
[0028] Calculate the reverse offset value at the current time point based on the cache data volumes of multiple channels of the display buffer;
[0029] Calculate the gradient value of the reverse offset value based on the reverse offset value at the current time point and the reverse offset value at the previous time point;
[0030] If the gradient value is less than the preset value, the priority of grabbing data from the path with the smallest cached data volume is adjusted to the highest level.
[0031] Among them, calculating the reverse offset value at the current time point based on the cached data volumes of the display buffer areas of multiple paths includes:
[0032] Calculating the average value of the cached data volumes of the display buffer areas of multiple paths;
[0033] Calculating the difference between the minimum value and the average value of the cached data volumes of the display buffer areas of multiple paths to obtain the reverse offset value at the current time point;
[0034] Calculating the gradient value of the offset value based on the reverse offset value at the current time point and the reverse offset value at the previous time point includes:
[0035] Calculating the difference between the reverse offset value at the previous time point and the reverse offset value at the current time point to obtain the gradient value.
[0036] Among them, obtaining the cached data volumes of the display buffer areas at the current time point and the previous time point previously included:
[0037] Determining the initial display input frequency based on the frame rate and the bitstream size;
[0038] Grabbing data at the initial display input frequency and inputting it into the display buffer area.
[0039] Among them, adjusting the display input frequency based on the weighting value includes:
[0040] Adjusting the display input frequency during the blanking interval.
[0041] To solve the above problems, the present application provides a display device, which includes a memory and a processor; a computer program is stored in the memory, and the processor is configured to execute the computer program to implement the steps of the above method.
[0042] To solve the above problems, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
[0043] The method of the present application first obtains the cache data volume of the display buffer at the current time point and the previous time point; then weights the cache data volume at the current time point and the cache data volume at the previous time point to obtain a weighted value; then adjusts the display input frequency based on the weighted value to ensure that the adjusted display input frequency is at an appropriate frequency, so as to dynamically adjust the frequency to adjust the power consumption of the display device, thereby reducing the power consumption of the device while ensuring the display performance of the display device, and filtering the cache data volume at the current time point through the cache data volume of the previous N time points to avoid the impact of short-term fluctuations in the sampled data on the adjustment of the display input frequency, so as to improve the effect of adjusting the display input frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0045] Figure 1 is a schematic flowchart of the first implementation method of the dynamic frequency adjustment method of the present application;
[0046] Figure 2 is a schematic diagram of adjusting the frequency in the dynamic frequency adjustment method of the present application;
[0047] Figure 3 is a schematic flowchart of the second implementation method of the dynamic frequency adjustment method of the present application;
[0048] Figure 4 is a schematic structural diagram of an embodiment of the display device of the present application;
[0049] Figure 5 is a schematic structural diagram of another embodiment of the display device of the present application;
[0050] Figure 6 is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] To enable those skilled in the art to better understand the technical solutions of the present application, the following will further describe in detail the dynamic frequency adjustment method and its related devices provided by the present application in conjunction with the drawings and specific embodiments.
[0052] The terms "first", "second", and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", and "third" may explicitly or implicitly include at least one of such features. In the description of this application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.
[0053] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that, without conflict, the embodiments described herein can be combined with other embodiments.
[0054] As Figure 1 shown, Figure 1 is a schematic flowchart of the first embodiment of the dynamic frequency adjustment method of this application. The dynamic frequency adjustment method of this application may include the following steps.
[0055] S11: Obtain the cache data volume of the display buffer at the current time point and the previous N time points.
[0056] The cache data volume of the display buffer at the current time point and the previous N time points can be obtained first, so as to calculate a weighted value based on the cache data volume of the display buffer at the current time point and the previous N time points, and determine whether to adjust the display input frequency and how to adjust the display input frequency based on the weighted value.
[0057] The cache data volume of the display buffer at the current time point can be obtained in various ways, as specifically shown below.
[0058] In one implementation, the cache data volume in the display buffer can be confirmed through a counter. For example, a first counter can be set between the display buffer and the external memory to measure the data volume of the images accumulated in the display buffer, and a second counter can be set between the display buffer and the display unit to measure the data volume of the images that have been read. Then, the cache data volume in the display buffer can be obtained by calculating the difference between the first counter and the second counter, etc.
[0059] In another implementation, the write pointer signal and the read pointer signal in the display buffer can be read first; then, by comparing the addresses pointed to by the write pointer signal and the read pointer signal, the buffer data volume of the display buffer can be obtained. For example, when the read pointer is before the write pointer, the difference between the address pointed to by the read pointer signal and the address pointed to by the write pointer signal is calculated to obtain the buffer data volume of the display buffer.
[0060] After obtaining the buffer data volume at the current time point, it can be stored so that it can be obtained when determining whether frequency modulation is required and how to perform frequency modulation subsequently. Based on this, the data of the buffer data volumes of the display buffers at the previous N time points stored in the memory can be obtained. Among them, the previous N time points are the time points that are before the current time point and are the N closest times to the current time point when obtaining the buffer data volumes of the display buffers of multiple channels. And N is an integer greater than or equal to 1.
[0061] In addition, the buffer data volume in the display buffer can be obtained periodically. Specifically, the buffer data volume in the display buffer can be obtained every once in a while. Among them, this period can be fixed, or adjusted according to the frame rate and / or the bitstream size. For example, the buffer data volume in the display buffer can be obtained every time a line of data is refreshed.
[0062] It can be understood that the buffer data volume of each display buffer can be the actual size of the buffer data in each display buffer, or can be the ratio value of the actual size of the buffer data in each display buffer to the total load of each display buffer, or can be a status value indicating whether the display buffer is busy. For example, the status value of the display buffer can be determined by comparing the busy threshold and the actual size of the buffer data in each display buffer. Specifically, if the actual size of the buffer data in the display buffer is more than the busy threshold, the status value of the display buffer is 1; if the actual size of the buffer data in the display buffer is less than or equal to the busy threshold, the status value of the display buffer is 0. Of course, the status value of the display buffer can also be determined by comparing the busy threshold and the storage ratio of the buffer data in each display buffer.
[0063] S12: Weight the buffer data volume at the current time point and the buffer data volumes at the previous N time points to obtain a weighted value.
[0064] After obtaining the cache data volume of the display buffer at the current time point and the previous N time points, the cache data volume of the display buffer at the current time point and the previous N time points can be weighted to obtain a weighted value, so as to subsequently determine whether to adjust the display input frequency based on the weighted value and how to adjust the display input frequency, so as to filter the cache data volume at the current time point through the cache data volume at the previous N time points, so as to avoid the influence of short-term fluctuations of the sampled data on the adjustment of the display input frequency and improve the effect of adjusting the display input frequency.
[0065] In one implementation, N is 1. The difference between the cache data volume at the current time point and the cache data volume at the previous time point can be calculated; then the first weighting coefficient corresponding to the range where the difference is located can be determined; then the cache data volume at the current time point and the cache data volume at the previous time point are weighted with the first weighting coefficient to obtain a weighted value. Among them, if the difference is less than the first lower limit value, the first weighting coefficient is the first value; if the difference is greater than or equal to the first lower limit value and less than or equal to the first upper limit value, the first weighting coefficient is the second value; if the difference is greater than the first upper limit value, the first weighting coefficient is the third value. The first lower limit value, the first upper limit value, the first value, the second value and the third value can be set according to the actual situation and are not limited here. For example, as shown in the following formula, the first lower limit value, the first upper limit value, the first value, the second value and the third value can be -a, a, 17 / 16, 0.5 and 15 / 16 respectively:
[0066]
[0067] Among them, k is the weighting coefficient.
[0068] In addition, the step of weighting the cache data volume at the current time point and the cache data volume at the previous time point with the first weighting coefficient may include: calculating the sum of the first product and the second product to obtain a weighted value, where the first product is the product of the first weighting coefficient and the cache data volume at the current time point, and the second product is the product of the second weighting coefficient and the cache data volume at the previous time point, and the sum of the first weighting coefficient and the second weighting coefficient is 1. The calculation formula for the step of weighting the cache data volume at the current time point and the cache data volume at the previous time point with the first weighting coefficient can be as follows:
[0069] Fout = k * F + (1 - k)Fpre;
[0070] Among them, F is the cache data volume at the current time, Fpre is the cache data volume at the previous time, and k is the weighting coefficient.
[0071] In another implementation, a weighted coefficient of the cache data volume at each time point determined in chronological order can be used to calculate the weighted result of the cache data volume at the current time point and the previous N time points. For example, when N is 3, the weighted coefficients of the cache data volume at the previous N time points, the cache data volume at the previous N - 1 time points, the cache data volume at the previous time point, and the cache data volume at the current time point can be 0.05, 0.15, 0.2, and 0.6 respectively.
[0072] In yet another implementation, the average value of the cache data volume in the display buffer at the current time point and the previous N time points can be calculated to obtain a weighted value.
[0073] S13. Adjust the display input frequency based on the weighted value.
[0074] After performing weighted processing on the cache data volume at the current time point and the previous N time points to obtain a weighted value, the display input frequency can be adjusted based on the weighted value to ensure that the data volume in the display buffer is within an appropriate range, reducing the power consumption of the device while ensuring the display performance of the display device.
[0075] Among them, the display input frequency refers to the frequency of inputting image data into the display buffer.
[0076] It is possible to first confirm the range in which the weighted value is located, and then adjust the display input frequency based on the range in which the weighted value is located. For example, if the weighted value is too small, the display input frequency is increased; if the weighted value is too large, the display input frequency is decreased. In this way, when the cache data volume in the display buffer is small, the display input frequency is increased to increase the cache data volume in the display buffer and avoid abnormal display caused by too little data in the display buffer. When the cache data volume in the display buffer is large, the display input frequency is decreased to reduce the power consumption of the device, and since there is sufficient cache data volume in the display buffer, the display performance of the device will not be affected, thus reducing power consumption while ensuring display performance.
[0077] Optionally, if the weighted value is less than the second lower limit value, the display input frequency can be increased; if the weighted value is greater than the second upper limit value, the display input frequency can be decreased. The second upper limit value and the second lower limit value can be set according to actual situations and are not limited here. For example, the second lower limit value can be 20%, and the second upper limit value can be 50%.
[0078] In addition, an adjustment value m can also be set. When the display input frequency needs to be adjusted, the adjusted frequency is determined by the adjustment value m. Specifically, the display input frequency can be increased by updating the display input frequency to the sum of the current display input frequency and the adjustment value m. The display input frequency can be decreased by updating the display input frequency to the difference between the current display input frequency and the adjustment value m. Specifically, the frequency adjustment formula can be as follows:
[0079]
[0080] Optionally, since the video path adjusts the frequency of the display path during data transfer, it may affect the entire display path and poses high requirements for the design of the clock frequency module of the input frequency. As Figure 2 shown, by combining the characteristics of the video signal, an event mode of notifying software through hardware can be used to send an interrupt to notify the software when the video signal enters the blanking interval, thus reserving a certain amount of time for frequency adjustment, ensuring that the frequency can be switched to a stable state, reducing the difficulty of clock frequency design, and avoiding the occurrence of abnormal states of the video signal and reducing clock frequency design. Further, a vertical blanking interval with a relatively long time point can be selected to adjust the display input frequency to ensure sufficient adjustment time points.
[0081] In this embodiment, first obtain the cache data volume of the display buffer at the current time point and the previous time point; then weight the cache data volume at the current time point and the cache data volume at the previous time point to obtain a weighted value; then adjust the display input frequency based on the weighted value to ensure that the adjusted display input frequency is at an appropriate frequency, thereby dynamically adjusting the frequency to adjust the power consumption of the display device, so as to reduce the power consumption of the device while ensuring the display performance of the display device, and filter the cache data volume at the current time point through the cache data volume of the previous N time points to avoid the impact of short-term fluctuations in the sampled data on the adjustment of the display input frequency, so as to improve the effect of adjusting the display input frequency.
[0082] Further, the present application can also first determine the initial display input frequency based on information such as the frame rate and bitstream size, and then adjust the display input frequency based on the cache data volume of the display buffers of multiple paths, so as to adjust the frequency of the display buffer in real time based on the cache data volume in the display buffer. After adjustment, the display input frequency is at an appropriate frequency, reducing the power consumption of the device while ensuring the display performance of the display device. Specifically, as Figure 3 shown, Figure 3 is a schematic flowchart of the second embodiment of the dynamic frequency adjustment method of the present application. The dynamic frequency adjustment method of the present application may include the following steps.
[0083] S21: Determine the initial display input frequency based on the frame rate and bitstream size.
[0084] First, the initial frequency of data input to the display buffer can be determined based on the frame rate and bitstream size, etc., so that the display device can capture data and input it to the display buffer at the initial frequency, ensuring that the system inputs data to the display buffer at a relatively appropriate frequency in the initial stage, and then adjusts the display input frequency based on the real-time cache data volume in the display buffers of multiple paths during operation.
[0085] Optionally, information such as frame rate and bitstream size can be stored in the display device, corresponding to the initial frequency of inputting data into the display buffer. Among them, before step S21, through data collection, a large number of application scenarios can be trained to complete the establishment of the system database. In different application scenarios, the correlation of data can be established to obtain the corresponding relationship between information such as frame rate and bitstream size and the initial frequency of inputting data into the display buffer.
[0086] Among them, before step S21, in addition to obtaining the frame rate and bitstream size, the usage conditions of each module in the system and user information (such as the user's operation habits, etc.) can also be obtained, so as to determine the initial frequency of inputting data into the display buffer based on the frame rate, bitstream size, usage conditions of each module, and user information. In this way, the congestion degree of the communication line can be determined through the usage conditions of each module, and then a relatively accurate initial frequency can be determined.
[0087] In addition, the initial frequency of inputting data into the display buffer can be determined according to the frame rate and bitstream size during each debugging phase or after the initial power-on.
[0088] S22: Grab data at the initial display input frequency and input it into the display buffer.
[0089] S23: Obtain the minimum value of the cached data volume in the display buffers of multiple channels at the current time point every other time period, and obtain the minimum value of the cached data volume in the display buffers of multiple channels at the previous time point.
[0090] After determining the initial frequency based on the frame rate and bitstream size and grabbing data at the initial frequency and inputting it into the display buffer, the minimum value of the cached data volume in the display buffers of multiple channels at the current time point and the minimum value of the cached data volume in the display buffers of multiple channels at the previous time point can be obtained every other time period, so as to adjust the display input frequency based on the minimum value of the cached data volume in the display buffers of multiple channels at the current time point and the minimum value of the cached data volume in the display buffers of multiple channels at the previous time point.
[0091] S24: Weight the minimum value of the cached data volume in the display buffers of multiple channels at the current time point and the minimum value of the cached data volume in the display buffers of multiple channels at the previous time point to obtain a weighted value.
[0092] After obtaining the minimum value of the cached data volume in the display caches of multiple channels at the current time point and the cached data volume in the display buffer of multiple channels at the previous time point, the minimum value of the cached data volume in the display buffers of multiple channels at the current time point and the previous time point can be weighted, so as to adjust the display input frequency based on the weighted value, avoid misadjustment caused by short-term fluctuations in the cached data volume in the display cache, and reduce the power consumption of the device while ensuring the display performance of the display device.
[0093] Among them, the method of weighting the minimum value of the cached data volume in the display buffers of multiple channels at the current time point and the minimum value of the cached data volume in the display buffers of multiple channels at the previous time point can be referred to step S12, which will not be elaborated here.
[0094] S25: Adjust the display input frequency based on the weighted value.
[0095] The specific adjustment method can be referred to step S13, which will not be elaborated here.
[0096] S26: Calculate the reverse offset value at the current time point based on the cached data volume in the display buffers of multiple channels at the current time point.
[0097] After obtaining the cached data volume in the display buffers of multiple channels at the current time point, the reverse offset value at the current time point can be calculated based on the cached data volume in the display buffers of multiple channels, so as to calculate the gradient value that can be used to determine whether to adjust the priority of channel data capture based on the reverse offset value.
[0098] Optionally, in step S26, the average value of the cached data volume in the display buffers of multiple channels at the current time point can be calculated; calculate the difference between the minimum value and the average value of the cached data volume in the display buffers of multiple channels at the current time point to obtain the reverse offset value at the current time point. The specific calculation formula can be as follows:
[0099] avg level = (level1 + level2 + level3 + … + leveln) / n;
[0100] Y down = avg level - min(level n );
[0101] Among them, n is the total number of channels, level 1 , level 2 ……level n are the cached data volumes of the display buffers of n channels respectively; min(level n ) is the minimum value of the cached data volumes of the display buffers of multiple channels; Ydown is the reverse offset value at the current time point.
[0102] It can be understood that the previous time point can be the time point when the buffer data volume of the display buffer area for obtaining multiple channels was last obtained before the current time point and closest to the current time point.
[0103] S27: Calculate the gradient value of the reverse offset value based on the reverse offset value at the current time point and the reverse offset value at the previous time point.
[0104] After calculating the reverse offset value at the current time point, the gradient value of the reverse offset value can be calculated based on the reverse offset value at the current time point and the reverse offset value at the previous time point, so as to judge whether it is necessary to adjust the priority of the data grabbed by the channels based on the reverse gradient value, so that the buffer volume of the display buffer areas of multiple channels is within a suitable range.
[0105] Optionally, in step S27, the difference between the reverse offset value at the previous time point and the reverse offset value at the current time point can be calculated to obtain the gradient value of the reverse offset value. The specific calculation formula can be as follows:
[0106] grad = y down (t - 1) - y down (t);
[0107] where y down (t) is the reverse offset value at the current time point; y down (t - 1) is the reverse offset value at the previous time point.
[0108] S28: If the gradient value is less than the preset value, adjust the priority of the data grabbed by the channel with the smallest buffer data volume to the highest level.
[0109] After calculating the gradient value of the reverse offset value, it can be confirmed whether the gradient value is less than the preset value. If it is less than the preset value, the priority of the data grabbed by the channel with the smallest buffer data volume can be adjusted to the highest level, which can improve the utilization rate of the channel with the smallest buffer data volume, make the minimum value of the buffer data volumes of multiple channels approach the average value of the buffer data volumes of multiple channels, that is, adjust the priority of the channel with the smallest buffer data volume according to the minimum descent gradient to make the buffer data volumes of multiple channels fluctuate within a small range, so that the utilization rates of multiple channels are as balanced as possible, the buffer data volumes of multiple channels can be within a suitable range, and the fluctuations of the buffer data volumes of each channel can be reduced, improving the continuity of frequency adjustment.
[0110] Optionally, if the gradient value calculated in step S27 is greater than the preset value, the priority of the data grabbed by the channel corresponding to the minimum value can be adjusted to the highest level to adjust the priority of the data grabbed by the channel with the smallest buffer data volume to ensure the stability of the data grabbed by multiple channels.
[0111] In addition, while increasing the priority of the data captured by the path corresponding to the minimum value, the priorities of the data captured by other paths may not be adjusted. Of course, in other implementation manners, while increasing the priority of the data captured by the channel corresponding to the minimum value, the priority of the data captured by the channel with the largest amount of cached data may be decreased.
[0112] The present application also discloses a display device. The display device includes an acquisition module, a calculation module, and an adjustment module.
[0113] The acquisition module is configured to acquire the amounts of cached data in the display buffer at the current time point and the previous time point;
[0114] The calculation module is configured to weight the amount of cached data at the current time point and the amount of cached data at the previous time point to obtain a weighted value;
[0115] The adjustment module is configured to adjust the display input frequency based on the weighted value.
[0116] Optionally, the calculation module is configured to calculate the difference between the amount of cached data at the current time point and the amount of cached data at the previous time point; determine a first weighting coefficient corresponding to the range where the difference is located; and weight the amount of cached data at the current time point and the amount of cached data at the previous time point with the first weighting coefficient to obtain a weighted value.
[0117] Optionally, the calculation module is configured to: if the difference is less than a first lower limit value, the first weighting coefficient is a first value; if the difference is greater than or equal to the first lower limit value and less than or equal to a first upper limit value, the first weighting coefficient is a second value; if the difference is greater than the first upper limit value, the first weighting coefficient is a third value; weighting the amount of cached data at the current time point and the amount of cached data at the previous time point with the first weighting coefficient includes: calculating the sum of a first product and a second product to obtain a weighted value, where the first product is the product of the first weighting coefficient and the amount of cached data at the current time point, the second product is the product of the second weighting coefficient and the amount of cached data at the previous time point, and the sum of the first weighting coefficient and the second weighting coefficient is 1.
[0118] Optionally, the adjustment module is configured to: if the weighted value is lower than a second lower limit value, increase the display input frequency; if the weighted value is higher than a second upper limit value, decrease the display input frequency.
[0119] Optionally, the adjustment module is configured to obtain an adjustment value; if the weighted value is lower than the second lower limit value, increasing the display input frequency includes: if the weighted value is lower than the second lower limit value, updating the display input frequency to the sum of the current display input frequency and the adjustment value; if the weighted value is higher than the second upper limit value, decreasing the display input frequency includes: if the weighted value is higher than the second upper limit value, updating the display input frequency to the difference between the current display input frequency and the adjustment value.
[0120] Optionally, the obtaining module is configured to obtain the cache data volume of the display buffers of multiple channels at the current time point, and obtain the minimum value of the cache data volumes of the display buffers of multiple channels at the previous time point;
[0121] The calculation module is configured to weight the minimum value of the cache data volumes of the display buffers of multiple channels at the current time point and the minimum value of the cache data volumes of the display buffers of multiple channels at the previous time point to obtain a weighted value.
[0122] Optionally, the adjustment module is further configured to calculate a reverse offset value at the current time point based on the cache data volumes of the display buffers of multiple channels; calculate a gradient value of the reverse offset value based on the reverse offset value at the current time point and the reverse offset value at the previous time point; if the gradient value is greater than a preset value, increase the priority of grabbing data for the channel with the smallest cache data volume.
[0123] Optionally, the adjustment module is configured to calculate the average value of the cache data volumes of the display buffers of multiple channels; calculate the difference between the minimum value and the average value of the cache data volumes of the display buffers of multiple channels to obtain the reverse offset value at the current time point;
[0124] Optionally, the adjustment module is configured to calculate the difference between the reverse offset value at the previous time point and the reverse offset value at the current time point to obtain the gradient value.
[0125] Optionally, the adjustment module is configured to determine an initial display input frequency based on the frame rate and the bitstream size; grab data at the initial display input frequency and input it into the display buffer.
[0126] Optionally, the adjustment module is configured to adjust the display input frequency during the vertical blanking interval.
[0127] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of an embodiment of the display device of the present application. The display device 10 includes a memory 11 and a processor 12 that are coupled to each other. The memory 11 is used to store program instructions, and the processor 12 is used to execute the program instructions to implement the method of any of the above embodiments.
[0128] Specifically, as Figure 5As shown, the memory 11 may include multiple display buffers. Each display buffer is used to store the image data of the corresponding channel. The database can determine the initial frequency of inputting data into the display buffer according to the frame rate and bitstream size, etc. during each debugging phase to ensure a relatively appropriate default frequency in the initial stage. Then, based on the real-time buffer data volume of multiple display buffers, it is determined whether to adjust the display input frequency to ensure that the buffer data volumes of multiple channels are within an appropriate range. And the gradient descent method can be used for iteration to adjust the display input frequency, adjust to an appropriate frequency, avoid the generation of random errors, and ensure the continuity of the adjustment.
[0129] The logical process of the above dynamic frequency adjustment method is presented as a computer program. In terms of the computer program, when it is sold or used as an independent software product, it can be stored in a computer-readable storage medium. Therefore, this application proposes a computer-readable storage medium. Please refer to Figure 6 , Figure 6 FIG. is a schematic structural diagram of an embodiment of the computer-readable storage medium of this application. In this embodiment, a computer program 21 is stored in the computer-readable storage medium 20. When the computer program 21 is executed by a processor, the steps in the above dynamic frequency adjustment method are implemented.
[0130] Specifically, the computer-readable storage medium 20 can be a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, etc., which can store computer programs. Or it can also be a server storing the computer program. The server can send the stored computer program to other devices for running, or it can also run the stored computer program itself. Physically, the computer-readable storage medium 20 can be a combination of multiple entities, such as a combination of multiple servers, a server plus a memory, or a memory plus a mobile hard disk, etc.
[0131] The above is only the embodiment of this application, and it does not limit the patent scope of this application. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of this application.
Claims
1. A dynamic frequency adjustment method, characterized in that, the method includes: Obtaining the buffer data amounts of the display buffer areas of multiple channels at the current time point and the previous N time points, where N is an integer greater than or equal to 1; Weighting the buffer data amount at the current time point and the buffer data amounts at the previous N time points to obtain a weighted value; Adjusting the display input frequency based on the weighted value, where the display input frequency is the frequency at which image data is input into the display buffer area; The method further includes: calculating the difference between the minimum value and the average value of the buffer data amounts of the display buffer areas of the multiple channels to obtain the reverse offset value at the current time point; calculating the gradient value of the reverse offset value based on the reverse offset value at the previous time point and the reverse offset value at the current time point; if the gradient value is less than a preset value, adjusting the priority of grabbing data for the channel with the smallest buffer data amount to the highest level.
2. The dynamic frequency adjustment method according to claim 1, characterized in that, the weighting the buffer data amount at the current time point and the buffer data amounts at the previous N time points to obtain a weighted value includes: Calculating the difference between the buffer data amount at the current time point and the buffer data amount at the previous time point; Determining the first weighting coefficient corresponding to the range where the difference is located; Weighting the buffer data amount at the current time point and the buffer data amount at the previous time point with the first weighting coefficient to obtain a weighted value.
3. The dynamic frequency adjustment method according to claim 2, characterized in that, the determining the first weighting coefficient corresponding to the range where the difference is located includes: If the difference is less than the first lower limit value, the first weighting coefficient is the first value; If the difference is greater than or equal to the first lower limit value and less than or equal to the first upper limit value, the first weighting coefficient is the second value; If the difference is greater than the first upper limit value, the first weighting coefficient is the third value; the weighting the buffer data amount at the current time point and the buffer data amount at the previous time point with the first weighting coefficient includes: calculating the sum of the first product and the second product to obtain the weighted value, where the first product is the product of the first weighting coefficient and the buffer data amount at the current time point, the second product is the product of the second weighting coefficient and the buffer data amount at the previous time point, and the sum of the first weighting coefficient and the second weighting coefficient is 1.
4. The dynamic frequency adjustment method according to claim 1, characterized in that, the adjusting the display input frequency based on the weighted value includes: If the weighted value is lower than the second lower limit value, increasing the display input frequency; If the weighted value is higher than the second upper limit value, decreasing the display input frequency.
5. The dynamic frequency adjustment method according to claim 4, characterized in that, the adjusting the display input frequency based on the weighted value includes: Obtaining an adjustment value; the if the weighted value is lower than the second lower limit value, increasing the display input frequency includes: if the weighted value is lower than the second lower limit value, updating the display input frequency to the sum of the current display input frequency and the adjustment value; If the weighted value is higher than the second upper limit value, lower the display input frequency, including: if the weighted value is higher than the second upper limit value, update the display input frequency to the difference between the current display input frequency and the adjustment value.
6. The dynamic frequency adjustment method according to claim 1, wherein, the obtaining of the cache data amounts of the display buffer at the current time point and the previous time point includes: obtaining the minimum value of the cache data amounts of the display buffers of multiple channels at the current time point, and obtaining the minimum value of the cache data amounts of the display buffers of multiple channels at the previous time point; the weighting of the cache data amount at the current time point and the cache data amount at the previous time point to obtain a weighted value includes: weighting the minimum value of the cache data amounts of the display buffers of multiple channels at the current time point and the minimum value of the cache data amounts of the display buffers of multiple channels at the previous time point to obtain a weighted value.
7. The dynamic frequency adjustment method according to claim 1, wherein, the calculating of the gradient value of the offset value based on the reverse offset value at the current time point and the reverse offset value at the previous time point includes: calculating the difference between the reverse offset value at the previous time point and the reverse offset value at the current time point to obtain the gradient value.
8. The dynamic frequency adjustment method according to claim 1, wherein, the adjusting of the display input frequency based on the weighted value includes: adjusting the display input frequency in the blanking interval.
9. A display device, wherein, the display device includes a memory and a processor; a computer program is stored in the memory, and the processor is configured to execute the computer program to implement the steps of the method according to any one of claims 1-8.
Citation Information
Patent Citations
Congestion control method for wireless sensor network
CN102196502A
Multimedia synchronous play method, device and system, and terminal
CN106412664A
Replay transmission device and replay transmission method
US20100165846A1
Digital carrier synthesis synchronized to a reference signal that is asynchronous with respect to a digital sampling clock
US5808691A