High-performance computing memory power consumption optimization method and system based on deep learning
By acquiring and analyzing the relationship function between the non-zero number of data matrix and storage power consumption, deciding whether to perform data matrix compression storage, the problem of failure to consider the total power consumption generated by the compression process in the prior art is solved, and the effect of stably reducing memory power consumption and reducing memory usage and transmission energy consumption is achieved.
Patent Information
- Application Number
- CN202510607273.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-06-13
- 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 the historical normal storage power consumption and the relationship function of the non-zero number and the historical compressed total power consumption, the storage method of the real-time data matrix is analyzed to determine whether to perform data matrix compression storage.
Power consumption prediction based on historical data is realized, and the storage method that saves the most power consumption is selected, which reduces memory storage power consumption and reduces the memory footprint and transmission energy consumption of the data matrix.
Smart Images

Figure CN120144318A_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.; Software and algorithm optimization includes compressing the data matrix to reduce memory occupancy and transmission energy 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 has decreased. For example, in the patent application with the application 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 storing data during transmission after compression, and fails to consider the power consumption generated when compressing data, resulting in an inability to determine whether the overall power consumption has decreased. In the 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
[0003] 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 total historical 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 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.
[0004] 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: Obtain the data matrix to be stored, marked as the real-time data matrix; 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, 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; Compress each historical data matrix to obtain a historical compressed matrix; Store each historical compressed matrix in memory a second number of times, 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 total historical compression power consumption, and obtain the relationship function between the number of non-zeros and the total historical compression power consumption, marked as the compression storage function; Analyze the storage method of the real-time data matrix based on the compression storage function and the normal storage function.
[0005] Furthermore, obtaining the relationship function between the number of non-zeros and the historical normal storage power consumption, marked as the normal storage function includes the following sub-steps: Obtain the range of the historical normal storage power consumption of a historical data matrix, marked as the historical normal power consumption range; Evenly divide the historical normal power consumption range into a1 equal range intervals, marked as the normal power consumption division intervals; Count the frequency of each normal power consumption division interval, marked as the normal division power consumption frequency; 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, marked as the normal power consumption histogram.
[0006] Furthermore, obtaining the relationship function between the number of non-zeros and the historical normal storage power consumption, marked as the normal storage function also includes the following sub-steps: Mark 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; Mark the normal division power consumption frequency less than or equal to the first division frequency threshold as the first abnormal division frequency; 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 the abnormal path frequencies, and repeat the above operations until they are not, and 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, marked as the first screening threshold and the second screening threshold respectively.
[0007] Furthermore, obtaining the relationship function between the number of non-zeros and the historical normal storage power consumption, marked as the normal storage function also includes the following sub-steps: 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; Obtain the screened normal storage power consumption of all historical data matrices; 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 rectangular coordinate system, and mark it as the normal energy consumption coordinate system; Take the non-zero count of each historical data matrix and the screened normal storage power consumption 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; 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.
[0008] Further, compressing each historical data matrix to obtain a historical compressed matrix includes the following sub-steps: Establish three data groups, namely the horizontal index array, the column index array, and the value array; 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; Retrieve the historical data matrix from left to right in the first row, and when each row is retrieved, retrieve the next row until the entire historical data matrix is retrieved. When retrieving, 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 of this row, and put Hi+M into the horizontal index array in the order of retrieval; when retrieving, determine whether each value is a non-zero value. If it is, 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 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; Mark the horizontal index array, the column index array, and the value array after retrieving the entire historical data matrix as the historical compressed matrix.
[0009] Further, obtain the relationship function between the non-zero count and the total historical compression power consumption, and mark it as the compression storage function, including the following sub-steps: Obtain the range of the historical compression storage power consumption of a historical compressed matrix, and mark it as the historical compression power consumption range; Evenly divide the historical compression power consumption range into a2 equal range intervals, and mark them as the compression power consumption division intervals; Count the frequency of each compression power consumption division interval, and mark it as the 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, draw a histogram and mark it as the compression power consumption histogram.
[0010] Furthermore, obtaining the relationship function between the number of non-zeros and the historical total 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 frequency less than or equal to the second division frequency threshold as the second abnormal division frequency; 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. Repeat the above operations until they are not, and 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.
[0011] Furthermore, obtaining the relationship function between the number of non-zeros and the historical total 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 third screening threshold, and mark it 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 and mark it 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, draw 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; Use a deep learning model to optimize the parameters of the compression storage function.
[0012] Furthermore, based on the compression storage function and the normal storage function, analyzing the storage method of the real-time data matrix includes the following steps: Obtain the number of non-0 values in the obtained real-time data matrix, and mark it as the real-time number; Substitute the real-time quantity into the normal storage function and the compression storage function respectively to obtain two values, which are marked as the normal predicted power consumption value and the compression predicted power consumption value respectively; 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 the historical compressed matrix and then store it.
[0013] 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; 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 the first number of data matrices with the same matrix size as the real-time data matrix, marked as the historical data matrix; 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; 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; The compression module is used to compress each historical data matrix to obtain the historical compressed matrix; The compression function fitting module is used to store each historical compressed matrix in the memory for the second number of times, 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 number of non-zeros and the historical total compressed power consumption, marked 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.
[0014] Advantages of the present invention: By obtaining the relationship function between the number of non-zeros and the historical normal storage power consumption, 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 compressed power consumption, 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, 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; By compressing each historical data matrix to obtain the historical compressed matrix, the advantage of the present invention is that it can compress the data matrix when it is large and sparse, which can reduce the memory occupancy and transmission energy consumption. Description of the Drawings
[0015] Figure 1 It is the principle block diagram of the system of the present invention; Figure 2 It is the schematic diagram of the normal power consumption histogram of the present invention; Figure 3 It is the schematic diagram of screening the normal power consumption histogram of the present invention; Figure 4 It is the schematic diagram of the normal storage function of the present invention; Figure 5 It is the schematic diagram of the formation of the historical compression matrix of the present invention; Figure 6 It is the schematic diagram of the normal power consumption histogram of the present invention; Figure 7 It is the schematic diagram of screening the compressed power consumption histogram of the present invention; Figure 8 It is the schematic diagram of the compressed storage function of the present invention; Figure 9 It is the step flow chart of the method of the present invention. Specific embodiments
[0016] 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 of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.
[0017] Embodiment 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: 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 the first number of data matrices with the same matrix size as the real-time data matrix, marked as the historical data matrix; 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 number of non-zeros; acquire the relationship function between the number of non-zeros and the historical normal storage power consumption, marked as the normal storage function; The normal function fitting module is configured with a normal power consumption histogram drawing strategy, and the normal power consumption histogram drawing strategy includes: Acquire the range of the historical normal storage power consumption of a historical data matrix, marked as the historical normal power consumption range; The historical normal power consumption range is evenly divided into a1 equal range intervals, marked as normal power consumption division intervals; The frequency of each normal power consumption division interval is counted and marked as the normal division power consumption frequency; 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, a histogram is drawn and marked as the normal power consumption histogram.
[0018] The normal function fitting module is configured with first and second threshold acquisition strategies, and the first and second threshold acquisition strategies include: Mark the second quantity 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; 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 occupancy ratio of 1% may be abnormal data, so b1 is set to 1%; Mark the normal division power consumption frequencies less than or equal to the first division frequency threshold as the first abnormal division frequencies; Respectively judge whether the normal division power consumption frequencies at the leftmost and rightmost 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 of the normal power consumption histogram, and then continue to judge whether the normal division power consumption frequencies at the leftmost and rightmost 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; 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 frequencies in the screened normal power consumption histogram, and mark them as the first screening threshold and the second screening threshold respectively; 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, a general power consumption range can be obtained.
[0019] The normal function fitting module is configured with a normal storage function fitting strategy, and the normal storage function fitting strategy includes: 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; 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 rectangular coordinate system, and mark it as the normal energy consumption coordinate system; 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; Perform polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function; 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 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, add the test set to perform polynomial fitting to obtain a new normal storage function; In practical applications, please refer to Figure 4 As shown, performing polynomial fitting on the normal energy consumption scatter plot obtains 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.
[0020] The compression module is used to compress each historical data matrix to obtain a historical compressed matrix; The compression module is configured with a compression strategy, and the compression strategy includes: 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. 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; Mark the horizontal index array, column index array, and value array after retrieving the entire historical data matrix as the historical compression matrix; 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.
[0021] 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; The compression function fitting module is configured with a compression power consumption histogram drawing strategy. The compression power consumption histogram drawing includes: Obtain the range of the historical compression storage power consumption of a historical compression matrix, mark it as the historical compression power consumption range; Evenly divide the historical compression power consumption range into a2 equal range intervals, mark it as the compression power consumption division interval; Count the frequency of each compression power consumption division interval, mark it as the compression division power consumption frequency; 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.
[0022] The compression function fitting module is configured with a second and third threshold acquisition strategy. The second and third threshold acquisition strategy includes: The second division frequency threshold is calculated as: F2 = b2 * Ds2 / a2; where F2 is the second division frequency threshold; the setting of F2 is used to screen out fewer abnormal compressed division power consumption frequencies. Because the same operation is performed under the same conditions and the power consumption is basically the same, 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%; Mark the compressed division power consumption frequencies less than or equal to the second division frequency threshold as the second abnormal division frequencies; Respectively determine whether the compressed division power consumption frequencies at the leftmost and rightmost sides of the compressed power consumption histogram are the second abnormal division frequencies. If so, delete the corresponding compressed division power consumption frequencies at the leftmost or rightmost side of the compressed power consumption histogram, and then continue to determine whether the compressed 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 judgment; Mark the compressed power consumption histogram after stopping the judgment as the screened compressed power consumption histogram; Obtain the maximum and minimum values of the abscissa of the compressed division power consumption frequencies in the screened compressed power consumption histogram, and mark them as the third screening threshold and the fourth screening threshold respectively; 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 division 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, so the power consumption stored each time is different. The approximate power consumption range after compression can be obtained through the third screening threshold and the fourth screening threshold.
[0023] The compression function fitting module is configured with a compression storage function fitting strategy, and the compression storage function fitting strategy includes: Obtain the mean value of the historical compressed storage power consumption between the third screening threshold and the third screening threshold, and mark it as the screened compressed storage power consumption; Obtain the screened compressed storage power consumption of all historical data matrices; Use the non-zero number as the X-axis data and the screened compressed storage power consumption as the Y-axis data to establish a rectangular coordinate system, and mark it as the compression energy consumption coordinate system; Take the non-zero number and the screened compressed storage power consumption of each historical compression matrix as the abscissa and ordinate of the compression energy consumption coordinate point 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; 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; for example, divide the data fitted by the function into a training set and a test set. The test set can also be newly acquired data. The training set is used to fit the compression storage function, and the test set is used to evaluate the compression 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, perform polynomial fitting on the newly added test set to obtain a new compression storage function; In practical applications, please refer to Figure 8 As shown, perform polynomial fitting on the compression energy dissipation scatter plot to obtain the compression storage function Gyh = 0.0168 * Cy 2 + 0.0685 * Cy + 1.8000, where Gyh is the screened compression storage power consumption, and the number of non - zero elements is Cy. The power consumption required for compression can be predicted through the compression storage function.
[0024] 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; The storage module is configured with a storage strategy, and the storage strategy includes: The number of non - zero values in the acquired real - time data matrix is marked as the real - time number; Substitute the real - time number into the normal storage function and the compression storage function respectively to obtain two values, which are marked as the normal predicted power consumption value and the compression predicted power consumption value respectively; 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 compressed matrix and then store it; In practical applications, the real - time number is 5, and substitute it into Gzh = 4.80 and Gyh = 0.0168 * Cy 2 + 0.0685 * Cy + 1.8000 to obtain. The normal predicted power consumption value is 4.80 mW and the compression predicted power consumption value is 2.56 mW. Since 2.56 mW is less than 4.80 mW, the power consumption required for compression is less. Therefore, 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.
[0025] Example 2, please refer to Figure 9 As shown, the present application provides a high - performance computing memory power consumption optimization method based on deep learning, including the following steps: Step S1, obtain the data matrix to be stored, marked as the real - time data matrix; Step S2: Obtain a first quantity 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 a second quantity 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. Step S2 includes the following sub-steps: Step S201: 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; Step S202: Evenly divide the historical normal power consumption range into a1 equal range intervals, and label them as the normal power consumption division intervals; Step S203: Count the frequency of each normal power consumption division interval, and label it as the normal division power consumption frequency; Step S204: Use 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 to draw a histogram, and label it as the normal power consumption histogram; Step S205: Label the second quantity as Ds2; 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; Step S207: Label the normal division power consumption frequencies less than or equal to the first division frequency threshold as the first abnormal division frequencies; Step S208: 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 the abnormal path frequencies, and repeat the above operation until it is not, and then stop the judgment; label the normal power consumption histogram after stopping the judgment as the screened normal power consumption histogram; 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 label them as the first screening threshold and the second screening threshold respectively.
[0026] Step S210: Obtain the mean value of the historical normal storage power consumption between the first screening threshold and the second screening threshold, and label it as the screened normal storage power consumption; Step S211: Obtain the screened normal storage power consumption of all historical data matrices; 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 rectangular coordinate system, and label it as the normal energy consumption coordinate system; Step S213: Take the number of non-zero elements in each historical data matrix and the screened normal storage power consumption 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; Step S214: Perform polynomial fitting on the normal energy consumption scatter plot to obtain the normal storage function; Step S215: Use a deep learning model to optimize the parameters of the normal storage function.
[0027] Step S3: Compress each historical data matrix to obtain a historical compressed matrix; Step S3 includes the following sub-steps: Step S301: Establish three data groups, namely the horizontal index array, the vertical index array, and the value array; Step S302: 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; Step S303: Retrieve the historical data matrix from left to right in the first row, and when each row is retrieved, retrieve the next row until the entire historical data matrix is retrieved. When retrieving, 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 of this row, and put Hi + M into the horizontal index array in the order of retrieval; when retrieving, determine whether each value is a non-zero value. If it is, obtain the Lj corresponding to this non-zero value at this time, put the Lj corresponding to this non-zero value at this time into the vertical index array in the order of retrieval, and put this non-zero value into the value array until the entire historical data matrix is retrieved; where M is a positive integer; Step S304: Mark the horizontal index array, the vertical index array, and the value array after retrieving the entire historical data matrix as the historical compressed matrix.
[0028] Step S4: Store each historical compressed matrix in the memory for the second number of times, 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 compressed total power consumption, and obtain the relationship function between the number of non-zero elements and the historical compressed total power consumption, marked as the compression storage function; Step S4 includes the following sub-steps: Step S401: Obtain the range of the historical compressed storage power consumption of a historical compressed matrix, marked as the historical compressed power consumption range; Step S402: Divide the historical compressed power consumption range evenly into a2 equal range intervals, marked as the compressed power consumption division intervals; Step S403: Count the frequency of each compression power consumption division interval, and mark it as the compression division power consumption frequency. Step S404: Use 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 to draw a histogram, which is marked as the compression power consumption histogram.
[0029] Step S405: Obtain the relationship function between the non-zero number and the historical total compression power consumption, which is marked as the compression storage function and also includes the following sub-steps: Step S406: Calculate the second division frequency threshold as: F2 = b2 * Ds2 / a2; where F2 is the second division frequency threshold. 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. Step S408: 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. Repeat the above operations 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. 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, which are marked as the third screening threshold and the fourth screening threshold respectively.
[0030] Step S410: Obtain the mean value of the historical compression storage power consumption between the third screening threshold and the third screening threshold, which is marked as the screened compression storage power consumption. Step S411: Obtain the screened compression storage power consumption of all historical data matrices. 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, which is marked as the compression energy consumption coordinate system. Step S413: Take 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 draw all the compression energy consumption coordinate points in the compression energy consumption coordinate system to obtain the compression energy consumption scatter plot. Step S414: Perform polynomial fitting on the compression energy consumption scatter plot to obtain the compression storage function. Step S415: Use the deep learning model to optimize the parameters of the compression storage function.
[0031] 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: Step S501: The number of non-zero values in the acquired real-time data matrix is marked as the real-time count. Step S502: Substitute 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. Step S503: Determine 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 the historical compressed matrix and then store it.
[0032] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely 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 (Static Random Access Memory, abbreviated as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, abbreviated as EPROM), programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), read-only memory (Read-Only Memory, abbreviated as ROM), magnetic memory, flash memory, magnetic disk or optical disk. 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 blocks Figure 1 one block or multiple blocks.
[0033] 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. In actual implementation, there may be other division methods. 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 coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical or other forms.
Claims
1. A high-performance computing memory power consumption optimization method based on deep learning, characterized in that: The steps include: Get the data matrix that needs to be stored and mark it as the real-time data matrix; Obtain a first number of data matrices having a matrix size equal to that of the real-time data matrix, and mark them as historical data matrices; Store each historical data matrix in the memory for a 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, and mark it as a non-zero number; Obtain the relationship function between the non-zero number and the historical normal storage power consumption, and mark it as the normal storage function; Compress each historical data matrix to obtain a historical compression matrix; Each historical compression 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 compression storage power consumption; the sum of the historical compression power consumption and the historical compression storage power consumption is marked as the historical compression total power consumption, and the relationship function between the non-zero number and the historical compression total power consumption is obtained and marked as the compression storage function; The storage method of the real-time data matrix is analyzed based on the compressed storage function and the normal storage function.
2. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 1, characterized in that: Obtaining the relationship function between the non-zero number and the historical normal storage power consumption and marking it as a normal storage function includes the following sub-steps: Obtain a range of historical normal storage power consumption of a historical data matrix, and mark it as a historical normal power consumption range; Divide the historical normal power consumption range into a1 equal range intervals, marked as normal power consumption division intervals; Count the frequency of each normal power consumption division interval and mark it as the normal division power consumption frequency; A histogram is drawn with the historical normal storage power consumption as the X-axis, the normal power consumption frequency as the Y-axis, and the normal power consumption interval as the histogram interval, and is marked as a normal power consumption histogram.
3. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 2, characterized in that: Obtaining the relationship function between the non-zero number and the historical normal storage power consumption and marking it as a normal storage function also includes the following sub-steps: Label the second quantity Ds2; The first division frequency threshold is calculated as: F1=b1*Ds2 / a1; where F1 is the first division frequency threshold, and b1 is the abnormal proportion value; Marking a normal divided power consumption frequency that is less than or equal to a first divided frequency threshold as a first abnormal divided frequency; Determine whether the normal divided power consumption frequencies on the leftmost and rightmost sides of the normal power consumption histogram are the first abnormal divided frequencies respectively. If so, delete the corresponding normal divided power consumption frequencies on the leftmost or rightmost sides of the normal power consumption histogram, and then continue to determine whether the normal divided power consumption frequencies on the leftmost and rightmost sides of the deleted normal power consumption histogram are abnormal path frequencies. Repeat the above operation until they are not, and stop determining. Mark the normal power consumption histogram after stopping determination as a filtered normal power consumption histogram. The maximum value and the minimum value of the horizontal coordinate of the normal divided power consumption frequency in the normal power consumption histogram are obtained and marked as the first screening threshold and the second screening threshold respectively.
4. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 3, characterized in that: Obtaining the relationship function between the non-zero number and the historical normal storage power consumption and marking it as a normal storage function also includes the following sub-steps: Obtain an average of historical normal storage power consumption between a first screening threshold and a second screening threshold, and mark it as screened normal storage power consumption; Get the filtered normal storage power consumption of all historical data matrices; Take the non-zero number as the X-axis data, filter the normal storage power consumption as the Y-axis data, establish a plane rectangular coordinate system, and mark it as the normal energy consumption coordinate system; The non-zero number of each historical data matrix and the filtered normal storage power consumption are used as the horizontal coordinate and vertical coordinate of the normal energy consumption coordinate point respectively, and all the normal energy consumption coordinate points are plotted 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 a normal storage function; Use deep learning models to optimize the parameters of normal storage functions.
5. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 4, characterized in that: Compressing each historical data matrix to obtain a historical compression matrix includes the following sub-steps: Create three data groups, namely, the horizontal index array, the column index array and the value array; Label the first row to the last row of the historical data matrix as H1 to Hn, and label H1 to Hn as Hi; Where i is an integer from 1 to n; the first column to the last column of the historical data matrix are marked as L1 to Lm, and L1 to Lm are marked as Lj; where j is an integer from 1 to m; the number of non-zero values in each row is marked as G, where G is a positive integer; Search the historical data matrix from the first row from left to right. When each row is searched, search the next row until the entire historical data matrix is searched. When searching, determine 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 according to the order of search; when searching, determine 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 column index array according to the order of search, and put the non-zero value at this time into the value array until the entire historical data matrix is searched; where M is a positive integer; The horizontal index array, column index array and value array after the entire historical data matrix is retrieved are marked as a historical compression matrix.
6. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 5, characterized in that: Obtaining the relationship function between the non-zero number and the total power consumption of historical compression, marked as a compression storage function, includes the following sub-steps: Obtain a range of historical compression storage power consumption of a historical compression matrix, marked as a historical compression power consumption range; Divide the historical compression power consumption range into a2 equal range intervals, marked as compression power consumption division intervals; Count the frequency of each compression power consumption division interval and mark it as compression division power consumption frequency; A histogram is drawn with the historical compressed storage power consumption as the X-axis, the compressed partition power consumption frequency as the Y-axis, and the compressed power consumption partition interval as the histogram interval, and is marked as a compressed power consumption histogram.
7. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 6, characterized in that: Obtaining the relationship function between the non-zero number and the total power consumption of historical compression, and marking it as a compression storage function, also includes the following sub-steps: The second division frequency threshold is calculated as: F2=b2*Ds2 / a2; where F2 is the second division frequency threshold; Marking the compression division power consumption frequency that is less than or equal to the second division frequency threshold as a second abnormal division frequency; Determine whether the compressed power consumption frequencies on the leftmost and rightmost sides of the compressed power consumption histogram are the second abnormal division frequencies. If so, delete the corresponding compressed power consumption frequencies on the leftmost or rightmost sides of the compressed power consumption histogram, and then continue to determine whether the compressed power consumption frequencies on the leftmost and rightmost sides of the deleted compressed power consumption histogram are abnormal path frequencies. Repeat the above operation until they are not, and stop determining. Mark the compressed power consumption histogram after the determination is stopped as a filtered compressed power consumption histogram. The maximum value and the minimum value of the horizontal coordinate of the compression division power consumption frequency in the screening compression power consumption histogram are obtained, and are marked as the third screening threshold and the fourth screening threshold respectively.
8. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 7, characterized in that: Obtaining the relationship function between the non-zero number and the total power consumption of historical compression, and marking it as a compression storage function, also includes the following sub-steps: Obtain an average of historical compressed storage power consumption between the third screening threshold and the third screening threshold, and mark it as screened compressed storage power consumption; Get the filtered compressed storage power consumption of all historical data matrices; Take the non-zero number as the X-axis data, filter the compressed storage power consumption as the Y-axis data, establish a plane rectangular coordinate system, and mark it as the compressed energy consumption coordinate system; The non-zero number of each historical compression matrix and the filtered compressed storage power consumption are used as the horizontal coordinate and the vertical coordinate of the compression energy consumption coordinate point respectively, and all the compression energy consumption coordinate points are plotted 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 the compression storage function; Use deep learning models to optimize the parameters of the compression storage function.
9. The method for optimizing high performance computing memory power consumption based on deep learning according to claim 8, characterized in that: The storage method of the real-time data matrix based on the compression storage function and the normal storage function includes the following steps: The number of non-zero values in the acquired real-time data matrix is marked as the real-time number; Substitute the real-time number into the normal storage function and the compressed storage function to obtain two values, which are marked as the normal predicted power consumption value and the compressed predicted power consumption value respectively; Determine whether the normal predicted power consumption value is greater than or equal to the compressed predicted power consumption value. If so, store the real-time data matrix directly. If not, compress the real-time data matrix according to the historical data matrix to obtain the compression method of the historical compression matrix and then store it.
10. A high-performance computing memory power consumption optimization system based on deep learning, used to implement the high-performance computing memory power consumption optimization method based on deep learning according to any one of claims 1 to 9, characterized in that: It includes 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 that needs to be stored, which is marked as a real-time data matrix; The normal function fitting module is used to obtain a first number of data matrices of the same size as the real-time data matrix, marked as historical data matrices; Store each historical data matrix in the memory for a 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, and mark it as a non-zero number; Obtain the relationship function between the non-zero number and the historical normal storage power consumption, and mark it 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, 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 historical compression total power consumption, obtain the relationship function between the non-zero number and the historical compression total power consumption, and mark it as the compression storage function; The storage module is used to analyze the storage mode 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
Cited By
Basin ecological flow accounting method and system
CN120542748A