A method and system for switching chip state in low power consumption mode
Through cluster analysis and real-time monitoring, the corresponding relationship between task execution status and chip status is established, which solves the problem of monitoring accuracy and stability of chip status switching, and achieves efficient status switching and scalability in low-power mode.
Patent Information
- Application Number
- CN202410787653.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In the existing technology, the monitoring accuracy and stability of chip state switching are insufficient, resulting in unstable power consumption changes, affecting the stability and reliability of the system, and it is difficult to discover the rules of task execution status to guide chip state transitions, affecting power consumption. manage.
By obtaining the historical resource usage data of the chip, perform cluster analysis, establish the corresponding relationship between task execution status and chip status, monitor resource usage in real time, predict and decide whether to switch chip status, and use the number and confidence of cluster elements Determine the switching threshold and calculation time.
It improves the accuracy and stability of chip status switching, reduces switching overhead, supports the scalability of chip operating status and work efficiency in low-power mode, and ensures seamless adaptation of resource expansion and status switching.
Smart Images

Figure CN118363736B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of low-power chip design, and in particular relates to a low-power mode chip state switching method and system. Background Art
[0002] For chip design, there is often a conflict in the design goals, that is, their performance must be strong enough, while the power consumption must be low enough. The chip switches between low power consumption states or chip states corresponding to various power consumption by turning off / on the clock, partial regional clock, peripheral clock, clock source, memory, different regions or parts of memory and other internal components to achieve the effect of reducing power consumption. In the existing scheme of low-power state switching, usually, instructions are sent by the host computer to make the chip enter different low-power states. It is also usually through monitoring the current consumption and status signals of the chip in different chip states, and then waking up the chip to return to normal working state; or adjusting the working state of the chip and switching the chip state; of course, some chip state switching overheads are smaller, while some chips need to be re-wake-up; the switching overheads corresponding to different chip states are different, and the software and hardware losses caused to the chip are also different; therefore, on the one hand, how to improve the accuracy of chip state switching monitoring and reduce such losses has always been a research hotspot; in addition, the frequent occurrence of sudden shutdown or opening of some or all clocks, resulting in a sudden drop or increase in the dynamic power consumption of the chip, will cause a sudden change in the system power supply current and unstable power supply, which may affect the stability and reliability of the system. How to improve the stability of chip state switching is also a very important issue.
[0003] It should also be noted that in recent years, with the rapid development of the Internet of Things and artificial intelligence, the difference between consumer electronics and computers has become smaller and smaller, and the functional requirements of consumer electronics have become higher and higher, and the design has become more and more complex. However, the requirements for batteries in these application scenarios are very high; therefore, low-power design is particularly important. For example, in the application of Bluetooth devices, data processing is generally required every few hundred milliseconds, so the use of this part of resources is very small; and in consumer electronics scenarios, due to its own functional limitations and user usage thinking, the operation of tasks in the chip is subject to regularity; for example: the data storage space is composed of two random access memories, so in some scenarios, when it is found that only a small amount of data access is required in the first application stage of the chip, and the second stage that follows requires more storage resources, then when the usage dynamics of the second stage are found, the power supply voltage of the second random access memory can be turned on, thereby improving the application execution efficiency and satisfying the user experience; similarly, when it is found that the first stage is about to be entered, the power supply voltage of the second random access memory can be turned off through power control, thereby saving power consumption.
[0004] How to discover these rules, use big data and simple analysis of chip usage to guide the transition of chip states, and how to discover chip state settings through big data for targeted hardware expansion are problems to be solved. Based on the above problems, the present invention starts from the application scenario, discovers the change trajectory of fine-grained task execution status, guides the subsequent coarse-grained chip operation status changes, and can also support the scalability of chip operation status. Summary of the invention
[0005] In order to solve the above problems in the prior art, the present invention proposes a low power mode chip state switching method and system, the method comprising:
[0006] Step S1: Obtain historical resource usage data of task execution on the chip; divide the historical resource usage data according to the segmentation interval; set the resource usage vector corresponding to the segmentation interval based on the historical resource usage data in each segmentation interval. >, k = 1~K, where: k is the resource type number, K is the total number of resource types;
[0007] Step S2: determining the number of clusters; clustering the resource usage vector based on the number of clusters to obtain one or more clusters; determining the number of cluster elements and the cluster center of each cluster; dividing the numerical space of the resource usage vector based on the cluster center so that the number of divided numerical spaces is equal to the number of clusters; each resource numerical space is represented by a plurality of corresponding resource numerical intervals;
[0008] Step S3: setting a task execution state for each cluster so that each task execution state corresponds to the resource value space of the cluster; setting the task execution state weight of the corresponding task execution state based on the number of cluster elements; setting the corresponding relationship between the task execution state and the chip state under the current chip hardware configuration; determining the chip state confidence; determining the historical task execution state corresponding to the resource usage vector obtained according to the historical resource usage data; arranging the historical task execution states in chronological order to obtain a historical task execution state sequence;
[0009] The task execution state weight of the corresponding task execution state is set based on the number of cluster elements, specifically: the task execution state weight is set based on the following formula (1): ;in: is the cluster number, is the number of cluster elements of its corresponding cluster;
[0010] ;
[0011] The determining chip state confidence level is specifically: setting the chip state confidence level to be equal to the sum of the task execution state weights of the task execution states corresponding to the chip state confidence level;
[0012] Step S4: During the task execution process, real-time monitoring of the real-time resource usage on the chip, mapping the real-time resource usage to the real-time task execution state; judging whether the current real-time task execution state is consistent with the previous real-time task execution state, if yes, returning to step S4 to continue real-time monitoring; otherwise, determining whether the chip state to be switched corresponding to the current real-time task execution state is the current chip state, if yes, returning to step S4 to continue real-time monitoring; otherwise, determining the prediction length N based on the confidence of the chip state to be switched; and obtaining the most recent N task execution states including the current real-time task execution state, and determining whether to switch the chip state based on the N task execution states;
[0013] The determining whether to perform chip state switching based on the N task execution states is as follows: specifically, matching a task execution state sequence of N length constituted by the N task execution states in a historical task execution state sequence, and recording the number of successful matches / the ratio of the number of matches; if the number of matches / the ratio of the number of matches is greater than or equal to the number of matches threshold / the number of matches ratio threshold, determining to perform state switching; otherwise, determining not to perform chip state switching.
[0014] Furthermore, the segmentation interval is a preset time length.
[0015] Furthermore, the number of clusters is a preset value.
[0016] Further, the number of clusters is set to be equal to NBS times the number of chip states supported by the current chip; NBS is a preset value.
[0017] Furthermore, when dividing the numerical space of the resource usage vector based on the cluster center, an average division method is selected.
[0018] Furthermore, the chip is a low power consumption mode chip.
[0019] A low power consumption mode chip state switching system, the system is used to implement the low power consumption mode chip state switching method.
[0020] A low power consumption mode chip state switching chip, the chip is used to implement the low power consumption mode chip state switching method.
[0021] A low power consumption mode chip state switching processor, the processor is used to implement the low power consumption mode chip state switching method.
[0022] A low power consumption mode chip state switching server, the server is used to implement the low power consumption mode chip state switching method.
[0023] The beneficial effects of the present invention include:
[0024] (1) Starting from the application scenario, by discovering the change trajectory of fine-grained task execution status, the subsequent coarse-grained chip operation status change is guided. At the same time, it can also support the scalability of chip operation status, so that the subsequent chip resource expansion can seamlessly adapt to the chip operation status;
[0025] (2) Based on quantitative calculation, the task execution state weight is determined, and the chip state confidence is set accordingly; the task execution trajectory lengths required for different chip state switching are different, and the switching thresholds are also different, so that the chip state with high confidence is easy to enter and the required state switching calculation time is short. Conversely, the entry difficulty is high and the required prediction calculation time is long; the switching efficiency of high-confidence chip states is improved, and the switching decision efficiency of commonly used chip states is improved;
[0026] (3) Considering that the operating state contained in the chip changes dynamically as the chip is updated; when the hardware is updated and expanded, the available hardware resource configuration and the state transition types it supports will also change accordingly; through cluster analysis, the key task execution state in the application scenario is discovered, and by constructing a reconfigurable correspondence between the task execution state and the chip state, a precise chip state is set for the key task execution state, fundamentally supporting the scalability of power-saving chip state switching and the working efficiency of low-power mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application, but do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 A schematic diagram of a low power mode chip state switching method provided by the present invention. DETAILED DESCRIPTION
[0029] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, wherein the illustrative embodiments and descriptions are only used to explain the present invention but are not intended to limit the present invention.
[0030] The present invention proposes a low power consumption mode chip state switching method and system, as shown in the attached Figure 1 As shown, the method comprises the following steps:
[0031] Step S1: Obtain historical resource usage data of task execution on the chip; divide the historical resource usage data according to the segmentation interval; use the historical resource usage data in each segmentation interval to set the resource usage vector corresponding to the segmentation interval. >, k = 1~K, where: k is the resource type number, K is the total number of resource types;
[0032] Preferably: the resource types include: computing resources, register resources, cache resources, memory resources and / or various types of communication resources, IO, bus resources, bandwidth resources, etc.;
[0033] The resource usage vector corresponding to each segmentation interval is set according to the historical resource usage data in the segmentation interval. >, specifically: for each resource type, calculate the average value of its resource usage data within the segmentation interval, and use the average value as the vector element value corresponding to the resource type k in the resource usage vector;
[0034] Preferably: the segmentation interval is a preset time length;
[0035] Preferably: pre-process the historical resource usage data; remove the historical resource demand data corresponding to the chip in the state of no task execution; divide the remaining part according to the segmentation interval; and use an independent control method for the state switching of the chip entering the sleep state;
[0036] The obtaining of historical resource usage data of tasks executed in parallel on the chip specifically includes: obtaining historical resource usage data of the current chip; collecting historical operation data of tasks running on the chip at the operating system level, and obtaining overall resource usage data of the tasks therefrom;
[0037] Alternatively: the acquisition of historical resource usage data of tasks executed in parallel on the chip is specifically as follows: the application scenario of the current chip is acquired, and historical resource usage data that conforms to the application scenario and the current chip configuration information is acquired from big data; considering that the tasks running on the chip are closely related to their application scenarios; different functions are provided in different application scenarios, and there is a certain logic between the functions, therefore, the demand for resources presented by the tasks on the chip is related to the scenario, and big data analysis based on the scenario and chip type can discover the regularity therein, and obtain effective information that can guide the state switching of the chip;
[0038] Step S2: determining the number of clusters; clustering the resource usage vector based on the number of clusters to obtain one or more clusters; determining the cluster size and cluster center of each cluster; dividing the numerical space of the resource usage vector based on the cluster center so that the number of divided numerical spaces is equal to the number of clusters; each resource numerical space is represented by a plurality of corresponding resource numerical intervals;
[0039] For example: cluster CLS1=([A1,A2],[B1,B2]), where A and B are both resource usage types; and [A1,A2],[B1,B2] are the resource value intervals of the two resource types they correspond to respectively; of course, the resource value interval can be adjusted according to the resource provision supported by the chip status to make it more consistent with the actual hardware configuration of the current chip;
[0040] Preferably: the number of clusters is a preset value;
[0041] Preferably: the number of clusters is set to be greater than the number of chip states supported by the current chip;
[0042] Alternative: Set the number of clusters to be equal to NBS times the number of chip states supported by the current chip; NBS is a preset value. NBS cannot be set too small, which will not facilitate the formation of the task execution state trajectory in the later stage and reduce the prediction accuracy; of course, setting it too large will also cause a certain amount of computational complexity; a trade-off is required here; for example: NBS=3;
[0043] Preferably: when dividing the numerical space of the resource usage vector based on the cluster center, the average division method can be directly selected, that is, when two cluster centers are adjacent in a resource numerical interval, the resource numerical interval between the two is evenly divided, and the middle value of the resource numerical interval between the two is used as the division point of the two cluster centers on the resource numerical interval; the division point constitutes the dividing point of one end of the two clusters on the resource numerical interval; after completing the division of the numerical intervals of all resource types, the division of the resource numerical space is completed;
[0044] Preferably: the running state is related to the resource usage during the actual running of the task; for example, the number of computing resources used in the running state ST1 is NC1, and the storage resources used is NM1; the number of available resources in the running state ST2 is NC2, and the storage resources used is NM2, and NC1> NC2, NM1> NM2; it expresses that the resource usage of the running state ST1 is greater than that of ST2, and obviously a chip state with higher power consumption is required; the power consumption of the chip state corresponding to ST1 is higher than that of ST2;
[0045] Alternatively: when dividing the numerical space of the resource usage vector based on the cluster center, an uneven division method is selected, that is, the number of cluster elements (that is, the cluster size) is considered when dividing the numerical interval, so that a large cluster division obtains more numerical intervals; conversely, a smaller numerical interval is obtained; at this time, the dividing point is no longer the mean, but an uneven division using the cluster size as the weight;
[0046] Alternatively: determining the number of clusters; clustering the resource usage vectors based on the number of clusters to obtain one or more clusters; specifically: determining a first number of clusters and a second number of clusters; wherein the first number of clusters is less than the second number of clusters; clustering the resource usage vectors based on the first number of clusters to obtain one or more clusters; after clustering, calculating, for each cluster, the average value of the distance between each element and its cluster center, that is, the element average distance, and when the cluster splitting condition is met, clustering the elements in the cluster again to split into two new clusters; repeating this step until the cluster splitting condition is not met; the cluster splitting condition is that the number of clusters is less than the second number of clusters and the average distance is greater than the splitting distance threshold;
[0047] Preferably: the split clustering threshold is a preset value, which is set to the mean of the average distances of the elements of all clusters when the last clustering was completed;
[0048] Preferably: after completing the clustering, for clusters with a small number of cluster elements, the elements therein are merged with other clusters to avoid cluster fragmentation, which will not be described in detail here;
[0049] Step S3: set a task execution state for each cluster, so that each task execution state corresponds to the resource value space of the cluster; set the task execution state weight of the corresponding task execution state based on the number of cluster elements; set the corresponding relationship between the task execution state and the chip state under the current chip hardware configuration; determine the chip state confidence; determine the historical task execution state corresponding to the resource usage vector obtained according to the historical resource usage data; arrange the historical task execution states in chronological order to obtain a historical task execution state sequence; it can be seen that the historical task execution state sequence is actually the conversion footprint of the historical execution state during the historical execution process;
[0050] The setting is a correspondence between the task execution state and the chip state under the current chip hardware configuration; specifically: obtaining the chip state supported under the current chip hardware configuration; processing each task execution state in turn, and selecting the minimum power consumption chip state whose resource availability can cover the numerical space of all resource types corresponding to the task execution state as the chip state corresponding to the task execution state;
[0051] Preferably: the steps also include: setting the chip state based on the number of cluster elements of the cluster corresponding to the task execution state; specifically: if there is a task execution state, and the number of cluster elements of its corresponding cluster is the largest, then a dedicated chip state is set for the task execution state, by updating the current chip hardware configuration information so that the chip state can and can only cover the numerical space of all resource types corresponding to the task execution state; the corresponding extended chip state switching logic is used to support the chip state setting; the running state is related to the resource usage during the actual operation of the task; and the chip state is related to the current hardware configuration of the chip and the resource state conversion type supported by the chip; when the chip is in the current hardware configuration, the more resource states that can be converted for a resource type, the more flexible chip states are supported, and in fact, the support can be set according to the number of cluster elements of the cluster corresponding to the task execution state, and a more optimized and easier to switch chip state is set for the task execution state with a large number of cluster elements; Of course, the chip state can also be set for multiple task execution states with the highest number of cluster elements, and the method used is similar and will not be repeated here. Here, it is considered that the operating state contained in the chip changes dynamically with the update of the chip. When the hardware is updated and expanded, the available hardware resource configuration and the state transition types supported by it will also change accordingly. The present invention clarifies the typical task execution state corresponding to the resource usage during the task execution process through big data analysis based on application scenarios, and fundamentally supports the scalability and flexibility of power consumption chip state switching by constructing a reconfigurable correspondence between the task execution state and the chip state.
[0052] The task execution state weight of the corresponding task execution state is set based on the number of cluster elements, specifically: the task execution state weight is set based on the following formula (1): ;in: is the cluster number, is the number of cluster elements of its corresponding cluster;
[0053] ;
[0054] The chip state confidence is determined; specifically: the initial value of the chip state confidence is set to be equal to the sum of the execution state weights of the task execution states covered by it; in the subsequent execution state process, the chip state confidence is updated based on the jitter degree of the chip state switching; when the chip state switching occurs, if the chip state retention time after the switching is less than the historical retention time length of the chip state, the chip state confidence of the chip state after the switching is reduced;
[0055] Preferably: when the number of adjustments of all chip status confidences exceeds the adjustable number threshold, re-execute steps S1-S3 to update the relevant settings of the task execution status, and reset the chip status confidence according to the update result;
[0056] Wherein: the chip is the current chip or a chip with the same application scenario and the same hardware configuration;
[0057] Step S4: During the task execution process, monitor the real-time resource usage on the chip, and map the real-time resource usage to the real-time task execution state; determine whether the current real-time task execution state is consistent with the previous real-time task execution state, if yes, return to step S4 to continue real-time monitoring; otherwise, determine whether the chip state to be switched corresponding to the current real-time task execution state is the current chip state, if yes, return to step S4 to continue real-time monitoring; otherwise, determine the prediction length N based on the confidence of the chip state to be switched; and obtain the latest N task execution states including the current real-time task execution state, and determine whether to switch the state based on the N task execution states; if yes, switch the chip state; otherwise; return to step S4 to continue real-time monitoring;
[0058] Preferably: after the current real-time task execution state remains stable, determining whether the current real-time task execution state is consistent with the previous real-time task execution state;
[0059] The chip state switching is specifically: switching the chip state from the current chip state to the chip state to be switched;
[0060] The real-time resource usage is mapped to the task execution state; specifically, determining the value interval of each type of resource into which the real-time resource usage falls, that is, finally determining the resource value space into which it falls, and determining the task execution state corresponding to the value space as the mapped task execution state; the method adopted is the same as step S1;
[0061] Preferably: the corresponding relationship between the chip state confidence and the prediction length N is preset, so that the greater the chip state confidence, the smaller the determined prediction length, and vice versa; that is, the chip state with high confidence has low entry difficulty and requires less state switching calculation time, and vice versa, the entry difficulty is high and the required prediction calculation time is long; for the chip state with high confidence, the matching of the sequence of historical task execution states can be started from the middle of the sequence, and after the state switching condition is met, the prediction calculation is ended, and a positive or negative state switching determination result is also obtained, so the required state switching calculation time is short;
[0062] Preferably: N is a preset value, for example: N=3-5;
[0063] The determining whether to perform chip state switching based on the N task execution states is as follows: specifically, matching a task execution state sequence of N length formed by the N task execution states in a historical task execution state sequence, and recording the number of successful matches / number of matches ratio; if the number of matches / number of matches ratio is greater than or equal to the number of matches threshold / number of matches ratio threshold, determining to perform state switching; otherwise, determining not to perform chip state switching; the number of matches threshold / number of matches ratio is a preset value; the number of matches / number of matches ratio can be set to be related to the chip state confidence, and a smaller number of matches threshold / number of matches ratio is set when the chip state confidence is high, otherwise, a larger number of matches threshold / number of matches ratio is set; obviously, the number of matches threshold / number of matches ratio is a dynamically changing value;
[0064] Alternatively: determining whether to switch the chip state based on the N task execution states; specifically: expressing the N-length task execution state sequence composed of the N task execution states as , called a matching sequence; where: is the execution state of the i-th task in the task execution state sequence; and obviously It is the last element in the task execution status sequence, that is, the current real-time task execution status; search for the matching sequence and / or its sub-matching sequence in the historical task execution status sequence , and when the matching sequence and / or its sub-matching sequence is found, the next task execution state of the matching sequence and / or its sub-matching sequence in the historical task execution state sequence is obtained, and the ratio of chip state switching / successful chip state switching corresponding to the chip state in the next task execution state is determined. If the ratio is greater than or equal to the ratio threshold, it is determined to perform state switching; otherwise, it is determined that the chip state switching is not performed; the ratio threshold is a preset value; the ratio can be set to be related to the chip state confidence. If the chip state confidence is high, a smaller ratio threshold is set, otherwise, a larger ratio threshold is set; considering that the monitoring data of the resource usage status or task execution status may be changed by the change of the chip state during real-time operation, resulting in the unavailability of the data of the last task execution state, it can be considered to use a subsequence for matching monitoring; of course, the above two methods of determining whether to perform state switching can use pre-matching and storage of the matching times and ratio values corresponding to each N-length task execution state sequence to improve the efficiency of determination, and exchange a certain storage overhead for determination speed;
[0065] Preferably: the ratio threshold is 50-90%;
[0066] The occurrence of successful chip state switching is specifically: when the holding time length of the chip state after the chip state switching occurs is greater than the switching overhead, it is determined that the successful chip state switching occurs; the switching overhead is the time overhead required to switch from the current chip state to the next chip state; of course, in the actual operation process, the chip state overhead will cause the loss of software and hardware efficiency resources, so the time overhead value will be appropriately increased to reflect it;
[0067] Available resources are related to the chip operating state and the actual configurability of various types of resources; the resource configuration is relatively fixed and expandable, and is coarse-grained; and the actual resource usage of the task during operation can change dynamically and continuously, and is fine-grained; therefore, the present invention uses the task execution state to describe the resource availability of the task during the actual operation process, so that fine-grained resource usage information and the actual change trajectory of resource usage can be discovered to guide subsequent chip operating state changes, and at the same time, it can also support the extensibility of the chip operating state, so that the subsequent chip resource expansion can be seamlessly adapted to the chip operating state; especially in the chip state switching control in big data and artificial intelligence processing scenarios, considering that the execution time of tasks in these scenarios is relatively long and the resource usage displayed by the tasks is relatively stable, after analyzing the historical resource usage data, a more accurate and detailed task execution state and its corresponding chip state can be obtained, thereby supporting the guidance of chip state switching during task execution;
[0068] Based on the same inventive concept, the present invention also provides a low-power mode chip state switching chip, the chip is used to execute the low-power mode chip state switching method;
[0069] Preferably: the chip is a low-power chip, and various types of resources on the chip are configurable or expandable;
[0070] Based on the same inventive concept, the present invention also provides a low power mode chip state switching system, the system is used to execute the low power mode chip state switching method;
[0071] Preferably: the system is arranged in the operating system kernel space on the chip;
[0072] A computer program (also referred to as a program, software, software application, script, or code) can be written in any form of a programming language, including an assembled or interpreted language, a declarative or procedural language, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple collaborative files (e.g., files storing one or more modules, subroutines, or code portions). A computer program can be deployed to execute on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.
[0073] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0074] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0075] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for switching chip states in a low power consumption mode, characterized in that: The method comprises: Step S1: Obtain historical resource usage data of task execution on the chip; divide the historical resource usage data according to the segmentation interval; set the resource usage vector corresponding to the segmentation interval based on the historical resource usage data in each segmentation interval. >, k = 1~K, where: k is the resource type number, K is the total number of resource types; Step S2: determining the number of clusters; clustering the resource usage vector based on the number of clusters to obtain one or more clusters; determining the number of cluster elements and the cluster center of each cluster; dividing the numerical space of the resource usage vector based on the cluster center so that the number of divided numerical spaces is equal to the number of clusters; each resource numerical space is represented by a plurality of corresponding resource numerical intervals; Step S3: setting a task execution state for each cluster so that each task execution state corresponds to the resource value space of the cluster; setting the task execution state weight of the corresponding task execution state based on the number of cluster elements; setting the corresponding relationship between the task execution state and the chip state under the current chip hardware configuration; determining the chip state confidence; determining the historical task execution state corresponding to the resource usage vector obtained according to the historical resource usage data; arranging the historical task execution states in chronological order to obtain a historical task execution state sequence; The task execution state weight of the corresponding task execution state is set based on the number of cluster elements, specifically: the task execution state weight is set based on the following formula (1): ;in: is the cluster number, is the number of cluster elements of its corresponding cluster; ; The determining chip state confidence level is specifically: setting the chip state confidence level to be equal to the sum of the task execution state weights of the task execution states corresponding to the chip state confidence level; Step S4: During the task execution process, real-time monitoring of the real-time resource usage on the chip, mapping the real-time resource usage to the real-time task execution state; judging whether the current real-time task execution state is consistent with the previous real-time task execution state, if yes, returning to step S4 to continue real-time monitoring; otherwise, determining whether the chip state to be switched corresponding to the current real-time task execution state is the current chip state, if yes, returning to step S4 to continue real-time monitoring; otherwise, determining the prediction length N based on the confidence of the chip state to be switched; and obtaining the most recent N task execution states including the current real-time task execution state, and determining whether to switch the chip state based on the N task execution states; The determining whether to perform chip state switching based on the N task execution states is as follows: specifically, matching a task execution state sequence of N length constituted by the N task execution states in a historical task execution state sequence, and recording the number of successful matches / the ratio of the number of matches; if the number of matches / the ratio of the number of matches is greater than or equal to the number of matches threshold / the number of matches ratio threshold, determining to perform state switching; otherwise, determining not to perform chip state switching.
2. The low power mode chip state switching method according to claim 1, characterized in that: The segmentation interval is a preset time length.
3. The low power mode chip state switching method according to claim 2, characterized in that: The number of clusters is a preset value.
4. The low power mode chip state switching method according to claim 3, characterized in that: Set the number of clusters to NBS times the number of chip states supported by the current chip; NBS is a preset value.
5. The low power mode chip state switching method according to claim 4, characterized in that: When dividing the numerical space of the resource usage vector based on the cluster center, an average division method is selected.
6. The low power mode chip state switching method according to claim 5, characterized in that: The chip is a low power mode chip.
7. A low power mode chip state switching system, characterized in that: The system is used to implement the low power mode chip state switching method described in any one of claims 1-6.
8. A low power mode chip state switching chip, characterized in that: The chip is used to implement the low power mode chip state switching method described in any one of claims 1-6.
9. A low power mode chip state switching processor, characterized in that: The processor is used to implement the low power mode chip state switching method described in any one of claims 1-6.
10. A low power mode chip state switching server, characterized in that: The server is used to implement the low power mode chip state switching method described in any one of claims 1-6.
Citation Information
Patent Citations
Method and system for enhancing cloud computing collaboration data processing and electronic equipment
CN114595051A
Chip resource management method and device based on cloud platform, equipment and storage medium
CN115147183A
Chip low-power-consumption verification method and system, chip and electronic equipment
CN116930716A
Computing power resource processing method
CN118069380A
