CN109992210B - Data storage method and device and electronic equipment - Google Patents

Data storage method and device and electronic equipment Download PDF

Info

Publication number
CN109992210B
CN109992210B CN201910256422.8A CN201910256422A CN109992210B CN 109992210 B CN109992210 B CN 109992210B CN 201910256422 A CN201910256422 A CN 201910256422A CN 109992210 B CN109992210 B CN 109992210B
Authority
CN
China
Prior art keywords
state
sample data
historical
sub
estimated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910256422.8A
Other languages
Chinese (zh)
Other versions
CN109992210A (en
Inventor
程智睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN201910256422.8A priority Critical patent/CN109992210B/en
Publication of CN109992210A publication Critical patent/CN109992210A/en
Application granted granted Critical
Publication of CN109992210B publication Critical patent/CN109992210B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0685Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays

Abstract

The embodiment of the application provides a data storage method, a data storage device and electronic equipment, wherein the method comprises the following steps: determining the pre-estimated heat degree state of the sample data according to the historical heat degree state of the sample data in the historical time period; and storing the sample data in a storage block corresponding to the estimated heat degree state. The method comprises the steps of predicting the estimated heat state of sample data in a future time period in advance, storing the sample data in a storage block corresponding to the estimated heat state in advance, and storing the sample data with the larger estimated heat state in the storage block with the higher reading and writing speed in advance, so that the feedback speed of the storage system to access the sample data can be improved, the performance of the storage system is improved, the technical problem that the performance of the storage system is poor due to certain hysteresis of a storage strategy based on hybrid storage at present is solved, and the technical effect of improving the performance of the storage system is achieved.

Description

Data storage method and device and electronic equipment
Technical Field
The application relates to the field of electronic information processing, in particular to a data storage method and device and electronic equipment.
Background
With the continuous development of computers and big data technologies, tens of thousands of terminals and sensors are continuously generating a large amount of data, and according to the report provided by International Data Consulting (IDC) companies, the global data volume is rapidly developing at a growth rate of 50% every year, and it is expected that 35ZB data volume will be owned globally by 2020.
The explosive growth of data volumes places ever higher demands on memory systems. In order to solve the contradiction between the performance and the cost of a storage system, hybrid storage using a memory, a solid state disk and a mechanical hard disk as storage media is widely used. According to the hybrid storage, different storage strategies are adopted according to the change of the data heat degree, most cold data are stored in a magnetic disk, and a small amount of hot data are reserved in a memory or a solid state disk with relatively high read-write speed, so that the storage cost is reduced, and the use efficiency of the whole resources is improved.
Although hybrid storage maximizes storage system performance and cost by thermally partitioning the data and using different strategies. However, the current storage strategy based on hybrid storage has a certain hysteresis, which results in poor performance of the storage system.
Disclosure of Invention
The present application is directed to a data storage method, an apparatus and an electronic device, which are used to overcome the above-mentioned shortcomings in the prior art.
In a first aspect, an embodiment of the present application provides a data storage method, including:
determining the pre-estimated heat degree state of the sample data according to the historical heat degree state of the sample data in a historical time period; the historical heat state characterizes a level at which the sample data is accessed a number of times over the historical period; the estimated heat degree state represents the grade of the estimated access times of the sample data in a future period;
and storing the sample data in a storage block corresponding to the estimated heat degree state.
Optionally, the history period includes a first history sub-period and a second history sub-period; the historical hot state comprises a first historical hot sub-state and a second historical hot sub-state; the first historical hot sub-state characterising the level at which the sample data is accessed a number of times during the first historical sub-period, the second historical hot sub-state characterising the level at which the sample data is accessed a number of times during the second historical sub-period,
the determining the pre-estimated heat state of the sample data according to the historical heat state of the sample data in the historical time period comprises the following steps:
and predicting the estimated heat degree state according to the first historical heat degree sub-state and the second historical heat degree sub-state.
Optionally, the predicting the estimated heat state according to the first historical heat sub-state and the second historical heat sub-state is specifically realized by the following formula:
Rnext=(1-ξ)Rnow+ξ(r+γRlast)
wherein R islastRepresenting the first historical hot sub-state, RnowRepresenting said second historical thermal sub-state, RnextRepresenting the predicted heat state of the sample data, gamma representing a discounting function, ξ representing learning efficiency (feedback signal), gamma and ξ being constants, R representing an emphasis signal, R ═ Rnow-Rlast
Optionally, before predicting the estimated heat state according to the first historical heat sub-state and the second historical heat sub-state, the method further includes:
and obtaining the first historical hot sub-state and the second historical hot sub-state.
Optionally, the obtaining the first historical thermal sub-state and the second historical thermal sub-state of the sample data includes:
obtaining the number of times of accessing the sample data in a set time period;
obtaining an average number of times a sample set is accessed over the set period of time, the sample set comprising a plurality of the sample data;
obtaining the hot state of the sample data based on the accessed times and the average accessed times;
when the set time period is the first history sub-time period, obtaining the first history heat sub-state of the sample data;
obtaining the second historical hot sub-state of the sample data when the set time period is the second historical sub-time period.
Optionally, the obtaining the hot state of the sample data based on the number of accesses and the average number of accesses is specifically implemented by the following formula:
Figure BDA0002011980160000031
wherein R represents a heat state, a represents a first type of heat state, b represents a second type of heat state, c represents a third type of heat state, d represents a fourth type of heat state, PiRepresenting the number of times the sample data was accessed over the set period of time, Pavr representing the average number of times all the sample data in the sample set was accessed over the set period of time.
Optionally, the sample data is stored in the storage block in advance in a form of key value pairs; the key-value pairs comprise at least a value characterizing content information of the sample data;
the memory blocks comprise a first memory block and a second memory block, and the read-write speed of the first memory block is greater than the read-write speed of the second memory block;
the storing the sample data in a storage block corresponding to the pre-estimated popularity state includes:
when the estimated heat degree state corresponds to the first storage block and the estimated heat degree state is larger than the second historical heat degree sub-state, expanding the first storage block and storing the value of the sample data in the first storage block;
and when the estimated heat degree state corresponds to the second storage block, the estimated heat degree state is smaller than the second historical heat degree sub-state, and the second historical heat degree sub-state corresponds to the first storage block, reducing the first storage block to release the space occupied by the sample data in the first storage block, and storing the value of the sample data in the second storage block corresponding to the estimated heat degree state.
Optionally, before the storing the sample data in the storage block corresponding to the pre-estimated popularity state, the method further includes:
and determining the corresponding relation between the estimated heat degree state and the storage block.
Optionally, the first storage area includes a memory; the second storage area comprises a solid state disk and a mechanical hard disk, and the mechanical hard disk comprises a partition with a front disk character and a partition with a back disk character;
the determining the corresponding relationship between the estimated heat degree state and the storage block comprises:
if the estimated heat degree state is equal to a first set value, the estimated heat degree state corresponds to the memory;
if the estimated heat degree state is equal to a second set value, the estimated heat degree state corresponds to the solid state disk;
if the estimated heat degree state is equal to a third set value, the estimated heat degree state corresponds to the previous partition of the disk signature;
and if the estimated heat degree state is equal to a fourth set value, the estimated heat degree state corresponds to the partition behind the disk character.
In a second aspect, an embodiment of the present application provides a data storage device, including:
the processing module is used for determining the estimated heat degree state of the sample data according to the historical heat degree state of the sample data in a historical time period; the historical heat state represents the grade of the access times of the sample data in the historical period; the estimated heat degree state represents the grade of the estimated access times of the sample data in a future period;
and the storage module is used for storing the sample data in a storage block corresponding to the estimated heat degree state.
In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is used for implementing the steps of any one of the above methods when executed by a processor.
In a fourth aspect, an embodiment of the present application provides an electronic device, which is characterized by comprising a processor and a computer program stored on a memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the methods described above.
Compared with the prior art, the method has the following beneficial effects:
the embodiment of the application provides a data storage method, a data storage device and electronic equipment, wherein the method comprises the following steps: determining the estimated heat state of the sample data according to the historical heat state of the sample data in the historical time period, wherein the historical heat state represents the level of the number of times the sample data is accessed in the historical time period, and the estimated heat state represents the level of the estimated access number of times the sample data is accessed in the future time period; and storing the sample data in a storage block corresponding to the estimated heat degree state. The estimated heat state of the sample data in a future time period is predicted in advance, the sample data is stored in a storage block corresponding to the estimated heat state in advance, and the sample data with the larger estimated heat state can be stored in the storage block with the higher reading and writing speed in advance before the future time period, so that the feedback speed of the storage system for accessing the sample data can be increased, the performance of the storage system is improved, the technical problem that the performance of the storage system is poor due to certain hysteresis of a storage strategy based on hybrid storage at present is solved, and the technical effect of improving the performance of the storage system is achieved.
Additional features and advantages of embodiments of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without creative efforts.
Fig. 1 shows a flowchart of a data storage method provided in an embodiment of the present application.
Fig. 2 is a flowchart illustrating another data storage method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating another data storage method according to an embodiment of the present application.
Fig. 4 shows a flowchart of another data storage method provided in an embodiment of the present application.
Fig. 5 is a flowchart illustrating a further data storage method according to an embodiment of the present application.
Fig. 6 shows a block schematic diagram of a data storage device 200 according to an embodiment of the present application.
Fig. 7 shows a block schematic structure diagram of an electronic device according to an embodiment of the present application.
Fig. 8 shows a block schematic structure diagram of another electronic device provided in an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Although hybrid storage maximizes storage system performance and cost by thermally partitioning the data and using different strategies. However, in the existing storage strategies based on hybrid storage, the data heat is identified and the latest data heat state (level) is acquired after the frequency of data access changes, and then the data is stored in the corresponding storage area according to the data heat state (level), so that certain hysteresis is provided. If the data quantity of a certain hot state (level) is greatly increased in a period of time, because the hot state (level) updating has hysteresis, the memory storage part with the highest read-write speed in the mixed storage is not expanded immediately, and the memory storage part cannot store the increased data quantity, the performance of the storage system is seriously influenced. Meanwhile, if the data amount of a certain hot state (level) is greatly reduced in a period of time, the memory corresponding to the hot state is idle, and unnecessary resource waste is caused by the excessively large idle memory.
The existing storage strategy of mixed storage only distinguishes two types of hot data and cold data from data, and the division of the data hot degree is not clear. Meanwhile, the existing storage strategy identifies the data hot state after the data access frequency is changed, and then expands or compresses the size of the memory according to the data hot state, so that certain hysteresis is provided, in other words, the mode is passive management in the aspect of memory management, and the storage mode causes poor system performance.
In order to solve the technical problems that the change speed of the size of a memory cannot adapt to the change speed of the heat state due to the hysteresis of the identification of the heat state of data in hybrid storage, the memory cannot store corresponding data or has a large amount of idle memory, and the system performance is poor, embodiments of the application provide a data storage method, a device and electronic equipment.
Examples
According to the data storage method provided by the embodiment of the application, the storage block is enlarged or reduced by predicting the hot state of the data, so that the storage block can store the data corresponding to the hot state, and the performance of the storage system is further improved. As an alternative embodiment, the method includes S101 and S102 as shown in fig. 1, and S101 and S102 are explained below with reference to fig. 1.
S101: and determining the estimated heat state of the sample data according to the historical heat state of the sample data in the historical time period.
The historical heat state represents the grade of the number of times of accessing the sample data in the historical time period, and the pre-estimated heat state represents the grade of the pre-estimated number of times of accessing the sample data in the future time period.
S102: and storing the sample data in a storage block corresponding to the estimated heat degree state.
In the embodiment of the present application, there are a plurality of sample data, and the plurality of sample data are stored in a plurality of storage blocks in the storage system in advance (in a historical period). The reading and writing speeds of the storage blocks are different, and the sample data is stored in the storage block corresponding to the historical heat state according to the size of the historical heat state. For example, the historical heat state of a certain sample data 1 is 1, the historical heat state with the value of 1 corresponds to a memory in the storage system, then in a historical period, the sample data is stored in the memory, the historical heat state of a certain sample data 2 is 2, the historical heat state with the value of 2 corresponds to a solid state disk in the storage system, and then in the historical period, the sample data is stored in the solid state disk.
By adopting the scheme, the estimated heat degree state of the sample data is determined according to the historical heat degree state of the sample data in the historical time period, and the sample data is stored in the storage block corresponding to the estimated heat degree state. The estimated heat state of the sample data in a future time period is predicted in advance, the sample data is stored in a storage block corresponding to the estimated heat state in advance, and the sample data with the larger estimated heat state can be stored in the storage block with the higher reading and writing speed in advance before the future time period, so that the feedback speed of the storage system for accessing the sample data can be increased, the performance of the storage system is improved, the technical problem that the performance of the storage system is poor due to certain hysteresis of a storage strategy based on hybrid storage at present is solved, and the technical effect of improving the performance of the storage system is achieved.
In order to improve the accuracy of obtaining the estimated heat state in S101, the embodiment of the present application divides the history time period into a first history sub-period and a second history sub-period, that is, the history time period includes the first history sub-period and the second history sub-period. The level of the sample data accessed in the first historical sub-period is represented by a first historical hot sub-state, the level of the sample data accessed in the second historical sub-period is represented by a second historical hot sub-state, namely the historical hot state comprises the first historical hot sub-state and the second historical hot sub-state, the first historical hot sub-state represents the level of the sample data accessed in the first historical sub-period, and the second historical hot sub-state represents the level of the sample data accessed in the second historical sub-period. The first historical heat substate and the second historical heat substate determine the trend of the clicked times of the sample data.
Optionally, the first history sub-period precedes the second history sub-period, for example, the first history sub-period is a period prior to the current period, the second history sub-period is the current period, and the future period is a period subsequent to the current period.
Optionally, on the basis of fig. 1, a possible implementation manner of determining the estimated heat state of the sample data according to the historical heat state is given below, specifically, referring to fig. 2, where S101 includes:
s101-1, predicting the estimated heat degree state according to the first historical heat degree sub-state and the second historical heat degree sub-state. Specifically, in order to improve the accuracy of predicting the predicted heat state, the history period is divided into a first history sub-period and a second history sub-period, and a first history heat sub-state and a second history heat sub-state are correspondingly obtained, that is, the history heat state may include the first history heat sub-state and the second history heat sub-state. According to the method. The first historical heat sub-state and the second historical heat sub-state predict the predicted heat state of the sample data, so that the accuracy of predicting the predicted heat state is improved.
In the embodiment of the present application, the lengths of the first history sub-period, the second history sub-period and the future period are not limited, and the lengths of the first history sub-period, the second history sub-period and the future period may be the same or different, and when the lengths of the first history sub-period, the second history sub-period and the future period are determined according to the time required by the storage system to access the sample data included in the data set. The lengths of the first history sub-period, the second history sub-period and the future period are not suitable to be too small, and the too small lengths of the first history sub-period, the second history sub-period and the future period can cause the increase of the calculation amount, thereby increasing the memory overhead.
In order to improve the accuracy of the pre-estimated heat state, the first historical heat sub-state and the second historical heat sub-state are obtained according to the times of the statistical sample data really accessed in the first historical sub-period and the second historical sub-period respectively.
Optionally, on the basis of fig. 1, referring to fig. 3, before predicting the predicted popularity state according to the first historical popularity sub-state and the second historical popularity sub-state, the method further includes
S100, obtaining a first historical hot sub-state and a second historical hot sub-state of the sample data.
Further, referring to fig. 4 on the basis of fig. 3, a possible implementation manner for obtaining the first historical hot sub-state and the second historical hot sub-state is given, where S100 specifically includes:
s100-1, obtaining the number of times of accessing sample data in a set time period.
S100-2, obtaining the average number of times of access to a sample set in a set time period, wherein the sample set comprises a plurality of sample data.
S100-3, obtaining the hot state of the sample data based on the accessed times and the average accessed times.
S100-4, when the set time interval is a first historical sub-time interval, obtaining a first historical hot sub-state of the sample data; when the set period is a second history sub-period, a second history heat sub-state of the sample data is obtained.
It should be noted that, for different history sub-periods, S100-1 to S100-3 may be respectively executed, for example, for the case that the set period is the first history sub-period, by executing S100-1 to S100-3, the first history hot sub-state of the sample data is finally obtained in step 100-4, and the second history hot sub-state is obtained in a similar manner. Moreover, for different history sub-periods, the above steps may be executed in parallel or may be executed one by one, which is not limited herein.
Alternatively, the sample set is denoted by T ═ T (T1, T2, T3, …, Ti, …, Tn), and Ti denotes the ith sample data. Specifically, for S100-1 and S100-2, the number of times that the ith sample data Ti is accessed in a set time period is obtained as PiThe average number of times Pavr of all sample data in the sample set T is calculated by the following formula (1):
Figure BDA0002011980160000111
where n is the number of multiple sample data in the sample set.
In the embodiment of the present application, the heat status may be determined by a heat level. The number of the heat levels is not limited in the present application, and there may be a plurality of levels, where different levels correspond to different heat states, and the different heat states indicate that the number of times and the frequency at which the sample data is accessed in a set time period are different. For example, there are four levels, and for S100-3, based on the number of accesses and the average number of accesses, the hot status of the sample data in the history sub-period is obtained, which can be obtained by formula (2).
Figure BDA0002011980160000112
Wherein R represents a heat state, a represents a first type of heat state, b represents a second type of heat state, c represents a third type of heat state, d represents a fourth type of heat state, and the values of a, b, c and d are preset.
Specifically, the grades corresponding to each type of heat state are different, for example, the first type of heat state, the second type of heat state, the third type of heat state, and the fourth type of heat state correspond to four heat levels, i.e., level 1, level 2, level 3, and level 4, respectively. The data corresponding to each level can be in four states of hot data, sub-hot data, warm data and cold data, wherein the hot data represents that the sample data has the highest heat degree, namely the accessed times are the most in a set time period, and the accessed frequency is the highest, relative to all sample data in the data set; the sub-hot data indicates that the hot degree of the sample data is higher, namely the number of times of access in a set time period is more, and the frequency of access is higher; the temperature data represents the general heat of the sample data, namely the number of times of access in a set time period is general, and the frequency of access is general; the cold data indicates that the sample data is the least hot, i.e. the number of times of access within a set period is the least, and the frequency of access is the least.
It should be noted that, in the above embodiment, for S100-4, when the set time period is the first history sub-period, the first history hot sub-state of the sample data is obtained, and when the set time period is the second history sub-period, the second history hot sub-state of the sample data is obtained. Optionally, the first historical hot sub-state is represented by RlastIndicating that the second historical hot sub-state is represented by RnowAnd (4) showing.
Further, after the first historical popularity sub-state and the second historical popularity sub-state are obtained, the estimated popularity state is predicted according to the first historical popularity sub-state and the second historical popularity sub-state, and a specific implementation manner of predicting the estimated popularity state may specifically be: and acquiring an estimated heat state based on the first historical heat sub-state and the second historical heat sub-state through agent reinforcement learning.
Specifically, the estimated heat state through agent reinforcement learning can be obtained by the following formula (3):
Rnext=(1-ξ)Rnow+ξ(r+γRlast) (3)
wherein R isnextRepresenting the predicted heat state of the sample data, gamma representing a discount function, ξ representing the learning efficiency (feedback signal), gamma and ξ being constants, R representing the enhancement signal, and specifically R ═ Rnow-Rlast
By adopting the agent reinforcement learning to predict the estimated heat state of the sample data, after multiple iterations, the formula (3) always finds an estimated heat state RnextAct on the environment to minimize R, in other words when the feedback signal acts on R of agentlastWhen R isnowSmaller variations indicate RnextThe closer to the true state. The accuracy of the pre-estimated heat state of the obtained sample data is improved. After obtaining the estimated popularity state, executing S102: and storing the sample data in a storage block corresponding to the estimated heat degree state.
In order to improve the performance of the storage system, sample data is stored in the storage block in advance according to the hot state, namely the sample data is stored in the storage block in advance in a key value pair mode, wherein the key value pair comprises a key and a value, the key represents identification information of the sample data, and the value represents content information of the sample data. In order to improve the speed of accessing sample data and the performance of a storage system, a key is stored in a first storage block included in a storage block, a value is stored in the first storage block or a second storage block included in the storage block in advance according to a second historical hot sub-state of sample data, and the reading and writing speed of the first storage block is higher than that of the second storage block. Specifically, when the second historical hot sub-state corresponds to the first storage block, the value is stored in the first storage block in advance, and when the second historical hot sub-state corresponds to the second storage block, the value is stored in the second storage block in advance. Alternatively, the key is represented by a key and the value is represented by a value.
Based on the storage status, when the sample data is stored in the storage block corresponding to the estimated popularity status, there may be two cases: because the first storage block is smaller and cannot accommodate the value of the sample data, the value of the sample data is unsuccessfully stored in the first storage block, or the value of the sample data pre-stored in the first storage block is stored in the second storage block, so that the free space of the first storage block is enlarged, and the resource waste is caused. In order to solve the above problem, in the embodiment of the present application, when sample data is stored in a storage block corresponding to an estimated heat state, if the sample data is stored in the storage block corresponding to the estimated heat state and relates to a first storage block, before a future time period, the first storage block is expanded or reduced according to a data amount of a value of the sample data, and then the sample data is stored in the storage block corresponding to the estimated heat state. Specifically, if the value of the sample data is moved from the first storage block to the second storage block for storage, the first storage block is reduced by the data amount of the value of the sample data before the future time period, and if the value of the sample data is stored in the first storage block, the first storage block is expanded by the data amount of the value of the sample data. The method specifically comprises the following steps:
and when the estimated heat degree state corresponds to the first storage block and is greater than the second historical heat degree sub-state, expanding the first storage block so that the first storage block can store the sample data, and then storing the value of the sample data in the first storage block.
And when the estimated heat state corresponds to the second storage block, the estimated heat state is smaller than the second historical heat sub-state, and the second historical heat sub-state corresponds to the first storage block, reducing the first storage block to release the space occupied by the sample data in the first storage block, and storing the value of the sample data in the second storage block corresponding to the estimated heat state.
Optionally, the first storage block includes a memory, and the first storage block may also be a block in the memory for storing data, which is collectively referred to as the memory herein. The second storage block may include a solid state disk and a mechanical hard disk, the mechanical hard disk including a first region and a second region.
By adopting the scheme, based on the predicted estimated heat state, the first storage block is expanded or reduced according to the data size of the value of the sample data, the first storage block is expanded to enable the first storage block to store the value of the sample data, the reading and writing speed of the first storage block is high, the speed of the storage system for responding to and accessing the sample data is increased, and the performance of the storage system is improved. The first storage block is reduced to release the space occupied by the sample data in the first storage block, when the first storage block is a memory, the memory comprises a block for storing the sample data and a block for processing other resources, namely, the memory is divided into a plurality of blocks, when a certain block is large, the other blocks are small, when the block for storing the value of the sample data is free, the free space is reduced to release the space occupied by the sample data, and the space is used for separating the storage resources from the other blocks, so that the performance of the block can be improved, the performance of a storage system is further improved, and meanwhile, the free space is reduced to save system resources. On the other hand, the problem of hysteresis of the existing storage strategy is solved by predicting the data heat state, so that the passive management of the memory is changed into the active management, the size of the memory timely responds to the change of the data heat state, the waste of memory resources is reduced, and the performance of the storage system is improved.
The sample data is stored in the storage block in advance, so that the data size of the value of the sample data is known and can be directly acquired from the storage block.
In order to enable the sample data to be stored in the storage block corresponding to the estimated popularity state, before the sample data is stored in the storage block corresponding to the estimated popularity state, the method further includes:
and determining the corresponding relation between the estimated heat degree state and the storage block.
Optionally, the step of determining the correspondence between the estimated heat status and the memory block may be performed before S100.
The determining of the corresponding relationship between the estimated heat degree state and the storage block specifically includes: the different estimated heat states correspond to the memory blocks with different read-write speeds. The estimated heat states are classified into a first type heat state, a second type heat state, a third type heat state and a fourth type heat state according to the values, and the first type heat state, the second type heat state, the third type heat state and the fourth type heat state respectively correspond to a memory, a solid state disk, a partition with a mechanical hard disk drive character in front of and a partition with a mechanical hard disk drive character in back of the storage system.
Optionally, the determining the correspondence between the estimated heat degree state and the storage block specifically includes:
if the estimated heat degree state is equal to the first set value, the estimated heat degree state corresponds to the memory; if the estimated heat degree state is equal to the second set value, the estimated heat degree state corresponds to the solid state disk; if the estimated heat degree state is equal to a third set value, the estimated heat degree state corresponds to a partition close to the disk symbol; if the estimated heat state is equal to the fourth set value, the estimated heat state corresponds to the partition behind the disk signature.
Further, storing the sample data in the storage block corresponding to the estimated heat degree state specifically includes: and replacing the storage position of the value of the sample data according to the predicted hot degree state.
Specifically, if the estimated heat state is equal to a first set value, storing the value of the sample data corresponding to the estimated heat state in a memory; if the estimated heat degree state is equal to the second set value, storing the value of the sample data corresponding to the estimated heat degree state in the solid state disk; if the estimated heat degree state is equal to a third set value, storing the value of the sample data corresponding to the estimated heat degree state in a partition close to the disk symbol; and if the estimated heat degree state is equal to the fourth set value, storing the value of the sample data corresponding to the estimated heat degree state in a partition behind the disk identifier.
The first set value, the second set value, the third set value and the fourth set value may correspond to the first kind of heat state, the second kind of heat state, the third kind of heat state and the fourth kind of heat state, respectively.
By adopting the scheme, the storage position of the value of the sample data is replaced according to the estimated heat state, so that the sample data with high heat state is stored in the storage area block with high reading and writing speed, and the sample data with low heat state is stored in the storage area block with low reading and writing speed, the storage system can conveniently and quickly read the sample data with high heat state, and the performance of the storage system is improved.
As an optional implementation manner, the storage block further includes a third storage area, and the third storage area is used for storing intermediate variables generated during execution of the data storage method. The method further includes storing the predicted intermediate variable hot status in a third storage area.
Based on the above pairs of S100 to S101 and fig. 5, the following provides a possible implementation manner of the computer program in executing the above method. The method specifically comprises the following steps:
s001, initializing and configuring a storage system.
The sample data is stored in the storage block in a form of a key value pair, specifically, the key is stored in the memory, and the value is stored in the storage block corresponding to the second historical thermal sub-state, where the storage block corresponding to the second historical thermal sub-state may be a memory, or a solid state disk, or a mechanical hard disk. The length of the initialization time period, that is, the lengths of the first history sub-time period, the second history sub-time period and the future time period are initialized, the values of the first history sub-time period, the second history sub-time period and the future time period should not be too small, and the initialization needs to be set according to the performance condition of the storage system, because the too small values of the first history sub-time period, the second history sub-time period and the future time period may cause the number of iterations of the system in predicting the predicted heat state to be too large, and the calculation amount is increased, thereby increasing the memory overhead. And setting the initial value of the iteration time to be 0.
And S002, initializing the memory size of the current time period.
That is, the storage system sets the memory size to be the memory size required by the key for currently storing the sample data, and reserves more than 10% of the free memory as the overhead required by statistics, for example, more than 10% of the reserved free memory is used for storing the value of the sample data, and optionally, more than 10% of the reserved free memory corresponds to the third partition.
And S003, respectively obtaining the times of the sample data being accessed in the current time interval and the previous time interval.
Taking the number of times that the sample data is accessed in the current time period as an example, at the end of the current time period (the second history sub-time period), counting the number of times P that the sample data is accessed in the current time periodi nowI has different values, Pi nowCorresponding to different sample data. The number of times P that statistical sample data is accessed in the current period at the end of the previous period (first historical subinterval)i lastI has different values, Pi lastCorresponding to different sample data. It is understood that S003 corresponds to S100-1 in FIG. 4, described above.
And S004, counting the sum of the times that all sample data in the sample set are accessed in the current time period and the previous time period respectively.
The sum of the number of times of access in the current time period is
Figure BDA0002011980160000171
The sum of the number of accesses in the previous period is
Figure BDA0002011980160000172
And S005, calculating to obtain the average number of times of access of the current time period and the previous time period respectively. Specifically, the average number of accesses in the current time period is
Figure BDA0002011980160000173
The average number of accesses in the previous period is
Figure BDA0002011980160000174
It is understood that S004 and S005 correspond to S100-2 in fig. 4 described above.
S006, obtaining a first historical hot state of the sample data in the previous period based on the number of times of access and the average number of times of access in the previous period, and obtaining a second historical hot state of the sample data in the current period based on the number of times of access and the average number of times of access in the current period.
Specifically, S006 specifically classifies the number of visits according to the average number of visits, where the categories include hot data, sub-hot data, warm data, and cold data, each category represents a level of a hot state, and to which category the number of visits belongs, indicates that the hot state corresponding to the number of visits is the category. These four heat states are mapped into four heat levels: level 1, level 2, level 3 and level 4, with level 1 being the highest level, next to level 2, then to level 3, i.e., level 4 being the lowest level. Specifically, the mapping relationship between each access frequency and the heat state is reflected by the formula (2).
It is understood that S006 corresponds to S100-3 in fig. 4 described above.
S007, when the iteration time is not more than 0, the step indicates that S002 is not executed yet, and the step jumps to S008.
S008, iteration time times +1, after the iteration time times +1, the program jumps to S002 of the step, and the step S002 is executed; when the iteration number time is larger than 0, the program jumps to S009 described below.
S009, judging whether the iteration time is less than a set value th. And if the value is less than the preset value, jumping to S200, otherwise, ending.
And S200, predicting the estimated heat state of the sample data in the future time period according to the second historical heat state and the second historical heat state. Specifically, the above formula (3) is executed to predict the predicted hot state of the sample data in the future period.
After obtaining the estimated hotness state of the sample data in the future period, S009 described below is performed.
S201, updating the size of the future time period according to the estimated heat degree state of the sample data in the future time period. Then jumping to S800 to update the iteration time times + 1.
And then, storing the value of the sample data in a memory or other storage blocks corresponding to the estimated heat degree state at the previous moment when the future time period starts or the moment when the future time period starts.
And repeatedly executing the steps S002-S201, and obtaining a group of second historical heat states and a second historical heat state every iteration, thereby predicting the estimated heat state of the sample data in a period of time. In a series of time periods, the sample data can predict and obtain the estimated heat state of the next time period based on the heat states of the previous two time periods, and the size of the memory is updated according to the estimated heat state, so that the memory can store the value of the sample data to be stored in the memory or reduce the free space of the memory, the performance of a storage system is improved, and system resources are saved.
In this embodiment of the application, sample data in a data set is pre-stored in a storage system, and when a thermal state of a certain sample data changes, in order to improve the storage performance of the storage system, a storage location of the sample data needs to be changed, for example, the thermal state of the certain sample data becomes large, the sample data corresponding to the thermal state with the high rank is stored in a storage block with a high read/write speed, the thermal state of the certain sample data becomes small, and the sample data corresponding to the thermal state with the high rank is stored in a storage block with a low read/write speed. However, the size of the storage block that may need to store the sample data may not be enough to store the sample data, or if the sample data moves out of the storage block, the free memory of the storage block may be too large, which may result in resource waste.
In conclusion, according to the historical heat state of the sample data in the historical time period, the pre-estimated heat state of the sample data is determined; the historical heat state represents the grade of the accessed times of the sample data in the historical time period; the estimated heat state represents the grade of the estimated access times of the sample data in the future period; and storing the sample data in a storage block corresponding to the estimated heat state. The method comprises the steps of predicting the estimated heat state of sample data in a future time period, expanding or reducing a storage block corresponding to the predicted heat state according to the data volume of the value of the sample data, enabling the storage block to store the sample data corresponding to the estimated heat state, expanding or reducing the storage block in advance, enabling the expanded storage block to store the sample data corresponding to the estimated heat state, or reducing the storage block to release storage resources of the storage block in time, improving the performance of a storage system, solving the technical problem that the performance of the storage system is poor due to certain hysteresis of a storage strategy based on hybrid storage at present, and achieving the technical effect of improving the performance of the storage system.
The embodiment of the present application further provides an execution main body for executing the above steps, and the execution main body may be the data storage device 200 in fig. 6. Referring to fig. 6, the apparatus includes:
the processing module 210 is configured to determine an estimated heat state of sample data according to a historical heat state of the sample data at a historical time period; the historical hot state represents the grade of the times of accessing the sample data in the historical time period; the estimated heat degree state represents the grade of the sample data in the future time period estimated access times;
a storage module 220, configured to store the sample data in a storage block corresponding to the pre-estimated popularity state.
Optionally, the processing module 210 is further configured to:
and predicting the estimated heat degree state according to the first historical heat degree sub-state and the second historical heat degree sub-state.
Optionally, the apparatus further comprises:
an obtaining module, configured to obtain the first historical hotness sub-state and the second historical hotness sub-state.
Optionally, the obtaining module is further configured to:
obtaining the number of times of accessing the sample data in a set time period;
obtaining an average number of times a sample set is accessed over the set period of time, the sample set comprising a plurality of the sample data;
obtaining the hot state of the sample data based on the accessed times and the average accessed times;
when the set time period is the first history sub-time period, obtaining the first history heat sub-state of the sample data;
obtaining the second historical hot sub-state of the sample data when the set time period is the second historical sub-time period.
Optionally, the storage module 220 is further configured to:
when the estimated heat degree state corresponds to the first storage block and the estimated heat degree state is larger than the second historical heat degree sub-state, expanding the first storage block and storing the value of the sample data in the first storage block;
and when the estimated heat degree state corresponds to the second storage block, the estimated heat degree state is smaller than the second historical heat degree sub-state, and the second historical heat degree sub-state corresponds to the first storage block, reducing the first storage block to release the space occupied by the sample data in the first storage block, and storing the value of the sample data in the second storage block corresponding to the estimated heat degree state.
Optionally, the apparatus further comprises:
and the determining module is used for determining the corresponding relation between the estimated heat degree state and the storage block.
Optionally, the determining module is further configured to:
if the estimated heat degree state is equal to a first set value, the estimated heat degree state corresponds to the memory;
if the estimated heat degree state is equal to a second set value, the estimated heat degree state corresponds to the solid state disk;
if the estimated heat degree state is equal to a third set value, the estimated heat degree state corresponds to the previous partition of the disk signature;
and if the estimated heat degree state is equal to a fourth set value, the estimated heat degree state corresponds to the partition behind the disk character.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present application further provides an electronic device, as shown in fig. 7, which includes at least a data interface 501 and a processor 502. The processor 502 performs data interaction with the memory system 600 through the data interface 501, and the specific processor 502 performs data interaction with a memory block in the memory system 600 through the data interface 501.
In order to illustrate the data interaction between the processor 502 and the storage system 600, as a possible implementation, the processor 502 executes the following steps when executing the data storage method described above: determining the corresponding relation between the heat degree state (historical heat degree state and/or estimated heat degree state) and the storage block, acquiring sample data from the storage block, counting the heat degree state of the sample data in a set time period, predicting the estimated heat degree state of the sample data, and storing the sample data in the storage block according to the estimated heat degree state.
Optionally, as shown in fig. 8, the electronic device further includes a storage system 600. Similarly, the processor 502 interacts with the memory blocks in the memory system 600 through the data interface 501.
Optionally, the electronic device further comprises a memory 504, a computer program stored on the memory 504 and executable on the processor 502, the processor 502 implementing the steps of any of the data storage methods described hereinbefore when executing the program.
The storage system 600 may be the memory 504, or may be different from the memory 504, or the storage system 600 may be a partial storage partition of the memory 504, or the memory 504 may be a certain storage block in the storage system 600.
Where in fig. 7 a bus architecture (represented by bus 500) is shown, bus 500 may include any number of interconnected buses and bridges, and bus 500 links together various circuits including one or more processors, represented by processor 502, and memory, represented by memory 504. The bus 500 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The processor 502 is responsible for managing the bus 500 and general processing, and the memory 504 may be used for storing data used by the processor 502 in performing operations. Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of any of the above-described data storage methods.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description provided above. In addition, this application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and any descriptions of specific languages are provided above to disclose the best modes of the present application.
In the description provided herein, numerous specific details are set forth. It can be appreciated, however, that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the device in the embodiments may be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component and furthermore may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than others, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an apparatus according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A method of storing data, comprising:
determining the pre-estimated heat degree state of the sample data according to the historical heat degree state of the sample data in a historical time period; the historical heat state characterizes a level at which the sample data is accessed a number of times over the historical period; the estimated heat degree state represents the grade of the estimated access times of the sample data in a future period;
storing the sample data in a storage block corresponding to the estimated heat degree state;
the history period comprises a first history sub-period and a second history sub-period; the historical hot state comprises a first historical hot sub-state and a second historical hot sub-state; the first historical hot sub-state being indicative of a level at which the sample data is accessed a number of times during the first historical sub-period, the second historical hot sub-state being indicative of a level at which the sample data is accessed a number of times during the second historical sub-period;
the determining the pre-estimated heat state of the sample data according to the historical heat state of the sample data in the historical time period comprises the following steps:
predicting the estimated popularity state according to the first historical popularity sub-state and the second historical popularity sub-state;
the sample data is stored in the storage block in advance in a key value pair mode; the key-value pairs comprise at least a value characterizing content information of the sample data;
the memory blocks comprise a first memory block and a second memory block, and the read-write speed of the first memory block is greater than that of the second memory block;
the storing the sample data in a storage block corresponding to the pre-estimated popularity state includes:
when the estimated heat degree state corresponds to the first storage block and the estimated heat degree state is larger than the second historical heat degree sub-state, expanding the first storage block and storing the value of the sample data in the first storage block;
and when the estimated heat degree state corresponds to the second storage block, the estimated heat degree state is smaller than the second historical heat degree sub-state, and the second historical heat degree sub-state corresponds to the first storage block, reducing the first storage block to release the space occupied by the sample data in the first storage block, and storing the value of the sample data in the second storage block corresponding to the estimated heat degree state.
2. The method of claim 1, wherein predicting the estimated heat state based on the first historical heat sub-state and the second historical heat sub-state is performed by:
Rnext=(1-ξ)Rnow+ξ(r+γRlast)
wherein R islastRepresenting the first historical hot sub-state, RnowRepresenting the second historical hot sub-state, Rnext represents the estimated heat state, γ represents a discount function, ξ represents learning efficiency (feedback signal), γ and ξ are constants, R represents an emphasis signal, and R ═ Rnow-Rlast
3. The method of claim 1, wherein prior to said predicting the estimated heat state based on the first historical heat sub-state and the second historical heat sub-state, the method further comprises:
and obtaining the first historical hot sub-state and the second historical hot sub-state.
4. The method of claim 3, wherein the obtaining the first historical hot sub-state and the second historical hot sub-state comprises:
obtaining the number of times of accessing the sample data in a set time period;
obtaining an average number of times a sample set is accessed over the set period of time, the sample set comprising a plurality of the sample data;
obtaining the hot degree state of the sample data based on the accessed times and the average accessed times;
when the set time period is the first history sub-time period, obtaining the first history heat sub-state of the sample data;
obtaining the second historical hot sub-state of the sample data when the set time period is the second historical sub-time period.
5. The method according to claim 4, wherein the obtaining the hot status of the sample data based on the number of accesses and the average number of accesses is implemented by the following formula:
Figure FDA0002566545600000031
wherein R represents the heat state, a represents a first type of heat state, b represents a second type of heat state, c represents a third type of heat state, d represents a fourth type of heat state, PiRepresenting the number of times the sample data was accessed over the set period of time, and Pavr representing the average number of times all the sample data in the sample set was accessed over the set period of time.
6. The method of claim 1, wherein prior to said storing said sample data in a storage block corresponding to said pre-estimated popularity state, said method further comprises:
and determining the corresponding relation between the estimated heat degree state and the storage block.
7. The method of claim 6, wherein the first storage area comprises a memory; the second storage area comprises a solid state disk and a mechanical hard disk, and the mechanical hard disk comprises a partition with a front disk character and a partition with a back disk character;
the determining the corresponding relationship between the estimated heat degree state and the storage block comprises:
if the estimated heat degree state is equal to a first set value, the estimated heat degree state corresponds to the memory;
if the estimated heat degree state is equal to a second set value, the estimated heat degree state corresponds to the solid state disk;
if the estimated heat degree state is equal to a third set value, the estimated heat degree state corresponds to a partition close to the disk character;
and if the estimated heat degree state is equal to a fourth set value, the estimated heat degree state corresponds to the partition behind the disk character.
8. A data storage device, comprising:
the processing module is used for determining the pre-estimated heat degree state of the sample data according to the historical heat degree state of the sample data in a historical time period; the historical heat state characterizes a level at which the sample data is accessed a number of times over the historical period; the estimated heat degree state represents the grade of the estimated access times of the sample data in a future period;
the storage module is used for storing the sample data in a storage block corresponding to the estimated heat degree state;
the history period comprises a first history sub-period and a second history sub-period; the historical hot state comprises a first historical hot sub-state and a second historical hot sub-state; the first historical hot sub-state being indicative of a level at which the sample data is accessed a number of times during the first historical sub-period, the second historical hot sub-state being indicative of a level at which the sample data is accessed a number of times during the second historical sub-period;
the processing module is specifically configured to predict the estimated popularity state according to the first historical popularity sub-state and the second historical popularity sub-state;
the sample data is stored in the storage block in advance in a key value pair mode; the key-value pairs comprise at least a value characterizing content information of the sample data;
the memory blocks comprise a first memory block and a second memory block, and the read-write speed of the first memory block is greater than that of the second memory block;
the storage module is used for expanding the first storage block and storing the value of the sample data in the first storage block when the estimated popularity state corresponds to the first storage block and the estimated popularity state is greater than the second historical popularity sub-state; and when the estimated heat degree state corresponds to the second storage block, the estimated heat degree state is smaller than the second historical heat degree sub-state, and the second historical heat degree sub-state corresponds to the first storage block, reducing the first storage block to release the space occupied by the sample data in the first storage block, and storing the value of the sample data in the second storage block corresponding to the estimated heat degree state.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a processor and a computer program stored on a memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 7 when executing the program.
CN201910256422.8A 2019-03-29 2019-03-29 Data storage method and device and electronic equipment Active CN109992210B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910256422.8A CN109992210B (en) 2019-03-29 2019-03-29 Data storage method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910256422.8A CN109992210B (en) 2019-03-29 2019-03-29 Data storage method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109992210A CN109992210A (en) 2019-07-09
CN109992210B true CN109992210B (en) 2020-10-23

Family

ID=67131936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910256422.8A Active CN109992210B (en) 2019-03-29 2019-03-29 Data storage method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109992210B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764714B (en) * 2019-11-06 2021-07-27 深圳大普微电子科技有限公司 Data processing method, device and equipment and readable storage medium
CN112947844A (en) * 2019-12-11 2021-06-11 北京金山云网络技术有限公司 Data storage method and device, electronic equipment and medium
CN111143364A (en) * 2019-12-24 2020-05-12 珠海大横琴科技发展有限公司 Data block storage method and device, electronic equipment and storage medium
CN112433679B (en) * 2020-12-01 2023-06-16 广州城市职业学院 Data storage method and device, electronic equipment and storage medium
CN112433682B (en) * 2020-12-15 2023-12-05 合肥大唐存储科技有限公司 Method for acquiring control parameters in solid state disk, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117248A (en) * 2011-03-09 2011-07-06 浪潮(北京)电子信息产业有限公司 Caching system and method for caching data in caching system
CN103605615A (en) * 2013-11-21 2014-02-26 浪潮电子信息产业股份有限公司 Block-level-data-based directional allocation method for hierarchical storage
CN104298475A (en) * 2014-10-13 2015-01-21 合一网络技术(北京)有限公司 Data storage optimization method
CN108932114A (en) * 2018-07-09 2018-12-04 郑州云海信息技术有限公司 A kind of method and device of data storage
CN109446258A (en) * 2018-10-22 2019-03-08 郑州云海信息技术有限公司 A kind of distributed data storage method and system
CN109491616A (en) * 2018-11-14 2019-03-19 三星(中国)半导体有限公司 The storage method and equipment of data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9537586B2 (en) * 2013-03-15 2017-01-03 DGS Global Systems, Inc. Systems, methods, and devices for electronic spectrum management with remote access to data in a virtual computing network
CN109343859A (en) * 2018-08-17 2019-02-15 咪咕文化科技有限公司 A kind of information processing method, device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117248A (en) * 2011-03-09 2011-07-06 浪潮(北京)电子信息产业有限公司 Caching system and method for caching data in caching system
CN103605615A (en) * 2013-11-21 2014-02-26 浪潮电子信息产业股份有限公司 Block-level-data-based directional allocation method for hierarchical storage
CN104298475A (en) * 2014-10-13 2015-01-21 合一网络技术(北京)有限公司 Data storage optimization method
CN108932114A (en) * 2018-07-09 2018-12-04 郑州云海信息技术有限公司 A kind of method and device of data storage
CN109446258A (en) * 2018-10-22 2019-03-08 郑州云海信息技术有限公司 A kind of distributed data storage method and system
CN109491616A (en) * 2018-11-14 2019-03-19 三星(中国)半导体有限公司 The storage method and equipment of data

Also Published As

Publication number Publication date
CN109992210A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109992210B (en) Data storage method and device and electronic equipment
JP5298444B2 (en) Method, apparatus, logic program and system for characterizing processor design
US9031826B2 (en) Method and apparatus for simulating operation in a data processing system
US20210191765A1 (en) Method for static scheduling of artificial neural networks for a processor
JP2004530193A (en) Method and apparatus for statistical evaluation of execution time of embedded software
US9916265B2 (en) Traffic rate control for inter-class data migration in a multiclass memory system
CN100416529C (en) Method and apparatus for determining a dynamic random access memory page management implementation
WO2019019926A1 (en) System parameter optimization method, apparatus and device, and readable medium
US11500828B1 (en) Method and device for constructing database model with ID-based data indexing-enabled data accessing
US20090171646A1 (en) Method for estimating power consumption
KR20180096780A (en) Method and apparatus for data mining from core trace
Blaß et al. Write-back caches in WCET analysis
Soudris et al. Data-reuse and parallel embedded architectures for low-power, real-time multimedia applications
US8340952B2 (en) Power estimation method and device therefor
CN111381881A (en) AHB (advanced high-performance bus) interface-based low-power-consumption instruction caching method and device
US7761280B2 (en) Data processing apparatus simulation by generating anticipated timing information for bus data transfers
US20230229899A1 (en) Neural network processing method and device therefor
CN108846248B (en) Application modeling and performance prediction method
US8438003B2 (en) Methods for improved simulation of integrated circuit designs
US7505886B1 (en) Technique for programmatically obtaining experimental measurements for model construction
Kim et al. System-level communication performance estimation for DMA-controlled accelerators
CN112379842A (en) Method and device for predicting cold and hot properties of data
Cui et al. Twin-load: Bridging the gap between conventional direct-attached and buffer-on-board memory systems
CN110333870A (en) Processing method, device and the equipment of Simulink model variable distribution
CN115080264A (en) Shared memory optimization method and system based on memory partitioning technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant