Solid state disk data processing method and device, storage medium and program product

By real-time detection of network bandwidth and buffer occupancy, dynamically adjusting buffer capacity and selecting power consumption mode, the problem of SSDs being difficult to enter a low power consumption state when low bandwidth is solved, and the effect of significantly reducing energy consumption without degrading data transmission performance is achieved.

CN119987686AActive Publication Date: 2025-05-13SHENZHEN XINGYAO SEMICON CO LTD

Patent Information

Application Number
CN202510476806.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-05-13
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

Solid-state drives are difficult to enter a low-power state in a timely manner when the network bandwidth is low, resulting in excessive energy consumption.

Method used

By real-time detection of network bandwidth status and data buffer occupancy, dynamically adjusting the buffer capacity, and selecting the appropriate power consumption mode according to the idle time window, we realize adaptive power consumption management of solid-state drives.

Benefits of technology

While ensuring data transmission performance, it significantly reduces the energy consumption of solid-state drives, avoids maintaining high-power operation under low load conditions, and improves the energy utilization efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987686A_ABST
    Figure CN119987686A_ABST
Patent Text Reader

Abstract

The invention discloses a solid state disk data processing method and device, a storage medium and a program product, and relates to the field of electrical digital data processing.The method comprises the steps that a network data transmission request is obtained, a network bandwidth state corresponding to the network data transmission request is detected, and bandwidth state parameters are generated according to the network bandwidth state; calculating a data transmission time consumption predicted value, and determining a buffer capacity threshold according to the data transmission time consumption predicted value; adjusting the capacity of the data buffer area according to the buffer area capacity threshold, and adjusting the data buffer area; monitoring the data occupancy rate of the adjusted data buffer area, and when the data occupancy rate is lower than a preset occupancy rate threshold value, calculating an idle time window of the target solid state disk according to the network bandwidth state; determining a target power consumption mode of the target solid state disk according to the duration of the idle time window; and controlling the target solid state disk to enter the target power consumption mode in the idle time window. By implementing the application, the energy consumption of the solid state disk can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic digital data processing, and in particular to a solid state hard disk data processing method, device, storage medium and program product. Background Art

[0002] With the popularity of cloud storage and network applications, SSDs need to process data access requests from both local and network sources. In an environment with ever-changing network conditions, energy consumption management of SSDs has become an important issue. Especially in scenarios such as mobile office and remote data synchronization, SSDs need to reasonably control energy consumption while ensuring data transmission efficiency.

[0003] The relevant technology uses multi-level cache and intelligent scheduling strategies to manage the working status of the solid-state drive. The controller sets multiple power consumption levels according to the I / O queue depth, reduces the operating frequency and voltage of the NAND flash memory when the queue depth is below the preset threshold, and improves the performance parameters when the queue depth exceeds the threshold; in addition, when the load is continuously low, the controller will also put the solid-state drive into sleep mode.

[0004] However, when the network bandwidth remains low, the cache area is continuously occupied. Even when the data transfer volume is small, the SSD will maintain a high power consumption level, resulting in excessive energy consumption. Summary of the invention

[0005] The present application provides a solid state drive data processing method, device, storage medium and program product for reducing the energy consumption of the solid state drive.

[0006] In a first aspect, the present application provides a solid-state hard disk data processing method, which is applied to electronic devices, and the method includes: obtaining a network data transmission request, and detecting a network bandwidth status corresponding to the network data transmission request, and generating a bandwidth status parameter according to the network bandwidth status; calculating a data transmission time prediction value based on the bandwidth status parameter and the data volume of the network data transmission request, and determining a buffer capacity threshold according to the data transmission time prediction value; adjusting the capacity size of the data buffer according to the buffer capacity threshold to obtain an adjusted data buffer; monitoring the data occupancy rate of the adjusted data buffer, and when the data occupancy rate is lower than a preset occupancy rate threshold, calculating an idle time window of a target solid-state hard disk according to the network bandwidth status; determining a target power consumption mode of the target solid-state hard disk according to the duration of the idle time window; and controlling the target solid-state hard disk to enter the target power consumption mode within the idle time window.

[0007] In the above embodiment, the electronic device dynamically adjusts the data buffer capacity according to the network bandwidth status, and combines data occupancy monitoring to identify the idle time window of the solid-state drive, and then selects a suitable power consumption mode based on the idle time window characteristics, so that the solid-state drive can enter a low power consumption state in time during network transmission, avoiding maintaining high power consumption operation under low load conditions; this adaptive power consumption management method based on network status not only ensures data transmission performance, but also achieves optimized control of energy consumption.

[0008] In combination with some embodiments of the first aspect, in some embodiments, a network data transmission request is obtained, and a network bandwidth status corresponding to the network data transmission request is detected, and the steps of generating a bandwidth status parameter according to the network bandwidth status specifically include: obtaining a network data transmission request, and determining a target data transmission address of the network data transmission request; performing a network bandwidth test based on the target data transmission address to obtain a real-time bandwidth value; obtaining a set of historical bandwidth values ​​within a preset time window according to the real-time bandwidth value; calculating a bandwidth volatility based on the set of historical bandwidth values; and integrating the real-time bandwidth value, the mean of the set of historical bandwidth values, and the bandwidth volatility to generate a bandwidth status parameter.

[0009] In the above embodiment, the electronic device will integrate the real-time bandwidth value, historical bandwidth data and bandwidth fluctuation rate to generate more comprehensive bandwidth status parameters. This multi-dimensional bandwidth status evaluation method improves the accuracy of network status judgment and makes buffer capacity adjustment and power consumption mode selection more accurate, thereby maximizing energy saving while ensuring data transmission reliability.

[0010] In combination with some embodiments of the first aspect, in some embodiments, the step of calculating a data transmission time prediction value based on bandwidth status parameters and the data volume of network data transmission requests, and determining a buffer capacity threshold value based on the data transmission time prediction value, specifically includes: calculating a bandwidth prediction interval based on the real-time bandwidth value and bandwidth fluctuation rate in the bandwidth status parameters; calculating a maximum data transmission time based on a lower limit value of the bandwidth prediction interval and the data volume of network data transmission requests; and calculating a buffer capacity threshold based on the maximum data transmission time and a preset data processing volume per unit time.

[0011] In the above embodiment, the electronic device calculates the maximum transmission time based on the bandwidth prediction interval and the data volume, and determines a reasonable buffer capacity threshold based on the data processing volume per unit time. This adaptive buffer capacity control strategy avoids the waste of buffer resources while ensuring sufficient data processing space and improving the efficiency of system resource utilization.

[0012] In combination with some embodiments of the first aspect, in some embodiments, the capacity of the data buffer is adjusted according to the buffer capacity threshold to obtain the adjusted data buffer, specifically including: obtaining the remaining available capacity of the current data buffer; if the remaining available capacity is less than the buffer capacity threshold, allocating supplementary capacity from a preset backup buffer, and merging the supplementary capacity with the current data buffer to obtain the adjusted data buffer; if the remaining available capacity is greater than a preset multiple of the buffer capacity threshold, releasing the excess capacity to the backup buffer to obtain the adjusted data buffer.

[0013] In the above embodiment, the electronic device implements a dynamic adjustment mechanism of the buffer capacity, which can allocate or release capacity from the backup buffer according to actual needs. This not only optimizes the utilization efficiency of memory resources, but also provides more accurate load status information for power consumption management, which helps to achieve more refined energy consumption control.

[0014] In combination with some embodiments of the first aspect, in some embodiments, after the step of adjusting the capacity of the data buffer according to the buffer capacity threshold to obtain the adjusted data buffer, the method also includes: obtaining historical power consumption data of the target solid-state hard drive; the historical power consumption data includes the average power consumption value and mode switching time under different power consumption modes; establishing a power consumption prediction model based on the historical power consumption data; the power consumption prediction model is used to predict the actual power consumption value of the target solid-state hard drive under different power consumption modes according to its working state; monitoring the temperature state of the target solid-state hard drive, and correcting the prediction result of the power consumption prediction model according to the temperature state to obtain a corrected power consumption prediction value; screening the available power consumption modes of the target solid-state hard drive according to the corrected power consumption prediction value to obtain a set of candidate power consumption modes.

[0015] In the above embodiment, the electronic device establishes a power consumption prediction model based on temperature status, which can more accurately evaluate the actual energy consumption in different power consumption modes. This temperature-aware power consumption prediction mechanism improves the accuracy of power consumption mode selection and effectively prevents power consumption prediction deviations caused by temperature factors.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining the target power consumption mode of the target solid-state hard disk according to the duration of the idle time window, the method also includes: obtaining performance mode parameters of the target solid-state hard disk; the performance mode parameters include the operating frequency and operating voltage of the NAND flash memory; calculating the target performance mode parameters based on the target power consumption mode, and calculating the switching time required to switch from the current performance mode parameters to the target performance mode parameters; when the switching time is less than the duration of the idle time window, calculating the ratio of the energy consumption cost of the switching process to the energy saving benefit after the switching, and performing parameter switching when the ratio is less than a preset threshold; when the switching time is greater than or equal to the duration of the idle time window, selecting the power consumption mode with the shortest switching time from the candidate power consumption mode set as the updated target power consumption mode.

[0017] In the above embodiment, the electronic device evaluates the switching cost and energy-saving benefit when switching power consumption modes, and selects the optimal switching strategy according to the time window characteristics. This mode switching mechanism based on cost-benefit analysis avoids the additional overhead caused by frequent switching and ensures the actual effect of energy-saving measures.

[0018] In combination with some embodiments of the first aspect, in some embodiments, the steps of calculating the target performance mode parameters based on the target power consumption mode, and calculating the switching time required to switch from the current performance mode parameters to the target performance mode parameters, specifically include: determining the target power consumption range according to the target power consumption mode; the upper limit value of the target power consumption range is equal to the nominal power consumption value corresponding to the target power consumption mode; based on the target power consumption range, a dynamic voltage and frequency adjustment algorithm is used to calculate multiple groups of candidate performance mode parameters; each group of candidate performance mode parameters includes the corresponding NAND flash memory operating frequency and operating voltage; performance evaluation is performed on the multiple groups of candidate performance mode parameters to obtain performance scores corresponding to each group of candidate performance mode parameters; the multiple groups of candidate performance mode parameters are sorted according to the performance scores, and the candidate performance mode parameters with the highest performance scores are selected as the target performance mode parameters; and the switching time required to switch from the current performance mode parameters to the target performance mode parameters is calculated.

[0019] In the above embodiment, the electronic device uses a dynamic voltage and frequency adjustment algorithm to optimize the performance mode parameters, and selects the optimal configuration through performance evaluation. Through refined parameter adjustment, more efficient energy consumption control is achieved while ensuring performance, thereby improving the overall energy efficiency of the system.

[0020] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and any possible implementation manner of the first aspect.

[0023] It is understandable that the electronic device provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Due to the use of an adaptive power consumption management mechanism based on network bandwidth status and data buffer occupancy, the idle time window of the solid-state drive can be accurately identified and the appropriate power consumption mode can be selected, which effectively solves the problem in the prior art that the solid-state drive cannot enter the low-power consumption state in time during network transmission, thereby achieving significant reduction in energy consumption while ensuring data transmission performance; by real-time monitoring of the network bandwidth status and buffer occupancy, potential energy-saving opportunities can be discovered in time when the network transmission rate is low, avoiding the solid-state drive from continuously maintaining a high-power consumption operating state under low load conditions, thereby improving the energy utilization efficiency of the system.

[0025] 2. Due to the adoption of a buffer management mechanism based on dynamic adjustment of remaining capacity, the buffer capacity can be flexibly allocated and released according to actual needs, effectively solving the problem of resource waste or shortage caused by fixed capacity allocation in the existing technology, thereby achieving more efficient memory resource utilization and more accurate load status perception; by comparing the relationship between the current remaining capacity and the threshold, the capacity can be replenished or released from the backup buffer in a timely manner, which not only avoids idle resources, but also ensures the continuity of data processing, and provides a more reliable decision-making basis for power consumption management.

[0026] 3. Due to the adoption of a power consumption mode adjustment mechanism based on switching cost and benefit analysis, the optimal switching strategy can be selected based on the switching time and energy consumption cost, which effectively solves the problem of additional overhead caused by frequent switching of power consumption modes in the prior art, thereby achieving more economical and efficient energy-saving control; by comparing the switching time with the idle window duration, and evaluating the ratio of switching cost to energy-saving benefit, unnecessary mode switching can be avoided, ensuring that each power consumption mode adjustment can bring actual energy-saving effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flowchart of a method for processing data of a solid state drive in an embodiment of the present application; Figure 2 is another flowchart of the solid state drive data processing method in an embodiment of the present application; Figure 3 It is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.

[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0030] For ease of understanding, the application scenarios of the embodiments of the present application are introduced below.

[0031] In a large data center, servers need to frequently process data transmission requests from different clients. Due to fluctuations in network bandwidth conditions and large differences in data transmission volume at different times, when network bandwidth is limited, the data arrival rate is reduced, and the solid-state drive is in a low-load state for a long time but still maintains a high-power working mode, resulting in energy waste. Especially when processing services such as video streaming and large-scale file synchronization, the volatility of network bandwidth is more obvious, which poses severe challenges to the buffer management and power consumption control of solid-state drives.

[0032] In the related art, data caching and energy saving control of solid state drives can be achieved by adopting a buffer management strategy with a fixed threshold and a preset power consumption mode switching rule. Specifically, the system triggers capacity adjustment when the buffer usage reaches a fixed threshold, and switches the power consumption mode when the device idle time exceeds a preset value. The following introduces the scenario of using the solid state drive data processing method in the related art.

[0033] A cloud storage service provider uses a traditional fixed threshold strategy to manage the buffer and power consumption status of solid-state drives. The system pre-sets a fixed buffer capacity upper limit and power consumption mode switching threshold. When the buffer usage rate exceeds 90%, the system expands the capacity, and when it is less than 30%, the system shrinks the capacity. When the idle time exceeds the preset value, the system switches to low power consumption mode. However, in actual operation, this solution often has response lags and misjudgments: for example, in the case of sudden performance demand scenarios, the system cannot predict and adjust the buffer capacity in time, resulting in data overflow; in the case of frequent fluctuations in network bandwidth, the fixed power consumption mode switching strategy leads to frequent state switching, which not only increases additional energy consumption, but also affects the stability of the system. Especially when dealing with complex mixed loads, the fixed threshold strategy cannot adapt to dynamically changing business needs.

[0034] By using the solid-state hard disk data processing method in the embodiment of the present application, the intelligent management of buffer capacity and power consumption mode is realized through real-time bandwidth testing, historical data analysis and power consumption status evaluation, which can not only accurately predict data transmission requirements and adjust the system status in advance, but also dynamically optimize energy efficiency according to actual operation conditions. The following introduces the scenarios in which the solid-state hard disk data processing method in the present application is used.

[0035] After a data processing center deployed this solution, the system was able to intelligently adapt to changes in the network environment. When it detects that an upstream application is about to transmit a large amount of log data, the system first performs a bandwidth test and analyzes historical bandwidth data to accurately predict bandwidth fluctuations that may be encountered in future data transmissions. Based on this prediction, the system expands the buffer of the solid-state drive to an appropriate size in advance to ensure that data can be received smoothly even when the network bandwidth is reduced. At the same time, the system continuously monitors the progress of data processing and buffer usage. When a longer idle time window is identified, it will evaluate the cost-benefit of switching to low-power mode and choose the appropriate time to adjust power consumption.

[0036] It can be seen that the solid-state hard disk data processing method in the embodiment of the present application can not only realize reliable data transmission, but also effectively solve the response lag and energy waste problems caused by the traditional fixed threshold strategy, thereby achieving dual optimization of system performance and energy efficiency.

[0037] For ease of understanding, the following describes the process of the method provided by this implementation in combination with the above scenario. Figure 1 , is a flow chart of a solid state drive data processing method in an embodiment of the present application.

[0038] S101: Obtain a network data transmission request, detect a network bandwidth status corresponding to the network data transmission request, and generate a bandwidth status parameter according to the network bandwidth status.

[0039] Among them, the network data transmission request refers to the operation instruction initiated by the application that requires data transmission through the network, including data upload request and data download request; the network bandwidth status refers to the data transmission capacity of the current network connection, including parameters such as real-time transmission rate and link quality; the bandwidth status parameter is used to represent the quantitative description of the network bandwidth status, including multi-dimensional data such as real-time bandwidth value, historical bandwidth statistics and volatility indicators.

[0040] The electronic device executes this step when it receives a data transmission operation from an application. Specifically, the electronic device first obtains a network data transmission request containing the target transmission address, and then performs multiple bandwidth test sampling on the target address through the network bandwidth test module to obtain real-time bandwidth data. At the same time, the electronic device will extract the bandwidth records of the target address in the past period of time from the historical database, and calculate the statistical characteristics of the bandwidth, such as the mean and standard deviation. Finally, the electronic device combines the real-time bandwidth data with the historical statistical characteristics to generate a comprehensive bandwidth status parameter containing bandwidth values, stability scores, and trend predictions.

[0041] In some embodiments, the detection of network bandwidth status and parameter generation can be achieved in a variety of ways: Optionally, the electronic device can calculate the real-time bandwidth value by sending a detection data packet of a preset size and recording the round-trip time, and evaluate the bandwidth stability by combining indicators such as TCP window size and network delay, and finally predict the short-term bandwidth change trend based on the linear regression method to generate bandwidth status parameters; Optionally, the electronic device can also directly monitor the data throughput of the network interface, and use the time series analysis method in combination with historical data to establish a bandwidth prediction model, and output the bandwidth status parameters through the model. It is understandable that other network performance measurement and data analysis methods can also be used to achieve bandwidth status detection and parameter generation, which is not limited here.

[0042] It should be noted that the bandwidth test uses adaptive probe packet technology. The system first sends probe packets of increasing size (from 64 bytes to 1500 bytes) and records the round-trip time and arrival interval of each packet. Then the exponentially weighted moving average algorithm is used to process the original measurement data to eliminate the impact of instantaneous fluctuations. Next, the system calculates the effective bandwidth value: by dividing the probe packet size by the arrival time interval, a series of bandwidth sampling values ​​are obtained. Finally, the Kelman filter algorithm is applied to correct the sampling value in combination with historical bandwidth data to output a more accurate real-time bandwidth estimate. The entire test process will dynamically adjust the frequency of probe packet sending, reduce the test frequency when the network status is stable to reduce overhead, and increase the sampling density when significant changes are detected to improve response speed.

[0043] It should be noted that the input data of the bandwidth prediction model include: real-time bandwidth measurement value, historical bandwidth record, network delay, packet loss rate, network congestion index and other network status parameters, as well as context information such as timestamp and service type. The model adopts LSTM network structure, including time series feature extraction module, state prediction module and probability output module. The time series feature extraction module analyzes the bandwidth change trend; the state prediction module establishes the network state transition model; the probability output module generates the bandwidth prediction interval. The training standard adopts the negative log-likelihood loss function, and combines the prediction accuracy and interval reliability. The training data covers network status records of different time periods and different load types, and constructs sequence samples through the sliding window method. When in use, the model continuously receives network monitoring data, outputs the bandwidth prediction value and fluctuation range in the future time window, and assists the system in buffer capacity planning and power consumption mode selection.

[0044] S102: Calculate a predicted value of data transmission time based on the bandwidth status parameter and the data volume of the network data transmission request, and determine a buffer capacity threshold according to the predicted value of data transmission time.

[0045] Among them, the data transmission time prediction value indicates the estimated time required to complete the current network data transmission request; the data volume refers to the total byte size of the data to be transmitted; the buffer capacity threshold is used to indicate the minimum available capacity that the data buffer needs to maintain to ensure the continuity and stability of data transmission.

[0046] The electronic device performs this step after obtaining the bandwidth status parameter. Specifically, the electronic device first calculates the worst-case data transmission completion time based on the lower limit of the bandwidth prediction interval in the bandwidth status parameter and the total amount of data to be transmitted. Then, the electronic device evaluates the data buffer capacity required during the transmission time based on the preset data processing rate and system resource status. Finally, the electronic device comprehensively considers the burstiness of data transmission and the fault tolerance requirements of the system, adds a certain amount of redundant space to the calculated necessary buffer capacity, and finally determines the buffer capacity threshold.

[0047] In some embodiments, the transmission time prediction and the determination of the buffer capacity threshold can be achieved in a variety of ways: Optionally, the electronic device can use the exponential weighted moving average method to process historical bandwidth data, establish a probability distribution model for bandwidth changes, and calculate the maximum transmission time with a confidence level of 95% in combination with the data volume, and determine the capacity threshold based on the time value and the preset buffer utilization upper limit; Optionally, the electronic device can also use machine learning methods to train a prediction model to estimate the required buffer capacity threshold by analyzing the bandwidth utilization, buffer requirements and other characteristics of historical transmission tasks. It is understandable that other data analysis and predictive modeling methods can also be used to achieve the evaluation of transmission time and buffer requirements, which is not limited here.

[0048] S103: Adjust the capacity of the data buffer according to the buffer capacity threshold to obtain an adjusted data buffer.

[0049] The data buffer refers to the memory space used to temporarily store the transmitted data; the capacity refers to the number of bytes available for data storage; and the adjusted data buffer refers to the new data temporary storage area after the capacity is adjusted.

[0050] The electronic device performs this step after determining the buffer capacity threshold. Specifically, the electronic device first checks the total capacity and used capacity of the current data buffer, and calculates the actual available remaining space. If the remaining space is less than the determined capacity threshold, the electronic device will apply for additional buffer space from the system's backup memory pool and merge the newly applied space with the original buffer. If the remaining space exceeds the threshold by too much, the excess space will be released back to the system memory pool to avoid wasting resources. During the adjustment process, the electronic device will ensure the continuity and integrity of the data, and reorganize and sort the data when necessary.

[0051] In some embodiments, dynamic adjustment of buffer capacity can be achieved in a variety of ways: optionally, the electronic device can maintain a hierarchical memory pool structure, allocate or release space from memory pools of different levels according to capacity requirements, and achieve dynamic expansion and contraction of the buffer through memory mapping technology; optionally, the electronic device can also adopt a memory page management mechanism to achieve precise control of buffer capacity by adjusting page allocation strategy and replacement algorithm. It is understandable that other memory management and resource scheduling methods can also be used to achieve dynamic adjustment of buffer capacity, which is not limited here.

[0052] S104: Monitor the data occupancy rate of the adjusted data buffer, and when the data occupancy rate is lower than a preset occupancy rate threshold, calculate the idle time window of the target solid state drive according to the network bandwidth status.

[0053] Among them, the data occupancy rate indicates the ratio of the used space of the buffer to the total capacity; the preset occupancy rate threshold refers to the standard value for judging the load status of the buffer; the idle time window is used to indicate the time period during which the solid-state drive can enter a low-power state.

[0054] The electronic device continues to perform this step after completing the buffer adjustment. Specifically, the electronic device monitors the usage of the data buffer by regular sampling and calculates the current data occupancy rate. When it is detected that the data occupancy rate is lower than the preset threshold, it indicates that the data processing pressure is small. The electronic device will combine the current network bandwidth status to estimate the time required to complete the processing of the remaining data in the current buffer, and combine the amount of new data that may arrive in the future. , Comprehensively calculate the possible idle time window of the solid-state drive.

[0055] In some embodiments, the calculation of the idle time window can be implemented in a variety of ways: Optionally, the electronic device can establish a data arrival rate model based on historical data, predict the future data inflow rate in combination with the current network status, and determine the possible idle time interval through simulation; Optionally, the electronic device can also use a heuristic algorithm to dynamically estimate the system's workload and idle opportunities based on the current buffer status and bandwidth change trend. It is understandable that other load prediction and time planning methods can also be used to implement the identification of idle windows, which are not limited here.

[0056] S105 . Determine a target power consumption mode of the target solid state drive according to the duration of the idle time window.

[0057] The duration of the idle time window indicates the duration that is expected to be available for energy saving; the target power consumption mode refers to a specific low-power working state that the solid-state drive can adopt; and the target solid-state drive is used to indicate a storage device that requires power consumption adjustment.

[0058] The electronic device performs this step after identifying the idle time window. Specifically, the electronic device first obtains all power consumption mode parameters supported by the solid-state drive, including the power consumption level, performance characteristics, and mode switching time of each mode. Then, based on the calculated idle time window length, the candidate power consumption modes whose switching time is less than the window length are screened out. Finally, the electronic device selects the optimal target power consumption mode from the candidate modes based on comprehensive energy-saving benefits, performance impact, and temperature factors.

[0059] In some embodiments, the target power consumption mode can be determined in a variety of ways: Optionally, the electronic device can establish a utility function based on multiple factors, quantify indicators such as energy saving benefits, performance loss, and switching overhead, and perform comprehensive scoring, and select the power consumption mode with the highest score; Optionally, the electronic device can also use a dynamic programming algorithm to predict the long-term benefits of different mode selections based on historical power consumption mode switching experience data, and select the optimal power consumption adjustment strategy. It is understandable that other decision optimization and mode selection methods can also be used to determine the target power consumption mode, which is not limited here.

[0060] S106: Control the target solid state drive to enter a target power consumption mode within the idle time window.

[0061] Among them, power consumption mode switching refers to the process of changing the working state and energy consumption level of the solid-state drive; the control signal refers to a set of instructions used to trigger and manage power consumption mode switching; and the switching completion flag is used to indicate the execution result of the power consumption mode adjustment.

[0062] The electronic device performs this step after determining the target power consumption mode. Specifically, the electronic device first verifies whether the current time point is within the expected idle time window, and checks whether the system resource status meets the mode switching conditions. Then, the electronic device sends a power consumption mode switching instruction through the solid-state drive control interface, and monitors the execution status of the switching process. If an abnormal situation is detected, the electronic device will interrupt the switching process in time and restore to the original state. After the switch is completed, the electronic device will update the working status record of the solid-state drive and continue to monitor the validity of the idle time window.

[0063] In some embodiments, the switching control of power consumption mode can be implemented in a variety of ways: Optionally, the electronic device can implement a progressive power consumption adjustment mechanism, gradually transition to the target power consumption mode through multiple intermediate states, reduce the impact of sudden changes, and monitor system performance indicators in real time during the process; Optionally, the electronic device can also adopt an event-driven control strategy to dynamically adjust the switching process according to events such as system load changes and temperature fluctuations to ensure the smoothness of power consumption adjustment. It is understandable that other control algorithms and state management methods can also be used to implement the switching control of power consumption mode, which is not limited here.

[0064] The following is a more detailed description of the process of the method provided by this implementation. Figure 2 , is another flow chart of the solid state drive data processing method in an embodiment of the present application.

[0065] S201: Obtain a network data transmission request, detect a network bandwidth status corresponding to the network data transmission request, and generate a bandwidth status parameter according to the network bandwidth status.

[0066] Referring to step S101, the electronic device generates a bandwidth status parameter.

[0067] In some embodiments, the electronic device will integrate various types of data into bandwidth status parameters, that is, the electronic device will obtain a network data transmission request and determine the target data transmission address of the network data transmission request; perform a network bandwidth test based on the target data transmission address to obtain a real-time bandwidth value; obtain a set of historical bandwidth values ​​within a preset time window based on the real-time bandwidth value; calculate the bandwidth volatility based on the historical bandwidth value set; integrate the real-time bandwidth value, the mean of the historical bandwidth value set and the bandwidth volatility to generate a bandwidth status parameter.

[0068] Among them, the network data transmission request represents the data transmission operation instruction initiated by the application; the target data transmission address refers to the destination network address of the data transmission; the real-time bandwidth value is used to represent the instantaneous data transmission rate of the current network connection; the preset time window represents the time range for historical data analysis; the historical bandwidth value set refers to all bandwidth sampling data recorded within the preset time window; the bandwidth fluctuation rate is used to represent the severity of the network bandwidth change; the bandwidth status parameter represents a comprehensive quantitative description of the current network status.

[0069] The electronic device executes this process when it receives a data transmission operation from an application. Specifically, the electronic device first parses the target address information in the network data transmission request to determine the destination endpoint of the data transmission. Then, the electronic device starts the bandwidth test module and measures the real-time network bandwidth between the target address and the target address by sending a detection data packet. Next, the electronic device queries the bandwidth history record database, extracts all bandwidth sampling data within a preset time window (such as nearly 1 hour), and forms a set of historical bandwidth values. After that, the electronic device calculates the ratio of the standard deviation of the historical bandwidth value to the mean to obtain the bandwidth volatility. Finally, the electronic device integrates the real-time bandwidth value, the historical bandwidth mean, and the bandwidth volatility to generate a comprehensive bandwidth status parameter that includes bandwidth numerical characteristics and stability indicators.

[0070] In some embodiments, the detection of network bandwidth status and parameter generation can be achieved in a variety of ways: Optionally, the electronic device first records the round-trip time and packet loss rate by regularly sending detection data packets of different sizes, then uses a statistical filtering algorithm to eliminate outliers, then calculates the mean and variance of the bandwidth, and finally obtains the bandwidth status parameters through weight fusion; Optionally, the electronic device can also first establish a bandwidth estimation model based on the TCP window size, then make corrections based on network delay and congestion status, then apply a time series analysis method to predict bandwidth trends, and finally generate bandwidth status parameters containing prediction information. It is understandable that other network performance measurement and data analysis methods can also be used to achieve bandwidth status detection and parameter generation, which are not limited here.

[0071] S202: Calculate a predicted value of data transmission time based on the bandwidth status parameter and the data volume of the network data transmission request, and determine a buffer capacity threshold according to the predicted value of data transmission time.

[0072] Referring to step S102 , the electronic device determines a buffer capacity threshold.

[0073] In some embodiments, the electronic device will xx, that is, the electronic device will calculate the bandwidth prediction interval based on the real-time bandwidth value and bandwidth fluctuation rate in the bandwidth status parameters; calculate the maximum data transmission time based on the lower limit value of the bandwidth prediction interval and the data volume of the network data transmission request; calculate the buffer capacity threshold based on the maximum data transmission time and the preset data processing volume per unit time.

[0074] Among them, the bandwidth prediction interval represents the possible range of bandwidth values ​​in the future; the lower limit refers to the minimum value of the bandwidth prediction interval; the data volume is used to represent the total size of data that needs to be transmitted; the maximum data transmission time represents the time required to complete data transmission under the worst network conditions; the data processing volume per unit time refers to the amount of data that can be processed by the electronic device per unit time; the buffer capacity threshold is used to represent the minimum storage space that the data buffer needs to maintain.

[0075] The electronic device executes this process after obtaining the bandwidth status parameters. Specifically, the electronic device first establishes a baseline prediction value based on the real-time bandwidth value, calculates the prediction error range based on the bandwidth fluctuation rate, and determines the upper and lower limits of the bandwidth prediction through confidence interval analysis. Then, the electronic device uses the lower limit value as the bandwidth expectation in the worst case, and combines the total amount of data to be transmitted to calculate the longest time that may be required to complete the data transmission. Next, the electronic device obtains the data processing rate defined in the hardware specification and calculates the amount of data that can be processed per unit time. Finally, the electronic device multiplies the maximum transmission time by the processing amount per unit time to obtain the minimum buffer capacity that needs to be reserved, that is, the buffer capacity threshold.

[0076] In some embodiments, bandwidth prediction and buffer capacity calculation can be implemented in a variety of ways: Optionally, the electronic device first builds a bandwidth prediction model based on time series, then applies an autoregressive algorithm to predict short-term bandwidth change trends, and then calculates the confidence level of the prediction interval in combination with historical fluctuation characteristics; Optionally, the electronic device can also first establish a bandwidth predictor based on a neural network, and then continuously optimize the prediction accuracy through real-time learning, and then use a probability distribution model to estimate the bandwidth fluctuation range. It is understandable that other data prediction and capacity planning methods can also be used to implement the calculation of bandwidth prediction intervals and buffer capacity, which is not limited here.

[0077] S203: Obtain the remaining available capacity of the current data buffer.

[0078] Among them, the current data buffer refers to the data temporary storage memory space in use; the remaining available capacity refers to the size of the storage space in the buffer that has not been occupied; capacity calculation refers to the process of determining the actual available storage space; the memory management unit refers to the system component responsible for managing and monitoring memory usage.

[0079] The electronic device performs this step after calculating the target buffer capacity threshold. Specifically, the electronic device first obtains the overall allocation status of the current data buffer through the memory management unit, including the total capacity, the allocated address range, and the continuity information of the memory block. Then, the electronic device scans the memory mapping table of the buffer and counts the sizes of all occupied memory blocks. At the same time, the electronic device also checks the memory fragmentation status and evaluates the actual available continuous space size. Finally, the electronic device combines the memory alignment requirements and the system reserved space to calculate the remaining capacity that can actually be used for data storage.

[0080] In some embodiments, the remaining available capacity can be obtained in a variety of ways: Optionally, the electronic device can first establish a status table of buffer usage, record the starting address, size and usage status of each memory block, then count all memory blocks marked as free, and finally obtain the actual available capacity through fragmentation analysis; Optionally, the electronic device can also adopt a real-time monitoring mechanism, record the dynamic usage of the buffer through periodic sampling, and combine historical data to predict the capacity demand changes in the short term, so as to more accurately evaluate the current available capacity. It is understandable that other memory monitoring and statistical analysis methods can also be used to obtain the remaining available capacity, which is not limited here.

[0081] S204: If the remaining available capacity is less than the buffer capacity threshold, allocating supplementary capacity from the preset standby buffer, and merging the supplementary capacity with the current data buffer to obtain an adjusted data buffer.

[0082] Among them, the preset backup buffer represents the memory resource pool pre-allocated by the system for dynamic expansion; the supplementary capacity refers to the size of the storage space that needs to be newly allocated; the merge operation represents the process of integrating the newly allocated space with the existing buffer; the adjusted data buffer is used to represent the new buffer after the space expansion is completed.

[0083] The electronic device executes this step when it detects that the remaining available capacity is insufficient. Specifically, the electronic device first calculates the specific value of the required supplementary capacity, that is, the difference between the buffer capacity threshold and the current remaining capacity. Then, the electronic device accesses the management interface of the backup buffer, queries the available resource status and submits a capacity allocation request. After obtaining the new memory space, the electronic device will initialize it and set the corresponding access rights and management attributes. Then, the electronic device uses memory mapping technology to physically or logically merge the newly allocated space with the existing buffer to ensure the continuity of data access. Finally, the electronic device updates the management information of the buffer, including the address range, capacity statistics, and usage status.

[0084] In some embodiments, the expansion and merging of the buffer can be achieved in a variety of ways: optionally, the electronic device first analyzes the current memory layout and access mode, calculates the optimal expansion plan, then selects appropriate continuous memory blocks from the backup buffer for allocation, and finally achieves space merging through page table remapping; optionally, the electronic device can also adopt a decentralized storage method to manage multiple discontinuous memory blocks by establishing an index table to achieve logical space expansion. It is understandable that other memory expansion and merging strategies can also be used to achieve dynamic increase of buffer capacity, which is not limited here.

[0085] S205: If the remaining available capacity is greater than a preset multiple of the buffer capacity threshold, the excess capacity is released to the standby buffer to obtain an adjusted data buffer.

[0086] Among them, the preset multiple represents the proportional factor for determining whether the capacity is excessive; the excess part refers to the storage space that exceeds the reasonable capacity range; the release operation represents the process of returning the excess space to the backup buffer; the adjusted data buffer is used to represent the buffer after the capacity optimization is completed.

[0087] The electronic device executes this step when it detects that there is too much remaining capacity. Specifically, the electronic device first calculates the capacity upper limit value based on the buffer capacity threshold and the preset multiple. Then, the electronic device compares the current remaining capacity with the upper limit value to determine the amount of space that can be released. Before releasing the space, the electronic device will organize the data, store the scattered valid data in a centralized manner, and update the relevant memory mapping information. Then, the electronic device marks the organized free space as releasable and returns it to the backup buffer through the memory management interface. Finally, the electronic device updates the capacity information and management status of the buffer.

[0088] In some embodiments, space release and capacity adjustment can be achieved in a variety of ways: Optionally, the electronic device first performs data access pattern analysis to identify low-frequency memory areas, then stores valid data in a centralized manner through data migration and reorganization, and finally releases the organized continuous free space; Optionally, the electronic device can also adopt a progressive release strategy to release excess space in batches according to the real-time load status to avoid performance impact caused by sudden adjustments. It is understandable that other memory recovery and optimization methods can also be used to achieve dynamic contraction of buffer capacity, which is not limited here.

[0089] It should be noted that the capacity optimization judgment adopts a multi-threshold dynamic evaluation method. The system first calculates the actual use efficiency of the buffer, divides the size of the used space by the total capacity to obtain the space utilization rate, and calculates the frequency of statistical read and write requests to obtain the access activity. Then, the baseline threshold is determined based on the historical load characteristics: by analyzing the buffer usage records in the past 24 hours, the average utilization rate and standard deviation are calculated, and the dynamically adjusted baseline is set. Finally, the system dynamically adjusts the threshold range based on the current network status and data processing speed: increase the threshold when the network bandwidth is sufficient and the data processing is fast, and lower the threshold when resources are limited, so as to achieve more flexible capacity optimization decisions.

[0090] In some embodiments, the electronic device will perform power consumption prediction based on historical data, that is, the electronic device will obtain historical power consumption data of the target solid-state drive; the historical power consumption data includes average power consumption values ​​and mode switching times in different power consumption modes; a power consumption prediction model is established based on the historical power consumption data; the power consumption prediction model is used to predict the actual power consumption values ​​of the target solid-state drive in different power consumption modes based on its working state; the temperature state of the target solid-state drive is monitored, and the prediction results of the power consumption prediction model are corrected according to the temperature state to obtain a corrected power consumption prediction value; the available power consumption modes of the target solid-state drive are screened according to the corrected power consumption prediction value to obtain a set of candidate power consumption modes.

[0091] Among them, the historical power consumption data represents the energy consumption information of the solid-state hard disk under different working conditions; the average power consumption value refers to the steady-state energy consumption level under a specific power consumption mode; the mode switching time is used to represent the time required to switch between different power consumption modes; the power consumption prediction model represents the mathematical model used to estimate the actual power consumption; the working state refers to the current operating parameter combination of the solid-state hard disk; the temperature state is used to represent the real-time temperature distribution of the solid-state hard disk; the candidate power consumption mode set represents all available power consumption configurations that meet the requirements.

[0092] The electronic device executes this process when power consumption management is required. Specifically, the electronic device first accesses the power consumption log database of the solid-state drive and extracts historical operating data under various power consumption modes, including steady-state power consumption and time overhead of mode switching. Then, the electronic device trains the power consumption prediction model based on these historical data and establishes a mapping relationship between working parameters and actual power consumption. Next, the electronic device obtains the temperature data of each key position of the solid-state drive through the temperature sensor array, analyzes the degree of influence of temperature on power consumption, and corrects the output results of the prediction model accordingly. Finally, the electronic device compares the corrected power consumption prediction value with the power consumption limit required by the system to screen out the power consumption mode combination that meets the conditions.

[0093] In some embodiments, power consumption prediction and mode selection can be achieved in a variety of ways: Optionally, the electronic device first establishes a multivariate regression model to describe the impact of factors such as temperature, frequency, and voltage on power consumption, and then uses the principal component analysis method to extract key characteristic parameters, and then optimizes the model accuracy through cross-validation; Optionally, the electronic device can also first build a power consumption evaluation system based on fuzzy logic, and then dynamically adjust the evaluation rules through an adaptive algorithm, and then combine the temperature compensation mechanism to improve the prediction accuracy. It is understandable that other data modeling and optimization screening methods can also be used to achieve power consumption prediction and mode selection, which are not limited here.

[0094] It should be noted that the input data of the power consumption prediction model include: operating parameters such as the operating frequency, operating voltage, temperature distribution, load type, access mode of the solid-state drive, as well as historical data such as historical power consumption records and mode switching logs. The model structure adopts a multi-layer perceptron network, which includes a feature extraction layer, a nonlinear mapping layer, and a regression output layer. The feature extraction layer uses convolution operations to process time series data and capture parameter change patterns; the nonlinear mapping layer uses the ReLU activation function to establish a complex relationship between parameters and power consumption; the regression output layer predicts power consumption values ​​under different working conditions. The training process uses mean square error as the loss function and uses the Adam optimizer for parameter update. The training data set contains power consumption data under normal operation, mode switching, and extreme working conditions, and cross-validation is used to ensure the generalization ability of the model. In the prediction stage, the model receives real-time working parameters and outputs expected power consumption values ​​and prediction confidence intervals. The system dynamically adjusts the power consumption mode according to the prediction results to achieve precise energy consumption control.

[0095] S206: Monitor the data occupancy rate of the adjusted data buffer, and when the data occupancy rate is lower than a preset occupancy rate threshold, calculate the idle time window of the target solid state drive according to the network bandwidth status.

[0096] Referring to step S104, the electronic device calculates an idle time window.

[0097] S207: Determine a target power consumption mode of the target solid state drive according to the duration of the idle time window.

[0098] Referring to step S105 , the electronic device determines a target power consumption mode.

[0099] S208: Obtain performance mode parameters of the target solid state drive.

[0100] Among them, the performance mode parameter represents the configuration information describing the working status of the solid-state drive; NAND flash memory refers to the storage chip in the solid-state drive; the operating frequency represents the operating clock rate of the NAND flash memory; and the operating voltage refers to the operating voltage value supplied to the NAND flash memory.

[0101] The electronic device performs this step after determining the target power consumption mode. Specifically, the electronic device first reads the current performance configuration information through the management interface of the solid-state drive, including parameters such as the operating frequency, operating voltage, and interface rate of the NAND flash memory. Then, the electronic device obtains all performance mode configuration options supported by the solid-state drive to form an optional parameter set. At the same time, the electronic device also reads the power consumption characteristics and switching constraints corresponding to each performance mode. Finally, the electronic device classifies and organizes the obtained parameter information to establish a performance mode parameter table.

[0102] In some embodiments, the acquisition and management of performance mode parameters can be achieved in a variety of ways: Optionally, the electronic device first establishes a hierarchical parameter management structure to record chip-level, channel-level, and device-level performance parameters, and then ensures configuration consistency through parameter dependency analysis, and finally generates a complete performance mode description; Optionally, the electronic device can also use a dynamic parameter detection mechanism to obtain the performance parameter range and adjustment accuracy actually supported by the device through test verification. It is understandable that other parameter collection and feature extraction methods can also be used to achieve the acquisition of performance mode parameters, which are not limited here.

[0103] S209: Calculate target performance mode parameters based on the target power consumption mode, and calculate the switching time required to switch from the current performance mode parameters to the target performance mode parameters.

[0104] Among them, the target performance mode parameter represents the new performance configuration set to meet the target power consumption requirement; the switching time refers to the time required to transition from the current state to the target state; the parameter switching represents the process of changing the working parameters of the solid-state drive; the current performance mode parameter is used to represent the current working configuration of the solid-state drive.

[0105] The electronic device performs this step after obtaining the performance mode parameters. Specifically, the electronic device first determines the power consumption constraints according to the target power consumption mode, including the upper limit and fluctuation range of power consumption. Then, the electronic device calculates the frequency and voltage combination that meets the power consumption requirements in combination with the performance characteristic curve of the NAND flash memory. Next, the electronic device evaluates the impact of each set of parameter combinations on performance and selects the configuration with the least performance loss as the target performance mode parameter. Finally, based on the hardware characteristics and stability requirements, the electronic device calculates the transition time required for parameter adjustment, including the sum of the time for voltage regulation, frequency switching, and state stabilization.

[0106] In some embodiments, the calculation of performance parameters and the evaluation of switching time can be achieved in a variety of ways: Optionally, the electronic device first establishes a power consumption-performance mathematical model, finds the optimal parameter configuration through a dynamic programming algorithm, then calculates the adjustment time of each parameter based on the hardware response characteristics, and finally evaluates the stability requirements of the switching process; Optionally, the electronic device can also use a fast parameter matching method based on table lookup, combined with historical switching experience data to predict the actual required switching time. It is understandable that other parameter optimization and time evaluation methods can also be used to determine the target performance mode, which is not limited here.

[0107] In some embodiments, the electronic device determines the switching time based on the performance mode, that is, the electronic device determines the target power consumption range according to the target power consumption mode; the upper limit value of the target power consumption range is equal to the nominal power consumption value corresponding to the target power consumption mode; based on the target power consumption range, a dynamic voltage and frequency adjustment algorithm is used to calculate multiple groups of candidate performance mode parameters; each group of candidate performance mode parameters includes the corresponding NAND flash memory operating frequency and operating voltage; a performance evaluation is performed on the multiple groups of candidate performance mode parameters to obtain a performance score corresponding to each group of candidate performance mode parameters; the multiple groups of candidate performance mode parameters are sorted according to the performance scores, and the candidate performance mode parameters with the highest performance scores are selected as the target performance mode parameters; and the switching time required to switch from the current performance mode parameters to the target performance mode parameters is calculated.

[0108] Among them, the target power consumption range represents the allowable power consumption variation range; the nominal power consumption value refers to the typical power consumption level defined in the power consumption mode specification; the dynamic voltage and frequency adjustment algorithm is used to represent the control strategy for optimizing performance and power consumption; the candidate performance mode parameters represent the optional operating parameter combinations; the performance score refers to the comprehensive performance evaluation index of the parameter combination; the operating frequency represents the operating clock rate of the NAND flash memory; and the operating voltage is used to represent the operating voltage value supplied to the NAND flash memory.

[0109] The electronic device executes this process after determining the target power consumption mode. Specifically, the electronic device first sets the power consumption upper limit according to the nominal power consumption value of the target power consumption mode and establishes the power consumption constraint. Then, the electronic device starts the dynamic voltage and frequency adjustment algorithm, and generates multiple sets of candidate parameter configurations that meet the power consumption constraints by traversing the available frequency and voltage combinations. Next, the electronic device performs a comprehensive performance evaluation on each set of candidate parameters, and calculates the comprehensive performance score based on multiple indicators such as read and write speed, response delay, and energy efficiency ratio. After that, the electronic device arranges all candidate parameters in descending order of performance scores, and selects the parameter combination with the highest score as the target configuration. Finally, the electronic device analyzes the voltage adjustment time, frequency locking time, and state stabilization time during the parameter switching process, and calculates the complete switching timing requirements.

[0110] In some embodiments, the optimization of performance mode parameters and the evaluation of switching time can be achieved in a variety of ways: Optionally, the electronic device first establishes a performance-power consumption trade-off model, then uses a multi-objective optimization algorithm to search for the Pareto optimal solution set, and then determines the optimal parameter combination in combination with the demand weight of the actual application scenario; Optionally, the electronic device can also first build a performance prediction model based on queuing theory, and then evaluate the actual effects of different parameter combinations through Monte Carlo simulation, and then use a heuristic algorithm to quickly locate the optimal configuration. It is understandable that other parameter optimization and time evaluation methods can also be used to achieve performance mode selection and switching planning, which are not limited here.

[0111] It should be noted that the input data of the performance prediction model include: NAND flash memory operating parameters, temperature status, access latency, throughput, energy efficiency and other performance indicators, as well as historical operation records and user experience feedback. The model uses a deep reinforcement learning framework, including a state representation module, a policy network and a value network. The state representation module encodes the system operation status; the policy network generates parameter adjustment decisions; the value network evaluates the long-term benefits of the decision. The training process uses the policy gradient method, and the reward function integrates performance improvement and energy saving. The training data is collected through actual system operation and includes performance and energy consumption data under various working scenarios. In actual applications, the model evaluates the comprehensive performance of different parameter configurations based on real-time monitoring data, provides the system with the best parameter adjustment suggestions, and achieves a balanced optimization of performance and energy efficiency.

[0112] S210: When the switching time is less than the duration of the idle time window, calculate the ratio of the energy consumption cost of the switching process to the energy saving benefit after the switching, and perform parameter switching when the ratio is less than a preset threshold.

[0113] Among them, the energy consumption cost of the switching process refers to the additional energy consumed during the state transition process; the energy saving benefit refers to the total amount of energy saved after switching to the low power mode; the ratio represents the cost-effectiveness ratio; the preset threshold is used to indicate the standard value for judging whether the switching is worthwhile; and the parameter switching represents the specific operation of executing the performance mode transition.

[0114] The electronic device performs this step after obtaining the switching time and the idle time window. Specifically, the electronic device first calculates the instantaneous power change curve during the mode switching process, and integrates it to obtain the total energy consumption cost of the switching process. Then, the electronic device calculates the expected energy saving amount based on the power level of the target power consumption mode and the remaining duration of the idle time window. Next, the electronic device calculates the ratio of the energy consumption cost to the energy saving benefit to evaluate the economy of the switching operation. When the ratio is lower than the preset threshold, it indicates that the switching operation has a significant energy-saving effect, and the electronic device will execute a specific parameter switching process. During the switching process, the electronic device will monitor the hardware status in real time to ensure the safety and reliability of the switching.

[0115] In some embodiments, energy consumption evaluation and switching decisions can be implemented in a variety of ways: Optionally, the electronic device first establishes an accurate energy consumption model, combines the various losses in the process of voltage regulation, frequency switching and state stabilization, and then calculates the total energy consumption through a numerical integration method, and finally makes a switching decision based on a set benefit threshold; Optionally, the electronic device can also use a probabilistic statistical method to establish an energy consumption prediction model by analyzing historical switching records, and dynamically evaluate the benefits of the switching operation. It is understandable that other energy consumption analysis and decision optimization methods can also be used to implement the evaluation and execution of the switching operation, which is not limited here.

[0116] S211 . When the switching time is greater than or equal to the duration of the idle time window, select a power consumption mode with the shortest switching time from the candidate power consumption mode set as an updated target power consumption mode.

[0117] Among them, the candidate power consumption mode set represents all optional low-power working state combinations; the switching time represents the duration required to complete the mode transition; the updated target power consumption mode refers to the reselected optimal power consumption configuration; the shortest switching time represents the option with the fastest state transition among all candidate modes.

[0118] The electronic device performs this step when it finds that the switching time of the current target power consumption mode is too long. Specifically, the electronic device first sorts all modes in the candidate power consumption mode set according to the switching time. Then, the electronic device obtains the detailed parameters of the power consumption mode with the shortest switching time, including power consumption level, performance characteristics and stability requirements. Next, the electronic device verifies whether the mode meets the basic operating requirements and safety constraints of the system. Finally, the electronic device sets the fastest switching mode that meets the conditions as the updated target power consumption mode, and updates the relevant control parameters and management information.

[0119] In some embodiments, fast mode selection and updating can be achieved in a variety of ways: Optionally, the electronic device first constructs a feature index table of candidate modes, locates several modes with the shortest switching time through a fast search algorithm, and then screens them in combination with hardware compatibility and stability requirements, and finally selects the best alternative; Optionally, the electronic device can also use a heuristic search strategy to preliminarily screen candidate modes based on historical experience and quickly locate the most suitable alternative mode. It is understandable that other mode screening and optimization methods can also be used to achieve fast updates of target power consumption modes, which are not limited here.

[0120] S212: Control the target solid state drive to enter a target power consumption mode within the idle time window.

[0121] Referring to step S106 , the electronic device controls the solid state drive to enter a target power consumption mode.

[0122] In the embodiments of the present application, due to the use of a network bandwidth prediction mechanism based on historical data analysis, a buffer capacity management strategy with a dynamic threshold, and a power consumption mode selection method combined with a switching cost, it is possible to accurately predict data transmission requirements and adjust the system state in advance, thereby realizing intelligent management of buffer capacity and power consumption mode, and effectively solving the problems of response lag, misjudgment, and energy waste existing in traditional fixed threshold solutions; through network bandwidth prediction and dynamic buffer management, the reliability of data transmission is significantly improved, and data loss and system congestion are avoided; through intelligent power consumption mode selection and switching strategies, the energy-saving effect is maximized while ensuring performance, and the overall energy consumption of the system is reduced; through multi-dimensional information fusion and adaptive adjustment mechanisms, the system's adaptability to complex environments is improved, and more efficient resource utilization is achieved.

[0123] The electronic device in the embodiment of the present invention is described below from the perspective of hardware processing. Figure 3 , is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present application.

[0124] It should be noted that Figure 3The structure of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0125] like Figure 3 As shown, the electronic device includes a CPU 301, which can perform various appropriate actions and processes according to the program stored in the ROM 302 or the program loaded from the storage part 308 into the RAM 303, such as executing the method described in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, the ROM 302 and the RAM 303 are connected to each other via a bus 304. An I / O interface 305 is also connected to the bus 304.

[0126] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0127] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 309, and / or installed from the removable medium 311. When the computer program is executed by the CPU 301, various functions defined in the present invention are executed.

[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.

[0129] Specifically, the electronic device of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the solid-state hard disk data processing method provided in the above embodiment is implemented.

[0130] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the electronic device, the electronic device implements the solid-state hard disk data processing method provided in the above embodiment.

[0131] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0132] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

Claims

1. A method for processing data of a solid state hard disk, characterized in that: Applied to electronic equipment, the method comprises: Obtaining a network data transmission request, detecting a network bandwidth status corresponding to the network data transmission request, and generating a bandwidth status parameter according to the network bandwidth status; Calculate a predicted value of data transmission time based on the bandwidth state parameter and the data volume of the network data transmission request, and determine a buffer capacity threshold according to the predicted value of data transmission time; Adjusting the capacity of the data buffer according to the buffer capacity threshold to obtain an adjusted data buffer; Monitoring the data occupancy rate of the adjusted data buffer, and when the data occupancy rate is lower than a preset occupancy rate threshold, calculating the idle time window of the target solid-state hard disk according to the network bandwidth status; Determining a target power consumption mode of the target solid state drive according to the duration of the idle time window; The target solid state drive is controlled to enter the target power consumption mode within the idle time window.

2. The method according to claim 1, characterized in that The step of obtaining a network data transmission request, detecting a network bandwidth status corresponding to the network data transmission request, and generating a bandwidth status parameter according to the network bandwidth status specifically includes: Obtaining a network data transmission request, and determining a target data transmission address of the network data transmission request; Performing a network bandwidth test based on the target data transmission address to obtain a real-time bandwidth value; Acquire a set of historical bandwidth values ​​within a preset time window according to the real-time bandwidth value; Calculating bandwidth volatility based on the historical bandwidth value set; The real-time bandwidth value, the average of the historical bandwidth value set and the bandwidth fluctuation rate are integrated to generate a bandwidth state parameter.

3. The method according to claim 1, characterized in that The step of calculating the predicted value of data transmission time consumption based on the bandwidth state parameter and the data volume of the network data transmission request, and determining the buffer capacity threshold value according to the predicted value of data transmission time consumption specifically includes: Calculate the bandwidth prediction interval according to the real-time bandwidth value and bandwidth fluctuation rate in the bandwidth status parameter; Calculating a maximum data transmission time based on a lower limit of the bandwidth prediction interval and the amount of data requested by the network data transmission; The buffer capacity threshold is calculated based on the maximum data transmission time and a preset data processing amount per unit time.

4. The method according to claim 1, characterized in that The step of adjusting the capacity of the data buffer according to the buffer capacity threshold to obtain an adjusted data buffer specifically includes: Get the remaining available capacity of the current data buffer; If the remaining available capacity is less than the buffer capacity threshold, allocating supplementary capacity from a preset standby buffer, and merging the supplementary capacity with the current data buffer to obtain an adjusted data buffer; If the remaining available capacity is greater than a preset multiple of the buffer capacity threshold, the excess capacity is released to the standby buffer to obtain an adjusted data buffer.

5. The method according to claim 1, characterized in that: After the step of adjusting the capacity of the data buffer according to the buffer capacity threshold to obtain an adjusted data buffer, the method further includes: Obtain historical power consumption data of the target solid-state hard disk; the historical power consumption data includes average power consumption values ​​and mode switching times under different power consumption modes; Establishing a power consumption prediction model based on the historical power consumption data; the power consumption prediction model is used to predict the actual power consumption value of the target solid state drive in different power consumption modes according to the working state of the target solid state drive; Monitoring the temperature state of the target solid state hard disk, and correcting the prediction result of the power consumption prediction model according to the temperature state to obtain a corrected power consumption prediction value; The available power consumption modes of the target solid state drive are screened according to the corrected power consumption prediction value to obtain a set of candidate power consumption modes.

6. The method according to claim 1, characterized in that After the step of determining the target power consumption mode of the target solid state drive according to the duration of the idle time window, the method further includes: Acquire performance mode parameters of the target solid state drive; the performance mode parameters include an operating frequency and an operating voltage of a NAND flash memory; Calculating a target performance mode parameter based on the target power consumption mode, and calculating a switching time required to switch from a current performance mode parameter to the target performance mode parameter; When the switching time is less than the duration of the idle time window, calculating the ratio of the energy consumption cost of the switching process to the energy saving benefit after the switching, and performing parameter switching when the ratio is less than a preset threshold; When the switching time is greater than or equal to the duration of the idle time window, a power consumption mode with the shortest switching time is selected from the candidate power consumption mode set as the updated target power consumption mode.

7. The method according to claim 6, characterized in that The step of calculating the target performance mode parameters based on the target power consumption mode, and calculating the switching time required to switch from the current performance mode parameters to the target performance mode parameters, specifically includes: Determining a target power consumption interval according to the target power consumption mode; an upper limit value of the target power consumption interval is equal to a nominal power consumption value corresponding to the target power consumption mode; Based on the target power consumption range, a dynamic voltage and frequency adjustment algorithm is used to calculate multiple groups of candidate performance mode parameters; each group of candidate performance mode parameters includes a corresponding NAND flash memory operating frequency and operating voltage; Performing performance evaluation on the multiple groups of candidate performance mode parameters to obtain a performance score corresponding to each group of candidate performance mode parameters; sorting the multiple groups of candidate performance mode parameters according to the performance scores, and selecting the candidate performance mode parameter with the highest performance score as the target performance mode parameter; The switching time required to switch from the current performance mode parameters to the target performance mode parameters is calculated.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Buffer management method and related device

    CN113972962A

  • Dynamic allocation algorithm for cache space of memory

    CN118113214A

  • Solid state disk power consumption control method, solid state disk and storage medium

    CN119396268A

  • Weak network adaptive algorithm system based on dynamic network monitoring

    CN119544561A

  • Method of Operating a Communication Device Operable in an Active Mode and in an Idle Mode, a Computer Program Product for Executing the Method, and the Communication Device Operable in an Active Mode and in an Idle Mode

    US20140247764A1

Cited By

  • Memory access method, chip and electronic equipment

    CN120894224A

  • Memory access method, chip and electronic device

    CN120894224B

  • Compensation method and platform for adaptive reference clock of solid state disk

    CN120973610A

  • Energy storage system control method based on task interruption and energy storage system

    CN121091826A

  • Power consumption prediction and management method and system based on solid state disk, medium and product

    CN121614349A