Power consumption test and data analysis method, device and electronic equipment
By introducing category identification and an improved K-Means algorithm into power consumption testing, the problems of time-consuming, labor-intensive, and classification errors in existing power consumption testing methods are solved, enabling fast and accurate power consumption data analysis and improving testing efficiency and the reliability of results.
Patent Information
- Application Number
- CN202511133936.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Existing power consumption testing methods rely on manual analysis, which is time-consuming and labor-intensive. Furthermore, the traditional K-Means algorithm is prone to classification errors during cluster analysis, resulting in inaccurate data analysis results.
By introducing category labels and an improved K-Means algorithm, category labels are set during the data collection phase, and cluster analysis is performed by combining the category labels of neighboring data points to improve classification accuracy.
It enables fast and accurate classification of power consumption test data, ensuring the reliability of subsequent data analysis, reducing misclassification, and improving testing efficiency and the accuracy of results.
Smart Images

Figure CN120636506B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage device research and development testing, in particular to a power consumption testing and data analysis method and device and electronic equipment. BACKGROUND
[0002] Power consumption testing refers to a process of measuring and analyzing power consumption of a storage device under different operating states, especially power consumption when a chip is in a read-write stage. At present, a common power consumption testing method is to use testing software to perform read-write operations, a power meter to record current changes, and then manually or rely on Excel data recorded by a host computer program attached to the power meter to analyze and calculate.
[0003] However, the common power consumption testing method has the following disadvantages:
[0004] 1. It relies heavily on manual data analysis. The host computer program attached to the power meter cannot automatically divide the state of the current chip, so it is necessary to manually select a relatively stable data segment for analysis. This method is time-consuming and laborious under a large number of read-write operations.
[0005] 2. The algorithm used by the testing software, such as the traditional K-Means algorithm, often causes classification errors due to scattered points when performing cluster analysis on test data, resulting in inaccurate results of subsequent data analysis. SUMMARY
[0006] The technical problem to be solved by the present application is to provide a power consumption testing and data analysis method and device and electronic equipment, which can efficiently and accurately classify power consumption testing data of a storage device and ensure the reliability of subsequent data analysis.
[0007] To solve the above technical problems, the technical solution adopted by the present application is:
[0008] The power consumption testing and data analysis method comprises:
[0009] Creating data collection stages corresponding to different operating states of a storage device, and setting a corresponding category identifier for each data collection stage;
[0010] Obtaining power consumption testing data of the storage device under each data collection stage, and binding a corresponding category identifier to each power consumption testing data;
[0011] Classifying all the power consumption testing data in combination with the category identifier and a clustering algorithm to obtain a classification result;
[0012] In combination with the classification result, analyzing power consumption performance results of the storage device under each data collection stage.
[0013] To solve the above technical problems, another technical solution adopted by the present application is:
[0014] The power consumption test and data analysis device comprises:
[0015] The front-end acquisition module is configured to:
[0016] Create a data acquisition stage corresponding to each different operating state of the storage device, and set a corresponding category identifier for each data acquisition stage;
[0017] Obtain power consumption test data of the storage device in each data acquisition stage, and bind a corresponding category identifier to each power consumption test data;
[0018] The back-end analysis module is communicatively connected to the front-end acquisition module and is configured to:
[0019] Combine the category identifier and classify all the power consumption test data through a clustering algorithm to obtain a classification result;
[0020] Combine the classification result and analyze the power consumption performance result of the storage device in each data acquisition stage.
[0021] To solve the above technical problems, another technical solution adopted by the present application is:
[0022] An electronic device comprises a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the processor executes the computer program to implement each step of the power consumption test and data analysis method described above.
[0023] The present application has the advantages of providing a power consumption test and data analysis method, device, and electronic device. In each data acquisition stage corresponding to the operating state of the storage device, a category identifier is introduced, and the category identifier is used as classification information attached to each power consumption test data collected. Then, when clustering analysis is performed on the data using a clustering algorithm, the category identifier is used to quickly and accurately determine the final classification of the power consumption test data, thereby ensuring the reliability of subsequent data analysis. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 The figure is a schematic diagram of the steps of the power consumption test and data analysis method in the embodiment of the present application.
[0025] Figure 2 The figure is a flowchart of the power consumption test and data analysis method in the embodiment of the present application.
[0026] Figure 3 The figure is a flowchart of the power consumption test and data analysis method in the embodiment of the present application when reading and writing test.
[0027] Figure 4 Flow chart of improved K-Means algorithm used in power consumption test and data analysis method in embodiments of the present application;
[0028] Figure 5 Classification result schematic diagram of existing K-Means algorithm;
[0029] Figure 6 Classification result schematic diagram of improved K-Means algorithm used in power consumption test and data analysis method in embodiments of the present application;
[0030] Figure 7 Structure schematic diagram of power consumption test and data analysis device in embodiments of the present application;
[0031] Figure 8 Structure schematic diagram of an electronic device in embodiments of the present application.
[0032] Label explanation
[0033] 1, power consumption test and data analysis device; 2, front-end acquisition module; 3, back-end analysis module; 4, storage device; 5, electronic device; 6, memory; 7, processor. DETAILED DESCRIPTION
[0034] To make the technical content, achieved purposes and effects of the present application clear, the following will be explained in detail in combination with embodiments and the accompanying drawings.
[0035] Please refer to Figures 1 to 6 , power consumption test and data analysis method, comprising:
[0036] Creating data acquisition stages corresponding to different running states of the storage device 4, setting corresponding category identifiers for each of the data acquisition stages;
[0037] Obtaining power consumption test data of the storage device 4 under each of the data acquisition stages, binding corresponding category identifiers for each of the power consumption test data;
[0038] Classifying all the power consumption test data in combination with the category identifiers and clustering algorithms, obtaining classification results;
[0039] Analyzing power consumption performance results of the storage device 4 under each of the data acquisition stages in combination with the classification results.
[0040] From the above description, the beneficial effects of the present application are that: the category identifier is introduced in each data collection stage corresponding to the running state of the storage device 4, and the category identifier is used as classification information attached to each power consumption test data collected, and then when the clustering algorithm is used for clustering analysis of the data, the final classification of the power consumption test data is determined more quickly and accurately with the help of the category identifier, and the reliability of subsequent data analysis is ensured.
[0041] Further, the combination of the category identifier and the clustering algorithm classifies all the power consumption test data, including:
[0042] At least two power consumption test data are determined from all the power consumption test data as clustering centers, and the remaining data as data points.
[0043] According to the distance of the data point to each clustering center and the category identifier of the other data points adjacent to the data point, the clustering center to which the data point belongs is determined.
[0044] From the above description, in the clustering process, not only the distance between data points is relied on, but also the category identifier of adjacent data points is introduced as a reference. This makes the classification of data points have a more accurate basis that conforms to the running state of the storage device 4, and reduces the wrong classification caused by data fluctuations or distance calculation deviation. In this way, the clustering process can converge more efficiently, avoid repeated classification of data, greatly improve the classification efficiency, and make the correspondence between the classification result and the actual running state of the storage device 4 more accurate, laying a more reliable foundation for subsequent power consumption analysis.
[0045] Further, it further includes:
[0046] Before the data collection stage corresponding to the read-write state of the storage device 4 starts, a block size for writing padding data is set, and the block size is one of at least two preset values.
[0047] From the above description, by setting at least two block size preset values, different read-write scenarios that the storage device 4 may encounter can be covered comprehensively in the data collection stage of the read-write state.
[0048] Further, it further includes:
[0049] According to the application scenario of the storage device 4, the value size of the preset value is determined to be 4K, 32K or 64K.
[0050] As can be seen from the above description, the preset value of the block size is closely related to the application scenario, so that the set block size is more suitable for the actual use of the storage device 4. Based on this, the collected power consumption test data is more targeted, which can truly reflect the power consumption performance of the storage device 4 in the target application scenario, avoiding the problem that the test data is inconsistent with the actual application caused by indiscriminate setting of the block size, and improving the practicability of the power consumption test and the reference value of the data analysis result.
[0051] Further, it further comprises:
[0052] Before the data collection phase corresponding to the read-write state of the storage device 4 starts, set the logical block addressing address and the preset fixed value as the padding data for writing;
[0053] During the execution of the data collection phase corresponding to the read-write state of the storage device 4, if the data read from the storage device 4 is inconsistent with the padding data, the padding data is fed back.
[0054] As can be seen from the above description, by fixing the related parameters of the padding data, the consistency of the data in the read-write process is ensured. When the read data is inconsistent with the padding data, the padding data is fed back in time, which can quickly find the data abnormality in the read-write process, and greatly reduces the data preparation time, and improves the test efficiency.
[0055] Further, the analysis of the power consumption performance of the storage device 4 in each data collection phase comprises:
[0056] Calculate the descriptive statistics of the power consumption test data belonging to the same category, compare the descriptive statistics with the corresponding historical version data, and generate the power consumption performance result of the storage device 4 according to the comparison result.
[0057] As can be seen from the above description, the descriptive statistics (such as mean, variance, etc.) can briefly summarize the overall characteristics of the same power consumption test data, and by comparing with the historical version data, the difference between the current storage device 4 power consumption performance and the historical state can be directly observed.
[0058] Further, the descriptive statistics include at least two of the mean, the maximum value and the minimum value.
[0059] As can be known from the foregoing description, a single descriptive statistic is difficult to comprehensively reflect the overall characteristics of the data. For example, the mean value can reflect the average level, and the variance can reflect the degree of data dispersion. By using at least two descriptive statistics, the same type of power consumption test data can be described from multiple dimensions. By comparing multiple statistics with historical data, the power consumption performance of the storage device 4 can be more comprehensively evaluated, avoiding the bias that may be caused by single statistic analysis, making the analysis result more objective and accurate, and providing a richer basis for judging the power consumption state of the storage device 4.
[0060] Further, the comparison of the descriptive statistic with the corresponding historical version data is specifically:
[0061] setting a difference threshold of the descriptive statistic, judging whether the difference between the value of the descriptive statistic and the historical version data is less than or equal to the difference threshold;
[0062] If not, the power consumption test data corresponding to the descriptive statistic is taken as risk test data and output.
[0063] As can be known from the foregoing description, the difference threshold is set, which provides a clear judgment standard for the comparison of the descriptive statistic and the historical version data. Instead of performing data comparison in a vague manner, the current power consumption performance is determined by a quantitative threshold value. This makes the comparison result more objective and operable, can quickly determine whether the power consumption of the storage device 4 is within an acceptable range, and timely discovers abnormal conditions exceeding the threshold value, thereby improving the accuracy and efficiency of power consumption performance evaluation.
[0064] Please refer to Figure 7 , a power consumption test and data analysis apparatus 1, comprising:
[0065] a front-end acquisition module 2, which is configured to be communicatively connected to a storage device 4, and is configured to:
[0066] create data acquisition stages corresponding to different running states of the storage device 4, and set a corresponding category identifier for each data acquisition stage;
[0067] obtain power consumption test data of the storage device 4 in each data acquisition stage, and bind a corresponding category identifier to each power consumption test data;
[0068] a back-end analysis module 3, which is communicatively connected to the front-end acquisition module 2, and is configured to:
[0069] classify all the power consumption test data in combination with the category identifier and a clustering algorithm to obtain a classification result;
[0070] analyze the power consumption performance result of the storage device 4 in each data acquisition stage in combination with the classification result.
[0071] Please refer to Figure 8 An electronic device 5, comprising a memory 6, a processor 7, and a computer program stored on the memory 6 and capable of running on the processor 7, wherein the processor 7 implements each step of the power consumption test and data analysis method described above when executing the computer program.
[0072] The power consumption test and data analysis method, device and electronic device 5 provided by the application can be applied to the scene of measuring and analyzing the power consumption of eMMC / UFS storage device 4 in different running states, which will be described in detail through the specific embodiments below:
[0073] Embodiment one
[0074] Please refer to Figures 1 to 6 The power consumption test and data analysis method, as shown in Figure 1 and Figure 2 , comprises:
[0075] In step 102, a data collection phase corresponding to each running state of the storage device 4 is created, and a corresponding category identifier is set for each data collection phase.
[0076] In this embodiment, the different running states of the storage device 4 specifically include writing data, reading data and idle (idle) state; the setting of the category identifier includes but is not limited to using coded data classification.
[0077] As shown in Figure 3 , before the data collection phase corresponding to the read / write state of the storage device 4 starts, the following process is included:
[0078] In step 402, the chunksize and the filling capacity are determined.
[0079] In this embodiment, the block size (chunksize) for writing fill data is set to one of at least two preset values. According to the application scenario of the storage device, the value of the preset value is determined to be 4K, 32K or 64K. Among them, the application scenarios of the storage device 4 can include file system random read / write, loading of application programs and large file backup, etc., and the preset value of chunksize can be 4K, 32K or 64K, which can cover most test scenarios.
[0080] In actual application, 4K chunksize is used for small file operations such as mobile application data, 32K chunksize is used for medium-sized file transmission such as video playback, and 64K chunksize is used for large file processing such as data backup.
[0081] In step 404, the filling pattern is determined.
[0082] The filling pattern includes setting the logical block address (LBA) and a preset fixed value as the filling data to be written. Taking a filling data size of 512 bytes as an example, the first four bytes use the current LBA address, while the following 508 bytes are filled with a preset fixed value, such as 0x5a.
[0083] Then, during the data acquisition phase of the corresponding storage device 4's read / write status:
[0084] In step 406, data writing, the filling data is written to storage device 4.
[0085] In step 408, data is read, that is, data is read from storage device 4.
[0086] In step 410, verify whether the data is consistent.
[0087] Specifically, it is necessary to verify whether the read chunksize is consistent with the padding data during writing. If they are inconsistent, step 412 is executed to output the current LBA address where the verification failed and dump (export) the corresponding data to the user to facilitate problem localization and fault analysis.
[0088] In step 104, the power consumption test data of storage device 4 in each data acquisition stage is obtained, and the corresponding category identifier is bound to each power consumption test data.
[0089] In step 106, combined with the category identifier, all power consumption test data are classified using a clustering algorithm to obtain the classification results.
[0090] In this embodiment, combined with Figure 4 As shown, the clustering algorithm specifically adopts the K-Means algorithm, which is improved upon the traditional K-Means algorithm, including the following:
[0091] In step 602, initialize N cluster centers and the maximum number of iterations n.
[0092] From all power consumption test data, N power consumption test data points are determined as cluster centers and the maximum number of iterations n is determined. The remaining data points are used as data points.
[0093] In step 604, set the parameter weight α.
[0094] Set the parameter weight α so that each data point has the same influence on the calculation of cluster centers and the weights are consistent.
[0095] In step 606, the distance is calculated and each data point is assigned to a cluster center.
[0096] In the embodiment, each data point is classified to a cluster center according to the distance of the data point to each cluster center.
[0097] In step 608, the cluster center is updated.
[0098] The position of the cluster center is optimized by iteration, so that the final clustering result is more consistent with the data distribution characteristics.
[0099] In step 610, the adjacent value classification is determined to be consistent with the data characteristics.
[0100] In the embodiment, whether the data point is consistent with the data characteristics of the cluster center is determined according to the class identifier of the other data points adjacent to the data point, so as to determine the cluster center to which the data point belongs.
[0101] In step 612, it is determined whether to converge or reach the maximum number of iterations.
[0102] In the embodiment, if the maximum number of iterations is not reached, step 606 is re-executed.
[0103] In step 614, the phase classification in which the data is located is output.
[0104] In the embodiment, as shown in Figure 5 and Figure 6 The traditional K-Means algorithm cannot correctly process the discrete points of the read-write phase, resulting in misclassification, and in the embodiment, in addition to the distance between the point and the center, the class identifier of the adjacent point of the data point is introduced when determining the cluster center to which the data point belongs. The two aspects of information are combined to more accurately determine the final classification of the data point, which will be described in detail as follows:
[0105] The improved K-Means algorithm proposed in the application is more reflected in the logical rules of classification. The traditional K-Means only performs hard assignment according to the distance between the data point and the cluster center (the nearest one wins). The improvement of the application is to introduce a local consistency constraint: the final class of a point depends not only on which center it is close to, but also on which class identifier the majority of its neighbor points (points adjacent in the feature space) belong to. This can effectively resist noise and discrete points, and make the classification boundary more consistent with the inherent clustering characteristics of the data (such as the dense regions of the read-write phases).
[0106] Taking power consumption test as an example, the test process is to write 2GB data and then read 2GB data, so that one set of power consumption test data has three labels, idle, write, and read. How to classify the data according to the application will be described in detail as follows:
[0107] 1. First, iterate as traditional K-Means (steps 602~608 above). In this process, each power consumption data is assigned to the class label_k represented by its Euclidean distance closest cluster center c_k.
[0108] 2. Introduce the judgment step of adjacent class information. First, for each data point x_i, find its K nearest neighbors in the feature space. Second, count the adjacent point classes and view the class labels (idle, write, read) assigned in the current iteration of the K nearest neighbors. Then, determine the majority class label of the adjacent points, and the class label that appears the most in the adjacent points is considered as the "adjacent point information". If the number of votes for each class is the same in the adjacent points, the class label of x_i itself is retained. Finally, determine and adjust the class label of x_i according to the adjacent point information. If the class label of x_i is consistent with the adjacent point information, the class label of x_i is retained. If the class label of x_i is inconsistent with the adjacent point information, determine whether it is a discrete point according to the adjacent point information.
[0109] 3. Iterate the above process, and after the iteration process containing adjacent information judgment, output the final class label of each data point belonging to the phase.
[0110] For example: Suppose that the write data phase, there is a point with low power consumption, which is close to the power consumption of the read phase. According to the traditional K-Means classification: wr_1, wr_2, wr_3, wr_4, rd_1, wr_5, wr_6,..., wr_x, where rd_1 is obviously a discrete point and is misjudged as read data. Suppose K=4 is set in the above method, and the four adjacent points of this point are found to be write, triggering the above reassignment logic, which reassigns it to the correct class. This method can accurately correct all misjudgment of discrete points in power consumption testing, as shown in Figure 6 .
[0111] In step 108, combine the classification results to analyze the power consumption performance of the storage device 4 in each data collection phase.
[0112] In this embodiment, the descriptive statistics of the power consumption test data belonging to the same class are calculated, the descriptive statistics are compared with the corresponding historical version data, and the power consumption performance of the storage device 4 is generated according to the comparison result.
[0113] The descriptive statistics are quantitative indicators used to summarize and describe the key features of the data set. The descriptive statistics of the present embodiment are at least two kinds, and include but are not limited to mean, maximum, minimum, etc.
[0114] Referring to Figure 1 and Figure 2As shown, the analysis process includes:
[0115] In step 202, import data, that is, import all power consumption test data under each data collection stage.
[0116] In step 204, the improved K-Means algorithm classifies the stage where the data is located.
[0117] In this embodiment, based on the improved K-Means algorithm described above, a data model for power consumption data analysis is constructed.
[0118] In step 206, the average, maximum and minimum of the power consumption test data of each stage are calculated.
[0119] In step 208, compare with the historical version data in the data model.
[0120] In this embodiment, when comparing, a difference threshold of descriptive statistics is set to determine whether the difference between the value of the descriptive statistics and the historical version data is less than or equal to the difference threshold. The difference threshold can be selected to be about 5% to 10% of the value of the historical version data, and is determined according to the standard strictness of each kind of data.
[0121] In step 210, it is determined whether the current version data has abnormal risk.
[0122] In this embodiment, if the difference between the value of the descriptive statistics and the historical version data is less than or equal to the difference threshold, it means that the current power consumption test data does not have abnormal risk, step 214 is executed, and normal test data is output; otherwise, it means that there may be abnormal risk, step 212 is executed, and risk test data is output. And the judgment result of the power consumption test data under each data collection stage can be arranged into a test report and output to the user.
[0123] Embodiment two
[0124] The power consumption test and data analysis method introduces specific application examples based on the above embodiment one:
[0125] For the storage device 4 being an eMMC chip, the power consumption test process includes:
[0126] First, place the eMMC chip into the HS400 card reader, disconnect the VCC (power supply voltage) or VCCQ (interface power supply voltage) power supply; second, connect the ammeter, and turn on the upper computer software corresponding to the ammeter; third, connect the HS400 card reader to the computer; fourth, open the h2test software, set the fill data size, click the read-write verification to start the test, and execute the above steps S102 and S104; fifth, record the current change during the above test process, execute steps S106 and S108, and export the data to calculate the descriptive statistics such as mean value in the current stable stage.
[0127] Embodiment three
[0128] Please refer to Figure 7 , the power consumption test and data analysis device 1, comprising:
[0129] The front-end acquisition module 2 is used for communication connection with the storage device 4, and is configured to:
[0130] Create a data acquisition stage corresponding to each running state of the storage device 4, and set a corresponding category identifier for each data acquisition stage;
[0131] Obtain the power consumption test data of the storage device 4 in each data acquisition stage, and bind the corresponding category identifier for each power consumption test data;
[0132] The back-end analysis module 3 is in communication connection with the front-end acquisition module 2, and is configured to:
[0133] Classify all power consumption test data in combination with the category identifier and the clustering algorithm to obtain a classification result;
[0134] In combination with the classification result, analyze the power consumption performance result of the storage device 4 in each data acquisition stage.
[0135] Embodiment four
[0136] An electronic device 5, as shown in Figure 8 , comprising a memory 6, a processor 7, and a computer program stored on the memory 6 and capable of running on the processor 7, wherein the processor 7 implements each step of the power consumption test and data analysis method of embodiments one or two when executing the computer program.
[0137] To sum up, the power consumption test and data analysis method, device and electronic equipment provided by the application introduce a category identifier in each data collection stage corresponding to the running state of the storage device, take the category identifier as the classification information attached to each power consumption test data collected, and then use the category identifier to more quickly and accurately determine the final classification of the power consumption test data when the clustering algorithm is used to analyze the data, thereby guaranteeing the reliability of subsequent data analysis. In the clustering process, the category identifier of the adjacent data points is taken as a reference instead of only relying on the distance between the data points. This makes the classification of the data points have a basis that is more in line with the running state of the storage device, reduces the false classification caused by the fluctuation of the data itself or the distance calculation deviation. In this way, the clustering process can converge more efficiently, avoid repeated classification of data, greatly improve the classification efficiency, and make the correspondence between the classification result and the actual running state of the storage device more accurate, thereby laying a more reliable foundation for subsequent power consumption analysis. In the read-write test, the preset value of the block size of the write-in is closely related to the application scenario, so that the set block size is more in line with the actual use of the storage device. The power consumption test data collected based on this is more targeted and can truly reflect the power consumption performance of the storage device in the target application scenario, avoiding the problem that the test data is inconsistent with the actual application caused by indiscriminate setting of the block size, and improving the practicability of the power consumption test and the reference value of the data analysis result.
[0138] By fixing the related parameters of the padding data, the consistency of the data in the read-write process is guaranteed. When the read data is inconsistent with the padding data, the padding data is fed back in time, so that the data abnormality in the read-write process can be quickly found, and the data preparation time is greatly reduced, thereby improving the test efficiency.
[0139] In the above embodiments provided in the application, it should be understood that the disclosed method, device, computer readable storage medium and electronic equipment can be implemented in other ways. For example, the above-mentioned device embodiments are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of components or modules can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces, devices or components or modules, and can be electrical, mechanical or other forms.
[0140] The components described as separate components can or can not be physically separated, and the components shown as components can or can not be physical modules, that is, they can be located in one place or distributed on a plurality of network modules. Part or all of the components can be selected according to actual needs to achieve the purpose of the embodiments.
[0141] In addition, each functional module in each embodiment of the present application can be integrated in one processing module, or each component can be physically present separately, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module.
[0142] When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0143] It should be noted that, for each method embodiment described above, in order to simplify the description, each method embodiment is described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0144] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0145] The above is only an embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent transformation made by using the content of the specification and drawings, or direct or indirect application in related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A power consumption testing and data analysis method, characterized in that, include: Create data acquisition stages that correspond one-to-one with different operating states of the storage device, and set a corresponding category identifier for each data acquisition stage; Acquire power consumption test data of the storage device in each data acquisition stage, and bind a corresponding category identifier to each power consumption test data; Based on the category identifiers, all the power consumption test data are classified using a clustering algorithm to obtain the classification results; Based on the classification results, the power consumption performance of the storage device in each data acquisition stage is analyzed; Based on the category identifiers, the clustering algorithm is used to classify all the power consumption test data, including: From all the power consumption test data, at least two power consumption test data are determined as cluster centers, and the remaining data are treated as data points; The cluster center to which the data point belongs is determined based on the distance from the data point to each cluster center and the category identifier of other data points adjacent to the data point.
2. The power consumption testing and data analysis method according to claim 1, characterized in that, Also includes: Before the data acquisition phase corresponding to the read / write state of the storage device begins, the block size for writing fill data is set, and the block size is one of at least two preset values.
3. The power consumption testing and data analysis method according to claim 2, characterized in that, Also includes: Based on the application scenario of the storage device, the preset value is determined to be 4K, 32K, or 64K.
4. The power consumption testing and data analysis method according to claim 1, characterized in that, Also includes: Before the data acquisition phase corresponding to the read / write state of the storage device begins, a logical block address and a preset fixed value are set as filler data for writing. During the data acquisition phase corresponding to the read / write state of the storage device, if the data read from the storage device is inconsistent with the filling data, the filling data is fed back.
5. The power consumption testing and data analysis method according to claim 1, characterized in that, The analysis of the power consumption performance of the storage device during each data acquisition phase includes: Calculate descriptive statistics for the power consumption test data belonging to the same category, compare the descriptive statistics with the corresponding historical version data, and generate the power consumption performance results of the storage device based on the comparison results.
6. The power consumption testing and data analysis method according to claim 5, characterized in that, The descriptive statistics include at least two of the following: mean, maximum, and minimum.
7. The power consumption testing and data analysis method according to claim 5, characterized in that, The specific steps of comparing the descriptive statistics with the corresponding historical version data are as follows: Set a difference threshold for the descriptive statistic, and determine whether the difference between the descriptive statistic and the historical version data is less than or equal to the difference threshold; If not, the power consumption test data corresponding to the descriptive statistics will be used as risk test data and output.
8. A power consumption testing and data analysis device, characterized in that, include: The front-end acquisition module, used for communication connection to the storage device, is configured as follows: Create data acquisition stages that correspond one-to-one with different operating states of the storage device, and set a corresponding category identifier for each data acquisition stage; Acquire power consumption test data of the storage device in each data acquisition stage, and bind a corresponding category identifier to each power consumption test data; The backend analysis module, which communicates with the frontend acquisition module, is configured as follows: By combining the category identifiers and clustering algorithms, all the power consumption test data are classified to obtain the classification results; Based on the classification results, the power consumption performance of the storage device in each data acquisition stage is analyzed; Based on the category identifiers, the clustering algorithm is used to classify all the power consumption test data, including: From all the power consumption test data, at least two power consumption test data are determined as cluster centers, and the remaining data are treated as data points; The cluster center to which the data point belongs is determined based on the distance from the data point to each cluster center and the category identifier of other data points adjacent to the data point.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements each step of the power consumption testing and data analysis method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method, system and device for testing product based on K-MEANS algorithm and storage medium
CN114780438A
Storage device power consumption test method, device and system and storage medium
CN119595987A