High-Performance Computing Memory Power Consumption Optimization Method and System Based on Deep Learning
By obtaining the relationship function of non-zero numbers and historical storage power consumption, and using deep learning models to analyze the storage method, the problem of failure to consider the power consumption of the overall process in the prior art is solved, and a stable reduction in memory power consumption and efficient storage of the data matrix is achieved.
Patent Information
- Application Number
- CN202510607273.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-05-13
AI Technical Summary
The existing memory power consumption optimization technology fails to consider the total power consumption generated by the compression of the overall process, resulting in the inability to stably reduce memory power consumption.
By obtaining the relationship function of the non-zero number and historical normal storage power consumption and the relationship function of compressed storage power consumption, the deep learning model is used to analyze the storage method of the real-time data matrix, and selecting the most power-saving method for storage.
It effectively reduces memory storage power consumption, reduces memory usage and transmission energy consumption of the data matrix.
Smart Images

Figure CN120144318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of memory power consumption optimization, and specifically to a method and system for optimizing the memory power consumption of high-performance computing based on deep learning. Background Art
[0002] With the development of Al, high-performance computing needs to process a large amount of data, and the computing power demand has increased explosively. Traditional memory has become a bottleneck for system energy consumption. Therefore, it is necessary to reduce the memory power consumption. Existing methods can be optimized from multiple aspects, such as hardware-level optimization, system architecture optimization, software and algorithm optimization, and dynamic power management strategies, etc.
[0003] Software and algorithm optimization includes compressing the data matrix to reduce memory occupancy and transmission power consumption. However, power consumption will also be generated when compressing the data matrix. The data matrix contains various types, and the power consumption of compressing different types of data matrices and the power consumption of storage will also be different, resulting in an inability to accurately determine whether the overall energy consumption is reduced. For example, in the patent application with the publication number CN118972895A, a low-power data transmission optimization method and device for Internet of Things devices are disclosed. This solution only considers reducing the power consumption of stored data during transmission after compression, and fails to consider the power consumption generated when compressing the data, resulting in an inability to determine whether the overall power consumption is reduced. In existing memory power consumption optimization technologies, the total power consumption generated during the overall compression process is not considered, resulting in an inability to stably reduce the memory power consumption. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art to some extent. By obtaining the relationship function between the number of non-zeros and the historical normal storage power consumption, which is marked as the normal storage function, compressing each historical data matrix to obtain the historical compressed matrix, obtaining the relationship function between the number of non-zeros and the historical total compression power consumption, which is marked as the compression storage function, and analyzing the storage method of the real-time data matrix based on the compression storage function and the normal storage function, to solve the problem that in the existing memory power consumption optimization technology, the total power consumption generated during the overall compression process is not considered, resulting in an inability to stably reduce the memory power consumption.
[0005] To achieve the above object, the present application provides a method for optimizing the memory power consumption of high-performance computing based on deep learning, including the following steps:
[0006] Obtain the data matrix to be stored, marked as the real-time data matrix;
[0007] Obtain the first quantity of data matrices equal in matrix size to the real-time data matrix, and mark them as historical data matrices; store each historical data matrix in memory for the second quantity of times, and mark the power consumption required for each storage as the historical normal storage power consumption; obtain the number of non-zero values in each historical data matrix, and mark it as the non-zero count; obtain the relationship function between the non-zero count and the historical normal storage power consumption, and mark it as the normal storage function;
[0008] Compress each historical data matrix to obtain a historical compressed matrix;
[0009] Store each historical compressed matrix in memory for the second quantity of times, and mark the power consumption required for each storage as the historical compressed storage power consumption; mark the sum of the historical compression power consumption and the historical compressed storage power consumption as the historical total compressed power consumption, and obtain the relationship function between the non-zero count and the historical total compressed power consumption, and mark it as the compressed storage function;
[0010] Analyze the storage method of the real-time data matrix based on the compressed storage function and the normal storage function.
[0011] Furthermore, obtaining the relationship function between the non-zero count and the historical normal storage power consumption, and marking the normal storage function includes the following sub-steps:
[0012] Obtain the range of the historical normal storage power consumption of a historical data matrix, and mark it as the historical normal power consumption range;
[0013] Evenly divide the historical normal power consumption range into a1 equal range intervals, and mark them as the normal power consumption division intervals;
[0014] Count the frequency of each normal power consumption division interval, and mark it as the normal division power consumption frequency;
[0015] Taking the historical normal storage power consumption as the X-axis, the normal division power consumption frequency as the Y-axis, and the normal power consumption division interval as the histogram interval, draw a histogram, and mark it as the normal power consumption histogram.
[0016] Furthermore, obtaining the relationship function between the non-zero count and the historical normal storage power consumption, and marking the normal storage function also includes the following sub-steps:
[0017] Mark the second quantity as Ds2;
[0018] Calculate the first division frequency threshold as: F1 = b1 * Ds2 / a1; where F1 is the first division frequency threshold and b1 is the abnormal occupancy ratio;
[0019] Mark the normal division power consumption frequency less than or equal to the first division frequency threshold as the first abnormal division frequency;
[0020] Determine whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram are the first abnormal division frequencies respectively. If so, delete the normal division power consumption frequency at the corresponding leftmost or rightmost side in the normal power consumption histogram, and then continue to determine whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram after deletion are abnormal path frequencies. Repeat the above operations until they are not, and then stop the determination; mark the normal power consumption histogram after stopping the determination as the screened normal power consumption histogram;
[0021] Obtain the maximum and minimum values of the abscissa of the normal division power consumption frequency in the screened normal power consumption histogram, and mark them as the first screening threshold and the second screening threshold respectively.
[0022] Furthermore, obtaining the relationship function between the non-zero number and the historical normal storage power consumption, marked as the normal storage function, also includes the following sub-steps:
[0023] Obtain the mean value of the historical normal storage power consumption between the first screening threshold and the second screening threshold, and mark it as the screened normal storage power consumption;
[0024] Obtain the screened normal storage power consumption of all historical data matrices;
[0025] Taking the non-zero number as the X-axis data and the screened normal storage power consumption as the Y-axis data, establish a plane rectangular coordinate system, marked as the normal energy consumption coordinate system;
[0026] Taking the non-zero number of each historical data matrix and the screened normal storage power consumption as the abscissa and ordinate of the normal energy consumption coordinate point respectively, plot all the normal energy consumption coordinate points in the normal energy consumption coordinate system to obtain the normal energy consumption scatter plot;
[0027] Perform polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function;
[0028] Optimize the parameters of the normal storage function using a deep learning model.
[0029] Furthermore, compressing each historical data matrix to obtain the historical compressed matrix includes the following sub-steps:
[0030] Establish three data groups, namely the horizontal index array, the vertical index array, and the value array;
[0031] Mark the first row to the last row of the historical data matrix as H1 to Hn respectively, and mark H1 to Hn as Hi; where i is an integer from 1 to n; mark the first column to the last column of the historical data matrix as L1 to Lm respectively, and mark L1 to Lm as Lj; where j is an integer from 1 to m; mark the number of non-zero numerical values in each row as G, where G is a positive integer;
[0032] Retrieve the historical data matrix from left to right in the first row. When each row is retrieved, retrieve the next row until the entire historical data matrix is retrieved. During the retrieval, determine whether each row contains non-zero values. If it does, obtain the number of non-zero values in this row, mark it as M, obtain Hi + M for this row, and place Hi + M into the horizontal index array in the order of retrieval. During the retrieval, determine whether each value is a non-zero value. If it is, obtain the corresponding Lj for this non-zero value, place the corresponding Lj for this non-zero value into the column index array in the order of retrieval, and place this non-zero value into the value array until the entire historical data matrix is retrieved; where M is a positive integer;
[0033] Mark the horizontal index array, column index array, and value array after retrieving the entire historical data matrix as the historical compression matrix.
[0034] Further, obtain the relationship function between the number of non-zeros and the total historical compression power consumption, marked as the compression storage function, including the following sub-steps:
[0035] Obtain the range of the historical compression storage power consumption of a historical compression matrix, marked as the historical compression power consumption range;
[0036] Evenly divide the historical compression power consumption range into a2 equal range intervals, marked as the compression power consumption division intervals;
[0037] Count the frequency of each compression power consumption division interval, marked as the compression division power consumption frequency;
[0038] Taking the historical compression storage power consumption as the X-axis, the compression division power consumption frequency as the Y-axis, and the compression power consumption division interval as the histogram interval, draw a histogram, marked as the compression power consumption histogram.
[0039] Further, obtain the relationship function between the number of non-zeros and the total historical compression power consumption, marked as the compression storage function, and also include the following sub-steps:
[0040] Calculate the second division frequency threshold as: F2 = b2 * Ds2 / a2; where F2 is the second division frequency threshold;
[0041] Mark the compression division power consumption frequency less than or equal to the second division frequency threshold as the second abnormal division frequency;
[0042] Respectively determine whether the compression division power consumption frequencies at the leftmost and rightmost sides of the compression power consumption histogram are the second abnormal division frequencies. If so, delete the corresponding compression division power consumption frequency at the leftmost or rightmost side of the compression power consumption histogram, and then continue to determine whether the compression division power consumption frequencies at the leftmost and rightmost sides of the deleted compression power consumption histogram are abnormal path frequencies, and repeat the above operation until they are not, and then stop the judgment; mark the compression power consumption histogram after stopping the judgment as the screened compression power consumption histogram;
[0043] Obtain the maximum and minimum values of the abscissa of the compressed partition power consumption frequency in the filtered compression power consumption histogram, and mark them as the third filtering threshold and the fourth filtering threshold respectively.
[0044] Furthermore, obtaining the relationship function between the number of non-zeros and the total historical compression power consumption, marked as the compression storage function, also includes the following sub-steps:
[0045] Obtain the mean value of the historical compressed storage power consumption between the third filtering threshold and the third filtering threshold, marked as the filtered compressed storage power consumption;
[0046] Obtain the filtered compressed storage power consumption of all historical data matrices;
[0047] Using the number of non-zeros as the X-axis data and the filtered compressed storage power consumption as the Y-axis data, establish a plane rectangular coordinate system, marked as the compression energy consumption coordinate system;
[0048] Take the number of non-zeros and the filtered compressed storage power consumption of each historical compression matrix as the abscissa and ordinate of the compression energy consumption coordinate points respectively, and plot all the compression energy consumption coordinate points in the compression energy consumption coordinate system to obtain a compression energy consumption scatter plot;
[0049] Perform polynomial fitting on the compression energy consumption scatter plot to obtain the compression storage function;
[0050] Use a deep learning model to optimize the parameters of the compression storage function.
[0051] Furthermore, analyzing the storage method of the real-time data matrix based on the compression storage function and the normal storage function includes the following steps:
[0052] Obtain the number of non-0 values in the obtained real-time data matrix, marked as the real-time number;
[0053] Substitute the real-time number into the normal storage function and the compression storage function respectively to obtain two values, marked as the normal predicted power consumption value and the compression predicted power consumption value;
[0054] Judge whether the normal predicted power consumption value is greater than or equal to the compression predicted power consumption value. If so, directly store the real-time data matrix. If not, compress the real-time data matrix according to the compression method of the historical data matrix to obtain a historical compression matrix and then store it.
[0055] This application also provides a high-performance computing memory power consumption optimization system based on deep learning, including: a data acquisition module, a normal function fitting module, a compression module, a compression function fitting module, and a storage module;
[0056] The data acquisition module is used to acquire the data matrix to be stored, marked as the real-time data matrix;
[0057] The normal function fitting module is used to obtain a first quantity of data matrices with the same matrix size as the real-time data matrix, which are marked as historical data matrices; store each historical data matrix in the memory for a second quantity of times, and mark the power consumption required for each storage as the historical normal storage power consumption; obtain the number of non-zero values in each historical data matrix, which is marked as the non-zero number; obtain the relationship function between the non-zero number and the historical normal storage power consumption, which is marked as the normal storage function.
[0058] The compression module is used to compress each historical data matrix to obtain a historical compressed matrix.
[0059] The compression function fitting module is used to store each historical compressed matrix in the memory for a second quantity of times, and mark the power consumption required for each storage as the historical compressed storage power consumption; mark the sum of the historical compression power consumption and the historical compressed storage power consumption as the historical total compressed power consumption, and obtain the relationship function between the non-zero number and the historical total compressed power consumption, which is marked as the compressed storage function.
[0060] The storage module is used to analyze the storage method of the real-time data matrix based on the compressed storage function and the normal storage function.
[0061] The beneficial effects of the present invention: By obtaining the relationship function between the non-zero number and the historical normal storage power consumption, which is marked as the normal storage function, compressing each historical data matrix to obtain a historical compressed matrix, obtaining the relationship function between the non-zero number and the historical total compressed power consumption, which is marked as the compressed storage function, and analyzing the storage method of the real-time data matrix based on the compressed storage function and the normal storage function, the advantage is that it can predict the power consumption of compression and non-compression based on historical data, select the most power-saving method based on the prediction to improve, and reduce the memory storage power consumption;
[0062] By compressing each historical data matrix to obtain a historical compressed matrix, the advantage of the present invention is that it can compress data matrices that are large and sparse, and can reduce memory occupancy and transmission energy consumption. Description of the Drawings
[0063] Figure 1 It is the principle block diagram of the system of the present invention;
[0064] Figure 2 It is the schematic diagram of the normal power consumption histogram of the present invention;
[0065] Figure 3 It is the schematic diagram of the screened normal power consumption histogram of the present invention;
[0066] Figure 4 It is the schematic diagram of the normal storage function of the present invention;
[0067] Figure 5Schematic diagram of the historical compression matrix formation of the present invention;
[0068] Figure 6 Schematic diagram of the normal power consumption histogram of the present invention;
[0069] Figure 7 Schematic diagram of the screened compression power consumption histogram of the present invention;
[0070] Figure 8 Schematic diagram of the compression storage function of the present invention;
[0071] Figure 9 Flow chart of the steps of the method of the present invention. Detailed implementation manners
[0072] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0073] Example 1, please refer to Figure 1 As shown, the present application provides a high-performance computing memory power consumption optimization system based on deep learning, including:
[0074] A data acquisition module, a normal function fitting module, a compression module, a compression function fitting module, and a storage module;
[0075] The data acquisition module is used to acquire the data matrix to be stored, marked as the real-time data matrix;
[0076] The normal function fitting module is used to acquire the first number of data matrices with the same matrix size as the real-time data matrix, marked as the historical data matrices; store each historical data matrix in the memory for the second number of times, mark the power consumption required for each storage as the historical normal storage power consumption; acquire the number of non-zero values in each historical data matrix, marked as the non-zero number; acquire the relationship function between the non-zero number and the historical normal storage power consumption, marked as the normal storage function;
[0077] The normal function fitting module is configured with a normal power consumption histogram drawing strategy, and the normal power consumption histogram drawing strategy includes:
[0078] Acquire the range of the historical normal storage power consumption of a historical data matrix, marked as the historical normal power consumption range;
[0079] Evenly divide the historical normal power consumption range into a1 equal range intervals, marked as the normal power consumption division intervals;
[0080] Count the frequency of each normal power consumption division interval and label it as the normal division power consumption frequency;
[0081] Using the historical normal storage power consumption as the X-axis, the normal division power consumption frequency as the Y-axis, and the normal power consumption division interval as the histogram interval, draw a histogram and label it as the normal power consumption histogram.
[0082] The normal function fitting module is configured with first and second threshold acquisition strategies, and the first and second threshold acquisition strategies include:
[0083] Label the second quantity as Ds2;
[0084] Calculate the first division frequency threshold as: F1 = b1 * Ds2 / a1; where F1 is the first division frequency threshold and b1 is the abnormal occupancy ratio; the setting of F1 is used to screen out fewer abnormal normal division power consumption frequencies. Because under the same conditions and the same operations, the power consumption is basically the same, so the data is relatively concentrated. In the field of quality control, usually less than 1% is ignored. Therefore, the data with a ratio of 1% may be abnormal data, so b1 is set to 1%;
[0085] Label the normal division power consumption frequencies less than or equal to the first division frequency threshold as the first abnormal division frequencies;
[0086] Respectively judge whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram are the first abnormal division frequencies. If so, delete the corresponding normal division power consumption frequencies at the leftmost or rightmost side of the normal power consumption histogram, and then continue to judge whether the normal division power consumption frequencies at the leftmost and rightmost sides of the deleted normal power consumption histogram are abnormal path frequencies, and repeat the above operations until they are not, and then stop the judgment; label the normal power consumption histogram after stopping the judgment as the screened normal power consumption histogram;
[0087] Obtain the maximum and minimum values of the abscissa of the normal division power consumption frequencies in the screened normal power consumption histogram, and label them as the first screening threshold and the second screening threshold respectively;
[0088] In practical applications, please refer to Figure 2 As shown, when the second quantity is set to 100 and a1 is set to 7, calculate the first division frequency threshold as: F1 = 0.1 * 100 / 7 = 1, and keep the calculation result as an integer. Please refer to Figure 3 As shown, the first screening threshold and the second screening threshold are 4.6mW and 5.2mW respectively. Because although the operating conditions and processes are the same, there are many factors affecting the power consumption, so the power consumption of each storage is different. Through the first screening threshold and the second screening threshold, the approximate power consumption range can be obtained.
[0089] The normal function fitting module is configured with a normal storage function fitting strategy, and the normal storage function fitting strategy includes:
[0090] Obtain the mean of the historical normal storage power consumption between the first screening threshold and the second screening threshold, and mark it as the screened normal storage power consumption;
[0091] Obtain the screened normal storage power consumption of all historical data matrices;
[0092] Use the non-zero count as the X-axis data and the screened normal storage power consumption as the Y-axis data to establish a Cartesian coordinate system, and mark it as the normal energy consumption coordinate system;
[0093] Take the non-zero count and the screened normal storage power consumption of each historical data matrix as the abscissa and ordinate of the normal energy consumption coordinate points respectively, and plot all the normal energy consumption coordinate points in the normal energy consumption coordinate system to obtain the normal energy consumption scatter plot;
[0094] Perform polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function;
[0095] Use a deep learning model to optimize the parameters of the normal storage function; for example, divide the data fitted by the function into a training set and a test set. The test set can also be newly obtained data. The training set is used to fit and obtain the compressed storage function, and the test set evaluates the compressed storage function. The loss function is defined as the mean squared error. Determine whether the value of the loss function becomes smaller. If it becomes smaller, add the test set to perform polynomial fitting to obtain a new normal storage function;
[0096] In practical applications, please refer to Figure 4 As shown, performing polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function as Gzh = 4.80, where Gzh is the screened normal storage power consumption, and the power consumption required for normal storage can be predicted through the normal storage function.
[0097] The compression module is used to compress each historical data matrix to obtain a historical compressed matrix;
[0098] The compression module is configured with a compression strategy, and the compression strategy includes:
[0099] Establish three data groups, namely the horizontal index array, the vertical index array, and the value array;
[0100] Mark the first row to the last row of the historical data matrix as H1 to Hn, and mark H1 to Hn as Hi; where i is an integer from 1 to n; mark the first column to the last column of the historical data matrix as L1 to Lm, and mark L1 to Lm as Lj; where j is an integer from 1 to m; mark the number of non-zero values in each row as G, where G is a positive integer;
[0101] Retrieve the historical data matrix from left to right in the first row. When each row is retrieved, retrieve the next row until the entire historical data matrix is retrieved. During the retrieval, determine whether each row contains non-zero values. If it does, obtain the number of non-zero values in this row, mark it as M, obtain Hi + M for this row, and put Hi + M into the horizontal index array in the order of retrieval. During the retrieval, determine whether each value is a non-zero value. If it is, obtain the corresponding Lj for the non-zero value at this time, put the corresponding Lj for the non-zero value at this time into the column index array in the order of retrieval, and put the non-zero value at this time into the value array until the entire historical data matrix is retrieved; where M is a positive integer;
[0102] Mark the horizontal index array, column index array, and value array after retrieving the entire historical data matrix as the historical compression matrix;
[0103] In practical applications, please refer to Figure 5 As shown, use the horizontal index array and column index array to represent the position of the value in the matrix, and the value array to represent the specific value. This method does not store 0 values, only stores non-zero values. For example: H1 to Hn are 0 to 3 respectively, L1 to Lm are 0 to 3 respectively, and the non-zero value at the 0th row and 1st column at this time is 2. Since the number of non-zero values in the 0th row is 1, that is, M = 1, so put 0 + 1 into the horizontal index array. Since the column where 2 is located is 1, put 1 into the column index array. Since the non-zero value at this time is 2, put 2 into the value array. Because there are a large number of 0 values in the data matrix, it can reduce memory occupancy and transmission energy consumption.
[0104] The compression function fitting module is used to store each historical compression matrix in the memory for the second number of times, mark the power consumption required for each storage as the historical compression storage power consumption; mark the sum of the historical compression power consumption and the historical compression storage power consumption as the historical compression total power consumption, and obtain the relationship function between the number of non-zeros and the historical compression total power consumption, mark it as the compression storage function;
[0105] The compression function fitting module is configured with a compression power consumption histogram drawing strategy. The compression power consumption histogram drawing includes:
[0106] Obtain the range of the historical compression storage power consumption of a historical compression matrix, mark it as the historical compression power consumption range;
[0107] Evenly divide the historical compression power consumption range into a2 equal range intervals, mark it as the compression power consumption division interval;
[0108] Count the frequency of each compression power consumption division interval, mark it as the compression division power consumption frequency;
[0109] Draw a histogram with the historical compression storage power consumption as the X-axis, the compression division power consumption frequency as the Y-axis, and the compression power consumption division interval as the histogram interval, mark it as the compression power consumption histogram.
[0110] The compression function fitting module is configured with second and third threshold acquisition strategies, and the second and third threshold acquisition strategies include:
[0111] The second partition frequency threshold is calculated as: F2 = b2 * Ds2 / a2; where F2 is the second partition frequency threshold; the setting of F2 is used to filter out fewer abnormal compression partition power consumption frequencies. Because the same operation is performed under the same conditions, the power consumption is basically the same, so the data is relatively concentrated. In the field of quality control, usually less than 1% is ignored. Therefore, the proportion of 1% may be abnormal data. Therefore, b2 is set to 1%;
[0112] Mark the compression partition power consumption frequencies less than or equal to the second partition frequency threshold as the second abnormal partition frequencies;
[0113] Respectively judge whether the compression partition power consumption frequencies at the leftmost and rightmost of the compression power consumption histogram are the second abnormal partition frequencies. If so, delete the corresponding compression partition power consumption frequencies at the leftmost or rightmost of the compression power consumption histogram, and then continue to judge whether the compression partition power consumption frequencies at the leftmost and rightmost of the compressed power consumption histogram after deletion are abnormal path frequencies. Repeat the above operation until it is not, and stop the judgment; mark the compressed power consumption histogram after stopping the judgment as the screened compression power consumption histogram;
[0114] Obtain the maximum and minimum values of the abscissa of the compression partition power consumption frequencies in the screened compression power consumption histogram, and mark them as the third screening threshold and the fourth screening threshold respectively;
[0115] In practical applications, please refer to Figure 6 As shown, when the second quantity is set to 100 and a2 is set to 7, the second partition frequency threshold is calculated as: F2 = 0.1 * 100 / 7 = 1. The calculation result is rounded to an integer. Please refer to Figure 7 As shown, the third screening threshold and the fourth screening threshold are 4.2 mW and 4.6 mW respectively. Because although the operating conditions and processes are the same, there are many factors affecting the power consumption. Therefore, the power consumption stored each time is different. The approximate compressed power consumption range can be obtained through the third screening threshold and the fourth screening threshold.
[0116] The compression function fitting module is configured with a compression storage function fitting strategy, and the compression storage function fitting strategy includes:
[0117] Obtain the mean value of the historical compression storage power consumption between the third screening threshold and the third screening threshold, and mark it as the screened compression storage power consumption;
[0118] Obtain the screened compression storage power consumption of all historical data matrices;
[0119] Using the non - zero count as the X - axis data and the screened compressed storage power consumption as the Y - axis data, a rectangular coordinate system is established and marked as the compressed energy consumption coordinate system;
[0120] Taking the non - zero count and the screened compressed storage power consumption of each historical compressed matrix as the abscissa and ordinate of the compressed energy consumption coordinate points respectively, all the compressed energy consumption coordinate points are plotted in the compressed energy consumption coordinate system to obtain a compressed energy consumption scatter plot;
[0121] Performing polynomial fitting on the compressed energy consumption scatter plot to obtain a compressed storage function;
[0122] Using a deep learning model to optimize the parameters of the compressed storage function; for example, dividing the data fitted by the function into a training set and a test set. The test set can also be newly obtained data. The training set is used to fit and obtain the compressed storage function, and the test set is used to evaluate the compressed storage function. The loss function is defined as the mean square error. Determine whether the value of the loss function becomes smaller. If it becomes smaller, a new compressed storage function is obtained by adding the test set for polynomial fitting;
[0123] In practical applications, please refer to Figure 8 As shown, performing polynomial fitting on the compressed energy consumption scatter plot to obtain the compressed storage function as Gyh = 0.0168*Cy 2 + 0.0685*Cy + 1.8000, where Gyh is the screened compressed storage power consumption and the non - zero count is Cy. The power consumption required for compressed storage can be predicted through the compressed storage function.
[0124] The storage module is used to analyze the storage method of the real - time data matrix based on the compressed storage function and the normal storage function;
[0125] The storage module is configured with a storage strategy, and the storage strategy includes:
[0126] The number of non - zero values in the obtained real - time data matrix is marked as the real - time count;
[0127] Substituting the real - time count into the normal storage function and the compressed storage function respectively to obtain two values, which are marked as the normal predicted power consumption value and the compressed predicted power consumption value respectively;
[0128] Judging whether the normal predicted power consumption value is greater than or equal to the compressed predicted power consumption value. If so, directly store the real - time data matrix. If not, compress the real - time data matrix according to the compression method of the historical data matrix to obtain a historical compressed matrix and then store it;
[0129] In practical applications, when the real - time count is 5, substitute it into Gzh = 4.80 and Gyh = 0.0168*Cy 2Obtained by +0.0685*Cy + 1.8000, the normal predicted power consumption value is 4.80 mW and the compressed predicted power consumption value is 2.56 mW. Since 2.56 mW is less than 4.80 mW, less power is required for compression. Therefore, the real-time data matrix is compressed according to the historical data matrix to obtain the historical compressed matrix, and then stored.
[0130] Example 2, please refer to Figure 9 As shown in the figure, the present application provides a high-performance computing memory power consumption optimization method based on deep learning, including the following steps:
[0131] Step S1, obtain the data matrix to be stored, marked as the real-time data matrix;
[0132] Step S2, obtain the first number of data matrices with the same matrix size as the real-time data matrix, marked as the historical data matrices; store each historical data matrix in the memory for the second number of times, and mark the power consumption required for each storage as the historical normal storage power consumption; obtain the number of non-zero values in each historical data matrix, marked as the number of non-zeros; obtain the relationship function between the number of non-zeros and the historical normal storage power consumption, marked as the normal storage function; Step S2 includes the following sub-steps:
[0133] Step S201, obtain the range of the historical normal storage power consumption of a historical data matrix, marked as the historical normal power consumption range;
[0134] Step S202, evenly divide the historical normal power consumption range into a1 equal range intervals, marked as the normal power consumption division intervals;
[0135] Step S203, count the frequency of each normal power consumption division interval, marked as the normal division power consumption frequency;
[0136] Step S204, draw a histogram with the historical normal storage power consumption as the X-axis, the normal division power consumption frequency as the Y-axis, and the normal power consumption division interval as the histogram interval, marked as the normal power consumption histogram;
[0137] Step S205, mark the second number as Ds2;
[0138] Step S206, calculate the first division frequency threshold as: F1 = b1*Ds2 / a1; where F1 is the first division frequency threshold and b1 is the abnormal occupancy ratio;
[0139] Step S207, mark the normal division power consumption frequency less than or equal to the first division frequency threshold as the first abnormal division frequency;
[0140] Step S208: Determine respectively whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram are the first abnormal division frequencies. If so, delete the normal division power consumption frequency at the corresponding leftmost or rightmost side in the normal power consumption histogram, and then continue to determine whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram after deletion are abnormal path frequencies. Repeat the above operations until they are not, and then stop the determination; Mark the normal power consumption histogram after stopping the determination as the screened normal power consumption histogram.
[0141] Step S209: Obtain the maximum and minimum values of the abscissas of the normal division power consumption frequencies in the screened normal power consumption histogram, and mark them as the first screening threshold and the second screening threshold respectively.
[0142] Step S210: Obtain the mean value of the historical normal storage power consumption between the first screening threshold and the second screening threshold, and mark it as the screened normal storage power consumption.
[0143] Step S211: Obtain the screened normal storage power consumption of all historical data matrices.
[0144] Step S212: Use the non-zero number as the X-axis data and the screened normal storage power consumption as the Y-axis data to establish a plane rectangular coordinate system, and mark it as the normal energy consumption coordinate system.
[0145] Step S213: Use the non-zero number and the screened normal storage power consumption of each historical data matrix as the abscissa and ordinate of the normal energy consumption coordinate point respectively, and plot all the normal energy consumption coordinate points in the normal energy consumption coordinate system to obtain the normal energy consumption scatter plot.
[0146] Step S214: Perform polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function.
[0147] Step S215: Optimize the parameters of the normal storage function using a deep learning model.
[0148] Step S3: Compress each historical data matrix to obtain a historical compression matrix; Step S3 includes the following sub-steps:
[0149] Step S301: Establish three data groups, namely the horizontal index array, the vertical index array, and the value array.
[0150] Step S302: Mark the first row to the last row of the historical data matrix as H1 to Hn respectively, and mark H1 to Hn as Hi; where i is an integer from 1 to n; Mark the first column to the last column of the historical data matrix as L1 to Lm respectively, and mark L1 to Lm as Lj; where j is an integer from 1 to m; Mark the number of non-0 numerical values in each row as G, where G is a positive integer.
[0151] Step S303: Retrieve the historical data matrix from left to right in the first row. When each row is retrieved, retrieve the next row until the entire historical data matrix is retrieved. During the retrieval, determine whether each row contains non-zero values. If it does, obtain the number of non-zero values in this row, denoted as M, obtain Hi + M for this row, and place Hi + M into the horizontal index array in the order of retrieval. During the retrieval, determine whether each value is a non-zero value. If it is, obtain the corresponding Lj for this non-zero value, place the corresponding Lj for this non-zero value into the column index array in the order of retrieval, and place this non-zero value into the value array until the entire historical data matrix is retrieved; where M is a positive integer;
[0152] Step S304: Mark the horizontal index array, column index array, and value array after retrieving the entire historical data matrix as the historical compression matrix.
[0153] Step S4: Store each historical compression matrix in the memory for the second number of times, and mark the power consumption required for each storage as the historical compression storage power consumption; Mark the sum of the historical compression power consumption and the historical compression storage power consumption as the total historical compression power consumption, and obtain the relationship function between the number of non-zeros and the total historical compression power consumption, denoted as the compression storage function; Step S4 includes the following sub-steps:
[0154] Step S401: Obtain the range of the historical compression storage power consumption of a historical compression matrix, denoted as the historical compression power consumption range;
[0155] Step S402: Evenly divide the historical compression power consumption range into a2 equal range intervals, denoted as the compression power consumption division intervals;
[0156] Step S403: Count the frequency of each compression power consumption division interval, denoted as the compression division power consumption frequency;
[0157] Step S404: Draw a histogram with the historical compression storage power consumption as the X-axis, the compression division power consumption frequency as the Y-axis, and the compression power consumption division interval as the histogram interval, denoted as the compression power consumption histogram.
[0158] Step S405: The sub-steps for obtaining the relationship function between the number of non-zeros and the total historical compression power consumption, denoted as the compression storage function, also include the following:
[0159] Step S406: Calculate the second division frequency threshold as: F2 = b2 * Ds2 / a2; where F2 is the second division frequency threshold;
[0160] Step S407: Mark the compression division power consumption frequency less than or equal to the second division frequency threshold as the second abnormal division frequency;
[0161] Step S408: Determine respectively whether the compression division power consumption frequencies at the leftmost and rightmost sides of the compression power consumption histogram are the second abnormal division frequencies. If so, delete the corresponding compression division power consumption frequency at the leftmost or rightmost side of the compression power consumption histogram, and then continue to determine whether the compression division power consumption frequencies at the leftmost and rightmost sides of the compressed power consumption histogram after deletion are abnormal path frequencies. Repeat the above operations until they are not, and then stop the determination; Mark the compression power consumption histogram after stopping the determination as the screened compression power consumption histogram;
[0162] Step S409: Obtain the maximum and minimum values of the abscissa of the compression division power consumption frequency in the screened compression power consumption histogram, and mark them as the third screening threshold and the fourth screening threshold respectively.
[0163] Step S410: Obtain the mean value of the historical compression storage power consumption between the third screening threshold and the third screening threshold, and mark it as the screened compression storage power consumption;
[0164] Step S411: Obtain the screened compression storage power consumption of all historical data matrices;
[0165] Step S412: Use the non-zero number as the X-axis data and the screened compression storage power consumption as the Y-axis data to establish a plane rectangular coordinate system, and mark it as the compression energy consumption coordinate system;
[0166] Step S413: Use the non-zero number and the screened compression storage power consumption of each historical compression matrix as the abscissa and ordinate of the compression energy consumption coordinate point respectively, and plot all compression energy consumption coordinate points in the compression energy consumption coordinate system to obtain a compression energy consumption scatter plot;
[0167] Step S414: Perform polynomial fitting on the compression energy consumption scatter plot to obtain a compression storage function;
[0168] Step S415: Use a deep learning model to optimize the parameters of the compression storage function.
[0169] Step S5: Analyze the storage method of the real-time data matrix based on the compression storage function and the normal storage function; Step S5 includes the following sub-steps:
[0170] Step S501: Obtain the number of non-0 values in the obtained real-time data matrix, and mark it as the real-time number;
[0171] Step S502: Substitute the real-time number into the normal storage function and the compression storage function respectively to obtain two values, and mark them as the normal predicted power consumption value and the compression predicted power consumption value respectively;
[0172] Step S503: Determine whether the normal predicted power consumption value is greater than or equal to the compressed predicted power consumption value. If it is, directly store the real-time data matrix; if not, compress the real-time data matrix according to the compression method for obtaining the historical compression matrix from the historical data matrix and then store it.
[0173] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (abbreviated as SRAM), electrically erasable programmable read-only memory (abbreviated as EEPROM), erasable programmable read-only memory (abbreviated as EPROM), programmable read-only memory (abbreviated as PROM), read-only memory (abbreviated as ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, and the instruction device implements the functions specified in one process Figure 1 one process or multiple processes and / or boxes Figure 1 specified in a box or multiple boxes.
[0174] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling, or communication connection can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.
Claims
1. A method for optimizing the memory power consumption of high-performance computing based on deep learning, characterized in that, It includes the following steps: Obtain the data matrix to be stored, and label it as the real-time data matrix; Obtain the first number of data matrices with the same matrix size as the real-time data matrix, and label them as historical data matrices; Store each historical data matrix in the memory for the second number of times, and label the power consumption required for each storage as the historical normal storage power consumption; obtain the number of non-zero values in each historical data matrix, and label it as the non-zero number; Obtain the relationship function between the non-zero number and the historical normal storage power consumption, and label it as the normal storage function; Compress each historical data matrix to obtain a historical compressed matrix; Store each historical compressed matrix in the memory for the second number of times, and label the power consumption required for each storage as the historical compressed storage power consumption; label the sum of the historical compression power consumption and the historical compressed storage power consumption as the historical total compressed power consumption, and obtain the relationship function between the non-zero number and the historical total compressed power consumption, and label it as the compressed storage function; Analyze the storage method of the real-time data matrix based on the compressed storage function and the normal storage function; The steps for analyzing the storage method of the real-time data matrix based on the compressed storage function and the normal storage function include the following: Obtain the number of non-zero values in the obtained real-time data matrix, and label it as the real-time number; Substitute the real-time number into the normal storage function and the compressed storage function respectively to obtain two values, which are respectively labeled as the normal predicted power consumption value and the compressed predicted power consumption value; Judge whether the normal predicted power consumption value is greater than or equal to the compressed predicted power consumption value. If so, directly store the real-time data matrix. If not, compress the real-time data matrix according to the compression method of the historical data matrix to obtain a historical compressed matrix and then store it.
2. The high-performance computing memory power consumption optimization method based on deep learning according to claim 1, characterized in that, The steps for obtaining the relationship function between the non-zero number and the historical normal storage power consumption, and labeling it as the normal storage function include the following sub-steps: Obtain the range of the historical normal storage power consumption of a historical data matrix, and label it as the historical normal power consumption range; Evenly divide the historical normal power consumption range into a1 equal range intervals, and label them as the normal power consumption division intervals; Count the frequency of each normal power consumption division interval, and label it as the normal division power consumption frequency; Draw a histogram with the historical normal storage power consumption as the X-axis, the normal division power consumption frequency as the Y-axis, and the normal power consumption division interval as the histogram interval, and label it as the normal power consumption histogram.
3. The high-performance computing memory power consumption optimization method based on deep learning according to claim 2, wherein The steps for obtaining the relationship function between the non-zero number and the historical normal storage power consumption, and labeling it as the normal storage function also include the following sub-steps: Label the second number as Ds2; Calculate the first division frequency threshold as: F1 = b1×Ds2 / a1; where F1 is the first division frequency threshold and b1 is the abnormal occupancy ratio; Label the normal division power consumption frequency less than or equal to the first division frequency threshold as the first abnormal division frequency; Judge whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram are the first abnormal division frequencies respectively. If so, delete the normal division power consumption frequency at the corresponding leftmost or rightmost side in the normal power consumption histogram, and then continue to judge whether the normal division power consumption frequencies at the leftmost and rightmost sides of the normal power consumption histogram after deletion are abnormal path frequencies. Repeat the judgment operation until it is not, and then stop the judgment; Mark the normal power consumption histogram after stopping the judgment as the screened normal power consumption histogram. Obtain the maximum and minimum values of the abscissa of the normal division power consumption frequency in the screened normal power consumption histogram, and mark them as the first screening threshold and the second screening threshold respectively.
4. The high-performance computing memory power consumption optimization method based on deep learning according to claim 3, characterized in that Obtain the relationship function between the non-zero number and the historical normal storage power consumption, and mark it as the normal storage function. It also includes the following sub-steps: Obtain the mean value of the historical normal storage power consumption between the first screening threshold and the second screening threshold, and mark it as the screened normal storage power consumption. Obtain the screened normal storage power consumption of all historical data matrices. Taking the non-zero number as the X-axis data and the screened normal storage power consumption as the Y-axis data, establish a rectangular coordinate system, and mark it as the normal energy consumption coordinate system. Taking the non-zero number and the screened normal storage power consumption of each historical data matrix as the abscissa and ordinate of the normal energy consumption coordinate point respectively, plot all normal energy consumption coordinate points in the normal energy consumption coordinate system to obtain a normal energy consumption scatter plot. Perform polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function. Optimize the parameters of the normal storage function using a deep learning model.
5. The high-performance computing memory power consumption optimization method based on deep learning according to claim 4, characterized in that Compress each historical data matrix to obtain a historical compression matrix, which includes the following sub-steps: Establish three data groups, namely the horizontal index array, the vertical index array, and the value array. Mark the first row to the last row of the historical data matrix as H1 to Hn respectively, and mark H1 to Hn as Hi; where i is an integer from 1 to n; mark the first column to the last column of the historical data matrix as L1 to Lm respectively, and mark L1 to Lm as Lj; where j is an integer from 1 to m; mark the number of non-zero values in each row as G, where G is a positive integer. Retrieve the historical data matrix from left to right in the first row. When each row is retrieved, retrieve the next row until the entire historical data matrix is retrieved. When retrieving, judge whether each row contains non-zero values. If so, obtain the number of non-zero values in this row, mark it as M, obtain Hi + M of this row, and put Hi + M into the horizontal index array in the order of retrieval; when retrieving, judge whether each value is a non-zero value. If so, obtain the Lj corresponding to the non-zero value at this time, put the Lj corresponding to the non-zero value at this time into the vertical index array in the order of retrieval, and put the non-zero value at this time into the value array until the entire historical data matrix is retrieved; where M is a positive integer. Mark the horizontal index array, the vertical index array, and the value array of the entire retrieved historical data matrix as the historical compression matrix.
6. The high-performance computing memory power consumption optimization method based on deep learning according to claim 5, characterized in that Obtain the relationship function between the non-zero number and the total historical compression power consumption, and mark it as the compression storage function. It includes the following sub-steps: Obtain the range of the historical compression storage power consumption of a historical compression matrix, and mark it as the historical compression power consumption range. The historical compression power consumption range is evenly divided into a2 equal range intervals, marked as compression power consumption division intervals; The frequency of each compression power consumption division interval is counted, marked as compression division power consumption frequency; Taking the historical compression storage power consumption as the X-axis, the compression division power consumption frequency as the Y-axis, and the compression power consumption division interval as the histogram interval, a histogram is drawn, marked as the compression power consumption histogram.
7. The method for optimizing the memory power consumption of high-performance computing based on deep learning according to claim 6, characterized in that, Obtaining the relationship function between the number of non-zeros and the total historical compression power consumption, the compression storage function also includes the following sub-steps: Calculate the second division frequency threshold as: F2 = b2×Ds2 / a2; where F2 is the second division frequency threshold; Mark the compression division power consumption frequencies less than or equal to the second division frequency threshold as the second abnormal division frequencies; Respectively judge whether the compression division power consumption frequencies at the leftmost and rightmost sides of the compression power consumption histogram are the second abnormal division frequencies. If so, delete the corresponding leftmost or rightmost compression division power consumption frequency in the compression power consumption histogram, and then continue to judge whether the compression division power consumption frequencies at the leftmost and rightmost sides of the deleted compression power consumption histogram are the abnormal path frequencies, and repeat the judgment operation until not, then stop the judgment; mark the compression power consumption histogram after stopping the judgment as the screened compression power consumption histogram; Obtain the maximum and minimum values of the abscissa of the compression division power consumption frequency in the screened compression power consumption histogram, and mark them as the third screening threshold and the fourth screening threshold respectively.
8. The high-performance computing memory power consumption optimization method based on deep learning according to claim 7, characterized in that Obtaining the relationship function between the number of non-zeros and the total historical compression power consumption, the compression storage function also includes the following sub-steps: Obtain the mean value of the historical compression storage power consumption between the third screening threshold and the fourth screening threshold, marked as the screened compression storage power consumption; Obtain the screened compression storage power consumption of all historical data matrices; Taking the number of non-zeros as the X-axis data and the screened compression storage power consumption as the Y-axis data, establish a plane rectangular coordinate system, marked as the compression energy consumption coordinate system; Taking the number of non-zeros and the screened compression storage power consumption of each historical compression matrix as the abscissa and ordinate of the compression energy consumption coordinate point respectively, plot all the compression energy consumption coordinate points in the compression energy consumption coordinate system to obtain a compression energy consumption scatter plot; Perform polynomial fitting on the compression energy consumption scatter plot to obtain a compression storage function; Optimize the parameters of the compression storage function using a deep learning model.
9. A high-performance computing memory power consumption optimization system based on deep learning, which is used to implement the high-performance computing memory power consumption optimization method based on deep learning described in any one of claims 1-8, characterized in that, Including a data acquisition module, a normal function fitting module, a compression module, a compression function fitting module, and a storage module; The data acquisition module is used to acquire the data matrix to be stored, marked as the real-time data matrix; The normal function fitting module is used to acquire a first number of data matrices with the same matrix size as the real-time data matrix, marked as the historical data matrices; Each historical data matrix is stored in the memory for a second number of times, and the power consumption required for each storage is marked as the historical normal storage power consumption; obtain the number of non-0 values in each historical data matrix, marked as the number of non-zeros; Obtain the relationship function between the number of non-zeros and the historical normal storage power consumption, marked as the normal storage function; The compression module is used to compress each historical data matrix to obtain a historical compression matrix; The compression function fitting module is used to store each historical compression matrix in the memory for a second number of times, mark the power consumption required for each storage as the historical compression storage power consumption; mark the sum of the historical compression power consumption and the historical compression storage power consumption as the historical compression total power consumption, obtain the relationship function between the number of non-zeros and the historical compression total power consumption, and mark it as the compression storage function; The storage module is used to analyze the storage method of the real-time data matrix based on the compression storage function and the normal storage function.
Citation Information
Patent Citations
Low-power-consumption data transmission optimization method and device for Internet of Things equipment
CN118972895A
Multi-channel neural signal compression system and method applied to brain-computer interface
CN116522117A
Computing program for simultaneous linear equations, computing apparatus for simultaneous linear equations, and solution method of simultaneous linear equations
JP2006048637A