RAPL-based coarse-grained power consumption load characteristic analysis method

By using RAPL technology to analyze CPU power consumption characteristics in Ubuntu systems, the problem of complex and low accuracy of CPU power consumption monitoring in the prior art is solved, and high-precision and real-time power consumption monitoring and load state analysis are achieved.

CN119201626APending Publication Date: 2024-12-27NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411365901.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, CPU power consumption monitoring operations are complex and have low accuracy, so real-time and accurate monitoring cannot be achieved.

Method used

Using a coarse-grained power consumption load feature analysis method based on RAPL, the CPU power consumption data of various load tasks is read in the Ubuntu system, the power consumption characteristics are analyzed and processed, and the user's working status is judged. The high sampling rate and high accuracy of RAPL technology is used. Power consumption measurement function.

Benefits of technology

It realizes high-precision monitoring of CPU power consumption, simplifies the operation process, can accurately monitor the CPU load status in real time, and reversely infer load information using power consumption characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201626A_ABST
    Figure CN119201626A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of hardware security. The invention provides a coarse-grained power consumption load feature analysis method based on RAPL. The method comprises the following steps: monitoring the power consumption change condition of a PKG domain in a Ubuntu system by using an RAPL technology, running various different types of task loads in the monitoring process, recording the power consumption change of each task load in the running process, analyzing the running state of the load according to information such as the power change trend and the change rate, and obtaining the power consumption leakage characteristic of the load. And finally, reversely speculating the information of the operation load by using the power consumption leakage characteristics of different task loads. The RAPL technology used in the embodiment of the invention has a high-sampling-rate and high-precision power consumption measurement function, and compared with a common power consumption monitoring interface, the RAPL technology has remarkable advantages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of hardware security technology, and in particular to a coarse-grained power consumption load feature analysis method based on RAPL. Background Art

[0002] Computer science is developing rapidly in modern society, and the requirements for CPU computing power in scientific research and daily life are getting higher and higher. Huge computing power consumes a lot of electricity. In order to save energy and make the best use of computer computing resources, computer power consumption monitoring is essential. Some mainstream hardware manufacturers have developed their own power management technologies to achieve computer power consumption monitoring, such as NVIDIA's GPUBoost technology and AMD's CPU-like RAPL interface, called APM (Application Power Management) and P-state (Performance State) control. However, Intel's RAPL technology is undoubtedly one of the most mature and complete power management technologies.

[0003] Intel first introduced the Running Average Power Limit technology in the Sandy Bridge architecture. This technology uses a software power model. Its principle is to use various hardware performance counters, temperature power leakage models and I / O models to estimate energy consumption on the auxiliary controller on the main chip package. RAPL technology can measure subtle power consumption changes with high granularity and high sampling rate. This high-precision power consumption measurement can be used to achieve high-precision CPU power consumption monitoring. Users can analyze the working status of the load tasks running in the computer CPU through tiny power consumption changes, and achieve a coarse-grained monitoring of CPU power consumption.

[0004] Existing methods usually use complex external measuring instruments or some low-precision interfaces to monitor the power consumption of the CPU. Not only is the operation complicated and cumbersome, but the measurement accuracy is also low, and it is impossible to achieve real-time and accurate monitoring of the CPU power consumption. Summary of the invention

[0005] In order to avoid the shortcomings of the prior art, the present invention provides a coarse-grained power consumption load characteristic analysis method based on RAPL, which is used to solve the problem that the prior art is not only complicated and cumbersome to operate, but also has low measurement accuracy and cannot realize real-time and accurate monitoring of CPU power consumption.

[0006] According to an embodiment of the present disclosure, a coarse-grained power consumption load characteristic analysis method based on RAPL is provided, the method comprising: Establish an experimental environment based on Ubuntu system; Based on the experimental environment, reading the CPU power consumption of multiple load tasks to obtain power consumption data of each of the load tasks; Analyzing and processing the power consumption data of each of the load tasks to obtain power consumption characteristics of each of the load tasks; Processing the power consumption data to be analyzed to obtain the power consumption characteristics to be analyzed; The power consumption characteristics to be analyzed are analyzed using the power consumption characteristics of each of the load tasks to determine the working status of the user.

[0007] Further, the steps to establish an experimental environment based on the Ubuntu system include: Install Ubuntu system in the boot disk; The Ubuntu system is installed in a computer using a boot disk to establish the experimental environment based on the Ubuntu system.

[0008] Further, based on the experimental environment, the step of reading the CPU power consumption of multiple load tasks to obtain the power consumption data of each load task includes: Generate a plurality of task loads using a load generation tool; For one of the load tasks, run the load task and perform different operations, and use RAPL to calculate the CPU power consumption generated by the load task to obtain the power consumption data; Traversing all the load tasks, and obtaining the power consumption data of all the task loads respectively; The power consumption data of all the task loads is read using the RAPL.

[0009] Further, the step of calculating the CPU power consumption generated by the load task using RAPL to obtain the power consumption data includes: The running task load causes the energy count value in the energy counter MSR_PKG_ENERGY_STATUS of the PKG domain to change, so as to obtain two consecutive values, namely, a first energy value and a second energy value; Periodically reading the first energy value and the second energy value according to a register with a period T; Obtaining an energy consumption count E within a time period T according to a difference between the first energy value and the second energy value; The energy counting unit U is obtained from MSR_RAPL_POWER_UNIT, and then the average power EU / T within the time T is obtained, that is, the power consumption data.

[0010] Furthermore, the load tasks include: light load, medium load, high load and heavy load.

[0011] Further, the step of analyzing and processing the power consumption data of each of the load tasks to obtain the power consumption characteristics of each of the load tasks includes: Generating a corresponding power consumption curve using the power consumption data of each of the load tasks; The power consumption curve of each of the load tasks is analyzed to obtain the power consumption characteristics of each of the load tasks.

[0012] Furthermore, the step of processing the power consumption data to be analyzed to obtain the power consumption characteristics to be analyzed includes: generating a power consumption curve to be analyzed using the power consumption data to be analyzed; The power consumption curve to be analyzed is analyzed to obtain the power consumption characteristics to be analyzed.

[0013] Further, the step of analyzing the power consumption characteristics to be analyzed by using the power consumption characteristics of each of the load tasks to determine the working status of the user includes: Based on the power consumption characteristics and absolute power consumption values ​​of each of the load tasks, the power consumption characteristics to be analyzed are compared to determine the type of the power consumption data to be analyzed; The working state of the user is determined according to the type of the power consumption data to be analyzed.

[0014] Furthermore, the absolute power consumption value of the light load is in the range of (0,5w], the absolute power consumption value of the medium load is in the range of (5,20w], the absolute power consumption value of the high load is in the range of (20,35w], and the absolute power consumption value of the heavy load is greater than 35w.

[0015] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects: In the embodiments of the present disclosure, through the above-mentioned coarse-grained power consumption load feature analysis method based on RAPL, on the one hand, the RAPL technology is used in the Ubuntu system to monitor the power consumption changes of the PKG domain, and a variety of different types of task loads are run during the monitoring process. The power consumption changes during the operation of each task load are recorded, and the operating state of the load is analyzed according to information such as the power change trend and the change rate, and the power consumption leakage characteristics of the load are obtained. Finally, the power consumption leakage characteristics of different task loads are used to reversely infer the information of the running load. On the other hand, the high sampling rate and high-precision power consumption measurement function of the RAPL technology used has significant advantages over the general power consumption monitoring interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0017] Figure 1 A step diagram showing a method for analyzing coarse-grained power consumption load characteristics based on RAPL in an exemplary embodiment of the present disclosure; Figure 2 A specific framework diagram of a coarse-grained power consumption load characteristic analysis method based on RAPL in an exemplary embodiment of the present disclosure is shown; Figure 3 A schematic diagram showing different domain divisions of the RAPL technology in an exemplary embodiment of the present disclosure; Figure 4 An example diagram showing power consumption of a video stream load in an exemplary embodiment of the present disclosure; Figure 5 A diagram showing a rate of change of power of a video stream in an exemplary embodiment of the present disclosure is shown; Figure 6 An example diagram showing power consumption of a mini-game load in an exemplary embodiment of the present disclosure; Figure 7 A graph showing the rate of change of load power of a small game in an exemplary embodiment of the present disclosure is shown; Figure 8 An example diagram showing power consumption of an audio streaming load in an exemplary embodiment of the present disclosure; Fig. 9 A graph showing the rate of change of audio stream power in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0018] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0019] In addition, the accompanying drawings are only schematic illustrations of the embodiments of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0020] This example embodiment provides a coarse-grained power consumption load characteristic analysis method based on RAPL. Figure 1 As shown in , the coarse-grained power consumption load characteristic analysis method based on RAPL may include: step S101 to step S105.

[0021] Step S101: Establishing an experimental environment based on the Ubuntu system; Step S102: Based on the experimental environment, reading the CPU power consumption of multiple load tasks to obtain power consumption data of each of the load tasks; Step S103: analyzing and processing the power consumption data of each of the load tasks to obtain power consumption characteristics of each of the load tasks; Step S104: Process the power consumption data to be analyzed to obtain power consumption characteristics to be analyzed; Step S105: Analyze the power consumption characteristics to be analyzed using the power consumption characteristics of each of the load tasks to determine the working status of the user.

[0022] Through the above-mentioned coarse-grained power consumption load feature analysis method based on RAPL, on the one hand, RAPL technology is used in the Ubuntu system to monitor the power consumption changes of the PKG domain. During the monitoring process, various types of task loads are run, and the power consumption changes of each task load are recorded. The load operation status is analyzed based on information such as power change trends and change rates, and the power consumption leakage characteristics of the load are obtained. Finally, the power consumption leakage characteristics of different task loads are used to reversely infer the information of the running load. On the other hand, the high sampling rate and high-precision power consumption measurement function of the RAPL technology used has significant advantages over general power consumption monitoring interfaces.

[0023] Next, we will refer to Figures 1 to 9 Each step of the above-mentioned RAPL-based coarse-grained power consumption load characteristic analysis method in this example implementation is described in more detail.

[0024] In a specific embodiment, the hardware environment used for implementation is: Intel i5-10300H CPU computer, 8.0GB memory; the running software environment is: Ubuntu22.04 operating system.

[0025] The basic implementation idea of ​​the present invention is as follows Figure 2As shown, first, changing the load of the computer will cause different changes in the energy count value in the energy counter MSR_PKG_ENERGY_STATUS of the PKG domain. The energy consumption count E within the T time is obtained by reading the value from this register periodically (period is T) and finding the difference between the two read values. Then, the energy count unit U is obtained from MSR_RAPL_POWER_UNIT, and the average power within the T time can be calculated as EU / T. The smaller the value of T, the higher the accuracy of power consumption monitoring. The power changes over a period of multiple consecutive T times can be observed to infer the changes in the computer load and establish the relationship between load changes and power consumption changes. On this basis, the power consumption of any load using the CPU in the computer can be studied.

[0026] The relevant domains of RAPL technology are introduced as follows Figure 3 As shown, RAPL supports multiple power domains. A RAPL power domain is a physically meaningful power management domain (e.g., Processor Package, DRAM, etc.). Each power domain reports the energy consumption of the domain, allowing the power consumption of the domain to be limited within a specified time window, monitoring the impact of power limits on performance, and providing other useful information, i.e., the energy measurement units supported by the domain, minimum or maximum power, etc. In general, RAPL includes 4 domains: •Package: The PKG (Package) field represents the power consumption of the entire socket. It includes the consumption of all cores, integrated graphics, and non-core components (last level cache, memory controller). •Power Plane 0: The Power Plane 0 (PP0) domain measures the power consumption of all processor cores on the socket. •Power Plane 1: The Power Plane 1 (PP1) domain measures the power consumption of the GPU on the socket (desktop models only). •DRAM: The DRAM domain measures the energy consumption of the random access memory (RAM) on the integrated memory controller. The platform for the client segment supports the following RAPL domains: PKG domain, two power planes PP0 and PP1 (PP1 may be reflected to non-core devices); the platform for the server segment supports the following RAPL domains: PKG domain, power plane domain PP0 and DRAM domain; each level of the RAPL hierarchy provides a set of its own RAPL interface msr. In addition, Intel Skylake introduced a new RAPL domain called PSys in 2015. It monitors and controls the thermal and power specifications of the entire SoC (system-on-chip), which is particularly useful when the power consumption source is neither the CPU nor the GPU. For example Figure 3 As shown, PSys includes the power consumption of the PKG domain, system agent, PCH, eDRAM, and more domains on a single socket SoC.

[0027] The implementation steps are as follows: Step S101: Install Ubuntu directly, prepare a USB flash drive (usually with no less than 8G memory) as a carrier to make a boot disk. Then download a tool for making a boot disk (using Rufus) and download the image file (file with the suffix iso). The process of making a boot disk will not be repeated here (note that making a boot disk will clear all the original files in the USB flash drive). Then start Ubuntu from the USB flash drive. First, shut down the computer and remove any unnecessary USB and external devices. After inserting the Ubuntu disk, turn on the computer. During the boot process, enter the BIOS setup. During this process, you should keep pressing the shortcut key to enter the BIOS. The shortcut keys for different models of devices are different, and you can find them yourself. After entering the BIOS setup, choose to boot from the USB flash drive, and then select "try or install Ubuntu" to start the installation. Follow the installation guide to complete the installation. Due to the incompatibility between Intel RST (Rapid Storage Technology) and Ubuntu, an error will occur in the last step of the installation. In order to install Ubuntu, you need to turn off RST first. First, restart the machine and repeat the previous operation to enter the BIOS settings, but this time, do not select the boot item, but modify the SATA Controller Mode (maybe a similar name) option from RST to AHCI. However, the SATA Controller Mode option may not be found in the BIOS of some models of devices. This is because this option is hidden. Generally, pressing the shift key can display this option. After the modification is completed, you can install Ubuntu normally according to the previous steps. However, after the installation is completed, you will find that you cannot enter when selecting the Windows system. This is because the RST that was closed before has not been restored. You need to open the BIOS settings again and change the AHIC back to RST. In this way, the experimental environment is ready.

[0028] Step S102: Use the command: sudo apt-get install msr-tools in the Ubuntu terminal to install the msr-tools tool, then use sudo rdmsr 0x606 to obtain the unit in MSR_RAPL_POWER_UNIT, and sudo rdmsr 0x611 to obtain the energy count value in MSR_PKG_ENERGY_STATUS, as described above. Figure 1 The real-time power is calculated by the steps.

[0029] Open the browser video stream load, perform a series of operations such as playback and pause, and start the power consumption monitoring interface to read data. Read the power consumption value once per second, take the average power per second as a numerical point, and draw a graph as shown below: Figure 4 As shown, the rate of change of video stream power is Figure 5 In addition, the same method is used to draw other types of load power consumption curves, such as Figure 6 For small game load, Figure 7 is the rate of change of game load power; Figure 8 For audio stream load, Fig. 9 The rate at which the audio stream power changes.

[0030] Step S103: Analyze the image trend and summarize the load power consumption leakage characteristics. Now draw a curve chart for the three load experiments mentioned above and analyze them as follows: (1) The characteristics of video stream load are summarized as follows: When starting the video stream, CPU power rises rapidly to a peak, indicating a large number of initial decoding and rendering operations. During the video stream playback, CPU power remains at a high level, and the video data is continuously decoded and rendered. When the video stream is paused or stopped, the power drops significantly, indicating that the CPU load is reduced. When the video stream playback is restarted, the CPU power rises again and resumes the high load state. When the video stream continues to play, the CPU remains in a high power consumption state, reflecting the continuous decoding and rendering operations.

[0031] (2) The load characteristics of mini-games are summarized as follows: During the running of the game, especially when processing complex game scenes, the CPU power consumption increases significantly, usually fluctuating at a high level, and a significant high power consumption stage occurs. The power consumption shows significant changes in different stages (initialization, running, low-intensity stage, and re-entering the high-intensity stage). The obvious stage differences reflect the dynamic changes in the CPU load. When processing game logic with high-frequency scene changes and high computing requirements, the CPU power consumption remains at a high level, while in the single game scene stage, the CPU power consumption drops significantly, reflecting the dynamic changes in task complexity and resource requirements.

[0032] (3) During audio stream playback, audio decoding and playback tasks do not require high CPU resources, and CPU power consumption usually remains at a low level with small fluctuations. Changes in task complexity during audio stream processing can cause power consumption fluctuations. More complex audio or parallel tasks will significantly increase power consumption. When the audio stream is paused or stopped, power consumption will drop significantly and the CPU will enter a low-load state.

[0033] Step S104: Analyze the power consumption characteristics of typical common loads and summarize the judgment rules of the power consumption curve of unknown loads.

[0034]

[0035] When reading documents, checking materials, listening to music and other loads, the power consumption is generally small. However, when the user operates the mouse and keyboard, moves the scroll wheel, or opens a web page, the power consumption will change significantly, which is usually manifested as an abrupt peak in the image. Except for the peak due to user operation, the image is relatively stable and low-power.

[0036] When watching web videos, movies or TV series, moderate power consumption is consumed, which is generally a relatively stable power consumption. However, there are many situations that may cause changes in power consumption during viewing. For example, when the scene in the video is changed and two consecutive frames are completely different, a large amount of computing resources are required to generate a new picture, which will cause a peak in power consumption. If only a small part of a scene changes, there will be no obvious change in power consumption. In addition, the power consumption value is also related to the amount of information conveyed by the video screen. For example, when the video screen is to highlight a main person or object, the other parts may be filled with monochrome. At this time, the required computing resources will be reduced, thereby reducing power consumption and causing troughs in the image.

[0037] When running some small web games, medium power is also consumed. The power consumption of small games is related to the following aspects. First, the game screen, which is similar to the video load. Complex game screens consume more power. Second, game operation. When using the mouse and keyboard, there will be frequent power changes. Finally, the different complexity of game logic also requires different computing resources, which also has a certain impact on power consumption.

[0038] When running large games or performing high-intensity computing loads such as model algorithm training, high power will be consumed. When large games are running, due to their own high power values, general operations have almost no effect on their power consumption values. High-frequency and high-intensity keyboard input and mouse clicks may have a slight impact on power. In addition, similar to small games and video loads, the screen of large games is also one of the main factors of power consumption, and they have similar rules. When complex model code training or similar high-intensity computing loads are running, a relatively stable high power curve will appear. When the computer runs such loads, there are generally no other tasks or operations to intervene, so such loads usually produce stable power consumption. It should be noted that the high power consumption state will not last too long. This is because RAPL technology will limit excessive power consumption and take measures such as frequency reduction to limit power consumption within a safe range. Therefore, there may be a slow decline trend after high power consumption. In addition, high power consumption will cause component temperature to rise, and component temperature will also have a certain impact on the measurement of power consumption value.

[0039] Step S105: Summarize the method of roughly determining load information based on unknown power consumption characteristics.

[0040] After obtaining a power consumption characteristic curve, we first judge it from two aspects: the absolute power consumption value and the relative trend of the power consumption curve. The absolute power consumption value can be expressed by the average power Pavg, while the relative trend of the power consumption curve is measured by two indicators: the power standard deviation Pstd reflects the degree of power change, and the derivative of power consumption (dP / dt) indicates the rate of change of power consumption. Here are two examples: 1. Read documents or process text: The average power Pavg is lower and the power consumption is lower.

[0041] The standard deviation Pstd is very small and the power hardly fluctuates.

[0042] The power change rate dP / dt≈0, and the power changes very little over time.

[0043] 2. Listen to music: The average power Pavg is lower, but probably slightly higher than when looking at the documentation.

[0044] The standard deviation Pstd is small and the power is stable but has slight fluctuations.

[0045] The power change rate dP / dt changes slightly, and small fluctuations occur when switching songs or operating the playback software.

[0046] First, we can roughly judge the load intensity based on the average power consumption value Pavg. Average power consumption values ​​below 5w are classified as light loads, 5-20w as medium loads, 20-35w as high loads, and above 35w as heavy loads. Observe the approximate level of the power curve from the image. Compare the average power value with the previously defined threshold to preliminarily determine the type of task (light, moderate, heavy).

[0047] Then identify the power volatility Pstd: Check whether the power curve is smooth or has obvious fluctuations. Further determine the task type by judging the frequency and amplitude of the fluctuations. For example, frequent fluctuations may be related to highly interactive tasks (such as games or multi-tab browsing), while a relatively stable curve may correspond to continuous background tasks (such as video rendering).

[0048] Analyze the power change rate image dP / dt: If the rate curve is basically 0 for a period of time, it means that the task is relatively consistent, such as continuous video playback or data processing. If the rate curve changes frequently, it may indicate that the task is highly interactive, such as web browsing or gaming. In this case, the area enclosed by the 0 scale line and the curve above it is the increased power, and the area below it is the decreased power. Then, you can locate and identify points where the rate changes significantly (such as sudden increases or decreases), which may correspond to the start, pause, switch, or other key operations of the task. Combine these key points to analyze the nature of the current task. (See the specific power change rate image for details.) Figure 5 , Figure 7 and Fig. 9 ) Infer task status: Based on the stability and volatility of power consumption, the activity level of the current task can be inferred (such as whether the task is at a peak or off-peak). If the power consumption remains at a high level with little change, it may indicate that the task is running at full speed (such as during video rendering). If the power image shows multiple segments of power consumption with different characteristics, it may reflect the presence of multiple tasks. For example, the power is low and stable in the first half, and suddenly increases in the second half, which may indicate that the user has switched from document processing to video playback or gaming.

[0049] Compare reference models and match existing reference models: Compare the observed image with the previously established reference model. Determine which task models are closest to the current power consumption image. Based on the comparison results, classify the current load task. For example, if the power image is similar to the model of "web browsing", it can be marked as this type of task.

[0050] In a specific embodiment, Intel CPU provides a Running Average Power Limit (RAPL) interface, which provides energy consumption measurement function with high granularity and high sampling rate based on model-specific registers (MSRs). It can measure the power consumption of the CPU with extremely high accuracy and provide power limiting function without deploying any complex measurement equipment. Based on the high-precision feature of the RAPL interface to measure power consumption, we can observe the slight changes in CPU power consumption during computer operation. In this way, we can summarize the different power consumption leakage characteristics when different load tasks are running, and reversely infer the load information based on these obtained power consumption leakage characteristics, try to obtain user privacy information, and destroy user security attributes.

[0051] Through the above-mentioned coarse-grained power consumption load feature analysis method based on RAPL, on the one hand, RAPL technology is used in the Ubuntu system to monitor the power consumption changes of the PKG domain. During the monitoring process, various types of task loads are run, and the power consumption changes of each task load are recorded. The load operation status is analyzed based on information such as power change trends and change rates, and the power consumption leakage characteristics of the load are obtained. Finally, the power consumption leakage characteristics of different task loads are used to reversely infer the information of the running load. On the other hand, the high sampling rate and high-precision power consumption measurement function of the RAPL technology used has significant advantages over general power consumption monitoring interfaces.

[0052] It should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc. in the above description indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present disclosure and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present disclosure.

[0053] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0054] In the embodiments of the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.

[0055] In the embodiments of the present disclosure, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include the first and second features being in direct contact, or may include the first and second features not being in direct contact but being in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes the first feature being directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes the first feature being directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0056] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.

[0057] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A coarse-grained power consumption load characteristic analysis method based on RAPL, characterized in that: The method includes: Establish an experimental environment based on Ubuntu system; Based on the experimental environment, reading the CPU power consumption of multiple load tasks to obtain power consumption data of each of the load tasks; Analyzing and processing the power consumption data of each of the load tasks to obtain power consumption characteristics of each of the load tasks; Processing the power consumption data to be analyzed to obtain the power consumption characteristics to be analyzed; The power consumption characteristics to be analyzed are analyzed using the power consumption characteristics of each of the load tasks to determine the working status of the user.

2. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 1 is characterized in that: The steps to establish an experimental environment based on the Ubuntu system include: Install Ubuntu system in the boot disk; The Ubuntu system is installed in a computer using a boot disk to establish the experimental environment based on the Ubuntu system.

3. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 1 is characterized in that: Based on the experimental environment, the step of reading the CPU power consumption of multiple load tasks to obtain the power consumption data of each load task includes: Generate a plurality of task loads using a load generation tool; For one of the load tasks, run the load task and perform different operations, and use RAPL to calculate the CPU power consumption generated by the load task to obtain the power consumption data; Traversing all the load tasks, and obtaining the power consumption data of all the task loads respectively; The power consumption data of all the task loads is read using the RAPL.

4. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 3 is characterized in that: The step of calculating the CPU power consumption generated by the load task by using RAPL to obtain the power consumption data includes: The running task load causes the energy count value in the energy counter MSR_PKG_ENERGY_STATUS of the PKG domain to change, so as to obtain two consecutive values, namely, a first energy value and a second energy value; Periodically reading the first energy value and the second energy value according to a register with a period T; Obtaining an energy consumption count E within a time period T according to a difference between the first energy value and the second energy value; The energy counting unit U is obtained from MSR_RAPL_POWER_UNIT, and then the average power EU / T within the time T is obtained, that is, the power consumption data.

5. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 4 is characterized in that: The load tasks include: light load, medium load, high load and heavy load.

6. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 5 is characterized in that: The step of analyzing and processing the power consumption data of each of the load tasks to obtain the power consumption characteristics of each of the load tasks includes: Generating a corresponding power consumption curve using the power consumption data of each of the load tasks; The power consumption curve of each of the load tasks is analyzed to obtain the power consumption characteristics of each of the load tasks.

7. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 6 is characterized in that: The step of processing the power consumption data to be analyzed to obtain the power consumption characteristics to be analyzed includes: generating a power consumption curve to be analyzed using the power consumption data to be analyzed; The power consumption curve to be analyzed is analyzed to obtain the power consumption characteristics to be analyzed.

8. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 7 is characterized in that: The step of analyzing the power consumption characteristics to be analyzed by using the power consumption characteristics of each of the load tasks to determine the working status of the user includes: Based on the power consumption characteristics and absolute power consumption values ​​of each of the load tasks, the power consumption characteristics to be analyzed are compared to determine the type of the power consumption data to be analyzed; The working state of the user is determined according to the type of the power consumption data to be analyzed.

9. The coarse-grained power consumption load characteristic analysis method based on RAPL according to claim 8 is characterized in that: The absolute power consumption value of the light load ranges from (0.5w], the absolute power consumption value of the medium load ranges from (5.20w], the absolute power consumption value of the high load ranges from (20.35w], and the absolute power consumption value of the heavy load is greater than 35w.