An artificial intelligence-based fixed hard disk power consumption detection method and system
Patent Information
- Application Number
- CN202610895412.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-09-29
AI Technical Summary
上述方法均需部署额外硬件,增加了系统成本与复杂度,且难以在设备实际运行中进行大规模、低开销的实时监测
[0005]本发明有益效果:本方法解决了传统功耗检测方法依赖硬件传感器带来的成本问题,以及SMART数据更新频率低、无法捕捉瞬态功耗波动的问题。实现了无需额外硬件的纯软件功耗检测,显著降低了数据中心或嵌入式系统中大规模部署功耗监控功能的硬件成本。同时,通过跨型号的通用特征表示与个体在线补偿相结合,解决了不同硬盘型号需要逐一标定的问题,提升了方法的泛化能力和部署效率。通过自适应采样策略,降低了高频采集对系统CPU资源的占用,减少了特征采集对硬盘正常IO性能的影响。
Smart Images

Figure CN122838210A_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a fixed hard drive power consumption detection method and system based on artificial intelligence, which relates to the field of power consumption detection technology, specifically to the field of fixed hard drive power consumption detection technology based on artificial intelligence. Background Technology
[0002] Power consumption monitoring of solid-state drives (SSDs) is a crucial aspect of data center energy management, equipment selection, and thermal optimization. Traditional monitoring methods primarily rely on hardware sensors or dedicated testing fixtures. For example, patent CN116027105A calculates SSD power consumption by collecting current and voltage data from a power resistor in an SFF-8639 adapter board; patent CN116453579A uses a portable testing device with an integrated display module for real-time power consumption display; and patent CN115151022B designs a solid-state drive power consumption testing device that includes heating elements and a heat dissipation conductor layer. All of these methods require additional hardware deployment, increasing system cost and complexity, and are difficult to implement for large-scale, low-overhead real-time monitoring during actual equipment operation. While patent CN122067568A introduces artificial intelligence into storage power management, using multi-dimensional feature data to perform hardware model inference to avoid exceeding current peak limits, existing technologies still lack a universal monitoring method that requires no hardware sensors, relies solely on software features for fine-grained power consumption decomposition, and adaptively tracks individual SSD power consumption drift. Summary of the Invention
[0003] This invention provides a fixed hard drive power consumption detection method and system based on artificial intelligence to solve the above-mentioned problems: This invention proposes a fixed hard drive power consumption detection method and system based on artificial intelligence, the method comprising: S1. Capture the raw instruction stream of the fixed hard disk through the asynchronous zero-copy feature acquisition interface to obtain timing features including IO operation type, queue depth and access mode, and synchronously align with the measured power consumption data of the high-precision power meter to obtain a paired sample set of software features and real power consumption. S2. By performing joint feature encoding on the temporal and static feature data extracted from the paired sample set, general feature representation information is obtained. S3. Perform online deviation compensation on the software features collected in real time by the current hard disk through general feature representation information, and perform sliding window feature update according to the historical power consumption deviation sequence to obtain the corrected feature offset. S4. By dynamically analyzing and adjusting the temporal resolution of feature acquisition through the correction of feature offset, an adaptive feature sampling strategy is obtained.
[0004] Furthermore, the system includes: The sample pairing module is used to capture the raw instruction stream of the fixed hard disk through the asynchronous zero-copy feature acquisition interface, obtain timing features including IO operation type, queue depth and access mode, and synchronously align with the measured power consumption data of the high-precision power meter to obtain a paired sample set of software features and real power consumption. The feature representation module is used to perform joint feature encoding on temporal features and static feature data extracted from the paired sample set to obtain general feature representation information; The feature correction module is used to perform online deviation compensation on the software features collected in real time by the current hard disk using general feature representation information, and to perform sliding window feature updates based on the historical power consumption deviation sequence to obtain the corrected feature offset. The feature adaptation module is used to dynamically analyze and adjust the temporal resolution of feature acquisition by correcting the feature offset, thereby obtaining an adaptive feature sampling strategy.
[0005] The beneficial effects of this invention are as follows: This method solves the cost problem caused by the reliance on hardware sensors in traditional power consumption detection methods, as well as the problems of low SMART data update frequency and inability to capture transient power consumption fluctuations. It achieves pure software power consumption detection without additional hardware, significantly reducing the hardware cost of large-scale deployment of power monitoring functions in data centers or embedded systems. Simultaneously, by combining cross-model universal feature representation with individual online compensation, it solves the problem of requiring individual calibration for different hard drive models, improving the method's generalization ability and deployment efficiency. Through an adaptive sampling strategy, it reduces the CPU resource consumption of high-frequency acquisition and minimizes the impact of feature acquisition on the normal I / O performance of the hard drive. Attached Figure Description
[0006] Figure 1 This is a schematic diagram of a fixed hard drive power consumption detection method based on artificial intelligence. Detailed Implementation
[0007] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0008] In one embodiment of the present invention, a fixed hard disk power consumption detection method and system based on artificial intelligence are proposed, the method comprising: S1. Capture the raw instruction stream of the fixed hard disk through the asynchronous zero-copy feature acquisition interface to obtain timing features including IO operation type, queue depth and access mode, and synchronously align with the measured power consumption data of the high-precision power meter to obtain a paired sample set of software features and real power consumption. S2. By combining the temporal and static feature data extracted from the paired sample set, joint feature encoding is performed to obtain general feature representation information; static features include hard disk capacity, rotation speed, and firmware version.
[0009] S3. Perform online deviation compensation on the software features collected in real time by the current hard disk through general feature representation information, and perform sliding window feature update according to the historical power consumption deviation sequence to obtain the corrected feature offset. S4. By dynamically analyzing and adjusting the temporal resolution of feature acquisition through the correction of feature offset, an adaptive feature sampling strategy is obtained.
[0010] The working principle and technical effects of the above technical solution are as follows: This invention directly captures the raw instruction stream from the hard disk controller through an asynchronous zero-copy feature acquisition interface, without the need for layer-by-layer buffering by the operating system, thus avoiding the latency and overhead caused by data copying. Simultaneously, a high-precision power meter records the actual power consumption waveform of the hard disk at the same time base. The acquired software features (IO operation type, queue depth, access mode) and the measured power consumption data are strictly aligned on the time axis, forming a paired sample set. Based on this, time-series features and static features (hard disk capacity, speed, firmware version) are extracted from the paired sample set and jointly encoded to obtain a general feature representation that can express the commonalities of different hard disk models. When deployed to a specific hard disk, the general feature representation is used to perform online inference on the real-time acquired software features, and sliding window compensation is performed using historical power consumption deviation sequences to eliminate prediction errors caused by individual differences and aging drift. The temporal resolution of feature acquisition is dynamically adjusted according to the corrected feature offset; the sampling frequency is reduced to reduce system overhead when prediction uncertainty is low, and the sampling frequency is increased to ensure tracking accuracy when uncertainty is high.
[0011] This method addresses the cost issues associated with traditional power consumption detection methods that rely on hardware sensors, as well as the low update frequency of SMART data and its inability to capture transient power consumption fluctuations. It achieves pure software power consumption detection without additional hardware, significantly reducing the hardware cost of large-scale deployment of power monitoring functions in data centers or embedded systems. Furthermore, by combining cross-model universal feature representation with individual online compensation, it solves the problem of requiring individual calibration for different hard drive models, improving the method's generalization ability and deployment efficiency. Through an adaptive sampling strategy, it reduces the CPU resource consumption of high-frequency acquisition and minimizes the impact of feature acquisition on normal hard drive I / O performance.
[0012] In one embodiment of the present invention, S1 includes: The raw command stream of the hard disk controller is captured in real time through the asynchronous zero-copy feature acquisition interface to obtain raw command stream information; The actual power consumption waveform of the hard drive is synchronously recorded using a high-precision power meter to obtain the measured total power consumption sequence; By splitting each read / write task in the original instruction stream information according to the logical block address continuity and access size threshold, multiple smallest granularity subtasks are obtained and a unique identifier is assigned to each of the multiple smallest granularity subtasks. By sequentially pushing the smallest granularity subtasks into a multi-level circular buffer queue according to their priority labels and arrival times, multiple timestamps and queue depth snapshots of the smallest granularity subtasks at the time of enqueuing are obtained. By using Kalman filtering and state machine decomposition algorithms to extract multiple independent component information of static power consumption, dynamic power consumption, idle power consumption, and power sleep from the measured total power consumption sequence, a paired sample set is obtained.
[0013] The working principle and technical effects of the above solution are as follows: This method captures the raw instruction stream of the hard disk controller in real time through an asynchronous zero-copy interface, obtaining complete information for each read / write operation. Simultaneously, a high-precision power meter records the actual power consumption waveform of the hard disk at the same time base. Each read / write task is divided into multiple subtasks of the smallest granularity according to the continuity of logical block addresses and the access size threshold, and a unique identifier is assigned to each subtask, enabling power consumption analysis to be more precise to a finer granularity. These subtasks are sequentially pushed into a multi-level circular buffer queue according to priority labels and arrival time order for queuing and waiting processing, recording the timestamp of each subtask's entry into the queue and a snapshot of the queue depth. Kalman filtering is used to remove measurement noise from the measured total power consumption sequence, and then a state machine decomposition algorithm is used to decompose the total power consumption into four independent components: static power consumption, dynamic power consumption, idle power consumption, and power sleep. These components are then associated with and stored with the corresponding subtask information to form a paired sample set.
[0014] This method addresses the limitations of traditional power consumption detection methods, which cannot distinguish between different power sources and suffer from ambiguity in the correlation between power consumption and load at the macroscopic I / O request granularity. It achieves independent extraction of four power consumption components, enabling the system to track basic hard drive wear, load-related increments, idle maintenance power consumption, and sleep energy-saving effects separately. By splitting the data at the subtask granularity, the accuracy of the correlation between power consumption and specific operations is improved. Through asynchronous zero-copy and a circular buffer queue mechanism, the impact of data acquisition on normal hard drive I / O processing is reduced, thus minimizing acquisition overhead.
[0015] In one embodiment of the present invention, the method of extracting multiple independent component information of static power consumption, dynamic power consumption, idle power consumption, and power sleep by applying Kalman filtering and state machine decomposition algorithm to the measured total power consumption sequence to obtain a paired sample set includes: The measured total power consumption sequence was filtered for noise using the Kalman filter algorithm to obtain smoothed power consumption waveform data; By segmenting the smoothed power consumption waveform data according to the time axis and the processing stage of the sub-task, the power consumption segment within the time window corresponding to each sub-task is obtained. The state machine decomposition algorithm is used to identify the state of each power consumption segment. Based on the waveform morphology characteristics, the power consumption is allocated to four state components: static power consumption, dynamic power consumption, idle power consumption, and power sleep, thus obtaining independent time series of the four power consumption components. By horizontally associating and storing the four types of power consumption components with the subtask identifier, IO operation type, and queue depth snapshot within the corresponding time window, a paired sample set is obtained.
[0016] Specifically, a state machine decomposition algorithm is used to identify the state of each power consumption segment. Based on waveform morphology characteristics, the power consumption is allocated to four state components: static power consumption, dynamic power consumption, idle power consumption, and power sleep. This yields independent time series for the four power consumption components, including: The state machine decomposition algorithm is used to identify the state of each power consumption segment. The state machine is set into three main states: idle state, active state, and sleep state, and two sub-states: read / write sub-state and queue sub-state. The state transition is determined according to the slope, amplitude, and duration of the power consumption waveform. Specifically, when the absolute value of the slope is less than 0.01 watts per millisecond and the duration is greater than two milliseconds, the state enters the idle state; when the slope is greater than 0.1 watts per millisecond and the amplitude rises to more than 0.5 watts, the state enters the read / write sub-state under the active state; and when the amplitude is stable below 0.05 watts and the duration is greater than one hundred milliseconds, the state enters the sleep state. The power consumption waveform is segmented and labeled along the time axis by the identified states to obtain the state label sequence corresponding to each moment. The original power consumption waveform is component-assigned using the obtained state tag sequence: the median power consumption value corresponding to the idle state tag is used as the static power consumption benchmark; the power consumption value corresponding to the read / write sub-state tag in the active state is subtracted from the static power consumption benchmark and used as the dynamic power consumption increment; the power consumption value corresponding to the idle state tag but during the non-zero queue depth period is subtracted from the static power consumption benchmark and used as the idle power consumption; and the power consumption value corresponding to the sleep state tag is directly used as the power sleep value, thus obtaining the independent millisecond time series of the four types of power consumption components.
[0017] The working principle and technical effect of the above technical solution are as follows: This method allocates the power consumption waveform to four state components through a state machine decomposition algorithm. The state machine is set up with three main states: idle state, active state, and sleep state. The active state is further subdivided into read / write sub-states and queuing sub-states. The state transition judgment is based on three characteristics of the power consumption waveform: slope, amplitude, and duration. When the absolute value of the slope is less than 0.01 watts per millisecond and the duration is greater than two milliseconds, it is determined to be an idle state; when the slope is greater than 0.1 watts per millisecond and the amplitude rises by more than 0.5 watts, it is determined to be a read / write sub-state under the active state; when the amplitude is stable below 0.05 watts and the duration is greater than one hundred milliseconds, it is determined to be a sleep state. After identifying the state, the power consumption waveform is segmented and labeled according to the time axis to obtain the state label at each moment. Then, the components are allocated according to the status labels: the median power consumption value corresponding to the idle state is taken as the static power consumption benchmark; the power consumption value corresponding to the active state read / write sub-state is subtracted from the static power consumption benchmark and used as the dynamic power consumption increment; the power consumption value of the idle state label when the queue depth is not zero is subtracted from the static power consumption benchmark and used as the idle power consumption; the power consumption value corresponding to the sleep state label is directly used as the sleep power consumption value.
[0018] This method addresses the technical challenge of automatically separating measured total power consumption from different physical sources, as well as the susceptibility to noise interference and high false positive rate of traditional simple threshold segmentation methods. It achieves intelligent state recognition and power consumption decomposition based on waveform morphology features, accurately distinguishing the power consumption contribution of the hard drive in four different scenarios: read / write operations, queuing, idle standby, and deep sleep. By jointly judging the slope, amplitude, and duration, the robustness of state recognition is improved, reducing false positives caused by instantaneous noise. By separately distinguishing the queuing sub-state, it reveals the long-overlooked phenomenon that the hard drive still consumes non-zero power during queuing.
[0019] In one embodiment of the present invention, S2 includes: By using paired sample sets, the temporal dependency features of each smallest granularity subtask in different processing stages in the buffer queue are extracted to obtain a set of feature vectors. By jointly encoding and normalizing the feature vector set and static meta-features, cross-device feature representation information is obtained; Supervised training of a hybrid neural network consisting of a one-dimensional convolutional network and a long short-term memory network is performed using paired sample sets. High-dimensional features of the encoding layer output in the trained network are then extracted to obtain general feature representation information.
[0020] The working principle and technical effects of the above solution are as follows: This method extracts the temporal dependency features of each smallest granularity subtask during its four different processing stages in the buffer queue: enqueueing, waiting in line, dequeueing, and completion feedback. These features include the duration of each stage, changes in queue depth, and I / O access patterns, forming a set of feature vectors. These temporal features are jointly encoded with static meta-features such as hard disk capacity, RPM, and firmware version, and normalized to eliminate the influence of different feature dimensions and value ranges, obtaining cross-device feature representations. A hybrid neural network composed of a one-dimensional convolutional network and a long short-term memory network is trained under supervision using a paired sample set. The high-dimensional features output from the encoding layer of the trained network are extracted as general feature representation information.
[0021] This method addresses the issues of significant power consumption differences among different hard drive models, the inability of a single model to be used across devices, and the problem that traditional power consumption modeling ignores the power consumption differences of I / O requests at different stages in the buffer queue. It achieves universal feature extraction capabilities across hard drive models, allowing trained models to be directly applied to new hard drives without recalibration, significantly reducing deployment costs. By modeling the four processing stages of subtasks separately, the model's ability to capture the power consumption characteristics of the I / O scheduling process is improved. Through one-dimensional convolutional networks to extract local I / O pattern features and long short-term memory networks to capture long-term dependencies, a more comprehensive expression of the temporal characteristics of hard drive power consumption is achieved.
[0022] In one embodiment of the present invention, the step of supervised training of a hybrid neural network composed of a one-dimensional convolutional network and a long short-term memory network using paired sample sets, and extracting high-dimensional features from the output of the coding layer in the trained network to obtain general feature representation information, includes: By using the temporal feature sequences in the paired sample set as input and the corresponding measured four types of power consumption components as supervision labels, end-to-end supervised training is performed on the hybrid neural network composed of a one-dimensional convolutional network and a long short-term memory network to obtain the network model and the weight parameters of each layer. The original high-dimensional feature vector is obtained by extracting the output vector of the last hidden layer in the trained network as the original high-dimensional feature. By using principal component analysis to reduce the dimensionality of the original high-dimensional feature vectors, general feature representation information is obtained. This general feature representation information is then segmented and stored according to the subtask processing stages, and a mapping table between the stage index and the feature vectors is established to obtain a feature library.
[0023] The working principle and technical effects of the above solution are as follows: This method uses the temporal feature sequence from the paired sample set as input and the corresponding measured four types of power consumption components as supervision labels to perform end-to-end supervised training on a hybrid neural network composed of a one-dimensional convolutional network and a long short-term memory network. After training, the output vector of the last hidden layer in the network is extracted as the original high-dimensional feature vector. In order to reduce computational and storage overhead and remove redundant information, principal component analysis is used to reduce the dimensionality of the high-dimensional feature vector, retaining principal components with a cumulative contribution rate of more than 95%. The dimensionality-reduced general feature representation is segmented and stored according to different processing stages of subtasks, and a mapping table between stage indexes and feature vectors is established to form a feature library that can be quickly accessed.
[0024] This method addresses the problems of high computational and storage overhead and high model inference latency caused by high-dimensional feature vectors, as well as the low expression efficiency caused by the aliasing of general features at different processing stages. It achieves dimensionality reduction mapping from the original high-dimensional features to low-dimensional general feature representations, significantly reducing the feature dimension of subsequent inference calculations while preserving key information, thus reducing computational resource consumption and inference latency. By segmenting and storing features according to subtask processing stages and establishing an index mapping table, the efficiency of feature retrieval and retrieval is improved. End-to-end supervised training ensures that the extracted features are highly correlated with the target of the power consumption prediction task, improving the relevance and effectiveness of feature representation.
[0025] In one embodiment of the present invention, S3 includes: By using general feature representation information, forward inference calculations are performed on the current hard disk using software feature streams to obtain the basic power consumption prediction value and the initial proportion of multiple independent component information at the current moment. By performing sliding window storage and statistical analysis on the deviation sequence between the basic power consumption prediction value and the historical actual feedback power consumption, the system deviation trend and noise variance estimation information of the most recent N sampling periods are obtained. The static power baseline, dynamic power coefficient, and idle power threshold of the basic power prediction value are compensated by online moving average through the system deviation trend to obtain the corrected feature offset.
[0026] The working principle and technical effect of the above technical solution are as follows: This method utilizes pre-trained general feature representation information to perform forward inference calculations on the software feature stream collected from the current hard disk in real time at millisecond intervals, obtaining the current basic power consumption prediction value and the initial proportions of four components: static power consumption, dynamic power consumption, idle power consumption, and power sleep. The difference between the basic power consumption prediction value and the historical actual feedback power consumption is stored in a sliding window in chronological order. The mean and variance of the deviation sequence within the window are calculated to obtain the system deviation trend and noise variance estimate for the most recent N sampling periods. Based on the system deviation trend, the static power consumption baseline of the basic power consumption prediction value is offset correction, the dynamic power consumption coefficient is proportionally adjusted, and the upper and lower boundaries of the idle power consumption threshold are adjusted. Online moving average compensation is performed for each, and the three compensation results are combined and encoded into a corrected feature offset.
[0027] This method addresses the prediction bias issues of general models on specific hard drives caused by individual manufacturing differences, aging, and environmental temperature variations, as well as the inability of static compensation methods to track time-varying drift. It achieves online adaptive compensation based on historical bias statistics, enabling the power consumption prediction system to continuously track the long-term aging trend of hard drives and short-term environmental fluctuations. By decomposing the compensation into three independent dimensions—baseline, coefficients, and thresholds—it achieves separate corrections for static, dynamic, and idle components, improving the precision and effectiveness of the compensation. By using a sliding window to statistically analyze bias trends and noise variance, it enhances the robustness of compensation decisions and reduces the interference of occasional noise on compensation parameters.
[0028] In one embodiment of the present invention, the step of performing online moving average compensation on the static power consumption baseline, dynamic power consumption coefficient, and idle power consumption threshold of the basic power consumption prediction value through system deviation trend to obtain the corrected feature offset includes: The static power baseline of the basic power prediction value is compensated by first-order low-pass filtering through the system deviation trend. The current deviation value is multiplied by the compensation coefficient and then superimposed on the original baseline to obtain the updated static power baseline value. By adjusting the gain of the dynamic power coefficient of the basic power prediction value according to the sign consistency of the recent preset number of deviations, the adaptively adjusted dynamic power coefficient is obtained. By scaling the idle power threshold of the base power prediction value according to the length of the continuous idle period, the corrected upper and lower boundaries of the idle power are obtained. The corrected feature offset is obtained by combining and encoding the static power consumption baseline value, dynamic power consumption coefficient, and upper and lower boundaries of idle power consumption.
[0029] Specifically, the adaptively adjusted dynamic power consumption coefficient is obtained by adjusting the gain of the dynamic power consumption coefficient of the basic power consumption prediction value according to the sign consistency of the recent preset number of deviations, including: The gain is adjusted by adjusting the dynamic power coefficient of the basic power prediction value according to the sign consistency of the recent preset number of deviations. First, a deviation sign sliding window with a length of 10 is established, and the positive and negative signs of the most recent 10 prediction deviations are stored in sequence. Each time a new deviation arrives, the earliest sign is removed and the current sign is moved in. Then, count the number of times the positive and negative signs appear in the sliding window. When the positive sign appears eight times or more, it is considered to be consistent in the positive direction. When the negative sign appears eight times or more, it is considered to be consistent in the negative direction. When both appear less than eight times, it is considered to be inconsistent in the signs. When a positive consensus is determined, the current dynamic power consumption coefficient is multiplied by a gain factor greater than one. The gain factor value increases linearly with the number of consensuses, and the factor value is 1.2 for ten consecutive positive consensuses. When a negative consistency is determined, the current dynamic power consumption coefficient is multiplied by an attenuation factor less than one. The attenuation factor decreases linearly with the number of consistency cycles. When all ten cycles are negative, the factor takes the value of 0.8. When a sign inconsistency is detected, the dynamic power consumption coefficient is restored to its initial value of 1.0, and the gain counter is cleared. The dynamic power consumption coefficient is updated iteratively through the above rules, and after each update, it is limited with the preset minimum coefficient of 0.5 and maximum coefficient of 2.0 to obtain the adaptively adjusted dynamic power consumption coefficient.
[0030] The working principle and technical effect of the above technical solution are as follows: This method establishes a sliding window of deviation sign with a length of 10, which sequentially stores the positive and negative signs of the ten most recent prediction deviations. Each time a new deviation arrives, the oldest sign is removed and the current sign is moved in, ensuring the window always contains the sign information of the ten most recent deviations. Then, the number of occurrences of positive and negative signs within the window is counted: when the number of occurrences of a positive sign is greater than or equal to eight, it is considered positively consistent, indicating that the predicted value is consistently low; when the number of occurrences of a negative sign is greater than or equal to eight, it is considered negatively consistent, indicating that the predicted value is consistently high; otherwise, it is considered inconsistent, indicating that the deviation direction is random and there is no systematic error. In the case of positive consistency, the dynamic power consumption coefficient is multiplied by a gain factor greater than one, and the gain factor increases linearly with the number of consistent occurrences; in the case of negative consistency, it is multiplied by an attenuation factor less than one; in the case of inconsistent signs, the recovery coefficient is initialized to 1.0. After each update, the coefficient is limited against preset minimum and maximum coefficients to ensure that the coefficient is within a reasonable range.
[0031] This method addresses the shortcomings of traditional fixed-coefficient compensation methods, such as slow response to sustained deviations, sensitivity to random noise, and inability of manual parameter tuning to adapt to dynamically changing loads. It implements intelligent gain adjustment based on deviation sign consistency, enabling the compensation coefficients to quickly respond to changes in system deviation trends while remaining stable even when the deviation direction is random. By using sign consistency determination rather than deviation magnitude determination, the algorithm's robustness to noise is improved, avoiding excessive influence of individual large deviation samples on the compensation coefficients. Through linear increment / decrement factors and amplitude limiting protection, smooth coefficient adjustment is achieved, preventing prediction instability caused by drastic coefficient jumps. Adaptive adjustment of the dynamic power consumption coefficient improves the model's tracking accuracy under different load modes.
[0032] In one embodiment of the present invention, S4 includes: By dynamically adjusting the temporal resolution of the feature acquisition module by correcting the uncertainty estimate in the feature offset, dynamic sampling interval information is obtained. The buffer queue depth is periodically detected by using dynamic sampling interval information to obtain the continuous idle cycle counter value. When the counter value exceeds the sleep entry threshold, the hard drive is switched from idle standby state to power sleep state to obtain the power state transition result. Based on the joint monitoring results of deviation fluctuation amplitude and the number of subtasks to be processed in the buffer queue, a wake-up command is immediately generated when the fluctuation or the number exceeds the threshold, and the hard disk is forced to recover from power sleep to active processing state, generating a step-by-step recovery sequence and performing step-by-step recovery of the sequence. An adaptive feature sampling strategy is obtained by closed-loop coupling of power state transition results and dynamic sampling interval information.
[0033] The working principle and technical effect of the above technical solution are as follows: This method extracts the uncertainty estimate from the corrected feature offset, and dynamically adjusts the time resolution of the feature acquisition module based on the comparison result of this value with the preset threshold: when the uncertainty is low, the sampling interval is increased to reduce system overhead; when the uncertainty is high, the sampling interval is decreased to ensure tracking accuracy. The buffer queue depth is periodically detected according to the dynamic sampling interval, and the number of consecutive detections of a zero queue depth is recorded as a continuous idle cycle counter value. When this counter value exceeds the sleep entry threshold, the hard drive is actively switched from idle standby state to power sleep state. Simultaneously, the deviation fluctuation amplitude and the number of pending subtasks in the buffer queue are jointly monitored. When either indicator exceeds the preset threshold, a wake-up command is immediately generated, forcibly restoring the hard drive from power sleep to active processing state, and restoring it step by step in the order of exiting sleep, restoring idle power, rebuilding the static power baseline, and starting dynamic power tracking. The power state transition result is coupled in a closed loop with the dynamic sampling interval information to achieve coordinated adjustment of the sampling frequency and the hard drive power state.
[0034] This method addresses the inherent trade-off between accuracy and overhead when using a fixed sampling frequency, as well as the energy efficiency loss caused by the independent operation of the sampling strategy and hard drive power management. It implements adaptive sampling interval adjustment based on prediction uncertainty, proactively reducing the sampling frequency to decrease CPU usage and system power consumption when model predictions are reliable, and increasing the sampling frequency to ensure prediction accuracy when model uncertainty is high. By coupling the sampling strategy with the hard drive power state transition in a closed loop, it achieves coordination between the sampling frequency and the hard drive's current operating state: the sampling frequency is synchronously reduced when the hard drive sleeps and synchronously restored when the hard drive wakes up, further reducing overall system power consumption. Through continuous idle cycle counting and a step-by-step recovery sequence, it achieves a smooth transition between hard drive sleep and wake-up, avoiding the additional overhead caused by frequent state switching.
[0035] In one embodiment of the present invention, obtaining an adaptive feature sampling strategy through closed-loop coupling of power state transition results and dynamic sampling interval information includes: By comparing the current state identifier in the power consumption state transition result with the current sampling frequency level in the dynamic sampling interval information, it is determined whether the state and the sampling frequency match, and the matching degree flag bit of state and frequency is obtained. By performing logical judgment on the matching degree flag, the sampling interval parameter after closed-loop adjustment is obtained; The feature sampling strategy is obtained by performing amplitude limiting processing on the sampling interval parameter and the preset minimum and maximum sampling intervals, and then writing the final parameters back to the configuration register of the feature acquisition module.
[0036] The feature sampling strategy is obtained by performing amplitude limiting processing on the sampling interval parameter and the preset minimum and maximum sampling intervals, and then writing the final parameters back to the configuration register of the feature acquisition module. This strategy includes: By limiting the sampling interval parameter with the preset minimum and maximum sampling intervals, the minimum and maximum sampling interval thresholds currently stored in the feature acquisition module configuration register are read. The minimum sampling interval threshold is preset to one millisecond and the maximum sampling interval threshold is preset to one hundred milliseconds. When the sampling interval parameter is less than the minimum sampling interval threshold, it is forcibly set to the minimum sampling interval threshold; when the sampling interval parameter is greater than the maximum sampling interval threshold, it is forcibly set to the maximum sampling interval threshold; when the sampling interval parameter is between the two, it remains unchanged, thus obtaining the effective sampling interval value after the amplitude limiting process. The obtained effective sampling interval value is converted to an integer according to the register bit width requirement. The unit is converted from milliseconds to microseconds and then written into the sampling period configuration register of the feature acquisition module. The register readback value is then read to verify that the writing was successful. By encapsulating the above-mentioned amplitude limiting and register write operations into an atomic function, this function is called every time the sampling interval is updated, and the currently effective sampling interval value is synchronously updated to the system state table, thus obtaining an adaptive feature sampling strategy that can be dynamically applied and is boundary-safe.
[0037] The working principle and technical effect of the above technical solution are as follows: This method reads the currently stored minimum sampling interval threshold and maximum sampling interval threshold from the configuration register of the feature acquisition module, where the minimum sampling interval is preset to one millisecond and the maximum sampling interval is preset to one hundred milliseconds. The sampling interval parameter obtained after closed-loop adjustment is compared with these two thresholds: if it is less than the minimum value, it is forcibly set to the minimum value; if it is greater than the maximum value, it is forcibly set to the maximum value; if it is between the two, it remains unchanged, thus obtaining the effective sampling interval value after amplitude limiting. The effective sampling interval value is converted from milliseconds to microseconds, converted to an integer according to the register bit width requirements, written into the sampling period configuration register of the feature acquisition module, and the readback value of the register is read to verify whether the write was successful. The above amplitude limiting and register write operations are encapsulated into an atomic function, which is called every time the sampling interval needs to be updated, and the currently effective sampling interval value is synchronously updated to the system status table.
[0038] This method addresses the issues of sampling interval parameters exceeding hardware support range causing acquisition module malfunctions, and the lack of verification during parameter writing leading to undetected configuration failures. It implements boundary safety protection for the sampling interval parameter, ensuring that the sampling frequency written to the feature acquisition module always remains within the effective range supported by the hardware, thus preventing acquisition module malfunctions due to parameter out-of-bounds errors. A readback verification mechanism after register writing guarantees the success rate and reliability of configuration operations, improving system robustness. By encapsulating limiting and write operations into atomic functions and synchronously updating the system state table, atomicity and consistency of sampling parameter updates are achieved, avoiding state inconsistencies caused by concurrent access. Preset minimum and maximum thresholds provide a flexible configuration interface for different application scenarios, balancing the requirements of power tracking accuracy and system overhead.
[0039] According to one embodiment of the present invention, the system includes: The sample pairing module is used to capture the raw instruction stream of the fixed hard disk through the asynchronous zero-copy feature acquisition interface, obtain timing features including IO operation type, queue depth and access mode, and synchronously align with the measured power consumption data of the high-precision power meter to obtain a paired sample set of software features and real power consumption. The feature representation module is used to perform joint feature encoding on temporal features and static feature data extracted from the paired sample set to obtain general feature representation information; static features include hard disk capacity, rotation speed, and firmware version.
[0040] The feature correction module is used to perform online deviation compensation on the software features collected in real time by the current hard disk using general feature representation information, and to perform sliding window feature updates based on the historical power consumption deviation sequence to obtain the corrected feature offset. The feature adaptation module is used to dynamically analyze and adjust the temporal resolution of feature acquisition by correcting the feature offset, thereby obtaining an adaptive feature sampling strategy.
[0041] The working principle and technical effects of the above solution are as follows: This system directly captures the raw instruction stream from the hard disk controller through an asynchronous zero-copy feature acquisition interface, without the need for layer-by-layer buffering by the operating system, thus avoiding the latency and overhead caused by data copying. Simultaneously, a high-precision power meter records the actual power consumption waveform of the hard disk at the same time base. The acquired software features (IO operation type, queue depth, access mode) are strictly aligned with the measured power consumption data on the time axis, forming a paired sample set. Based on this, time-series features and static features (hard disk capacity, speed, firmware version) are extracted from the paired sample set and jointly encoded to obtain a general feature representation that can express the commonalities of different hard disk models. When deployed to a specific hard disk, the general feature representation is used to perform online inference on the real-time acquired software features, and sliding window compensation is performed using historical power consumption deviation sequences to eliminate prediction errors caused by individual differences and aging drift. The temporal resolution of feature acquisition is dynamically adjusted according to the corrected feature offset; the sampling frequency is reduced to reduce system overhead when prediction uncertainty is low, and the sampling frequency is increased to ensure tracking accuracy when uncertainty is high.
[0042] This system addresses the cost issues associated with traditional power consumption detection methods that rely on hardware sensors, as well as the low update frequency of SMART data and its inability to capture transient power consumption fluctuations. It achieves pure software power consumption detection without the need for additional hardware, significantly reducing the hardware cost of large-scale deployment of power monitoring functions in data centers or embedded systems. Furthermore, by combining cross-model universal feature representation with individual online compensation, it solves the problem of requiring individual calibration for different hard drive models, improving the method's generalization ability and deployment efficiency. Through an adaptive sampling strategy, it reduces the CPU resource consumption of high-frequency acquisition and minimizes the impact of feature acquisition on the normal I / O performance of the hard drive.
[0043] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A fixed hard drive power consumption detection method based on artificial intelligence, characterized in that, The method includes: S1. Capture the raw instruction stream of the fixed hard disk through the asynchronous zero-copy feature acquisition interface to obtain timing features including IO operation type, queue depth and access mode, and synchronously align with the measured power consumption data of the high-precision power meter to obtain a paired sample set of software features and real power consumption. S2. By performing joint feature encoding on the temporal and static feature data extracted from the paired sample set, general feature representation information is obtained. S3. Perform online deviation compensation on the software features collected in real time by the current hard disk through general feature representation information, and perform sliding window feature update according to the historical power consumption deviation sequence to obtain the corrected feature offset. S4. By dynamically analyzing and adjusting the temporal resolution of feature acquisition through the correction of feature offset, an adaptive feature sampling strategy is obtained.
2. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 1, characterized in that, S1 includes: The raw command stream of the hard disk controller is captured in real time through the asynchronous zero-copy feature acquisition interface to obtain raw command stream information; The actual power consumption waveform of the hard drive is synchronously recorded using a high-precision power meter to obtain the measured total power consumption sequence; By splitting each read / write task in the original instruction stream information according to the logical block address continuity and access size threshold, multiple smallest granularity subtasks are obtained and a unique identifier is assigned to each of the multiple smallest granularity subtasks. By sequentially pushing the smallest granularity subtasks into a multi-level circular buffer queue according to their priority labels and arrival times, multiple timestamps and queue depth snapshots of the smallest granularity subtasks at the time of enqueuing are obtained. By using Kalman filtering and state machine decomposition algorithms to extract multiple independent component information of static power consumption, dynamic power consumption, idle power consumption, and power sleep from the measured total power consumption sequence, a paired sample set is obtained.
3. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 2, characterized in that, The process involves extracting multiple independent components of static power consumption, dynamic power consumption, idle power consumption, and power sleep from the measured total power consumption sequence using Kalman filtering and state machine decomposition algorithms, thereby obtaining a paired sample set, including: The measured total power consumption sequence was filtered for noise using the Kalman filter algorithm to obtain smoothed power consumption waveform data; By segmenting the smoothed power consumption waveform data according to the time axis and the processing stage of the sub-task, the power consumption segment within the time window corresponding to each sub-task is obtained. The state machine decomposition algorithm is used to identify the state of each power consumption segment. Based on the waveform morphology characteristics, the power consumption is allocated to four state components: static power consumption, dynamic power consumption, idle power consumption, and power sleep, thus obtaining independent time series of the four power consumption components. By horizontally associating and storing the four types of power consumption components with the subtask identifier, IO operation type, and queue depth snapshot within the corresponding time window, a paired sample set is obtained.
4. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 1, characterized in that, S2 includes: By using paired sample sets, the temporal dependency features of each smallest granularity subtask in different processing stages in the buffer queue are extracted to obtain a set of feature vectors. By jointly encoding and normalizing the feature vector set and static meta-features, cross-device feature representation information is obtained; Supervised training of a hybrid neural network consisting of a one-dimensional convolutional network and a long short-term memory network is performed using paired sample sets. High-dimensional features of the encoding layer output in the trained network are then extracted to obtain general feature representation information.
5. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 4, characterized in that, The method involves supervised training of a hybrid neural network composed of a one-dimensional convolutional network and a long short-term memory network using paired sample sets, and extracting high-dimensional features from the output of the encoding layer in the trained network to obtain general feature representation information, including: By using the temporal feature sequences in the paired sample set as input and the corresponding measured four types of power consumption components as supervision labels, end-to-end supervised training is performed on the hybrid neural network composed of a one-dimensional convolutional network and a long short-term memory network to obtain the network model and the weight parameters of each layer. The original high-dimensional feature vector is obtained by extracting the output vector of the last hidden layer in the trained network as the original high-dimensional feature. By using principal component analysis to reduce the dimensionality of the original high-dimensional feature vectors, general feature representation information is obtained. This general feature representation information is then segmented and stored according to the subtask processing stages, and a mapping table between the stage index and the feature vectors is established to obtain a feature library.
6. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 1, characterized in that, S3 includes: By using general feature representation information, forward inference calculations are performed on the current hard disk using software feature streams to obtain the basic power consumption prediction value and the initial proportion of multiple independent component information at the current moment. By performing sliding window storage and statistical analysis on the deviation sequence between the basic power consumption prediction value and the historical actual feedback power consumption, the system deviation trend and noise variance estimation information of the most recent N sampling periods are obtained. The static power baseline, dynamic power coefficient, and idle power threshold of the basic power prediction value are compensated by online moving average through the system deviation trend to obtain the corrected feature offset.
7. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 6, characterized in that, The process involves online moving average compensation of the static power baseline, dynamic power coefficient, and idle power threshold of the basic power prediction value based on the system deviation trend to obtain the corrected feature offset, including: The static power baseline of the basic power prediction value is compensated by first-order low-pass filtering through the system deviation trend. The current deviation value is multiplied by the compensation coefficient and then superimposed on the original baseline to obtain the updated static power baseline value. By adjusting the gain of the dynamic power coefficient of the basic power prediction value according to the sign consistency of the recent preset number of deviations, the adaptively adjusted dynamic power coefficient is obtained. By scaling the idle power threshold of the base power prediction value according to the length of the continuous idle period, the corrected upper and lower boundaries of the idle power are obtained. The corrected feature offset is obtained by combining and encoding the static power consumption baseline value, dynamic power consumption coefficient, and upper and lower boundaries of idle power consumption.
8. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 1, characterized in that, S4 includes: By dynamically adjusting the temporal resolution of the feature acquisition module by correcting the uncertainty estimate in the feature offset, dynamic sampling interval information is obtained. The buffer queue depth is periodically detected by using dynamic sampling interval information to obtain the continuous idle cycle counter value. When the counter value exceeds the sleep entry threshold, the hard drive is switched from idle standby state to power sleep state to obtain the power state transition result. Based on the joint monitoring results of deviation fluctuation amplitude and the number of subtasks to be processed in the buffer queue, a wake-up command is immediately generated when the fluctuation or the number exceeds the threshold, and the hard disk is forced to recover from power sleep to active processing state, generating a step-by-step recovery sequence and performing step-by-step recovery of the sequence. An adaptive feature sampling strategy is obtained by closed-loop coupling of power state transition results and dynamic sampling interval information.
9. The fixed hard drive power consumption detection method based on artificial intelligence according to claim 8, characterized in that, The adaptive feature sampling strategy obtained by closed-loop coupling of power state transition results and dynamic sampling interval information includes: By comparing the current state identifier in the power consumption state transition result with the current sampling frequency level in the dynamic sampling interval information, it is determined whether the state and the sampling frequency match, and the matching degree flag bit of state and frequency is obtained. By performing logical judgment on the matching degree flag, the sampling interval parameter after closed-loop adjustment is obtained; The feature sampling strategy is obtained by performing amplitude limiting processing on the sampling interval parameter and the preset minimum and maximum sampling intervals, and then writing the final parameters back to the configuration register of the feature acquisition module.
10. A fixed hard drive power consumption detection system based on artificial intelligence, characterized in that, The system includes: The sample pairing module is used to capture the raw instruction stream of the fixed hard disk through the asynchronous zero-copy feature acquisition interface, obtain timing features including IO operation type, queue depth and access mode, and synchronously align with the measured power consumption data of the high-precision power meter to obtain a paired sample set of software features and real power consumption. The feature representation module is used to perform joint feature encoding on temporal features and static feature data extracted from the paired sample set to obtain general feature representation information; The feature correction module is used to perform online deviation compensation on the software features collected in real time by the current hard disk using general feature representation information, and to perform sliding window feature updates based on the historical power consumption deviation sequence to obtain the corrected feature offset. The feature adaptation module is used to dynamically analyze and adjust the temporal resolution of feature acquisition by correcting the feature offset, thereby obtaining an adaptive feature sampling strategy.
Citation Information
Patent Citations
A solid state hard disk power consumption test device
CN115151022B
SSD hard disk power consumption test method and device, equipment and storage medium
CN116027105A
Portable solid state disk power consumption testing device with display
CN116453579A
Controller of solid state disk and peak current control method
CN122067568A