Control method and apparatus, device, and storage medium
By acquiring the operating information of different processing units in the processing module, and using preset mapping relationships and intelligent frequency hopping technology to adjust the operating parameters of the storage unit, the problem that existing technologies cannot meet the performance requirements of electronic devices is solved, and the performance of the processing module and the storage module is optimized.
Patent Information
- Application Number
- CN202310189128.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-02-22
AI Technical Summary
Existing solutions for adjusting the operating parameters of storage units cannot meet the performance requirements of electronic devices, especially in heterogeneous computing environments where the performance of processing and storage modules cannot be optimized.
By acquiring the operating information of different processing units in the processing module, the operating parameters of the storage unit are determined using a preset mapping relationship, and the storage unit is dynamically adjusted through intelligent frequency hopping technology to match the actual needs of the processing module.
It achieves performance optimization of processing and storage modules in heterogeneous computing environments, improving the operating efficiency of electronic devices and user experience.
Smart Images

Figure CN116225330B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to electronic technology, and relates to a control method and device, equipment and a storage medium. BACKGROUND
[0002] With the development of technology, the use of electronic equipment is more and more frequent. Among them, various types of storage units as an important part of electronic equipment, play an irreplaceable role.
[0003] In the use process of electronic equipment, the working parameters of the storage unit need to be adjusted, but the existing scheme for adjusting the working parameters of the storage unit cannot meet the use performance of the electronic equipment. SUMMARY
[0004] Therefore, the embodiment of the present application provides a control method and device, equipment and a storage medium.
[0005] The technical scheme of the embodiment of the present application is as follows:
[0006] In a first aspect, the embodiment of the present application provides a control method, which comprises:
[0007] Obtaining the first running information of the first processing unit of the processing module;
[0008] Obtaining the second running information of the second processing unit of the processing module;
[0009] According to the first running information and the second running information, the working parameters of the storage unit are determined, and the storage unit can communicate with the processing module;
[0010] The storage unit is controlled to work with the working parameters.
[0011] In some embodiments, according to the first running information and the second running information, the working parameters of the storage unit are determined, comprising: according to a preset rule, the first running information or the second running information is determined as target running information; according to the target running information, a target mapping relationship is determined from a plurality of preset mapping relationships; and based on the target mapping relationship, the working parameters of the storage unit are determined.
[0012] In some embodiments, according to the preset rule, the first running information or the second running information is determined as the target running information, comprising: determining the first attribute parameter of the storage unit required by the first running information, and the second attribute parameter of the storage unit required by the second running information; and according to the comparison result of the first attribute parameter and the second attribute parameter, the first running information or the second running information is determined as the target running information.
[0013] In some embodiments, the determining, according to the target running information, a target mapping relationship from a plurality of preset mapping relationships comprises: obtaining a first mapping relationship corresponding to the first processing unit and a second mapping relationship corresponding to the second processing unit; if the target running information belongs to the first processing unit, determining the first mapping relationship as the target mapping relationship; if the target running information belongs to the second processing unit, determining the second mapping relationship as the target mapping relationship; wherein the first mapping relationship comprises a first parameter value set of the working parameter, and the second mapping relationship comprises a second parameter value set of the working parameter, and the first parameter value set is different from the second parameter value set.
[0014] In some embodiments, the determining, based on the target mapping relationship, a working parameter of a storage unit comprises: determining, from a parameter value set included in the target mapping relationship, a target working parameter value matched with the target running information; correspondingly, the controlling the storage unit to work with the working parameter comprises: obtaining a current working parameter value of the storage unit; and controlling the storage unit to adjust from the current working parameter value to the target working parameter value.
[0015] In some embodiments, the controlling the storage unit to adjust from the current working parameter value to the target working parameter value comprises: determining a difference value between the current working parameter value and the target working parameter value; if the difference value is greater than a preset threshold, determining an intermediate parameter value; and controlling the storage unit to adjust from the current working parameter value to the intermediate parameter value, and then to adjust from the intermediate parameter value to the target working parameter value; wherein the intermediate parameter value is between the current working parameter value and the target working parameter value, and the intermediate parameter value belongs to the target mapping relationship.
[0016] In some embodiments, the processing capability of the first processing unit is different from that of the second processing unit.
[0017] In a second aspect, the embodiments of the present application provide a control device, which comprises:
[0018] a first obtaining unit configured to obtain first running information of a first processing unit of a processing module;
[0019] a second obtaining unit configured to obtain second running information of a second processing unit of the processing module;
[0020] a determining unit configured to determine, according to the first running information and the second running information, a working parameter of a storage unit, the storage unit being capable of communicating with the processing module;
[0021] a control unit configured to control the storage unit to operate at the working parameter.
[0022] In a third aspect, an electronic device is provided, which includes a memory and a processor, the memory storing a computer program capable of running on the processor, and the processor implements the steps of the control method when executing the program.
[0023] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the control method when executed by a processor. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 Implementation flowchart of the control method of the embodiments of the present application Figure One ;
[0025] Figure 2 Implementation flowchart of the control method of the embodiments of the present application Figure Two ;
[0026] Figure 3A Principle diagram of the SAGV frequency modulation scheme
[0027] Figure 3B Principle diagram of the memory intelligent frequency hopping technology of the embodiments of the present application Figure One ;
[0028] Figure 3C Principle diagram of the memory intelligent frequency hopping technology of the embodiments of the present application Figure Two ;
[0029] Figure 4 Composition structure diagram of the control device of the embodiments of the present application
[0030] Figure 5 Hardware entity diagram of the electronic device of the embodiments of the present application DETAILED DESCRIPTION
[0031] The technical solutions of the present application will be further described in detail below in combination with the drawings and embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0032] In the following description, "some embodiments" are related to a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0033] In the following description, the suffixes such as "module", "part", or "unit" used for components are merely intended for facilitating explanation of the present application, and are by no means specific thereto. Thus, "module", "part", or "unit" can be used interchangeably.
[0034] It should be noted that the terms "first", "second", and "third" used in the embodiments of the present application are merely used to distinguish similar objects, and do not represent a specific order of the objects. Understandably, the "first", "second", and "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0035] Based on this, the embodiments of the present application provide a control method, the functions realized by the method can be realized by the processor in the electronic device calling the program code, of course, the program code can be saved in the storage medium of the electronic device. Figure 1 The implementation flow of the control method of the embodiments of the present application is shown in Figure One As shown in Figure 1 The method comprises:
[0036] Step S101, obtaining first running information of a first processing unit of a processing module;
[0037] Here, the electronic device can be various types of devices with information processing capabilities, such as navigation devices, smart phones, tablet computers, wearable devices, laptop computers, sweeping robots, smart kitchen and bathroom, smart home, cars, servers or server clusters, etc.
[0038] In the embodiments of the present application, the processing module includes various types of modules with processing functions, such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), SCP (Service Control Point), MCU (Micro Controller Unit), etc. And the processing module can communicate with the storage unit of the electronic device, for example, the result of the calculation processing can be put into the storage unit, or the target data can be read from the storage unit for processing.
[0039] The processing module in the embodiment of the present application includes at least two processing units, and different processing units among the at least two processing units have different processing capabilities. For example, when the processing module is a CPU, the first processing unit can be a large core in the CPU, and the second processing unit can be a small core in the CPU. The large core is mainly responsible for heavy load tasks through high frequency and super threading, and the small core is mainly responsible for light load tasks, multi-thread performance throughput and cooperation capability. The first processing unit in the embodiment of the present application can be one of the at least two processing units.
[0040] Here, the first running information of the first processing unit refers to various information of the first processing unit in the running process. The working state of the first processing unit can be determined through the first running information, and then the parameter demand of the first processing unit to the storage unit is judged. For example, when the first processing unit is a large core in the CPU, the first running information includes but is not limited to the clock frequency of the large core, the power consumption occupied by the large core, the number of processes processed in the large core, etc.
[0041] In step S102, the second running information of the second processing unit of the processing module is obtained.
[0042] Here, the second processing unit can be another processing unit of the at least two processing units. The second running information of the second processing unit refers to various information of the second processing unit in the running process. The working state of the second processing unit can be determined through the second running information, and then the parameter demand of the second processing unit to the storage unit is judged. For example, when the second processing unit is a small core in the CPU, the second running information includes but is not limited to the clock frequency of the small core, the power consumption occupied by the small core, the number of processes processed in the small core, etc.
[0043] In step S103, the working parameters of the storage unit are determined according to the first running information and the second running information, and the storage unit can communicate with the processing module.
[0044] Here, the storage unit refers to a unit with storage function in the electronic device, which can include cache (Cache), and can also include memory such as DDR (Double Data Rate, double data rate synchronous dynamic random access memory), ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random access memory), and can also include external storage, hard disk, etc. The working parameters of the storage unit include but are not limited to: the frequency of the storage unit, the capacity of the storage unit, the clock cycle of the storage unit, the reaction time of the storage unit, etc.
[0045] In the embodiments of the present application, when the first processing unit and the second processing unit of the processing module are both in the working state, the working parameter of the storage unit can be determined according to the first running information of the first processing unit and the second running information of the second processing unit. For example, the processing module is a CPU, the first processing unit is a large core of the CPU, and the second processing unit is a small core of the CPU. The first running information is the power consumption of the large core, and the second running information is the power consumption of the small core. Then, the frequency of the memory can be determined according to the power consumption of the large core and the power consumption of the small core, so as to achieve the optimization of performance while meeting the functional requirements. For another example, the processing module is a CPU, the first processing unit is a large core of the CPU, and the second processing unit is a small core of the CPU. The first running information is the number of processes processed by the large core, and the second running information is the number of processes processed by the small core. Then, the transmission rate of the hard disk (i.e., the speed of reading and writing data of the hard disk) can be determined according to the above two process numbers.
[0046] In step S104, the storage unit is controlled to work at the working parameter.
[0047] In the embodiments of the present application, after the working parameter of the storage unit is determined, the storage unit needs to be controlled to work at the working parameter. For example, if the working frequency of the memory is determined to be 4800MHz (megahertz) according to the power consumption of the large core and the power consumption of the small core, the memory is controlled to work at the frequency of 4800MHz.
[0048] For example, in the prior art, the memory frequency adjustment is generally to set four fixed frequency points, and then switch among the four fixed frequency points according to the overall use of the CPU. The embodiments of the present application consider the large core mode of the CPU, that is, there are high-performance P-CORE (i.e., large core) and low-power E-CORE (i.e., small core) inside the SOC (System On Chip, System on Chip), and then determine the working frequency of the memory based on the running information of the large core and the running information of the small core.
[0049] Here, through the control method in steps S101 to S104, the working parameter of the storage unit can be determined comprehensively according to the running information of different processing units of the processing module, so as to achieve the optimization of performance of the processing module and the storage module while meeting the function of the processing module.
[0050] In some embodiments, the processing capabilities of the first processing unit and the second processing unit are different; or, the processing capabilities of the first processing unit and the second processing unit are the same. For example, the first processing unit and the second processing unit are a large core and a small core of a CPU, and have different processing capabilities. For another example, the first processing unit and the second processing unit are two cores of the same specification of the CPU, and have the same processing capability.
[0051] Based on the foregoing embodiments, the embodiments of the present application further provide a control method, which is applied to an electronic device, Figure 2 For the implementation process of the control method of the embodiments of the present application Figure Two As shown in Figure 2 The method comprises the following steps:
[0052] In step S201, first running information of a first processing unit of a processing module is obtained.
[0053] In step S202, second running information of a second processing unit of the processing module is obtained.
[0054] In step S203, the first running information or the second running information is determined as target running information according to a preset rule.
[0055] For example, if the processing module is a CPU, the first processing unit is a large core of the CPU, and the second processing unit is a small core of the CPU, generally, the large core and the small core are both in a working state, and the CPU dynamically balances the use of the large core and the small core. In the case of running information being power consumption, if the power consumption of the large core is greater than that of the small core, the target running information is the first running information; otherwise, if the power consumption of the small core is greater than that of the large core, the target running information is the second running information.
[0056] It should be noted that the running information includes but is not limited to running frequency, usage rate, power consumption, and process number, and different properties of the running information can correspond to different preset rules. For example, when the running information is frequency, it can correspond to a first preset rule, and when the running information is power consumption, it can correspond to a second preset rule, and the first preset rule is different from the second preset rule.
[0057] In step S204, a target mapping relationship is determined from a plurality of preset mapping relationships according to the target running information.
[0058] In the embodiments of the present application, a plurality of mapping relationships are required to be preset, and then the target mapping relationship is determined from the plurality of mapping relationships according to the target running information, so as to determine the working parameter of the storage unit. It should be noted that the forms of the mapping relationship include but are not limited to a mapping table and a mapping function. The embodiments of the present application do not limit the forms of the mapping relationship, and any form (i.e., any type) of the mapping relationship is within the protection scope of the present application.
[0059] For example, if the processing module is a CPU, the first processing unit is a large core of the CPU, the second processing unit is a small core of the CPU, and both the large core and the small core are in a working state. Moreover, the large core corresponds to the first frequency table, the small core corresponds to the second frequency table, and the first frequency table and the second frequency table include different memory frequencies. If the target running information is the first running information, the target mapping relationship is the first frequency table; otherwise, if the target running information is the second running information, the target mapping relationship is the second frequency table.
[0060] In some embodiments, each processing unit corresponds to a preset mapping relationship. That is, the number of the plurality of preset mapping relationships is related to the number of processing units included in the processing module.
[0061] Step S205, determining a working parameter of a storage unit based on the target mapping relationship, the storage unit being capable of communicating with the processing module;
[0062] For example, if the target mapping relationship is the first frequency table and the working parameter of the storage unit is a memory frequency, the frequency of the memory is determined as a target frequency value in the first frequency table, and frequency hopping and / or frequency adjustment are performed based on the first frequency table, so that the frequency of the memory is switched to the target frequency value.
[0063] Step S206, controlling the storage unit to work in the working parameter.
[0064] Here, through the control method in steps S201 to S206, the target mapping relationship can be determined from the plurality of mapping relationships according to the running information of different processing units of the processing module, and then the working parameter of the storage unit is determined, so that the optimal combination of the performance of the processing module and the performance of the storage unit is achieved.
[0065] Based on the foregoing embodiments, an embodiment of the present application further provides a control method, which is applied to an electronic device, and the method comprises:
[0066] Step S211, obtaining first running information of a first processing unit of a processing module;
[0067] Step S212, obtaining second running information of a second processing unit of the processing module;
[0068] Step S213, determining a first attribute parameter of a storage unit required by the first running information and a second attribute parameter of the storage unit required by the second running information;
[0069] Here, the first processing unit and the second processing unit can communicate with the storage unit, and the first attribute parameter of the storage unit required by the first processing unit can be determined through the running information of the first processing unit, and the second attribute parameter of the storage unit required by the second processing unit can be determined through the running information of the second processing unit. The first attribute parameter and the second attribute parameter include but are not limited to the bandwidth of the storage unit, the capacity of the storage unit, etc.
[0070] For example, if the processing module is a CPU, the first processing unit is a large core of the CPU, the second processing unit is a small core of the CPU, and the large core and the small core are in a working state. The first attribute parameter of the storage unit required by the first running information and the second attribute parameter of the storage unit required by the second running information can be the memory bandwidth requirement corresponding to the power consumption of the large core and the memory bandwidth requirement corresponding to the power consumption of the small core.
[0071] Step S214, determining the first running information or the second running information as target running information according to the comparison result of the first attribute parameter and the second attribute parameter;
[0072] For example, the first processing unit is a large core of the CPU, and the second processing unit is a small core of the CPU. The memory bandwidth requirement corresponding to the power consumption of the large core and the memory bandwidth requirement corresponding to the power consumption of the small core can be compared. If the memory bandwidth requirement corresponding to the power consumption of the large core is higher than the memory bandwidth requirement corresponding to the power consumption of the small core, the first running information is determined as the target running information. Conversely, if the memory bandwidth requirement corresponding to the power consumption of the large core is less than the memory bandwidth requirement corresponding to the power consumption of the small core, the second running information is determined as the target running information.
[0073] Step S215, determining a target mapping relationship from a plurality of preset mapping relationships according to the target running information;
[0074] For example, if the memory bandwidth requirement corresponding to the power consumption of the large core is higher than the memory bandwidth requirement corresponding to the power consumption of the small core, the first running information is determined as the target running information, and the target mapping relationship is the mapping relationship corresponding to the large core. Conversely, if the memory bandwidth requirement corresponding to the power consumption of the large core is less than the memory bandwidth requirement corresponding to the power consumption of the small core, the second running information is determined as the target running information, and the target mapping relationship is the mapping relationship corresponding to the small core.
[0075] Here, the target mapping relationship can be determined by the attribute parameter information of the storage unit required by different processing units, and then the working parameter of the storage unit is determined according to the target mapping relationship. In this way, the embodiments of the present application can consider the running state of each processing unit, so as to determine the working parameter of the memory unit according to the current actual running application, to meet the function while realizing the performance optimization of each processing unit of the processing module and the performance optimization of the storage unit.
[0076] Step S216, determining the working parameter of the storage unit based on the target mapping relationship, the storage unit being capable of communicating with the processing module;
[0077] Step S217, controlling the storage unit to work with the working parameter.
[0078] Based on the foregoing embodiments, the embodiments of the present application further provide a control method, the method being applied to an electronic device, and the method comprises:
[0079] Step S221, obtaining the first running information of the first processing unit of the processing module;
[0080] Step S222, obtaining the second running information of the second processing unit of the processing module;
[0081] Step S223, determining the first running information or the second running information as the target running information according to a preset rule;
[0082] Step S224, obtaining the first mapping relationship corresponding to the first processing unit and the second mapping relationship corresponding to the second processing unit;
[0083] Here, the first processing unit corresponds to the first mapping relationship, and the second processing unit corresponds to the second mapping relationship. For example, if the processing module is a CPU, the first processing unit is a large core of the CPU, and the second processing unit is a small core of the CPU. The large core corresponds to the first memory frequency table, and the small core corresponds to the second memory frequency table. The first memory frequency table includes four frequencies: 8500MHz, 7500MHz, 5200MHz, and 3600MHz. The second memory frequency table includes three frequencies: 6000MHz, 4800MHz, and 2400MHz.
[0084] Step S225, if the target running information belongs to the first processing unit, determining the first mapping relationship as the target mapping relationship;
[0085] Step S226, if the target running information belongs to the second processing unit, determining the second mapping relationship as the target mapping relationship;
[0086] The first mapping relationship includes a first parameter value set of the working parameter, and the second mapping relationship includes a second parameter value set of the working parameter, and the first parameter value set is different from the second parameter value set.
[0087] In step S227, a working parameter of a storage unit is determined based on the target mapping relationship, and the storage unit is capable of communicating with the processing module.
[0088] For example, if the processing module is a CPU, the first processing unit is a large core of the CPU, and the second processing unit is a small core of the CPU. The large core corresponds to the first memory frequency table, and the small core corresponds to the second memory frequency table. The first memory frequency table includes four frequencies: 8500 MHz, 7500 MHz, 5200 MHz, and 3600 MHz. The second memory frequency table includes three frequencies: 6000 MHz, 4800 MHz, and 2400 MHz. The memory bandwidth required by the power consumption of the large core is greater than the memory bandwidth required by the power consumption of the small core. Therefore, the target frequency of the memory is determined according to the first memory frequency table, and the frequency is jumped or adjusted to the target frequency. Conversely, the memory bandwidth required by the power consumption of the small core is greater than the memory bandwidth required by the power consumption of the large core. Therefore, the target frequency of the memory is determined according to the second memory frequency table, and the frequency is jumped or adjusted to the target frequency.
[0089] In step S228, the storage unit is controlled to work at the working parameter.
[0090] Based on the foregoing embodiments, the embodiments of the present application further provide a control method, which is applied to an electronic device, and the method comprises the following steps:
[0091] In step S231, first running information of a first processing unit of a processing module is obtained.
[0092] In step S232, second running information of a second processing unit of the processing module is obtained.
[0093] In step S233, the first running information or the second running information is determined as target running information according to a preset rule.
[0094] In step S234, a first mapping relationship corresponding to the first processing unit and a second mapping relationship corresponding to the second processing unit are obtained.
[0095] In step S235, if the target running information belongs to the first processing unit, the first mapping relationship is determined as a target mapping relationship.
[0096] In step S236, if the target running information belongs to the second processing unit, the second mapping relationship is determined as the target mapping relationship.
[0097] The first mapping relationship includes a first parameter value set of the working parameter, and the second mapping relationship includes a second parameter value set of the working parameter, and the first parameter value set is different from the second parameter value set.
[0098] In step S237, a target working parameter value matched with the target running information is determined from a parameter value set included in the target mapping relationship.
[0099] For example, the memory bandwidth required by the power consumption of the large core is greater than the memory bandwidth required by the power consumption of the small core, and the target mapping relationship is the first memory frequency table corresponding to the large core. The memory frequency values included in the first memory frequency table are 8500MHz, 7500MHz, 5200MHz and 3600MHz, and it is assumed that the power consumption of the large core is a first value. Therefore, the target memory frequency matched with the first value of the power consumption is determined to be 5200MHz from the memory frequency value set included in the first memory frequency table. Further, the memory needs to be controlled to work at the target memory frequency.
[0100] In step S238, a current working parameter value of the storage unit is obtained.
[0101] For example, after determining the target memory frequency matched with the first value of the power consumption from the memory frequency value set included in the first memory frequency table, the current frequency value of the memory needs to be obtained, so that the memory can be adjusted from the current frequency value to the target memory frequency.
[0102] In step S239, the storage unit is controlled to be adjusted from the current working parameter value to the target working parameter value.
[0103] Here, the control method described in steps S231 to S239 can select a target mapping relationship from the mapping relationships corresponding to different processing units according to the running information of the processing units, and then determine the working parameter of the storage unit, so as to realize the best matching of the performance of the processing module and the performance of the storage unit.
[0104] In some embodiments, the step S239 of controlling the storage unit to be adjusted from the current working parameter value to the target working parameter value includes:
[0105] In step S2391, a difference between the current working parameter value and the target working parameter value is determined.
[0106] In step S2392, if the difference is greater than a preset threshold, an intermediate parameter value is determined.
[0107] For example, the first memory frequency table includes 4 frequencies: 8500MHz, 7500MHz, 5200MHz, and 3600MHz. The second memory frequency table includes 3 frequencies: 6000MHz, 4800MHz, and 2400MHz. If the current memory frequency is 5200MHz, the target memory frequency is 2400MHz, and the preset threshold is 2000MHz, the difference between the current memory frequency and the target memory frequency is greater than the preset threshold, and the intermediate parameter value needs to be determined. The determined intermediate parameter value is 4800MHz. For another example, if the current memory frequency is 8500MHz, the target memory frequency is 2400MHz, and the preset threshold is 2000MHz, the difference between the current memory frequency and the target memory frequency is greater than the preset threshold, and the intermediate parameter value needs to be determined. The determined intermediate parameter value can include 6000MHz and 4800MHz.
[0108] It should be noted that if the difference between the current working parameter value and the target working parameter value is greater than the preset threshold, the determined intermediate parameter value can include one parameter value or multiple parameter values.
[0109] Step S2393, controlling the storage unit to adjust from the current working parameter value to the intermediate parameter value, and then adjust from the intermediate parameter value to the target working parameter value.
[0110] The intermediate parameter value is between the current working parameter value and the target working parameter value, and the intermediate parameter value belongs to the target mapping relationship.
[0111] In the embodiments of the present application, if the span between the current working parameter value and the target working parameter value is large, the intermediate parameter value can be used as a bridge to switch the storage unit from the current working parameter value to the intermediate parameter value, and then switch the storage unit from the intermediate parameter value to the target working parameter value. Moreover, the intermediate parameter value belongs to the target mapping relationship, so that in the case of memory frequency as the working parameter, the frequency adjustment scheme of first frequency hopping between different mapping relationships and then frequency switching within the same mapping relationship is realized.
[0112] For example, the first memory frequency table includes 4 frequencies: 8500MHz, 7500MHz, 5200MHz, and 3600MHz. The second memory frequency table includes 3 frequencies: 6000MHz, 4800MHz, and 2400MHz. The current memory frequency is 8500MHz, which belongs to the first memory frequency table, and the target memory frequency is 2400MHz, which belongs to the second memory frequency table. The memory frequency can be controlled to first switch from 8500MHz in the first memory frequency table to 6000MHz in the second memory frequency table (i.e., first frequency hopping between different mapping relationships), then after 1 second, the memory frequency is controlled to switch from 6000MHz in the second memory frequency table to 4800MHz in the second memory frequency table (i.e., frequency switching within the same mapping relationship), then after 1 second, the memory frequency is controlled to switch from 4800MHz in the second memory frequency table to 2400MHz in the second memory frequency table (i.e., continuing frequency switching within the same mapping relationship), thereby realizing intelligent dynamic frequency switching. That is, in the embodiment of the application, the parameter value span (i.e., the number of intermediate parameter values) between the current working parameter value and the target working parameter value can be first determined, and the switching between adjacent two parameter values is completed every preset time interval until the target parameter value is switched to.
[0113] Here, by the method described in steps S2391 to S2393, frequency hopping between different mapping relationships can be first performed, and then frequency switching within the same mapping relationship is performed. Thus, in the case of a too large frequency span, the problem of unsmooth experience can be reduced.
[0114] Based on the foregoing embodiments, the embodiment of the application further provides a control method, which is a memory intelligent frequency hopping technology and can realize the best matching of CPU performance and memory performance in real time. The control method will be described in detail as follows:
[0115] The maximum frequency of the memory is getting higher and higher, and the span from the minimum frequency to the maximum frequency is too large. However, the frequency points in the current SAGV frequency modulation scheme are only 4, which will result in a large span between each frequency point, and is not conducive to realizing the demand for extreme performance according to the instant running application in actual work.
[0116] In addition, the current CPU is a heterogeneous computing (i.e., supporting large and small core computing), and the future CPU may also support large, medium, and small core computing. Since the purposes of large, medium, and small core design are different, the large core focuses on performance, the medium core adopts a balanced mode, and the small core focuses on battery endurance. Therefore, the current SAGV frequency modulation scheme is mainly optimized for the performance direction of the large core, and cannot be optimized for heterogeneous computing, and cannot meet the performance optimization under multiple cores.
[0117] Figure 3AThis is a schematic diagram of the SAGV frequency modulation scheme, as shown below. Figure 3A As shown, even if the CPU of an electronic device supports big.LITTLE architecture, the SAGV frequency modulation method still uses the memory frequency modulation method corresponding to a single type of CPU core. That is, both big and small cores use the same frequency, namely four frequency points: 8500MHz, 7500MHz, 5200MHz, and 3600MHz. In this case, the bandwidth requirements of the big and small cores do not match the bandwidth requirements provided by the memory, thus failing to meet the performance optimization requirements under multiple cores.
[0118] For heterogeneous computing CPUs, the same frequency does not mean the same performance. The memory frequency should be selected according to the memory bandwidth requirements corresponding to the real-time performance of the CPU.
[0119] That is, in response to the different characteristics of heterogeneous computing, the embodiments of this application add corresponding frequency tables (such as one frequency table for large cores and another frequency table for small cores, and the two frequency tables are different) to meet the memory bandwidth requirements of the performance of multiple cores, so that the memory can achieve optimal performance while meeting the functions of different CPU cores.
[0120] At the same time, a frequency hopping technique is added between different frequency tables, allowing for frequency hopping between different frequency tables first, and then frequency switching within the same frequency table. This can resolve the issue of unsmooth performance caused by excessively large frequency spans in certain situations.
[0121] In some embodiments, memory frequency can be switched based on the program's CPU usage, i.e., based on the actual system operating state. For example, if the program has a high CPU usage, a higher memory frequency is required. It is also related to the CPU frequency; if switching to a smaller core results in a high-frequency operation, a higher memory frequency is needed. Furthermore, if it is an integrated graphics card, the memory frequency value can be jointly determined based on the operating information of different CPU cores and the GPU.
[0122] The following is an example illustrating the solution of an embodiment of this application:
[0123] (1) Frequency modulation and frequency hopping methods for large and small cores;
[0124] Figure 3B This is a schematic diagram illustrating the principle of the intelligent frequency hopping technology for memory in this application. Figure One ,like Figure 3BAs shown, the CPU is a heterogeneous computing architecture, supporting both large and small cores. The frequency table for large cores includes four frequencies: 8500MHz, 7500MHz, 5200MHz, and 3600MHz, while the frequency table for small cores includes three frequencies: 6000MHz, 4800MHz, and 2400MHz. This embodiment employs more frequency modulation methods, and uses different levels of frequency tables for different core sizes. When switching between large and small cores, it supports frequency hopping methods corresponding to memory and CPU, thus achieving performance optimization across multiple core types. Figure 3B As shown, when the memory frequency corresponding to the large core switches to the memory frequency corresponding to the small core, the frequency first jumps down and then adjusts. When the memory frequency corresponding to the small core switches to the memory frequency corresponding to the large core, the frequency first jumps up and then adjusts. Of course, different frequency values within the same frequency table can switch between each other. For example, there are no restrictions on switching between the three frequency values in the frequency table corresponding to the small core. For switching between frequency values in different frequency tables, allowed switching paths can be set. For example, if 8500MHz in the frequency table corresponding to the large core switches to a frequency value in the frequency table corresponding to the small core, switching to 6000MHz and 4800MHz in the frequency table corresponding to the small core is only allowed. Similarly, if 4800MHz in the frequency table corresponding to the small core switches to a frequency value in the frequency table corresponding to the large core, switching to 5200MHz, 7500MHz, and 8500MHz in the frequency table corresponding to the large core is only allowed.
[0125] (2) Frequency modulation and frequency hopping modes for large, medium and small cores;
[0126] Figure 3C This is a schematic diagram illustrating the principle of the intelligent frequency hopping technology for memory in this application. Figure Two ,like Figure 3C As shown, the CPU is a heterogeneous computing architecture, supporting three types of cores: large cores, medium cores, and small cores. The frequency table for large cores includes four frequencies: 8500MHz, 7500MHz, 5200MHz, and 3600MHz; for medium cores, it includes three frequencies: 6000MHz, 4800MHz, and 2400MHz; and for small cores, it includes three frequencies: 3600MHz, 2400MHz, and 1333MHz. This application embodiment employs more frequency modulation methods and uses different frequency table levels for large, medium, and small cores. When switching between large, medium, and small cores, it supports frequency hopping methods corresponding to memory and CPU, thus achieving performance optimization across multiple core types. Figure 3C As shown, when the memory frequency corresponding to the large core, the memory frequency corresponding to the medium core, and the memory frequency corresponding to the small core are switched, the frequency is first hopped and then adjusted.
[0127] In some embodiments, a switching path between frequency values of different frequency tables can also be set. For example...Figure 3C As shown in the table, 8500MHz in the frequency table corresponding to the large core can switch to 6000MHz and 4800MHz in the frequency table corresponding to the medium core if switching to the frequency value in the frequency table corresponding to the medium core. 4800MHz in the frequency table corresponding to the medium core can switch to 3600MHz, 2400MHz and 1333MHz in the frequency table corresponding to the small core if switching to the frequency value in the frequency table corresponding to the small core. 2400MHz in the frequency table corresponding to the small core can switch to 3600MHz, 5200MHz and 7500MHz in the frequency table corresponding to the large core if switching to the frequency value in the frequency table corresponding to the large core.
[0128] Of course, Figure 3B and Figure 3C The frequency table corresponding to each core and the switching path between the frequency values of different frequency tables are only examples. That is, a person skilled in the art can set the frequency values in the frequency table corresponding to each core and the switching path between the frequency values of different frequency tables according to actual use requirements, and the embodiments of the present application do not limit this.
[0129] Based on the foregoing embodiments, the embodiments of the present application provide a control device, which includes each unit included, and each module included by each unit, and each component included by each module, can be realized by a processor in an electronic device; of course, it can also be realized by a specific logic circuit; in the implementation process, the processor can be CPU (Central Processing Unit, Central Processor), MPU (Microprocessor Unit, Microprocessor), DSP (Digital Signal Processing, Digital Signal Processor) or FPGA (Field Programmable Gate Array, Field Programmable Gate Array) and the like.
[0130] Figure 4 The constituent structure diagram of the control device of the embodiments of the present application is as follows, Figure 4 As shown in the table, the device 400 includes:
[0131] The first acquisition unit 401 is configured to obtain first running information of a first processing unit of a processing module;
[0132] The second acquisition unit 402 is configured to obtain second running information of a second processing unit of the processing module;
[0133] The determination unit 403 is configured to determine a working parameter of a storage unit according to the first running information and the second running information, the storage unit being capable of communicating with the processing module;
[0134] The control unit 404 is configured to control the storage unit to work in the working parameter.
[0135] In some embodiments, the determination unit 403 includes:
[0136] A first determination module is configured to determine the first running information or the second running information as target running information according to a preset rule.
[0137] A second determination module is configured to determine a target mapping relationship from a plurality of preset mapping relationships according to the target running information.
[0138] A third determination module is configured to determine a working parameter of the storage unit based on the target mapping relationship.
[0139] In some embodiments, the first determination module includes:
[0140] A first determination sub-module is configured to determine a first attribute parameter of the storage unit required by the first running information and a second attribute parameter of the storage unit required by the second running information.
[0141] The first determination sub-module is further configured to determine the first running information or the second running information as the target running information according to a comparison result of the first attribute parameter and the second attribute parameter.
[0142] In some embodiments, the second determination module includes:
[0143] An obtaining component is configured to obtain a first mapping relationship corresponding to the first processing unit and a second mapping relationship corresponding to the second processing unit.
[0144] A determining component is configured to determine the first mapping relationship as the target mapping relationship if the target running information belongs to the first processing unit.
[0145] The determining component is further configured to determine the second mapping relationship as the target mapping relationship if the target running information belongs to the second processing unit.
[0146] The first mapping relationship includes a first parameter value set of the working parameter, and the second mapping relationship includes a second parameter value set of the working parameter, and the first parameter value set is different from the second parameter value set.
[0147] In some embodiments, the third determination module includes:
[0148] A third determination sub-module is configured to determine a target working parameter value matched with the target running information from a parameter value set included in the target mapping relationship.
[0149] Correspondingly, the control unit 404 comprises:
[0150] a control sub-unit, configured to obtain a current working parameter value of the storage unit;
[0151] The control sub-unit is further configured to control the storage unit to adjust from the current working parameter value to the target working parameter value.
[0152] In some embodiments, the control sub-unit comprises:
[0153] a difference determining module, configured to determine a difference between the current working parameter value and the target working parameter value;
[0154] an intermediate value determining module, configured to determine an intermediate parameter value if the difference is greater than a preset threshold value;
[0155] a control module, configured to control the storage unit to adjust from the current working parameter value to the intermediate parameter value, and then adjust from the intermediate parameter value to the target working parameter value;
[0156] The intermediate parameter value is between the current working parameter value and the target working parameter value, and the intermediate parameter value belongs to the target mapping relationship.
[0157] In some embodiments, the processing capabilities of the first processing unit and the second processing unit are different.
[0158] The above description of the device embodiments is similar to the description of the method embodiments, and has similar beneficial effects. For technical details not disclosed in the device embodiments, please refer to the description of the method embodiments for understanding.
[0159] It should be noted that, in the embodiments of the present application, if the above-mentioned control method is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing an electronic device (which can be a personal computer, a server, etc.) to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM (Read Only Memory), a magnetic disk or an optical disk, and various storage media that can store program codes. Thus, the embodiments of the present application are not limited to any specific hardware and software combination.
[0160] Correspondingly, an electronic device is provided in an embodiment of the present application, comprising a memory and a processor, the memory storing a computer program executable on the processor, and the processor implements the steps in the control method provided in the above embodiments when executing the program.
[0161] Correspondingly, a readable storage medium is provided in an embodiment of the present application, storing a computer program, and the computer program implements the steps in the control method when executed by a processor.
[0162] It should be noted that the description of the above storage medium and device embodiments is similar to that of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0163] It should be noted that, Figure 5 A hardware entity diagram of an electronic device according to an embodiment of the present application is shown in FIG. 5, which comprises a processor 501, a communication interface 502 and a memory 503. Figure 5 The hardware entity of the electronic device 500 comprises a processor 501, a communication interface 502 and a memory 503.
[0164] The processor 501 generally controls the overall operation of the electronic device 500.
[0165] The communication interface 502 can enable the electronic device 500 to communicate with other electronic devices or servers or platforms through a network.
[0166] The memory 503 is configured to store instructions and applications executable by the processor 501, and can also cache data to be processed by the processor 501 and modules in the electronic device 500 (for example, image data, audio data, voice communication data and video communication data), which can be implemented by FLASH (flash memory) or RAM (Random Access Memory, random access memory).
[0167] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.
[0168] The units described as separate parts above can or can not be physically separate, the parts shown as units can or can not be physical units, that is, can be located in one place or distributed on multiple network units; part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0169] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can be separately as a unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit. Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the above program can be stored in a computer readable storage medium, and the program executes the steps including the above method embodiments when executed; and the above storage medium includes mobile storage equipment, ROM, RAM, magnetic disc or optical disc and various storage program codes.
[0170] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0171] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0172] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.
[0173] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A control method, the method comprising: obtaining first running information of a first processing unit of a processing module; obtaining second running information of a second processing unit of the processing module; determining the first running information or the second running information as target running information according to a preset rule; determining a target mapping relationship from a plurality of preset mapping relationships according to the target running information; determining a working parameter of a storage unit based on the target mapping relationship, the storage unit being capable of communicating with the processing module; wherein the first processing unit is a big core of the processing module, the second processing unit is a small core of the processing module, and a task load of the big core is greater than a task load of the small core; and controlling the storage unit to work with the working parameter.
2. The method of claim 1, wherein the determining the first running information or the second running information as target running information according to a preset rule comprises: determining a first attribute parameter of the storage unit required by the first running information and a second attribute parameter of the storage unit required by the second running information; and determining the first running information or the second running information as target running information according to a comparison result of the first attribute parameter and the second attribute parameter.
3. The method of claim 1, wherein the determining a target mapping relationship from a plurality of preset mapping relationships according to the target running information comprises: obtaining a first mapping relationship corresponding to the first processing unit and a second mapping relationship corresponding to the second processing unit; determining the first mapping relationship as the target mapping relationship if the target running information belongs to the first processing unit; and determining the second mapping relationship as the target mapping relationship if the target running information belongs to the second processing unit; wherein the first mapping relationship comprises a first parameter value set of the working parameter, and the second mapping relationship comprises a second parameter value set of the working parameter, the first parameter value set being different from the second parameter value set.
4. The method of claim 3, wherein the determining a working parameter of a storage unit based on the target mapping relationship comprises: determining a target working parameter value matched with the target running information from a parameter value set included in the target mapping relationship; and correspondingly, the controlling the storage unit to work with the working parameter comprises: obtaining a current working parameter value of the storage unit; and controlling the storage unit to adjust from the current working parameter value to the target working parameter value.
5. The method of claim 4, wherein the controlling the storage unit to adjust from the current working parameter value to the target working parameter value comprises: determining a difference value between the current working parameter value and the target working parameter value; determining an intermediate parameter value if the difference value is greater than a preset threshold; and controlling the storage unit to adjust from the current working parameter value to the intermediate parameter value and then from the intermediate parameter value to the target working parameter value. The intermediate parameter value is between the current working parameter value and the target working parameter value, and the intermediate parameter value belongs to the target mapping relationship.
6. The method of any one of claims 1-5, wherein the processing capability of the first processing unit is different from the processing capability of the second processing unit.
7. A control apparatus, comprising: a first obtaining unit configured to obtain first running information of a first processing unit of a processing module; a second obtaining unit configured to obtain second running information of a second processing unit of the processing module; a determining unit configured to determine the first running information or the second running information as target running information according to a preset rule; determine a target mapping relationship from a plurality of preset mapping relationships according to the target running information; determine a working parameter of a storage unit based on the target mapping relationship, the storage unit being capable of communicating with the processing module; wherein the first processing unit is a big core of the processing module, the second processing unit is a small core of the processing module, and a task load of the big core is greater than a task load of the small core; a control unit configured to control the storage unit to work with the working parameter.
8. An electronic device, comprising a memory and a processor, the memory storing a computer program capable of running on the processor, and the processor implements the steps in the control method of any one of claims 1-6 when executing the program.
9. A computer readable storage medium, storing a computer program, the computer program being executed by a processor to implement the steps in the control method of any one of claims 1-6.
Citation Information
Patent Citations
Control method of electronic equipment and electronic equipment
CN115237204A