Data storage method, device, equipment and storage medium

By identifying and adjusting the potential ratio in the data storage unit, the problem of high power consumption of data storage is solved, and longer equipment working time is achieved.

CN114546262BActive Publication Date: 2025-08-26ZHUHAI MEGAIN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210047896.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2025-08-26
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

The existing data storage units consume a lot of power when erasing and writing data, resulting in a shorter working time of the equipment.

Method used

By analyzing the original ratio of the first potential and the second potential in the data to be stored, identifying and adjusting the power consumption potential, converting the unused power consumption potential to the non-power consumption potential, and adjusting the potential ratio when data is stored.

Benefits of technology

This reduces the write operation of invalid power consumption, reduces the power consumption of data storage, and thus extends the operating time of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546262B_ABST
    Figure CN114546262B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data storage technology, and discloses a data storage method, apparatus, device, and storage medium. This method achieves a change in the data storage potential ratio, thereby reducing data storage power consumption. The method comprises: obtaining data to be stored, analyzing the original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is an effective potential and the second potential is an ineffective potential; identifying the power consumption potential of the data to be stored when writing to the data recording device based on the power consumption rules of the data recording device; adjusting the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain the written data, and storing the written data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage technology, and in particular to a data storage method, device, equipment and storage medium. Background Art

[0002] With the development of electronic science and technology, batteries are used more and more widely. Batteries are mainly used to realize mobile power supply of equipment. As the functions of equipment increase, the consumption of batteries also increases. In order to solve the above problems, the main solution currently adopted is to provide a power consumption mode for the equipment, that is, to power the equipment within the effective time, especially for the storage unit. The storage unit is used to store data. In order to ensure that the data is not lost or is safe, the storage unit is powered most of the time. Its main power-consuming operation is to erase and write data in the storage unit.

[0003] In the prior art, when erasing or writing data in a storage unit, the control is based on the effective potential of the storage unit. For example, when the low potential is effective, the erasing and writing process is based on erasing first and then writing. Erasing is to change all data bits to high potential, and writing is to change the high potential to low potential. Regardless of the proportion of high potential and low potential in the data to be written, the operation is carried out according to the above process. This results in higher power consumption of the storage unit and reduces the working time of the device. Summary of the Invention

[0004] The main purpose of the present invention is to solve the problem that the existing data storage unit consumes a lot of power, resulting in a reduction in the working time of the device.

[0005] A first aspect of the present invention provides a data storage method, which is applied to a data recording device, and is characterized in that the data storage method includes: obtaining data to be stored, and parsing the original ratio of a first potential and a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential; based on the power consumption rules of the data recording device, identifying the power consumption potential of the data to be stored when writing to the data recording device; adjusting the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and storing the write data.

[0006] Optionally, in a first implementation method of the first aspect of the present invention, obtaining the data to be stored includes: obtaining the original data and corresponding storage power consumption data of the data recording device, as well as the data accuracy of the stored data; calculating the offset value based on the storage power consumption data using a preset offset value calculation method; calculating the offset data of the original data based on the offset value using a preset offset data calculation formula; and transcoding the offset data using a preset transcoding algorithm to obtain the data to be stored.

[0007] Optionally, in a second implementation of the first aspect of the present invention, the offset value is calculated based on the stored power consumption data using a preset offset value calculation method, including: drawing a power consumption graph of the data recording device at different offset values ​​based on the stored power consumption data using a preset statistical analysis method; calculating the average power consumption value corresponding to each offset value based on the power consumption graph using a preset exhaustive method; comparing the numerical values ​​of each average power consumption value to obtain the lowest average power consumption value, and determining the offset value corresponding to the lowest average power consumption as the offset value corresponding to the data recording device.

[0008] Optionally, in a third implementation of the first aspect of the present invention, the offset data is transcoded using a preset transcoding algorithm to obtain data to be stored, including: converting the offset data into original storage data of a corresponding format using a preset data format conversion method; and transcoding the original storage data using a preset transcoding algorithm to obtain data to be stored.

[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the offset data calculation formula is:

[0010] ;

[0011] Among them, T f is the offset data, T r is the original data, T a is the data accuracy, F o is the offset value.

[0012] Optionally, in a fifth implementation of the first aspect of the present invention, the power consumption potential of the data to be stored when being written to the data recording device is identified based on the power consumption rules of the data recording device, including: based on the power consumption rules of the data recording device, positionally identifying the second potential in the data to be stored, and obtaining position information corresponding to each second potential; traversing the position information according to the storage method corresponding to the data recording device, and obtaining the head position information and tail position information of the second potential in the data to be stored; and taking the first potential outside the potential corresponding to the previous position potential corresponding to the head position information to the tail position information as the power consumption potential.

[0013] Optionally, in a sixth implementation of the first aspect of the present invention, the ratio of the first potential to the second potential in the original ratio is adjusted based on the power consumption potential to obtain write data, and the write data is stored, including: based on the power consumption potential, converting the first potential corresponding to the power consumption potential into a second potential; adjusting the ratio of the first potential to the second potential in the original ratio according to the result of the second potential conversion, and combining the converted second potential with the unconverted potential according to the potential position information corresponding to the data to be stored to obtain write data; determining the storage space for erased data in the data recording device, and writing the write data into the storage space.

[0014] The second aspect of the present invention provides a data recording device, comprising: a potential analysis module for acquiring data to be stored and analyzing the original ratio of a first potential and a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential; a potential identification module for identifying the power consumption potential of the data to be stored when writing to the data recording device based on the power consumption rules of the data recording device; a potential adjustment module for adjusting the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data and store the write data.

[0015] Optionally, in a first implementation of the second aspect of the present invention, the potential analysis module includes: an acquisition unit, used to acquire the original data and corresponding storage power consumption data of the data recording device, as well as the data accuracy of the stored data; an offset value calculation unit, used to calculate the offset value according to the storage power consumption data using a preset offset value calculation method; a data calculation unit, used to calculate the offset data of the original data according to the offset value using a preset offset data calculation formula; and a transcoding unit, used to transcode the offset data using a preset transcoding algorithm to obtain data to be stored.

[0016] Optionally, in a second implementation of the second aspect of the present invention, the offset value calculation unit includes: based on the stored power consumption data, using a preset statistical analysis method to draw a power consumption graph of the data recording device at different offset values; based on the power consumption graph, using a preset exhaustive method to calculate the average power consumption value corresponding to each offset value; comparing the numerical values ​​of each average power consumption value to obtain the lowest average power consumption value, and determining the offset value corresponding to the lowest average power consumption as the offset value corresponding to the data recording device.

[0017] Optionally, in a third implementation of the second aspect of the present invention, the transcoding unit includes: converting the offset data into original storage data of a corresponding format using a preset data format conversion method; and transcoding the original storage data using a preset transcoding algorithm to obtain data to be stored.

[0018] Optionally, in a fourth implementation of the second aspect of the present invention, the offset value calculation unit further includes: the offset data calculation formula is:

[0019] ;

[0020] Among them, T f is the offset data, T r is the original data, T a is the data accuracy, F o is the offset value.

[0021] Optionally, in a fifth implementation of the second aspect of the present invention, the potential identification module includes: a position identification unit, used to perform position identification on the second potential in the data to be stored based on the power consumption rules of the data recording device, and obtain position information corresponding to each second potential; a traversal unit, used to traverse the position information according to the storage method corresponding to the data recording device, and obtain the starting position information and tail position information of the second potential in the data to be stored; and a determination unit, used to take the first potential other than the previous position potential corresponding to the starting position information to the potential corresponding to the tail position information as the power consumption potential.

[0022] Optionally, in a sixth implementation of the second aspect of the present invention, the potential adjustment module includes: a conversion unit for converting the first potential corresponding to the power consumption potential into a second potential based on the power consumption potential; an adjustment unit for adjusting the ratio of the first potential to the second potential in the original ratio according to a result of the second potential conversion, and combining the converted second potential with the unconverted potential according to the potential position information corresponding to the data to be stored to obtain write data; a storage unit for determining a storage space for erased data in the data recording device, and writing the write data into the storage space.

[0023] The third aspect of the present invention provides a data storage device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the data storage device executes each step of the above-mentioned data storage method.

[0024] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the various steps of the above-mentioned data storage method.

[0025] In the technical solution provided by the present invention, the data to be stored is obtained, and the original ratio of the first potential and the second potential in the data to be stored is analyzed, wherein the first potential is a valid potential and the second potential is an invalid potential; based on the power consumption rules of the data recording device, the power consumption potential of the data to be stored when writing to the data recording device is identified; based on the power consumption potential, the ratio of the first potential to the second potential in the original ratio is adjusted to obtain the written data, and the written data is stored. Compared with the existing technology, the present application performs potential analysis on the data to be stored, does not obtain the unused power consumption potential therein, and then converts the unused power consumption potential into a non-power consumption potential to adjust the ratio of the first potential to the second potential in the data to be stored, obtains the written data, and stores it. This reduces the writing operations on the invalid power consumption potential in the data storage, reduces the power consumption required for data storage, and thus improves the working time of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a schematic diagram of a first embodiment of a data storage method according to an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of a second embodiment of a data storage method according to an embodiment of the present invention;

[0028] Figure 3 This is a temperature data storage format diagram corresponding to the temperature recording device in an embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram of a third embodiment of a data storage method according to an embodiment of the present invention;

[0030] Figure 5 This is a schematic diagram of a fourth embodiment of a data storage method according to an embodiment of the present invention;

[0031] Figure 6 This is a schematic diagram of a fifth embodiment of a data storage method according to an embodiment of the present invention;

[0032] Figure 7 Schematic diagram of the data conversion process of the temperature recording device in an embodiment of the present invention;

[0033] Figure 8 A schematic diagram of a data recording device according to an embodiment of the present invention;

[0034] Figure 9 A schematic diagram of another embodiment of a data recording device according to an embodiment of the present invention;

[0035] Figure 10 FIG. 1 is a schematic diagram of an embodiment of a data storage device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] Embodiments of the present invention provide a data storage method, apparatus, device, and storage medium that achieve a change in the data storage potential ratio and reduce power consumption for data storage. The method includes: obtaining data to be stored and analyzing the original ratio of a first potential to a second potential in the data to be stored, where the first potential is a valid potential and the second potential is an invalid potential; identifying the power consumption potential of the data to be stored when writing to the data recording device based on the power consumption rules of the data recording device; adjusting the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain the written data, and storing the written data.

[0037] The terms "first," "second," "third," "fourth," and so on (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that shown or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.

[0038] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the data storage method in the embodiment of the present invention includes:

[0039] 101. Acquire data to be stored, and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential;

[0040] It is understandable that the execution subject of the present invention may be a data recording device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0041] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0042] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0043] In this embodiment, the data to be stored herein refers to a data format determined by the properties of the memory in the data recording device. For example, the storage format of current memories is commonly represented by binary (0 bits and 1 bits), and the corresponding data to be stored is represented by binary (0 bits and 1 bits). The first potential herein refers to the potential state required for data storage and writing. Here, the memory's erased state is represented by the binary number 1, so the binary number corresponding to the first potential is 0. The second potential herein refers to the original potential state of the memory during data storage and writing. Here, the memory's erased state is represented by the binary number 1, so the binary number corresponding to the second potential is 1. The original ratio herein refers to the ratio between the number of first potentials and the number of second potentials in the data to be stored. By performing an offset calculation on the original data to be stored, corresponding offset data for different original data can be obtained. The original data obtained by the offset calculation can achieve a corresponding low-energy writing method for different data. The obtained data to be stored is then analyzed for the corresponding potential number ratio, which can be used to perform an initial analysis of the original data to be stored and obtain the corresponding potential ratio of the current data.

[0044] In actual applications, a data recording device is used to obtain original data and the corresponding storage power consumption data previously recorded by the device, as well as the data accuracy of the stored data, and then, based on the storage power consumption data, a preset offset value calculation method is used to calculate the offset value corresponding to the data recording device; based on the calculated offset value, the offset data corresponding to the original data is calculated using a preset offset data calculation formula, and the above-mentioned offset data is transcoded with a preset offset code using a preset transcoding algorithm to obtain the data to be stored in the required encoding format; and then the obtained data to be stored is parsed, and the corresponding quantities of the first potential and the second potential therein are parsed, and then the original proportional relationship between the two is determined based on the corresponding quantities, wherein the above-mentioned first potential is a valid potential, and the above-mentioned second potential is an invalid potential. This application uses the binary number 0 to represent the first potential for example, and this application uses the binary number 1 to represent the second potential for example.

[0045] 102. Based on the power consumption rule of the data recording device, identifying the power consumption potential of the data to be stored when writing into the data recording device;

[0046] In this embodiment, the power consumption rule here refers to the corresponding potential change when data is stored in the data recording device, which requires power consumption. If the original potential does not change, no power consumption is required. The power consumption rule here in this application is represented by a potential that consumes power as 0, and a potential that does not require power consumption as 1; by identifying the power consumption potential in the data to be stored based on the power consumption rule of the data recording device currently analyzed, it is beneficial to change the power consumption potential that is not related to the actual data recording according to the identification result, to know the power consumption potential part, and then to realize the corresponding potential change, thereby achieving the change in the ratio of the first potential to the second potential, and realizing a better power saving method.

[0047] In practical applications, based on the power consumption rules of the data recording device to be analyzed, the power consumption rules here are that power consumption is required to convert the second potential into the first potential, that is, power consumption is required when storing the binary number 0, and no power consumption is required when writing with the original second potential, that is, power consumption is required when storing the binary number 1; the traversal function is used to identify the position of the second potential in the data to be stored, and the position information corresponding to each second potential is obtained; according to the storage method corresponding to the data recording device, the position information corresponding to each second potential is traversed to obtain the head position information and tail position information of the second potential in the data to be stored; and then the previous position potential corresponding to the head position information to the tail position information and the first potential corresponding to the position information outside the position area are used as the power consumption potential.

[0048] 103. Adjust the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and store the write data.

[0049] In this embodiment, the power consumption potential is used to adjust the ratio of the first potential to the second potential in the original ratio, thereby reducing the proportion of the first potential that consumes power during the corresponding writing and storage, and changing the ratio of the first potential to the second potential in the data to be stored, thereby reducing the power consumption required for writing the data to be stored into the data recording device, thereby achieving the writing power consumption of the corresponding data, optimizing the data storage method, and achieving a longer device usage time.

[0050] In practical applications, based on the processed power consumption potential information, all corresponding first potentials in the power consumption potential are converted into second potentials; then, according to the result of the above-mentioned second potential conversion, the ratio of the first potential to the second potential in the original ratio corresponding to the data to be stored is adjusted, and the converted second potential and the unconverted potential are combined according to the potential position information corresponding to the above-mentioned data to be stored to obtain the same written data as the original corresponding position; then, the storage space of the erased data in the data recording device is determined, and the converted data to be stored is written into the storage space, thereby realizing low-power storage of different data and extending the service life of the data recording device.

[0051] In an embodiment of the present invention, data to be stored is obtained based on the power consumption potential, and the original ratio of the first potential and the second potential in the data to be stored is analyzed, where the first potential is a valid potential and the second potential is an invalid potential; based on the power consumption rules of the data recording device, the power consumption potential of the data to be stored when writing to the data recording device is identified; based on the power consumption potential, the ratio of the first potential to the second potential in the original ratio is adjusted to obtain the write data, and the write data is stored. Compared to the prior art, the present application performs a potential analysis on the data to be stored, does not obtain the unused power consumption potential therein, and then converts the unused power consumption potential into a non-power consumption potential to adjust the ratio of the first potential to the second potential in the data to be stored, obtains the write data, and stores it. This reduces the write operation of the invalid power consumption potential in the data storage, reduces the power consumption required for data storage, and thus improves the working time of the device.

[0052] See also Figure 2 A second embodiment of the data storage method in the embodiment of the present invention includes:

[0053] 201. Obtaining original data and corresponding storage power consumption data from a data recording device, as well as data accuracy of the stored data;

[0054] In this embodiment, the data recording device here is explained by taking a battery-powered temperature recording device as an example; the original data here refers to the original collected data to be recorded by the data recording device, that is, the ambient temperature data collected by the temperature recording device as the original processed data; the storage power consumption data here refers to the corresponding data and corresponding power consumption data recorded by the temperature recording device during previous normal operation. The memory characteristics of the temperature recording device are that the memory needs to be erased in its entirety, has low power consumption, and consumes no power at most. The memory is used as an example to illustrate; the data accuracy here refers to the minimum difference between the measured value and the true value, that is, the minimum difference between the temperature data collected by the temperature recording device and the actual temperature data that cannot exceed; by obtaining the corresponding original data, it is beneficial to conduct an overall analysis of the data recording device and obtain a more appropriate offset value.

[0055] In practical applications, the original data to be stored in this acquisition of the temperature recording device is obtained, and the storage power consumption corresponding to the historical storage of different temperature data and the data accuracy corresponding to the data stored by the temperature recording device are obtained.

[0056] 202. Calculate an offset value using a preset offset value calculation method according to the stored power consumption data;

[0057] In this embodiment, the offset value calculation method here refers to using data statistical analysis to draw a statistical graph to analyze the power consumption corresponding to each temperature data record under different offset values, and then using the exhaustive method to analyze to obtain the average energy consumption of different offset values, so as to compare and obtain the corresponding offset value with the minimum average energy consumption; by processing to obtain the optimal offset value, it is possible to achieve the lowest consumption of power consumption corresponding to different data, and to achieve the corresponding processing power consumption for the storage and writing of different data, thereby achieving a longer operating time of the device.

[0058] In actual application, based on the above-obtained storage power consumption data, a statistical analysis is performed using the statistical analysis method in the preset offset value calculation method to obtain a write power consumption distribution diagram corresponding to the temperature data under different offset values. Then, based on the write power consumption distribution diagram, an exhaustive analysis is performed using the offset value calculation method to obtain the corresponding offset value with the lowest average power consumption. For example, the remaining bits F in the temperature data storage format of the temperature recording device that are not needed to store data are used. b =0x7c00 as an example: when the offset value F o =0, at 0℃, the number of 0 bits written to the non-volatile memory reaches the highest: 11. At this time, the power consumption of data writing also reaches the highest. The average power consumption of 0 bit writing is 6. When the temperature data is less than 0℃, the average power consumption is 5. When the offset value F o =-100, at 10℃, the number of 0 bits written to the non-volatile memory reaches the highest: 11. At this time, the power consumption of data writing also reaches the highest. The average power consumption of 0 bit writing is 6. When the temperature data is less than 0℃, the average power consumption is 5. When the offset value F o =-200, at 20℃, the number of 0 bits written to the non-volatile memory reaches the highest: 11. At this time, the power consumption of data writing also reaches the highest. The average power consumption of 0 bit writing is 5. When the temperature data is less than 0℃, the average power consumption is 5. When the offset value F o =-55. At 55°C, the number of 0 bits written to the non-volatile memory reaches the highest: 11. At this time, the data writing power consumption also reaches the highest. The average power consumption of 0-bit writing is 5. When the temperature data is less than 0°C, the average power consumption is 4. Compared with the 0-bit writing of the existing scheme, the writing power consumption of the device at low temperature is relatively good. The expected number of 0 bits will be lower than the average of 6 in the whole range, which is much lower than the average number of 0 bits of 9 in the existing method. The optimal offset value of the temperature recording device is -55.

[0059] 203. Calculate the offset data of the original data using a preset offset data calculation formula according to the offset value;

[0060] In this embodiment, the offset data calculation formula here refers to:

[0061] ;

[0062] Among them, T f is the offset data, T r is the original data, T a is the data accuracy, F o is the offset value.

[0063] In practical applications, according to the offset value obtained through processing, the offset value, data accuracy and original data are substituted into the preset offset data calculation formula to perform offset data calculation to obtain the offset data corresponding to the original data. For example, the original data of the temperature recording device here is 45.5, the offset value is -55, and the data accuracy is 0.1. Then, through calculation, the offset data can be obtained as 400.

[0064] 204. Transcode the offset data using a preset transcoding algorithm to obtain data to be stored;

[0065] In this embodiment, the transcoding process is to convert the offset data of the corresponding base into data in the corresponding storage base format. For example, the decimal corresponding to the offset data of the temperature recording device is converted into the binary format corresponding to the data to be stored, thereby realizing transcoding of different original data, so that the data can be uniformly stored in the data recording device. The temperature data storage format corresponding to the temperature recording device here refers to Figure 3 There are 16 potentials in total, two major areas: high 8 bits and low 8 bits. The valid data range is x11111xxxxxxxxxx (where 1 means not used), where the first x is the sign bit, 0 is positive and 1 is negative. It can be concluded that the storage data corresponding to -40.0℃ (0xFD90) is 1111110110010000, and the storage data corresponding to 40.0℃ (0x7D90) is 0111110110010000.

[0066] In practical applications, the offset data obtained by processing is transcoded using a preset transcoding algorithm to obtain the data to be stored. For example, if the offset data obtained by the above processing is 400, the decimal value corresponding to 400 is first converted to the corresponding hexadecimal value to obtain 0xD90. The hexadecimal value 0xD90 is then converted to its corresponding binary value to obtain 011111011001000. The original ratio of the first potential and the second potential in the data to be stored is then analyzed, where the first potential is the valid potential and the second potential is the invalid potential.

[0067] 205. Based on the power consumption rule of the data recording device, identifying the power consumption potential of the data to be stored when writing into the data recording device;

[0068] 206 . Adjust the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and store the write data.

[0069] In an embodiment of the present invention, the original data and corresponding storage power consumption data of the data recording device, as well as the data accuracy of the stored data, are obtained; based on the storage power consumption data, an offset value is calculated using a preset offset value calculation method; based on the offset value, the offset data of the original data is calculated using a preset offset data calculation formula; and the offset data is transcoded using a preset transcoding algorithm to obtain the data to be stored. Compared to the prior art, the present application analyzes the storage power consumption data to obtain an offset value, and then uses the offset value to calculate the offset data corresponding to the original data, and transcodes the compiled data to obtain the required data to be stored, thereby achieving unified processing of different data. The offset value can also achieve write processing under different data, and the corresponding write power consumption is lower, and can adapt to the potential ratio of different data, thereby achieving the optimal energy consumption for each corresponding data and achieving the purpose of longer device operation time.

[0070] See also Figure 4 A third embodiment of the data storage method in the embodiment of the present invention includes:

[0071] 301. Obtaining original data and corresponding storage power consumption data from a data recording device, as well as data accuracy of the stored data;

[0072] 302. Draw a power consumption graph of the data recording device at different offset values ​​using a preset statistical analysis method based on the stored power consumption data;

[0073] In this embodiment, the statistical analysis method refers to performing a statistical analysis of the write power consumption corresponding to each data item to obtain a power consumption distribution graph corresponding to each data item. The power consumption graph here refers to a graph of the power consumption associated with writing the corresponding data item. By analyzing and plotting the power consumption graphs corresponding to each offset value, the polarity of each power consumption graph can be calculated to obtain the offset value with the lowest write power consumption, thereby ensuring that each offset data item has a lower write power consumption.

[0074] In practical applications, based on the above storage power consumption data, a preset statistical analysis method is used to analyze and draw a power consumption diagram of each data under different offset values ​​of the data recording device.

[0075] 303. Calculate the average power consumption corresponding to each offset value using a preset exhaustive method according to the power consumption graph;

[0076] In this embodiment, the exhaustive method, ie, the enumeration method, refers to analyzing the write power consumption corresponding to each data in the power consumption graph and calculating the average power consumption of the power consumption graph corresponding to each offset value.

[0077] In practical applications, based on the power consumption graph, a preset exhaustive method is used to analyze the power consumption corresponding to each data in the power consumption graph, and the average power consumption value of the power consumption values ​​corresponding to each offset value is calculated.

[0078] 304. Compare the average power consumption values ​​to obtain the lowest average power consumption value, and determine the offset value corresponding to the lowest average power consumption as the offset value corresponding to the data recording device;

[0079] In this embodiment, based on the average power consumption corresponding to each offset value obtained, the average power consumption values ​​are compared to obtain the lowest average power consumption. The offset value corresponding to the lowest average power consumption obtained from the comparison is then determined as the offset value corresponding to the data recording device. By statistically analyzing the power consumption graphs for data with different offset values ​​and comparing the average power consumption values, the offset value corresponding to the lowest power consumption for writing each data item can be determined.

[0080] 305. Calculate the offset data of the original data using a preset offset data calculation formula according to the offset value;

[0081] 306. Convert the offset data into original storage data of a corresponding format using a preset data format conversion method;

[0082] In this embodiment, the data format conversion method herein refers to a method for converting the original offset data into a data format that can be processed by the data processing device, for example, converting the decimal number 400 corresponding to the offset data into a hexadecimal number. By converting the data format, data in different formats can be uniformly processed, facilitating consistency in subsequent data processing.

[0083] In actual application, the offset data is obtained according to the above processing, and the preset data format conversion method is used to convert the offset data into the original storage data of the corresponding format. The offset data 400 obtained by the above processing is converted into the corresponding hexadecimal number to obtain the original storage data 0x190.

[0084] 307. Using a preset transcoding algorithm to transcode the original stored data to obtain data to be stored;

[0085] In this embodiment, transcoding here refers to converting the data in the corresponding processing format into data in the corresponding storage format. By performing the transcoding operation on the data, the data to be stored can be obtained, thereby realizing the writing operation of the data.

[0086] In practical applications, a preset transcoding algorithm is used to transcode the original stored data to obtain the data to be stored. For example, the original stored data 0x190 is converted from hexadecimal to binary to obtain the data to be stored 0000000110010000. The original ratio of the first potential to the second potential in the data to be stored is then analyzed, where the first potential is the effective potential and the second potential is the invalid potential.

[0087] 308. Based on the power consumption rule of the data recording device, identifying the power consumption potential of the data to be stored when writing into the data recording device;

[0088] 309 . Adjust the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and store the write data.

[0089] In an embodiment of the present invention, based on the storage power consumption data, a preset statistical analysis method is used to draw a power consumption diagram of the data recording device at different offset values; based on the power consumption diagram, a preset exhaustive method is used to calculate the average power consumption value corresponding to each offset value; the numerical values ​​of each average power consumption value are compared to obtain the lowest average power consumption value, and the offset value corresponding to the lowest average power consumption is determined as the offset value corresponding to the data recording device; based on the offset data, a preset data format conversion method is used to convert the original storage data into the corresponding format; a preset transcoding algorithm is used to transcode the original storage data to obtain the data to be stored. Compared with the prior art, the present application obtains the offset value by analyzing and introducing calculation to obtain the data to be stored. The offset value can achieve the optimal average power consumption value for the storage power consumption corresponding to each data, so that the power consumption of the data to be written is lower than that of the data to be written by the prior art, and the use time of the delay device is extended.

[0090] See also Figure 5 A fourth embodiment of the data storage method according to the present invention includes:

[0091] 401. Acquire data to be stored, and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential;

[0092] 402. Based on the power consumption rule of the data recording device, position identification is performed on the second potentials in the data to be stored to obtain position information corresponding to each second potential;

[0093] In this embodiment, the position information here refers to the position of the potential in the data to be stored.

[0094] In practical applications, based on the power consumption rules of the data recording device, the second potential in the data to be stored is identified, and the position information corresponding to each second potential is obtained. For example, the data to be stored 0000000110010000 obtained by the above processing is traversed and identified, and the position of the second potential (1) therein is obtained.

[0095] 403. According to the storage mode corresponding to the data recording device, traverse the position information to obtain the starting position information and the ending position information of the second potential in the data to be stored;

[0096] In this embodiment, according to the storage mode corresponding to the data recording device (e.g., the data storage bit number of the data recording device is 16 binary codes), except for the potential information of the symbol potential such as the first bit for symbol identification, the remaining potentials are processed by the traversal function to perform traversal identification processing on the position information corresponding to each second potential (1), thereby obtaining the head position information and tail position information of the second potential in the data to be stored. For example, when the data to be stored 0000000110010000 is traversed, the head position information of the second potential in the data to be stored is the eighth bit and the tail position information is the twelfth bit.

[0097] 404. Using a first potential between a previous position potential corresponding to the head end position information and a potential corresponding to the tail end position information as a power consumption potential;

[0098] In this embodiment, according to the storage method corresponding to the data recording device, in addition to the sign potential, the first potential corresponding to the position information other than the starting position information and the ending position information of the second potential in the data to be stored obtained according to the above processing is used as the power consumption potential. For example, in addition to the sign potential, the first potential (0) corresponding to all position information other than the starting position information (the seventh bit) corresponding to the starting position information of the second potential in the data to be stored 0000000110010000 is used as the power consumption potential.

[0099] 405 . Adjust the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and store the write data.

[0100] In an embodiment of the present invention, based on the power consumption rules of a data recording device, the position of the second potential in the data to be stored is identified to obtain position information corresponding to each second potential; according to the storage method corresponding to the data recording device, the position information is traversed to obtain the starting position information and the ending position information of the second potential in the data to be stored; and the first potential between the previous position potential corresponding to the starting position information and the potential corresponding to the ending position information is used as the power consumption potential. Compared to the prior art, the present application identifies and processes the position information of the second potential in the data to be stored to obtain the "idle" power consumption potential in the data to be stored. Furthermore, by changing the power consumption potential to a non-power consumption potential, the potential ratio of the data to be stored is changed, thereby reducing the power consumption required for data storage and extending the service life of the device.

[0101] See also Figure 6 A fifth embodiment of the data storage method according to the present invention includes:

[0102] 501. Acquire data to be stored, and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential;

[0103] 502. Based on the power consumption rule of the data recording device, identifying the power consumption potential of the data to be stored when writing into the data recording device;

[0104] 503. Convert a first potential corresponding to the power consumption potential into a second potential;

[0105] In this embodiment, the process of temperature recording device data conversion is as follows: Figure 7 , from the data to be stored 0000000110010000 (0x190) corresponding to the original data, the potential of the data storage format that is not used to record data is set high to obtain 0111110110010000 (0xFD90), and the "idle" data in the actual storage data bit of 0xFD90 is converted into the potential to obtain the write data 0111110110011111 (0x7D90), thereby realizing the conversion processing of the data to be stored.

[0106] In practical applications, based on the power consumption potential of the identified data recording device, the first potential corresponding to the power consumption potential is converted to a second potential. For example, based on the storage method corresponding to the data recording device, in addition to the sign potential, the first potential corresponding to the power consumption potential in the data to be stored 0000000110010000 is converted (0) to a second potential (1), resulting in 011111 (011001 (potential non-conversion area)) 1111 (0x7D90).

[0107] 504. Adjust the ratio of the first potential to the second potential in the original ratio according to the result of the second potential conversion, and combine the converted second potential with the unconverted potential according to the potential position information corresponding to the offset transcoded data to obtain write data.

[0108] In this embodiment, the ratio of the first potential to the second potential in the original ratio is adjusted according to the result of the second potential conversion. For example, the ratio of the first potential to the second potential of the original data to be stored 0000000110010000 is 13:3, and the ratio of the first potential to the second potential of the result of the second potential conversion 011111 (011001 (potential non-conversion area)) 1111 (0x7D90) is adjusted to 4:12. The converted second potential and the unconverted potential are then combined according to the potential position information corresponding to the offset transcoded data to obtain the final write data to be stored 0111110110011111.

[0109] By converting the "idle" power consumption potential into a second potential, the potential ratio of the data to be written is changed, and the ratio of the desired good point potential is reduced. In addition, since the data to be stored is obtained by processing using the offset value, the average writing power consumption corresponding to different data can be minimized, and the storage writing power consumption of different data can be adapted to achieve the purpose of extending the use time of the device.

[0110] 505. Determine a storage space in the data recording device where data has been erased, and write the write data into the storage space.

[0111] In this embodiment, when storing data, the data recording device erases the data used for data storage, and then determines the storage space of the erased data in the data recording device and writes the write data into the storage space, thereby achieving low-power data storage.

[0112] In an embodiment of the present invention, a first potential corresponding to a power consumption potential is converted to a second potential; based on the result of the second potential conversion, the ratio of the first potential to the second potential in the original ratio is adjusted, and the converted second potential is combined with the unconverted potential according to the potential position information corresponding to the offset transcoded data to obtain write data; a storage space for erased data in a data recording device is determined, and the write data is written into the storage space. Compared to the prior art, the present application converts the "idle" power consumption potential in the data to be stored into a non-power consumption potential, thereby changing the potential ratio of the write data and reducing the proportion of the power consumption potential, thereby achieving lower power consumption for writing data and extending the device's service life.

[0113] The data storage method according to the embodiment of the present invention is described above. The data recording device according to the embodiment of the present invention is described below. Figure 8In one embodiment of the present invention, a data recording device includes:

[0114] A potential analysis module 601 is used to obtain data to be stored and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential;

[0115] A potential identification module 602 is configured to identify the power consumption potential of the data to be stored when writing the data recording device based on the power consumption rule of the data recording device;

[0116] The potential adjustment module 603 is configured to adjust the ratio of the first potential to the second potential in the original ratio based on the power consumption potential, obtain write data, and store the write data.

[0117] In an embodiment of the present invention, data to be stored is obtained, and the original ratio of the first potential and the second potential in the data to be stored is analyzed, wherein the first potential is a valid potential and the second potential is an invalid potential; based on the power consumption rules of the data recording device, the power consumption potential of the data to be stored when writing to the data recording device is identified; based on the power consumption potential, the ratio of the first potential to the second potential in the original ratio is adjusted to obtain the written data, and the written data is stored. Compared to the prior art, the present application performs potential analysis on the data to be stored, does not obtain the unused power consumption potential therein, and then converts the unused power consumption potential into a non-power consumption potential to adjust the ratio of the first potential to the second potential in the data to be stored, obtains the written data, and stores it. This reduces the writing operations on invalid power consumption potentials in data storage, reduces the power consumption required for data storage, and thus increases the working time of the device.

[0118] See also Figure 9 Another embodiment of the data recording device in the embodiment of the present invention includes:

[0119] A potential analysis module 601 is used to obtain data to be stored and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential;

[0120] A potential identification module 602 is configured to identify the power consumption potential of the data to be stored when writing the data recording device based on the power consumption rule of the data recording device;

[0121] The potential adjustment module 603 is configured to adjust the ratio of the first potential to the second potential in the original ratio based on the power consumption potential, obtain write data, and store the write data.

[0122] Furthermore, the potential analysis module 601 includes:

[0123] An acquisition unit 6011 is configured to acquire the original data and corresponding storage power consumption data of the data recording device, as well as the data accuracy of the stored data;

[0124] an offset value calculation unit 6012, configured to calculate an offset value according to the stored power consumption data using a preset offset value calculation method;

[0125] The data calculation unit 6013 is configured to calculate the offset data of the original data according to the offset value using a preset offset data calculation formula;

[0126] The transcoding unit 6014 is configured to perform transcoding processing on the offset data using a preset transcoding algorithm to obtain data to be stored.

[0127] Furthermore, the offset value calculation unit 6012 includes:

[0128] Based on the stored power consumption data, a preset statistical analysis method is used to draw a power consumption diagram of the data recording device under different offset values; based on the power consumption diagram, the preset exhaustive method is used to calculate the average power consumption value corresponding to each offset value; the numerical values ​​of each average power consumption value are compared to obtain the lowest average power consumption value, and the offset value corresponding to the lowest average power consumption is determined as the offset value corresponding to the data recording device.

[0129] Furthermore, the transcoding unit 6014 includes:

[0130] According to the offset data, a preset data format conversion method is used to convert the data into original storage data of a corresponding format; and a preset transcoding algorithm is used to transcode the original storage data to obtain data to be stored.

[0131] Furthermore, the offset value calculation unit 6012 further includes:

[0132] The calculation formula for the offset data is:

[0133] ;

[0134] Among them, T f is the offset data, T r is the original data, T a is the data accuracy, F o is the offset value.

[0135] Furthermore, the potential identification module 602 includes:

[0136] A position identification unit 6021 is configured to identify positions of the second potentials in the data to be stored based on the power consumption rule of the data recording device, and obtain position information corresponding to each second potential;

[0137] a traversal unit 6022 configured to traverse the position information according to a storage mode corresponding to the data recording device, and obtain the starting position information and the ending position information of the second potential in the data to be stored;

[0138] The determining unit 6023 is configured to use a first potential other than a previous position potential corresponding to the head end position information and a potential corresponding to the tail end position information as a power consumption potential.

[0139] Furthermore, the potential adjustment module 603 includes:

[0140] a conversion unit 6031, configured to convert a first potential corresponding to the power consumption potential into a second potential based on the power consumption potential;

[0141] an adjusting unit 6032, configured to adjust the ratio of the first potential to the second potential in the original ratio according to a result of the second potential conversion, and combine the converted second potential with the unconverted potential according to the potential position information corresponding to the data to be stored, to obtain write data;

[0142] The storage unit 6033 is used to determine the storage space of the erased data in the data recording device and write the write data into the storage space.

[0143] In an embodiment of the present invention, an offset value analysis is performed on the historical power consumption data stored in a data recording device to obtain the optimal offset value for the data recording device, and the offset value is used to calculate the data to be stored. A potential analysis is performed on the data to be stored, and the "idle" power consumption potential is converted to a non-power consumption potential, thereby changing the potential ratio of the data to be stored and reducing the proportion of the power consumption potential therein. The adjusted data to be stored is then written into the data recording device. Compared to the prior art, the present application can achieve optimal write power consumption for different data to be stored through corresponding offset values. By changing the potential ratio of the data to be stored, the proportion of the power consumption potential in the data to be stored is reduced, reducing the power consumption required for data writing, thereby extending the device's service life.

[0144] above Figure 8 and Figure 9 The data recording apparatus in the embodiment of the present invention is described in detail from the perspective of modular functional entities, and the data storage device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0145] Figure 10This is a schematic diagram of the structure of a data storage device provided by an embodiment of the present invention. The data storage device 800 may vary significantly due to different configurations or performance, and may include one or more processors (central processing units, CPUs) 810 (e.g., one or more processors), a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) storing application programs 833 or data 832. The memory 820 and storage medium 830 may be either transient or persistent storage. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations on the data storage device 800. Furthermore, the processor 810 may be configured to communicate with the storage medium 830 to execute the series of instruction operations in the storage medium 830 on the data storage device 800.

[0146] The data storage device 800 may further include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input and output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 10 The illustrated data storage device structure does not constitute a limitation on the data storage device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0147] The present invention further provides a data storage device, comprising a computer device including a memory and a processor, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor performs the steps of the data storage method described in the above embodiments. The present invention further provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer performs the steps of the data storage method.

[0148] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0150] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0151] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data storage method, applied to a data recording device, characterized in that: The data storage method includes: Acquire data to be stored, and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential; identifying a power consumption potential of the data to be stored when writing the data recording device based on a power consumption rule of the data recording device; adjusting the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and storing the write data; The obtaining of the data to be stored includes: Obtaining the raw data and corresponding storage power consumption data of the data recording device, as well as the data accuracy of the stored data; wherein the data accuracy refers to the minimum difference between the measured value and the true value; Calculating an offset value using a preset offset value calculation method according to the stored power consumption data; Calculating the offset data of the original data using a preset offset data calculation formula according to the offset value; The offset data is transcoded using a preset transcoding algorithm to obtain data to be stored.

2. The data storage method according to claim 1, wherein: Calculating the offset value using a preset offset value calculation method according to the stored power consumption data includes: Drawing a power consumption graph of the data recording device at different offset values ​​using a preset statistical analysis method according to the stored power consumption data; According to the power consumption graph, using a preset exhaustive method, calculate the average power consumption value corresponding to each offset value; The average power consumption values ​​are compared to obtain a minimum average power consumption value, and the offset value corresponding to the minimum average power consumption is determined as the offset value corresponding to the data recording device.

3. The data storage method according to claim 1, wherein: The using a preset transcoding algorithm to transcode the offset data to obtain data to be stored includes: According to the offset data, converting into original storage data of corresponding format using a preset data format conversion method; The original stored data is transcoded using a preset transcoding algorithm to obtain data to be stored.

4. The data storage method according to claim 1, wherein: The calculation formula for the offset data is: ; Among them, T f is the offset data, T r is the original data, T a is the data accuracy, F o is the offset value.

5. The data storage method according to claim 1, wherein: The step of identifying the power consumption potential of the data to be stored when writing the data recording device based on the power consumption rule of the data recording device includes: Based on the power consumption rule of the data recording device, position identification is performed on the second potentials in the data to be stored to obtain position information corresponding to each second potential; According to the storage mode corresponding to the data recording device, traverse the position information to obtain the starting position information and the tail position information of the second potential in the data to be stored; The first potential outside the previous position potential corresponding to the head end position information and the potential corresponding to the tail end position information is used as the power consumption potential.

6. The data storage method according to claim 1, wherein: The adjusting the ratio of the first potential to the second potential in the original ratio based on the power consumption potential to obtain write data, and storing the write data includes: Based on the power consumption potential, converting a first potential corresponding to the power consumption potential into a second potential; adjusting the ratio of the first potential to the second potential in the original ratio according to a result of the second potential conversion, and combining the converted second potential with the unconverted potential according to the potential position information corresponding to the data to be stored to obtain write data; A storage space of erased data in the data recording device is determined, and the write data is written into the storage space.

7. A data recording device, characterized in that: The data recording device comprises: a potential analysis module, configured to obtain data to be stored and analyze an original ratio of a first potential to a second potential in the data to be stored, wherein the first potential is a valid potential and the second potential is an invalid potential; a potential identification module, configured to identify a power consumption potential of the data to be stored when writing the data recording device based on a power consumption rule of the data recording device; a potential adjustment module, configured to adjust a ratio of the first potential to the second potential in the original ratio based on the power consumption potential, obtain write data, and store the write data; The potential analysis module is further used to: obtain the original data and corresponding storage power consumption data of the data recording device, as well as the data accuracy of the stored data; wherein the data accuracy refers to the minimum difference between the measured value and the true value; calculate the offset value based on the storage power consumption data using a preset offset value calculation method; calculate the offset data of the original data based on the offset value using a preset offset data calculation formula; transcode the offset data using a preset transcoding algorithm to obtain the data to be stored; and analyze the original ratio of the first potential to the second potential in the data to be stored.

8. A data storage device, characterized in that The data storage device includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the data storage device to execute the steps of the data storage method according to any one of claims 1 to 6.

9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the data storage method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method for reducing power consumption of memory in integrated circuit

    CN1811978A