Dynamic voltage frequency adjustment method and device, equipment and storage medium
By load sampling of the target frame when receiving the vertical synchronization signal, the first load and the second load are obtained, and frequency modulation of the CPU link is performed based on these loads, the problem of inaccurate frequency modulation processing in the prior art is solved, and more accurate computing power matching and performance improvement is achieved.
Patent Information
- Application Number
- CN202311325290.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, frequency regulation processing is inaccurate, resulting in excessive power consumption or insufficient computing power, resulting in reduced performance and waste.
By load sampling the starting position and intra-frame feature points of the target frame upon receiving the vertical synchronization signal, the first load and the second load are obtained, and dynamic frequency modulation of the CPU link is performed according to these loads.
It realizes accurate load acquisition during frequency adjustment, accurately tracking load changes in frames, accurately matching computing power and load, and improves the effect of taking into account performance and power consumption.
Smart Images

Figure CN119829264A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart terminal technology, and in particular to a dynamic voltage and frequency adjustment method, device, electronic device and storage medium. Background Art
[0002] At present, when performing frequency modulation, each hardware platform calculates the load frequency through scheduled jiffies update or periodic sampling to vote for frequency modulation. However, the sampling load results are random, so the sampled point may be the point with the heaviest load. At this time, the voting frequency is high after the decision algorithm. If the load after frequency modulation is executed is the time point in the second half of a frame, there will be excessive power consumption. If the sampled point is the lightest load point, the voting frequency after the decision algorithm is relatively low. If the load after frequency modulation is executed is the high load time point in the first half of a frame, the computing power is insufficient and stalled, resulting in serious performance degradation. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a dynamic voltage frequency adjustment method, device, electronic device and storage medium to solve the technical problem of inaccurate frequency modulation processing in the related art.
[0004] In a first aspect, an embodiment of the present application provides a dynamic voltage frequency adjustment method, including:
[0005] When a vertical synchronization signal is received, a load sampling is performed on a starting position of a target frame to obtain a first load;
[0006] Acquire a vertical synchronization offset, and perform load sampling on the target frame according to the vertical synchronization offset to obtain a second load;
[0007] According to the first load and the second load, frequency modulation is performed on the CPU link when processing the target frame.
[0008] In a second aspect, an embodiment of the present application provides a dynamic voltage frequency adjustment device, including:
[0009] A first sampling module is used to perform load sampling on the starting position of the target frame to obtain a first load when a vertical synchronization signal is received;
[0010] A second sampling module, used for acquiring a vertical synchronization offset, and performing load sampling on the target frame according to the vertical synchronization offset to obtain a second load;
[0011] A frequency modulation processing module is used to perform frequency modulation processing on the CPU link when processing the target frame according to the first load and the second load.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-described dynamic voltage and frequency adjustment methods when executing the computer program.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above-mentioned dynamic voltage and frequency adjustment methods are implemented.
[0014] The embodiment of the present application provides a dynamic voltage frequency adjustment method, device, electronic device and storage medium. When performing frequency modulation processing, the moment of receiving the vertical synchronization signal is determined as the start of processing the target frame. At this time, the load sampling is performed at the starting position of the target frame to obtain the first load, so as to perform frequency modulation processing on the CPU link according to the first load, and the vertical synchronization offset at this time is obtained. In the process of processing the target frame, the second load is sampled again on the target frame according to the vertical synchronization offset, and the CPU link is frequency modulated again according to the second load. In the frequency adjustment process, the vertical synchronization signal is used as the start signal of the frame processing, so that the load can be accurately acquired, and then the vertical synchronization offset determined according to the characteristics in the frame can accurately track the load, and the heavy load and light load can be accurately acquired, and then the frequency is determined and adjusted for different intervals according to the corresponding loads, so that the matching of frequency modulation and computing power can be achieved more accurately, and both performance and power consumption can be taken into account. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of a dynamic voltage and frequency adjustment method provided in an embodiment of the present application;
[0016] Figure 2 This is a schematic diagram of a frequency modulation process provided by an embodiment of the present application;
[0017] Figure 3 It is a flowchart of the steps of determining whether a target frame is an adjustment frame provided by an embodiment of the present application;
[0018] Figure 4 It is a flow chart of the steps of performing frequency modulation processing provided in an embodiment of the present application;
[0019] Figure 5 It is a structural schematic diagram of a dynamic voltage and frequency adjustment device provided in an embodiment of the present application;
[0020] Figure 6is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0021] Figure 7 This is another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0025] In related technologies, such as mobile terminals, the final goal is to display content on the terminal screen, such as an LCD / OLED display. In fact, the display is triggered by the frame synchronization signal to send and process display data, and the data load of a frame is regular. However, when the jiffies update scheduled by the system is used as a trigger condition, the load is sampled at a random time point in a frame, which makes it possible to sample the point with the heaviest load, and the load after the frequency modulation is executed may be the time point in the second half of a frame, which will cause excessive power consumption, waste energy and generate heat. At the same time, it is also possible to sample the point with the lightest load, resulting in the load after the frequency modulation is executed may be the time point with high load in the first half of a frame, which will lead to insufficient computing power and stall, resulting in serious performance degradation.
[0026] In order to solve the technical problems existing in the related art, the present application embodiment provides a dynamic voltage frequency adjustment method, see Figure 1 , Figure 1 It is a flow chart of a dynamic voltage and frequency adjustment method provided in an embodiment of the present application, and the method includes steps 101 to 103.
[0027] Step 101 : When a vertical synchronization signal is received, a load sampling is performed on a starting position of a target frame to obtain a first load.
[0028] In one embodiment, when frequency modulation is performed, whether a vertical synchronization signal is received is used to determine when to process each frame, and then the frequency is adjusted according to the determined target frame. At the beginning of the target frame, the frequency of the CPU link is adjusted according to the load condition. Specifically, at the beginning of the target frame, it is determined to start processing the target frame, and then the load is sampled at the starting position of the target frame to obtain a first load corresponding to the starting position.
[0029] For each frame, taking the rendering and synthesis of the scene as an example, the processing of each frame includes two parts: rendering and synthesis. First, the rendering process is performed, and then the synthesis process is performed after the rendering is completed. In the actual processing process, different requirements correspond to different loads. For example, when performing calculation rendering, the load is higher, while when performing synthesis, the load is lower.
[0030] In one embodiment, illustratively, referring to Figure 2 ,like Figure 2 As shown, the arrow on the black line indicates the moment when the vertical synchronization signal is received, that is, the moment when each frame starts. At the beginning of each frame, load sampling is performed at the starting position to determine the load condition at the starting position, and then the frequency of the CPU link is adjusted according to the actual load condition.
[0031] It should be noted that the starting position of the target frame can be the very beginning of a frame, or a certain time / position after the beginning. At the beginning of a frame, its load condition may not reach the actual load condition, so the starting position can be determined based on experience or experiments.
[0032] Step 102: Acquire a vertical synchronization offset, and perform load sampling on a target frame according to the vertical synchronization offset to obtain a second load.
[0033] In one embodiment, when frequency adjustment is performed, a vertical synchronization offset is obtained, and then load sampling is performed again on the target frame according to the vertical synchronization offset to obtain a second load, wherein the sampling points corresponding to the first load and the second load are different, and when load sampling is performed, real-time sampling is performed during real-time processing of a frame, that is, when load sampling is performed to obtain the second load, load sampling is performed when the target frame is processed to reach the sampling time / position to obtain the second load.
[0034] For example, when performing load sampling to obtain the second load, the sampling point for sampling can refer to Figure 2 As shown, specifically Figure 2 The arrows under the black line correspond to the positions where the sampling is performed based on the vertical synchronization offset.
[0035] In practical applications, the vertical synchronization offset can be pre-set, such as setting it to any value between 0-16.6ms according to actual conditions. That is, after receiving the vertical synchronization signal, load sampling is performed after a certain period of time, and the certain period of time that has passed is the time value set for the vertical synchronization offset. Usually, the vertical synchronization offset is obtained based on experimental and empirical data, and can be accurately set for the current scene. However, in actual applications, due to being in the same scene, there will be certain changes, which will lead to slight changes in the specific vertical synchronization offset. Therefore, when obtaining the vertical synchronization offset and performing load sampling based on the vertical synchronization offset to obtain the second load, it is necessary to determine the currently obtained vertical synchronization offset.
[0036] According to the actual processing situation, the target frame obtained can be directly processed with the default vertical synchronization offset, or it can be dynamically adjusted according to the actual processing results to complete more accurate load sampling. Therefore, when obtaining the vertical synchronization offset, it includes: determining whether the target frame is an adjustment frame; when the target frame is a non-adjustment frame, obtaining the vertical synchronization offset corresponding to the target frame; when the target frame is an adjustment frame, obtaining the historical load sampling result according to the target frame, and determining the vertical synchronization offset according to the historical load sampling result.
[0037] It should be noted that in determining whether it is necessary to dynamically adjust the vertical synchronization offset, and determining whether and when to adjust the vertical synchronization offset, it can be determined based on the currently starting frame. For example, when the current frame is the initial frame or the first few frames, since there is no basis for adjustment, the default vertical synchronization offset can be used as the basis for the second load sampling. After certain processing, the vertical synchronization offset can be dynamically adjusted based on the actual processing results and feedback.
[0038] Therefore, when obtaining the vertical synchronization offset, it is determined whether the currently started target frame is an adjustment frame. When it is determined that the target frame is a non-adjustment frame, the vertical synchronization offset corresponding to the target frame is directly used for subsequent processing. Conversely, when it is determined that the target frame is an adjustment frame, the historical load sampling result is obtained according to the target frame, and the vertical synchronization offset is dynamically updated based on the historical load sampling result for subsequent processing.
[0039] Among them, the default adjustment frame will be different according to the different setting methods. For example, when only the first ten frames are set to be processed with the default vertical synchronization offset, the first ten frames will be set as the default adjustment frame, that is, only when the target frame is a frame in the first ten frames, the default vertical synchronization offset will be used for subsequent processing. For another example, when setting an adjustment every ten frames, an adjustment is required when entering a new ten frames. For example, the 1st to 10th frames are the initial frames, the 11th to 20th frames are a ten-frame, the 21st to 30th frames are a ten-frame, and so on. The adjustment frames at this time are the 11th frame, the 21st frame, the 31st frame...the 10n+1st frame, and n is an integer greater than or equal to 1. For other frames in a cycle (ten frames), they can be set as non-adjustment frames, such as the 11th to 20th frames are the 12th to 20th frames in a cycle.
[0040] Furthermore, when determining whether the currently started target frame is an adjustment frame, the Figure 3 , Figure 3 It is a flowchart diagram of the steps of determining whether a target frame is an adjustment frame provided in an embodiment of the present application, wherein the steps include steps 301 to 305.
[0041] Step 301, determining whether the target frame is an initial frame;
[0042] Step 302, when the target frame is determined to be an initial frame, determining the target frame to be a non-adjusted frame;
[0043] Step 303, when it is determined that the target frame is not the initial frame, determining whether the target frame is the first frame in the adjustment period;
[0044] Step 304, when it is determined that the target frame is the first frame in the adjustment period, determine the target frame as an adjustment frame;
[0045] Step 305 : When determining the first frame in the target frame non-adjustment period, determine the target frame non-adjustment frame.
[0046] Specifically, first determine whether the target frame is the initial frame. From the above description, it can be obtained that the initial frame can be set to the first few frames to be processed, such as the first ten frames. Therefore, the first ten frames to be processed can be called initial frames. When the target frame is determined to be the initial frame, the target frame is judged to be a non-adjusted frame, otherwise further processing will be performed. When performing further processing judgment, determine whether the target frame is the first frame in an adjustment cycle. When it is determined that the target frame is the first frame in the adjustment cycle, the target frame is judged to be an adjusted frame, otherwise the target frame will be determined to be a non-adjusted frame.
[0047] Exemplarily, the adjustment period can be set according to actual circumstances, for example, it can be set as described above, with ten frames as one adjustment period, and the first frame in an adjustment period is used as an adjustment frame to determine a new vertical synchronization offset, while other frames in the adjustment period will use the new vertical synchronization offset for subsequent processing, including sampling and acquisition of the second load.
[0048] That is, when it is determined that the target frame is a non-adjusted frame, the vertical synchronization offset corresponding to the target frame can be directly read for subsequent processing, and when it is determined that the target frame is an adjusted frame, it is necessary to dynamically adjust the vertical synchronization offset. When performing dynamic adjustment to obtain the vertical synchronization offset corresponding to the target frame, it includes: according to the target frame, obtaining load sampling results of several frames; analyzing each frame in the several frames to determine the offset value corresponding to each frame; and calculating the mean based on the offset value to obtain the vertical synchronization offset corresponding to the target frame.
[0049] Specifically, when it is determined that the target frame is an adjustment frame, the load sampling results of several frames are obtained according to the target frame, and then each frame is analyzed and processed to determine the actual offset value corresponding to each frame, and then the vertical synchronization offset corresponding to the target frame is obtained by averaging all the obtained offset values.
[0050] For example, when determining that the target frame is an adjustment frame, certain analysis and processing can be performed based on actual historical load results and data to obtain the load conditions during actual use, and then the vertical synchronization offset can be determined more accurately to perform sampling and frequency adjustment more accurately.
[0051] Taking the above-described ten frames as an adjustment cycle as an example, when the target frame is determined to be the 10n+1th frame, and n is an integer greater than or equal to 1, when obtaining the load sampling results of several frames according to the target frame, the load conditions of a certain number of frames in the past can be obtained. For example, when n is equal to 2, that is, the target frame is the 31st frame, when obtaining the historical load results and data, the actual load conditions of each frame from the 21st frame to the 30th frame can be obtained. By analyzing each frame, the offset value of each frame in the actual processing is determined, and then the average of the 10 offset values is calculated, and the obtained average value is used as the vertical synchronization offset of the target frame. That is, the average value obtained at this time will be used as the sampling basis for each frame in the next adjustment cycle (the 31st frame to the 40th frame).
[0052] It should be noted that in actual applications, in addition to determining the adjustment frame and the corresponding vertical synchronization offset in the above manner, each frame can also be processed in real time, that is, except for the initial frame using the default vertical synchronization offset for sampling processing, each other frame will be adjusted in real time according to the actual historical load conditions, such as the 11th frame is updated according to the load conditions of the 1st to 10th frames, the 12th frame is updated according to the load conditions of the 2nd to 11th frames, the 13th frame is updated according to the load conditions of the 3rd to 12th frames, and so on. When updating, the average calculation method can also be used for processing.
[0053] That is, when it is determined that the target frame is not the initial frame, the target frame is judged to be an adjustment frame. At this time, the load conditions of each frame within a cycle are obtained according to the target frame, and analyzed and processed to obtain the offset value of each frame, and then the vertical synchronization offset corresponding to the target frame is obtained by average calculation.
[0054] Further, when a vertical synchronization offset is obtained, and a load is sampled on a target frame according to the vertical synchronization offset to obtain a second load, the method includes: determining a sampling point for sampling on the target frame according to the vertical synchronization offset and the starting position, and performing load sampling at the sampling point to obtain the second load. Specifically, the vertical synchronization offset is the position / time interval between the sampling point for sampling the first load and the sampling point for sampling the second load, so when sampling to obtain the second load, it is first necessary to determine a sampling point on the target frame according to the vertical synchronization offset and the starting position, and then perform load sampling to obtain the second load when the sampling point is reached.
[0055] Reference Figure 2 ,exist Figure 2 In the frequency modulation scenario shown, the position indicated by arrow 1 is the starting position, and the position indicated by arrow 2 can be obtained according to the vertical synchronization offset, and the position indicated by arrow 2 is the position where sampling is performed to obtain the second load.
[0056] Step 103: According to the first load and the second load, frequency modulation is performed on the CPU link when processing the target frame.
[0057] In one embodiment, after the first load and the second load are obtained, the CPU link is frequency modulated according to the obtained first load and the second load.
[0058] For example, when processing, Figure 2 Position, when performing frequency modulation processing, the area included by arrow 1 and arrow 2 will be frequency adjusted according to the first load sampled at arrow 1, and the area included by arrow 2 and arrow 3 (the beginning of the next frame adjacent to the target frame) will be frequency adjusted according to the second load sampled at arrow 2.
[0059] Normally, when processing each frame, the loads at different locations in different frames of the scene are different. For example, when processing a frame, rendering is performed first and then synthesis is performed to complete the processing of the frame. Obviously, the load situation is not constant during processing, and there are also large differences in the demand for CPU during rendering and synthesis, which leads to different demands for load, and a situation where the load is heavy at the beginning and light at the end, that is, the load is heavier during rendering and lighter during synthesis. At this time, frequency modulation processing will be performed according to the first load and the second load obtained by real-time sampling, which can effectively avoid insufficient computing power in heavy-load areas and waste of computing power in light-load areas.
[0060] Further, when frequency modulation is performed according to the first load and the second load, referring to Figure 4 , Figure 4 It is a flowchart diagram of the steps of performing frequency modulation processing provided in an embodiment of the present application, wherein the steps include steps 401 to 403.
[0061] Step 401, obtaining a load adjustment table, and querying the load adjustment table to obtain a first link frequency and a second link frequency corresponding to a first load and a second load, respectively;
[0062] Step 402, splitting the target frame into a first part and a second part according to the vertical synchronization offset;
[0063] Step 403: frequency modulate the first part according to the first link frequency, and frequency modulate the second part according to the second link frequency.
[0064] Specifically, when frequency modulation is performed according to the first load and the second load, frequency modulation is performed on different areas, such as Figure 2 As shown, when the frequency modulation processing is not performed using the method of the present application, the default frequency is used for processing each frame, such as Figure 2 f0 shown in the figure, and when frequency modulation processing is performed based on the method of the present application, for the area included in arrows 1 and arrows 2, the adjusted frequency f1 can be used for subsequent processing, and for the area included in arrows 2 and arrows 3, the frequency f2 is used for subsequent processing, and the results of frequency modulation corresponding to different intervals, such as f1 and f2, need to be adjusted according to the actual load conditions.
[0065] Exemplarily, when determining the frequencies corresponding to the first load and the second load, a load adjustment table can be obtained, wherein the load adjustment table can be updated in real time, and then the first link frequency and the second link frequency corresponding to the first load and the second load are determined in the load adjustment table, and at the same time, the target frame is split according to the vertical synchronization offset and the initial position to obtain the first part and the second part, and finally, when performing frequency modulation processing, the first link frequency is used to perform frequency modulation processing on the first part, and the second link frequency is used to perform frequency modulation processing on the second part.
[0066] Furthermore, in actual applications, due to different scenarios, there are differences in load conditions. For example, in the rendering and synthesis scenarios mentioned above, there will be differences in the load in a frame, but in other scenarios, it may always be under heavy load, such as in a game scenario. In this case, when load sampling is performed to obtain the first load and the second load, the first load and the second load are the same or the load offset is small, and segmented frequency modulation may not be performed at this time.
[0067] Therefore, when the first load and the second load are obtained, it is determined whether the first load and the second load are the same or have a small difference, wherein a difference threshold can be set for a small difference, and when the difference between the first load and the second load is less than the difference threshold, it is determined that the difference is small, and then subsequent processing is performed based on the comparison result, specifically including: determining whether the first load and the second load are the same; when it is determined that the first load and the second load are the same, using the first link frequency for frequency modulation processing.
[0068] By comparing the first load and the second load, the performance impact caused by frequent frequency modulation when the load difference is small can be avoided.
[0069] In summary, the present application discloses a dynamic voltage frequency adjustment method. When performing frequency modulation processing, the moment of receiving the vertical synchronization signal is determined as the start of processing the target frame. At this time, the load sampling is performed at the starting position of the target frame to obtain the first load, so as to perform frequency modulation processing on the CPU link according to the first load, and the vertical synchronization offset at this time is obtained. In the process of processing the target frame, the second load is sampled again on the target frame according to the vertical synchronization offset, and the CPU link is frequency modulated again according to the second load. In the frequency adjustment process, the vertical synchronization signal is used as the start signal of the frame processing, and the load can be accurately acquired. Then, according to the vertical synchronization offset determined by the intra-frame features, the load can be accurately tracked, and the heavy load and light load can be accurately acquired. Then, for different intervals, the frequency is determined and adjusted according to the corresponding loads, and the matching of frequency modulation and computing power can be achieved more accurately, and both performance and power consumption can be taken into account.
[0070] According to the method described in the above embodiments, this embodiment will be further described from the perspective of a dynamic voltage and frequency adjustment device. The dynamic voltage and frequency adjustment device can be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, etc.
[0071] See also Figure 5 , Figure 5 is a structural diagram of a dynamic voltage frequency adjustment device provided in an embodiment of the present application, such as Figure 5 As shown, the dynamic voltage frequency adjustment device 500 provided in the embodiment of the present application includes:
[0072] A first sampling module 501 is used to perform load sampling on the starting position of a target frame to obtain a first load when a vertical synchronization signal is received;
[0073] A second sampling module 502 is used to obtain a vertical synchronization offset, and perform load sampling on a target frame according to the vertical synchronization offset to obtain a second load;
[0074] The frequency modulation processing module 503 is used to perform frequency modulation processing on the CPU link when processing the target frame according to the first load and the second load.
[0075] In one embodiment, the second sampling module 502 is further configured to:
[0076] Determine whether the target frame is a regulation frame;
[0077] When the target frame is a non-adjusted frame, obtaining a vertical synchronization offset corresponding to the target frame;
[0078] In the case where the target frame is an adjustment frame, a historical load sampling result is obtained according to the target frame, and a vertical synchronization offset is determined according to the historical load sampling result.
[0079] In one embodiment, the second sampling module 502 is further configured to:
[0080] Determine whether the target frame is an initial frame;
[0081] In the case where the target frame is determined to be an initial frame, the target frame is determined to be a non-adjusted frame;
[0082] In the case where it is determined that the target frame is not the initial frame, determining whether the target frame is the first frame in the adjustment period;
[0083] In the case where the target frame is determined to be the first frame in the adjustment cycle, determining the target frame to be the adjustment frame;
[0084] In the case of determining the first frame in the target frame non-adjustment period, the target frame non-adjustment frame is determined.
[0085] In one embodiment, the second sampling module 502 is further configured to:
[0086] According to the target frame, obtain the load sampling results of several frames;
[0087] Analyze each of the plurality of frames to determine an offset value corresponding to each frame;
[0088] The average value is calculated according to the offset value to obtain the vertical synchronization offset corresponding to the target frame.
[0089] In one embodiment, the second sampling module 502 is further configured to:
[0090] According to the vertical synchronization offset and the starting position, a sampling point for sampling is determined on the target frame, and load sampling is performed at the sampling point to obtain a second load.
[0091] In one embodiment, the frequency modulation processing module 503 is further used for:
[0092] Obtain a load adjustment table, and query the load adjustment table to obtain a first link frequency and a second link frequency corresponding to the first load and the second load, respectively;
[0093] Splitting the target frame into a first part and a second part according to a vertical synchronization offset;
[0094] The first portion is frequency modulated according to a first link frequency, and the second portion is frequency modulated according to a second link frequency.
[0095] In one embodiment, the frequency modulation processing module 503 is further used for:
[0096] determining whether the first load and the second load are the same;
[0097] When it is determined that the first load and the second load are the same, the first link frequency is used for frequency modulation processing.
[0098] Also, see Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.
[0099] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 600 and processes data by running or loading applications stored in the memory 602 and calling data stored in the memory 602, thereby monitoring the electronic device 600 as a whole.
[0100] In this embodiment, the processor 601 in the electronic device 600 will load the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 will run the application stored in the memory 602, thereby implementing any step in the dynamic voltage and frequency adjustment method provided in the above embodiment.
[0101] The electronic device 600 can implement the steps in any embodiment of the dynamic voltage and frequency adjustment method provided in the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by any dynamic voltage and frequency adjustment method provided in the embodiments of the present application. Please refer to the previous embodiments for details and will not be repeated here.
[0102] See also Figure 7 , Figure 7 is another structural schematic diagram of an electronic device provided in an embodiment of the present application, such as Figure 7 As shown, Figure 7 The specific structural block diagram of the electronic device provided in the embodiment of the present application is shown, and the electronic device can be used to implement the dynamic voltage frequency adjustment method provided in the above embodiment. The electronic device 700 can be a mobile terminal such as a smart phone or a laptop computer.
[0103] The RF circuit 710 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.
[0104] The memory 720 can be used to store software programs and modules, such as the program instructions / modules corresponding to the dynamic voltage and frequency adjustment method in the above-mentioned embodiment. The processor 780 executes various functional applications and the dynamic voltage and frequency adjustment method by running the software programs and modules stored in the memory 720.
[0105] The memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 720 may further include a memory remotely arranged relative to the processor 780, and these remote memories may be connected to the electronic device 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0106] The input unit 730 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen or touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 731), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 731 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0107] The display unit 740 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 700, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 740 may include a display panel 741, and optionally, the display panel 741 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 731 may cover the display panel 741, and when the touch-sensitive surface 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of the touch event. Although in the figure, the touch-sensitive surface 731 and the display panel 741 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 731 and the display panel 741 can be integrated to implement input and output functions.
[0108] The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 700, they will not be repeated here.
[0109] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the electronic device 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another terminal through the RF circuit 710, or the audio data is output to the memory 720 for further processing. The audio circuit 760 may also include an earplug jack to provide communication between an external headset and the electronic device 700.
[0110] The electronic device 700 can help the user receive requests, send information, etc. through the transmission module 770 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 770 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 700 and can be omitted as needed without changing the essence of the invention.
[0111] The processor 780 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the electronic device 700 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 780.
[0112] The electronic device 700 also includes a power supply 790 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 790 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0113] Although not shown, the electronic device 700 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step of the dynamic voltage frequency adjustment method provided in the above embodiment.
[0114] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0115] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium, which stores a plurality of instructions, and the instructions can be executed by the processor to implement any step of the dynamic voltage and frequency adjustment method provided in the above embodiments.
[0116] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0117] Since the instructions stored in the storage medium can execute the steps in any embodiment of the dynamic voltage and frequency adjustment method provided in the embodiments of the present application, the beneficial effects that can be achieved by any dynamic voltage and frequency adjustment method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0118] The above is a detailed introduction to a dynamic voltage frequency adjustment method, device, electronic device and storage medium provided by the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. Moreover, for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and modifications can be made, and these improvements and modifications are also regarded as the protection scope of the present application.
Claims
1. A dynamic voltage frequency adjustment method, characterized in that: include: When a vertical synchronization signal is received, a load sampling is performed on a starting position of a target frame to obtain a first load; Acquire a vertical synchronization offset, and perform load sampling on the target frame according to the vertical synchronization offset to obtain a second load; According to the first load and the second load, frequency modulation is performed on the CPU link when processing the target frame.
2. The dynamic voltage frequency adjustment method according to claim 1, wherein: The obtaining of the vertical synchronization offset comprises: Determining whether the target frame is an adjustment frame; When the target frame is a non-adjusted frame, obtaining a vertical synchronization offset corresponding to the target frame; In the case that the target frame is an adjustment frame, a historical load sampling result is acquired according to the target frame, and a vertical synchronization offset is determined according to the historical load sampling result.
3. The dynamic voltage frequency adjustment method according to claim 2, wherein: The determining whether the target frame is an adjustment frame comprises: Determining whether the target frame is an initial frame; In the case where the target frame is determined to be the initial frame, determining the target frame to be a non-adjusted frame; In the case where it is determined that the target frame is not the initial frame, determining whether the target frame is the first frame in the adjustment period; In the case where it is determined that the target frame is the first frame in the adjustment period, determining the target frame as an adjustment frame; In case of determining the first frame in the target frame non-adjustment period, the target frame non-adjustment frame is determined.
4. The dynamic voltage frequency adjustment method according to claim 2, wherein: The acquiring a historical load sampling result according to the target frame, and determining a vertical synchronization offset according to the historical load sampling result, includes: According to the target frame, obtaining load sampling results of several frames; Analyze each of the plurality of frames to determine an offset value corresponding to each frame; An average calculation is performed according to the offset values to obtain a vertical synchronization offset corresponding to the target frame.
5. The dynamic voltage frequency adjustment method according to claim 1, wherein: The performing load sampling on the target frame according to the vertical synchronization offset to obtain a second load comprises: A sampling point for sampling is determined on the target frame according to the vertical synchronization offset and the starting position, and load sampling is performed at the sampling point to obtain a second load.
6. The dynamic voltage frequency adjustment method according to claim 1, wherein: The step of performing frequency modulation processing on a CPU link when processing the target frame according to the first load and the second load includes: Obtain a load adjustment table, and query the load adjustment table to obtain a first link frequency and a second link frequency corresponding to the first load and the second load, respectively; Splitting the target frame into a first part and a second part according to the vertical synchronization offset; The first portion is frequency modulated according to the first link frequency, and the second portion is frequency modulated according to the second link frequency.
7. The dynamic voltage frequency adjustment method according to claim 6, wherein: The method further comprises: determining whether the first load and the second load are the same; When it is determined that the first load and the second load are the same, the first link frequency is used for frequency modulation processing.
8. A dynamic voltage frequency adjustment device, characterized in that: include: A first sampling module is used to perform load sampling on the starting position of the target frame to obtain a first load when a vertical synchronization signal is received; A second sampling module, used for acquiring a vertical synchronization offset, and performing load sampling on the target frame according to the vertical synchronization offset to obtain a second load; A frequency modulation processing module is used to perform frequency modulation processing on the CPU link when processing the target frame according to the first load and the second load.
9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Self-adaptive memory protection method and device for dynamically adjusting triple modular redundancy voting frequency
CN121455701A