Data storage method, device, electronic device and computer readable medium
By dynamically adjusting the storage hierarchy and media during the data storage process, and based on the data access popularity and business labels, the problem of inefficient storage and acquisition of massive data sets is solved, and the rational storage and efficient acquisition of data sets are achieved.
Patent Information
- Application Number
- CN202410500048.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-04-24
AI Technical Summary
During the storage and acquisition of massive data sets, all data sets are directly stored in the target storage medium, resulting in an increase in storage capacity requirements, extended acquisition time and inefficient efficiency.
By in response to the received storage hierarchy determination information, the current data access popularity and service tag of the target data set are determined, combined with the pre-set data partitioning strategy, historical data access and service tag popularity sequence, the candidate storage hierarchy is determined, and the data storage medium is dynamically adjusted to achieve adaptive storage of the data set.
The rational storage of the target data set is achieved, the efficiency of subsequent data acquisition is improved, the useless data set foot in space and the acquisition time is shortened.
Smart Images

Figure CN118349178B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a data storage method, device, electronic device, and computer-readable medium. Background Art
[0002] At present, with the diversification of data sets, how to effectively store data sets has become one of the main research directions. For the storage of data sets, the commonly used method is: directly storing all acquired data sets in the target storage medium.
[0003] However, when using the above method to store data sets, the following technical problems often occur:
[0004] For massive data sets, directly storing all data sets in the target storage medium not only requires the target storage medium to have a large storage capacity, but also in the subsequent data set acquisition process, there are many useless data sets, which often leads to long acquisition time and low acquisition efficiency.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose data storage methods, devices, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a data storage method, including: in response to receiving storage tier determination information for a target data set, determining a current data access heat and a current data business tag corresponding to the target data set; obtaining a pre-set data partitioning strategy, a historical data access heat sequence and a historical data business tag heat sequence corresponding to the target data set; determining a candidate storage tier corresponding to the target data set based on the current data access heat and the current data business tag and using the data partitioning strategy; in response to determining that the target data set has determined the corresponding candidate storage tier, storing the target data set in a first storage medium; obtaining a first future data access heat sequence and a first future data business tag heat sequence in a preset first future time period; determining whether to store the target data set in the first storage medium in a second storage medium corresponding to the candidate storage tier based on the first future data access heat sequence, the first future data business tag heat sequence, the historical data access heat sequence and the historical data business tag heat sequence; in response to determining to store, deleting the target data set in the first storage medium, and storing the target data set in the second storage medium.
[0009] In a second aspect, some embodiments of the present disclosure provide a data storage device, comprising: a first determination unit, configured to determine, in response to receiving storage tier determination information for a target data set, a current data access heat and a current data business label corresponding to the target data set; a first acquisition unit, configured to acquire a pre-set data partitioning strategy, a historical data access heat sequence and a historical data business label heat sequence corresponding to the target data set; a second determination unit, configured to determine, based on the current data access heat and the current data business label, a candidate storage tier corresponding to the target data set using the data partitioning strategy; a first storage unit, configured to determine, in response to determining that the target data set has determined a candidate storage tier corresponding to the target data set; level, storing the above-mentioned target data set in the first storage medium; a second acquisition unit is configured to acquire a first future data access heat sequence and a first future data business label heat sequence under a preset first future time period; a third determination unit is configured to determine whether to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level according to the above-mentioned first future data access heat sequence, the above-mentioned first future data business label heat sequence, the above-mentioned historical data access heat sequence and the above-mentioned historical data business label heat sequence; the second storage unit is configured to delete the above-mentioned target data set in the above-mentioned first storage medium in response to determining the storage, and store the above-mentioned target data set in the above-mentioned second storage medium.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0012] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the data storage method of some embodiments of the present disclosure, the target data set can be stored rationally and the subsequent data acquisition efficiency can be improved. Specifically, the reason for the unreasonable storage of the relevant target data set and the low data acquisition efficiency is that for a large number of data sets, all data sets are directly stored in the target storage medium, which not only requires the target storage medium to have a large storage capacity, but also in the process of subsequent data set acquisition, there are many useless data sets, which often leads to a long acquisition time and low acquisition efficiency. Based on this, the data storage method of some embodiments of the present disclosure, first, in response to receiving the storage level determination information for the target data set, determines the current data access heat and current data business label corresponding to the above target data set. Here, by determining the current data access heat and the corresponding current data business label corresponding to the target data set, the corresponding usage frequency of the target data set is characterized to reflect the data heat of the target data set, so as to facilitate the subsequent targeted storage in the corresponding storage medium. Then, the pre-set data partitioning strategy, the historical data access heat sequence and the historical data business label heat sequence corresponding to the above target data set are obtained, so as to facilitate the subsequent determination of the long-term heat of the target data set, so as to perform adaptive storage adjustment later. Then, according to the above-mentioned current data access heat and the above-mentioned current data service label, the above-mentioned data partitioning strategy can be used to accurately determine the candidate storage level corresponding to the above-mentioned target data set at the current time. Then, in response to determining that the above-mentioned target data set has determined the corresponding candidate storage level, the above-mentioned target data set is stored in the first storage medium, so as to determine data caching for the target data set. Then, the first future data access heat sequence and the first future data service label heat sequence in the preset first future time period are obtained for subsequent determination of the long-term heat corresponding to the target data set, so as to determine whether to store it in the second storage medium. Secondly, according to the above-mentioned first future data access heat sequence, the above-mentioned first future data service label heat sequence, the above-mentioned historical data access heat sequence and the above-mentioned historical data service label heat sequence, it can be accurately determined whether to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level. Finally, in response to determining to store, the above-mentioned target data set in the above-mentioned first storage medium is deleted, and the above-mentioned target data set is stored in the above-mentioned second storage medium, so as to store the target data set in the corresponding storage medium. In summary, the current data popularity and future data popularity of the target data set can be used to achieve adaptive storage of the data set, which can greatly improve the efficiency of data set acquisition in the future. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flow chart of some embodiments of the data storage method according to the present disclosure;
[0015] Figure 2 is a schematic diagram of the structure of some embodiments of the data storage device according to the present disclosure;
[0016] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] refer to Figure 1, shows a process 100 of some embodiments of the data storage method according to the present disclosure. The data storage method comprises the following steps:
[0024] Step 101 : in response to receiving storage tier determination information for a target data set, determining a current data access heat and a current data service tag corresponding to the target data set.
[0025] In some embodiments, in response to receiving storage level determination information for a target data set, the execution subject of the above data storage method may determine the current data access heat and the current data service tag corresponding to the above target data set. The target data set may be a data set to be stored. In practice, the target data set may be an acquired user data set to be stored. The storage level determination information may be information for determining the storage level. In practice, the storage level determination information may be a storage level determination request. The storage level may be a storage location that characterizes the storage of the data set. In practice, each storage level corresponds to a different storage medium. Each storage medium in each storage medium may characterize the importance of the stored data. For example, each storage level may include: a first predetermined storage level, a second predetermined storage level, and a third predetermined storage level. The storage medium corresponding to the first predetermined storage level is a first predetermined storage medium. The storage medium corresponding to the second predetermined storage level is a second predetermined storage medium. The storage medium corresponding to the third predetermined storage level is a third predetermined storage medium. The data importance corresponding to the data in the first predetermined storage medium is higher than the data importance corresponding to the data in the second predetermined storage medium. The data importance corresponding to the data in the second predetermined storage medium is higher than the data importance corresponding to the data in the third predetermined storage medium. The current data access heat may be the data access heat of the target data set at the current time. The data access heat may characterize the access frequency and the number of accesses to the data set. Specifically, the data access heat may characterize the degree of attention paid to the data set. The current data access heat may be a value between 0 and 1. The larger the value, the greater the access frequency and the number of accesses to the corresponding target data set. The current time may be the time when the storage level determination information is received. The current data service tag may be each tag of the target data set under the corresponding service at the current time. The corresponding service may be the scenario service involved in the target data set. The tag may characterize the data characteristics of the target data set under the corresponding scenario service. For example, the scenario service may be an e-commerce scenario service. The current data service tags may include: "Men's clothing", "Tops", "Cheap".
[0026] As an example, the execution subject may determine the current data access heat and the current data service label corresponding to the target data set by means of access heat statistics and service label acquisition.
[0027] Step 102: Obtain a preset data partitioning strategy, a historical data access heat sequence and a historical data business tag heat sequence corresponding to the target data set.
[0028] In some embodiments, the execution subject may obtain a pre-set data partitioning strategy, a historical data access heat sequence corresponding to the target data set, and a historical data service tag heat sequence. Among them, the data partitioning strategy may be a strategy for determining the storage situation corresponding to the data set for the scenario business. For example, the data partitioning strategy may be a data partitioning strategy based on load balancing and time optimization. There is a one-to-one correspondence between the historical data access heat in the historical data access heat sequence and the historical time in the historical time period. The historical data access heat may be the data access heat corresponding to the data at the historical time. The historical time period may be a pre-set time period. There is a one-to-one correspondence between the historical data service tag heat in the historical data service tag heat sequence and the historical time in the historical time period. The historical data service tag heat may be the tag heat of the data service tag at the historical time. The tag heat may represent the access frequency and access count of the tag. The tag heat may be a value between 0 and 1. The larger the value, the higher the frequency of access to the corresponding representation tag and the larger the corresponding access count.
[0029] Step 103 : According to the current data access heat and the current data service tag, the candidate storage tier corresponding to the target data set is determined by using the data partitioning strategy.
[0030] In some embodiments, the execution subject may determine the candidate storage tier corresponding to the target data set based on the current data access heat and the current data service tag using the data partitioning strategy, wherein the candidate storage tier may be the storage tier corresponding to the target data set to be further determined.
[0031] In some optional implementations of some embodiments, after step 103, the steps further include:
[0032] In response to receiving the acquisition information for the target data set, the execution subject may acquire the target data set from the first storage medium. The acquisition information may be information for acquiring the data set. In practice, the acquisition information may be a data acquisition request.
[0033] In some optional implementations of some embodiments, the above-mentioned data partitioning strategy includes: a data access heat partitioning strategy and a data service tag partitioning strategy. The data access heat partitioning strategy may be a strategy for data partitioning based on data access heat. The data service tag partitioning strategy may be a strategy for data partitioning based on data service tags. For example, the data access heat partitioning strategy may be "matching the data service tag with each data service tag in the first association information table to perform data partitioning of the data corresponding to the data service tag". The first association information table may characterize the correspondence between the data service tag and at least one storage medium. The first association information table may be updated at predetermined intervals. The data access heat partitioning strategy may be "determining the heat interval corresponding to the data corresponding to the data access heat. Then, according to the second association information table, determine the storage medium corresponding to the heat interval". Among them, the second association information table may characterize the correspondence between the heat interval and at least one storage medium. The second association information table may be updated at predetermined intervals. The heat interval may be a heat value interval. In practice, the heat interval may be a frequency interval.
[0034] Optionally, the determining of the candidate storage tier corresponding to the target data set according to the current data access heat and the current data service tag by using the data partitioning strategy may include the following steps:
[0035] In the first step, based on the current data access heat, the data access heat partitioning strategy is used to determine at least one first initial storage tier corresponding to the target data set, wherein the at least one first initial storage tier may be at least one alternative storage tier for the target data set under the data access heat dimension.
[0036] The second step is to determine at least one second initial storage tier corresponding to the target data set based on the current data service tag and using the data service tag partitioning strategy. The at least one second initial storage tier may be at least one alternative storage tier for the target data set under the data service tag dimension.
[0037] In a third step, the candidate storage tier is generated according to the at least one first initial storage tier and the at least one second initial storage tier.
[0038] As an example, first, at least one identical storage tier between at least one first initial storage tier and at least one second initial storage tier is determined, and then, a storage tier with the highest corresponding level of the corresponding storage tier is selected from the at least one identical storage tier as a candidate storage tier.
[0039] In the process of adopting technical solutions to solve the above technical problem 1, the following technical problem 2 often occurs: Determining the storage level corresponding to the data set based on the data access heat partitioning strategy and the data business label partitioning strategy is highly subjective and one-sided, resulting in the storage level corresponding to the data set not being accurate enough. Combining the advantages / technical status quo, we can decide to adopt the following solution:
[0040] In some optional implementations of some embodiments, the above-mentioned data partitioning strategy also includes: a data access heat level strategy and a data service label score strategy. Among them, the data access heat score strategy can be a strategy for determining the heat level corresponding to the data access heat. In practice, the data access heat score strategy can be a strategy for determining the heat level through the correspondence between the level and the data access heat interval within 1 hour. For example, the levels corresponding to the data access heat level strategy include: the first level, the second level, the third level and the fourth level. The data access heat interval corresponding to the first level is [0,100]. The data access heat interval corresponding to the second level is (100,500]. The data access heat interval corresponding to the third level is (500,1000]. The data access heat interval corresponding to the fourth level is (1000,+∞]. The data service label score strategy can be a strategy for determining the label score corresponding to the data service label. In practice, the data service label score strategy can be a strategy for determining the data service label score by the corresponding label similarity relationship between the data service label and the data heat label within 1 hour. In practice, the corresponding label similarity relationship between the data service label and the data heat label can be measured by the cosine similarity between the labels.
[0041] Optionally, generating the candidate storage tier according to the at least one first initial storage tier and the at least one second initial storage tier comprises the following steps:
[0042] The first step is to determine the data access heat level corresponding to the current data access heat according to the data access heat level strategy.
[0043] In the second step, according to the data service label score strategy, the data service label score corresponding to the current data service label is determined.
[0044] The third step is to determine the initial candidate storage level corresponding to the target data set through corresponding relationship query based on the above data access heat level and data business label score.
[0045] In a fourth step, at least one identical storage tier between the at least one first initial storage tier and the at least one second initial storage tier is determined.
[0046] In a fifth step, in response to determining that at least one identical storage tier includes the initial candidate storage tier, the initial candidate tier is determined as the candidate storage tier.
[0047] In step 6, in response to determining that at least one identical storage tier does not include the initial candidate storage tier, a storage tier closest to the initial candidate storage tier is determined from the at least one identical storage tier as a target storage tier.
[0048] Step 7: Obtain the currently set policy preference weights, wherein the policy preference weights include: first weights for data access heat level strategy and data service label score strategy, and second weights for data access heat partition strategy and data service label partition strategy.
[0049] In step eight, in response to determining that the first weight is greater than the second weight, the initial candidate tier is determined to be the candidate storage tier.
[0050] In step nine, in response to determining that the second weight is greater than the first weight, determining the target storage tier as the candidate storage tier.
[0051] The above-mentioned content of "in some optional implementation methods of some embodiments" as one of the inventive points of the present disclosure solves the technical problem mentioned in the background technology that "determining the storage tier corresponding to the data set based on the data access heat partitioning strategy and the data business label partitioning strategy is highly subjective and one-sided, resulting in the storage tier corresponding to the data set being inaccurate". Based on this, the present disclosure determines the storage tier corresponding to the data set in multiple aspects and dimensions through the data access heat tier strategy and the data business label score strategy included in the data partitioning strategy, avoiding the situation of high subjectivity and one-sidedness, resulting in the inaccurate determination of the storage tier corresponding to the data set.
[0052] Step 104 : In response to determining that the target data set has determined a corresponding candidate storage tier, storing the target data set in a first storage medium.
[0053] In some embodiments, in response to determining that the target data set has determined a corresponding candidate storage tier, the execution subject may store the target data set in a first storage medium, wherein the first storage medium may be a storage medium for storing the target data set as an alternative.
[0054] Step 105 : obtaining a first future data access heat sequence and a first future data service tag heat sequence in a preset first future time period.
[0055] In some embodiments, the above-mentioned execution entity can obtain the first future data access heat sequence and the first future data service label heat sequence under a preset first future time period. Among them, the first future time period can be a future time period for the current time. For example, the current time is March 1st. The first future time period can be "March 10th-March 31st". Among them, there is a one-to-one correspondence between the future time in the first future time period and the first future data access heat in the first future data access heat sequence. There is a one-to-one correspondence between the future time in the first future time period and the first future data service label heat in the first future data service label heat sequence. The first future data access heat can be the data access heat of the target data set at the future time. The first future data service label heat can be the data service label heat of the target data set at the future time.
[0056] Step 106, based on the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence and the historical data service tag heat sequence, determine whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level.
[0057] In some embodiments, the execution subject may determine whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence. The second storage medium may be the actual storage medium of the target data set.
[0058] In some optional implementations of some embodiments, determining whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence includes:
[0059] The first step is to generate the above-mentioned future predicted data access heat change information based on the above-mentioned historical data access heat sequence. Among them, the future predicted data access heat change information can represent the heat change of the data access heat corresponding to the above-mentioned target data set predicted in the first future time period. The heat change can represent the change of access frequency or the change of access number.
[0060] As an example, the execution subject may input the historical data access heat sequence into the first regression model to generate future predicted data access heat change information. For example, the first regression model may be a recurrent neural network model.
[0061] The second step is to generate future actual data access heat change information for the first future data access heat sequence. The future actual data access heat change information can represent the actual (real) heat change of the data access heat corresponding to the target data set in the first future time period. The heat change can represent the change of access frequency or the change of access times.
[0062] The third step is to generate the above-mentioned future predicted data service label heat change information based on the above-mentioned historical data service label heat sequence. Among them, the future predicted data service label heat change information can represent the heat change of the data service label heat corresponding to the above-mentioned target data set predicted in the first future time period. The heat change can represent the change in access frequency or the change in the number of accesses.
[0063] As an example, the execution entity may input the historical data service tag heat sequence into the second regression model to generate future predicted data access heat change information.
[0064] The fourth step is to generate future actual data service label heat change information for the first future data service label heat sequence. The future actual data service label heat change information can represent the actual (real) heat change of the data service label heat corresponding to the target data set in the first future time period. The heat change can represent the change in access frequency or the change in the number of accesses.
[0065] The fifth step, in response to determining that the above-mentioned future predicted data access heat change information matches the above-mentioned first future actual data access heat change information, and the above-mentioned future predicted data business label heat change information matches the above-mentioned first future actual data business label heat change information, determines to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level.
[0066] Step 6, in response to determining that the above-mentioned future predicted data access heat change information and the above-mentioned first future actual data access heat change information do not match, and / or the above-mentioned future predicted data business label heat change information and the above-mentioned first future actual data business label heat change information do not match, determine not to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level.
[0067] In some optional implementations of some embodiments, determining whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence includes:
[0068] The first step is to generate the above-mentioned total amount of predicted data access heat according to the above-mentioned historical data access heat sequence, wherein the future predicted total amount of data access heat can represent the total amount of heat of the data access heat corresponding to the above-mentioned target data set predicted in the first future time period.
[0069] As an example, first, the execution subject may input the historical data access heat sequence into the third regression model to generate a future predicted data access heat sequence. Then, each future predicted data access heat in the future predicted data access heat sequence is added up to generate a total future predicted data access heat. For example, the third regression model may be a linear regression model.
[0070] The second step is to generate the total amount of future actual data access heat for the first future data access heat sequence, wherein the total amount of future actual data access heat can represent the actual (real) total amount of heat of data access heat corresponding to the target data set in the first future time period.
[0071] As an example, the execution entity may add up the first future data access heats in the first future data access heat sequence to generate the total future actual data access heat.
[0072] The third step is to generate the above-mentioned total amount of future predicted data service label heat according to the above-mentioned historical data service label heat sequence. The total amount of future predicted data service label heat can represent the total amount of heat of the data service label heat corresponding to the above-mentioned target data set predicted in the first future time period.
[0073] As an example, first, the execution subject may input the historical data service tag heat sequence into the fourth regression model to generate a future prediction data service tag heat sequence. Then, each future prediction data service tag heat in the future prediction data service tag heat sequence is added to generate a total future prediction data service tag heat. For example, the fourth regression model may be a linear regression model.
[0074] The fourth step is to generate the total amount of future actual data service label heat for the first future data service label heat sequence.
[0075] As an example, the execution entity may add up the first future data service label heats in the first future data service label heat sequence to generate the total future actual data service label heat.
[0076] The fifth step, in response to determining that the total amount of access heat of the above-mentioned future predicted data matches the total amount of access heat of the above-mentioned future actual data, and the total amount of heat of the above-mentioned future predicted data business tags matches the total amount of heat of the above-mentioned future actual data business tags, determines to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level.
[0077] Step 6, in response to determining that the total amount of access heat of the above-mentioned future predicted data does not match the total amount of access heat of the above-mentioned future actual data, and / or the total amount of heat of the above-mentioned future predicted data business tags does not match the total amount of heat of the above-mentioned future actual data business tags, determine not to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level.
[0078] In some optional implementations of some embodiments, the steps further include:
[0079] In the first step, in response to determining not to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level, the future data access heat sequence and the historical data access heat sequence are sequence-fused to generate a first fused sequence.
[0080] In the second step, the future data service label heat sequence and the historical data service label heat sequence are sequence-fused to generate a second fused sequence.
[0081] As an example, the execution subject may perform sequence fusion on the future data service label heat sequence and the historical data service label heat sequence according to a time sequence relationship to generate a second fusion sequence.
[0082] The third step is to obtain a second future data access heat sequence and a second future data service tag heat sequence in a preset second future time period, wherein the time in the second future time period is the time after the first future time period. The second future time period may be a time period adjacent to the first future time period and after the first future time period.
[0083] The fourth step is to determine whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the second future data access heat sequence, the second future data service label heat sequence, the first fusion sequence and the second fusion sequence.
[0084] Step 107 : in response to determining to store, deleting the target data set in the first storage medium, and storing the target data set in the second storage medium.
[0085] In some embodiments, in response to determining to store, the execution entity may delete the target data set in the first storage medium, and store the target data set in the second storage medium.
[0086] In some optional implementations of some embodiments, after step 107, the steps further include:
[0087] The first step is to store the target data set stored in the second storage medium in a third storage medium in response to not receiving storage level determination information for the target data set within a first future predetermined time period.
[0088] In the second step, in response to the number of times that the storage level determination information for the above-mentioned target data set is received within the above-mentioned second future scheduled time period is less than the scheduled number of times, the target data set stored in the above-mentioned third storage medium is deleted, wherein the future time period corresponding to the above-mentioned first future scheduled time period is the third future time period, and the future time period corresponding to the above-mentioned second future scheduled time period is the fourth future time period, and the above-mentioned fourth future time period is the time period after the above-mentioned third future time period.
[0089] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the data storage method of some embodiments of the present disclosure, the target data set can be stored rationally and the subsequent data acquisition efficiency can be improved. Specifically, the reason for the unreasonable storage of the relevant target data set and the low data acquisition efficiency is that for a large number of data sets, all data sets are directly stored in the target storage medium, which not only requires the target storage medium to have a large storage capacity, but also in the process of subsequent data set acquisition, there are many useless data sets, which often leads to a long acquisition time and low acquisition efficiency. Based on this, the data storage method of some embodiments of the present disclosure, first, in response to receiving the storage level determination information for the target data set, determines the current data access heat and current data business label corresponding to the above target data set. Here, by determining the current data access heat and the corresponding current data business label corresponding to the target data set, the corresponding usage frequency of the target data set is characterized to reflect the data heat of the target data set, so as to facilitate the subsequent targeted storage in the corresponding storage medium. Then, the pre-set data partitioning strategy, the historical data access heat sequence and the historical data business label heat sequence corresponding to the above target data set are obtained, so as to facilitate the subsequent determination of the long-term heat of the target data set, so as to perform adaptive storage adjustment later. Then, according to the above-mentioned current data access heat and the above-mentioned current data service label, the above-mentioned data partitioning strategy can be used to accurately determine the candidate storage level corresponding to the above-mentioned target data set at the current time. Then, in response to determining that the above-mentioned target data set has determined the corresponding candidate storage level, the above-mentioned target data set is stored in the first storage medium, so as to determine data caching for the target data set. Then, the first future data access heat sequence and the first future data service label heat sequence in the preset first future time period are obtained for subsequent determination of the long-term heat corresponding to the target data set, so as to determine whether to store it in the second storage medium. Secondly, according to the above-mentioned first future data access heat sequence, the above-mentioned first future data service label heat sequence, the above-mentioned historical data access heat sequence and the above-mentioned historical data service label heat sequence, it can be accurately determined whether to store the target data set in the above-mentioned first storage medium in the second storage medium corresponding to the above-mentioned candidate storage level. Finally, in response to determining to store, the above-mentioned target data set in the above-mentioned first storage medium is deleted, and the above-mentioned target data set is stored in the above-mentioned second storage medium, so as to store the target data set in the corresponding storage medium. In summary, the current data popularity and future data popularity of the target data set can be used to achieve adaptive storage of the data set, which can greatly improve the efficiency of data set acquisition in the future.
[0090] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a data storage device. These device embodiments are Figure 1Corresponding to the method embodiments shown, the data storage device can be specifically applied to various electronic devices.
[0091] like Figure 2 As shown, a data storage device 200 includes: a first determination unit 201, a first acquisition unit 202, a second determination unit 203, a first storage unit 204, a second acquisition unit 205, a third determination unit 206 and a second storage unit 207. Among them, the first determination unit 201 is configured to determine the current data access heat and the current data business label corresponding to the above target data set in response to receiving the storage level determination information for the target data set; the first acquisition unit 202 is configured to obtain a preset data partitioning strategy, a historical data access heat sequence and a historical data business label heat sequence corresponding to the above target data set; the second determination unit 203 is configured to determine the candidate storage level corresponding to the above target data set according to the above current data access heat and the above current data business label and using the above data partitioning strategy; the first storage unit 204 is configured to store the above target data set in response to determining that the above target data set has determined the corresponding candidate storage level. stored in a first storage medium; a second acquisition unit 205 is configured to acquire a first future data access heat sequence and a first future data business label heat sequence under a preset first future time period; a third determination unit 206 is configured to determine whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the first future data access heat sequence, the first future data business label heat sequence, the historical data access heat sequence and the historical data business label heat sequence; a second storage unit 207 is configured to delete the target data set in the first storage medium in response to determining the storage, and store the target data set in the second storage medium.
[0092] It is understood that the units recorded in the data storage device 200 are similar to the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the data storage device 200 and the units contained therein, and will not be described in detail here.
[0093] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0094] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0095] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0096] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0097] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0098] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0099] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to receiving the storage level determination information for the target data set, determines the current data access heat and the current data business label corresponding to the above-mentioned target data set; obtains the pre-set data partitioning strategy, the historical data access heat sequence and the historical data business label heat sequence corresponding to the above-mentioned target data set; according to the above-mentioned current data access heat and the above-mentioned current data business label, using the above-mentioned data partitioning strategy, determines the candidate storage level corresponding to the above-mentioned target data set; in response to determining that the above-mentioned target data set has determined the corresponding A candidate storage level stores the target data set in a first storage medium; obtains a first future data access heat sequence and a first future data business label heat sequence under a preset first future time period; determines whether to store the target data set in the first storage medium in a second storage medium corresponding to the candidate storage level according to the first future data access heat sequence, the first future data business label heat sequence, the historical data access heat sequence and the historical data business label heat sequence; in response to determining to store, deletes the target data set in the first storage medium, and stores the target data set in the second storage medium.
[0100] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a first determination unit, a first acquisition unit, a second determination unit, a first storage unit, a second acquisition unit, a third determination unit, and a second storage unit. Among them, the names of these units do not constitute a limitation on the unit itself in certain circumstances, for example, the second acquisition unit may also be described as "a unit for acquiring a first future data access heat sequence and a first future data service label heat sequence under a preset first future time period".
[0103] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0104] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A data storage method, comprising: In response to receiving storage tier determination information for a target data set, determining a current data access heat and a current data service tag corresponding to the target data set; Obtaining a preset data partitioning strategy, a historical data access heat sequence and a historical data business tag heat sequence corresponding to the target data set; Determine, according to the current data access heat and the current data service tag, a candidate storage tier corresponding to the target data set using the data partitioning strategy; In response to determining that the target data set has determined a corresponding candidate storage tier, storing the target data set in a first storage medium; Acquire a first future data access heat sequence and a first future data service tag heat sequence in a preset first future time period; Determining whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence; In response to determining to store, the target data set in the first storage medium is deleted, and the target data set is stored in the second storage medium.
2. The method according to claim 1, wherein: After storing the target data set in the first storage medium in response to determining that the target data set has determined a corresponding candidate storage tier, the method further includes: In response to receiving acquisition information for the target data set, the target data set is acquired from the first storage medium.
3. The method according to claim 1, wherein: The data partitioning strategy includes: a data access heat partitioning strategy and a data service label partitioning strategy; and The determining, according to the current data access heat and the current data service tag, using the data partitioning strategy, a candidate storage tier corresponding to the target data set includes: According to the current data access heat, using the data access heat partitioning strategy, determining at least one first initial storage tier corresponding to the target data set; Determine, according to the current data service label, at least one second initial storage tier corresponding to the target data set by using the data service label partitioning strategy; The candidate storage tier is generated according to the at least one first initial storage tier and the at least one second initial storage tier.
4. The method according to claim 1, wherein: The determining, according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence, whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level includes: Generate future predicted data access heat change information based on the historical data access heat sequence; Generating future actual data access heat change information for the first future data access heat sequence; Generate future prediction data service tag heat change information based on the historical data service tag heat sequence; Generating future actual data service label heat change information for the first future data service label heat sequence; In response to determining that the future predicted data access heat change information matches the future actual data access heat change information, and the future predicted data service tag heat change information matches the future actual data service tag heat change information, determining to store the target data set in the first storage medium in a second storage medium corresponding to the candidate storage level; In response to determining that the future predicted data access heat change information and the future actual data access heat change information do not match, and / or the future predicted data business label heat change information and the future actual data business label heat change information do not match, it is determined not to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level.
5. The method according to claim 1, wherein: The determining, according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence, whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level includes: Generate a total amount of future predicted data access heat according to the historical data access heat sequence; generating a total amount of future actual data access heat for the first future data access heat sequence; Generate a total amount of future predicted data service tag heat according to the historical data service tag heat sequence; generating a total amount of future actual data service label heat for the first future data service label heat sequence; In response to determining that the total amount of future predicted data access heat matches the total amount of future actual data access heat, and the total amount of future predicted data service tag heat matches the total amount of future actual data service tag heat, determining to store the target data set in the first storage medium in a second storage medium corresponding to the candidate storage tier; In response to determining that the total amount of future predicted data access heat and the total amount of future actual data access heat do not match, and / or the total amount of future predicted data business tag heat and the total amount of future actual data business tag heat do not match, it is determined not to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level.
6. The method according to any one of claims 4-5, wherein: The method further comprises: In response to determining not to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage tier, performing sequence fusion on the first future data access heat sequence and the historical data access heat sequence to generate a first fused sequence; Performing sequence fusion on the first future data service label heat sequence and the historical data service label heat sequence to generate a second fused sequence; Acquire a second future data access heat sequence and a second future data service tag heat sequence in a preset second future time period, wherein the time in the second future time period is the time after the first future time period; Determine whether to store the target data set in the first storage medium in the second storage medium corresponding to the candidate storage level according to the second future data access heat sequence, the second future data service label heat sequence, the first fusion sequence and the second fusion sequence.
7. The method according to claim 1, wherein: The method further comprises: In response to not receiving storage tier determination information for the target data set within a first future predetermined time period, storing the target data set stored in the second storage medium in a third storage medium; In response to the fact that the number of times storage level determination information for the target data set is received within a second future predetermined time period is less than a predetermined number, the target data set stored in the third storage medium is deleted, wherein the future time period corresponding to the first future predetermined time period is the third future time period, and the future time period corresponding to the second future predetermined time period is a fourth future time period, and the fourth future time period is a time period after the third future time period.
8. A data storage device, comprising: A first determination unit is configured to, in response to receiving storage tier determination information for a target data set, determine a current data access heat and a current data service tag corresponding to the target data set; A first acquisition unit is configured to acquire a preset data partitioning strategy, a historical data access heat sequence and a historical data business tag heat sequence corresponding to the target data set; A second determining unit is configured to determine a candidate storage tier corresponding to the target data set according to the current data access heat and the current data service tag and using the data partitioning strategy; A first storage unit, configured to store the target data set in a first storage medium in response to determining that the target data set has determined a corresponding candidate storage tier; A second acquisition unit is configured to acquire a first future data access heat sequence and a first future data service tag heat sequence in a preset first future time period; a third determining unit, configured to determine whether to store the target data set in the first storage medium in a second storage medium corresponding to the candidate storage tier according to the first future data access heat sequence, the first future data service tag heat sequence, the historical data access heat sequence, and the historical data service tag heat sequence; The second storage unit is configured to delete the target data set in the first storage medium in response to determining to store, and store the target data set in the second storage medium.
9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data storage method and device and electronic equipment
CN109992210A
Data partition storage method, device and system
CN111930848A