Hierarchical storage method and device, equipment and storage medium
Through the multi-level storage method of the hierarchical storage method, the access frequency and number of copies of data files are monitored and adjusted, and the problem that the existing technology cannot meet the complex storage needs is solved, and the ultimate cost optimization and efficient data management of network disk storage are realized.
Patent Information
- Application Number
- CN202411026545.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-15
AI Technical Summary
The existing hierarchical storage methods cannot meet complex storage needs, especially in the network disk scenario where file reference relationships are complex, data access behaviors are highly random, and cost-benefit requirements are high, ultimate cost optimization cannot be achieved. .
Using a hierarchical storage method of multi-level storage media, the data file access frequency is monitored, and the number of copies is adjusted before migration to meet the data access performance requirements of different levels of storage media. , realize multi-level hierarchical storage of data files.
On the premise of meeting the product business's requirements for data file access performance, ultimate cost optimization is achieved, significantly saving storage costs, and providing a user-free experience.
Smart Images

Figure CN118964323A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to technical fields such as cloud storage, the Internet, and data storage in the storage field, and in particular to a layered storage method, device, equipment, and storage medium. Background Art
[0002] With the development of science and technology, the amount of data that needs to be processed is getting larger and larger. By storing data in layers, the efficiency of data management and access can be improved, which can reduce costs while ensuring performance. It is an effective data storage management strategy.
[0003] At present, user files are usually divided according to the frequency of access, and different storage solutions are used for each. Specifically, the granularity of the file is used to determine whether the time from the last access time to the current time of the file exceeds the preset length (for example, 30 days). If so, the file is determined to be an "infrequently accessed" file (i.e., cold data), and the file is transferred to a storage system with a lower cost. If a file stored in a storage system with a lower cost is accessed again, the file is determined to be a "frequently accessed" file (i.e., hot data), and the file is immediately migrated back to the original storage system.
[0004] However, in some scenarios, tiered storage using the above method cannot meet storage needs. Summary of the invention
[0005] The present disclosure provides a tiered storage method, apparatus, device and storage medium for better meeting storage requirements when performing tiered storage.
[0006] According to a first aspect of the present disclosure, a hierarchical storage method is provided, which is used for a storage system including multi-level storage media, wherein storage media at different levels in the multi-level storage media have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance. The hierarchical storage method includes:
[0007] Monitor the access frequency of data files in multi-level storage media within a preset time period;
[0008] If it is determined based on the access frequency that the data files are to be migrated from the current level storage medium to the target level storage medium, the data files are pre-processed according to the data access performance requirements of the target level storage medium, and the processed data files are transferred and stored in the target level storage medium. The pre-processing includes adjusting the number of copies.
[0009] According to a second aspect of the present disclosure, a hierarchical storage device is provided, which is used in a storage system including multi-level storage media, wherein storage media at different levels in the multi-level storage media have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance. The hierarchical storage device includes:
[0010] A monitoring unit, used to monitor the access frequency of data files in the multi-level storage medium within a preset time period;
[0011] A processing unit is used to perform pre-flow processing on the data file according to the data access performance requirements of the target-level storage medium if it is determined based on the access frequency that the data file is to be migrated from the current-level storage medium to the target-level storage medium, and to flow and store the processed data file to the target-level storage medium, wherein the pre-flow processing includes adjusting the number of copies.
[0012] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the hierarchical storage method described in the first aspect.
[0013] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the hierarchical storage method described in the first aspect.
[0014] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product comprising: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the hierarchical storage method described in the first aspect.
[0015] The technology disclosed in the present invention solves the problem that the storage demand cannot be met by the current tiered storage method. The technology disclosed in the present invention is used for a storage system including multi-level storage media, in which the data access performance of storage media at different levels is different, and the number of copies of data files stored in the storage media is positively correlated with the data access performance, that is, storage media with different data access performance are provided to perform multi-level tiered storage of data files; considering the flow strategy and efficiency of data files between storage media at different levels, when determining to migrate data files from the current level storage medium to the target level storage medium according to the access frequency of data files in the multi-level storage medium, the data files are pre-processed according to the data access performance requirements of the target level storage medium, and the pre-processing includes adjusting the number of copies, and the processed data files are transferred and stored to the target level storage medium, and on the premise of meeting the data file access performance requirements of the product business, intelligent tiered storage with extreme cost optimization is realized, which better meets the storage demand, greatly saves storage cost, and can meet the user's imperceptible experience.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0018] Figure 1 It is a schematic diagram of an application scenario to which the hierarchical storage method disclosed in the present invention is applicable;
[0019] Figure 2 is a schematic diagram according to a first embodiment of the present disclosure;
[0020] Figure 3 is a schematic diagram according to a second embodiment of the present disclosure;
[0021] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure;
[0022] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure;
[0023] Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure;
[0024] Figure 7 FIG. 7 is a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0026] The present invention discloses a hierarchical storage method, apparatus, device and storage medium, which are applied to technical fields such as cloud storage, Internet and data storage in the storage field, so as to better meet storage needs when performing hierarchical storage.
[0027] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0028] Tiered storage of data can improve the efficiency of data management and access, and reduce costs while ensuring performance.
[0029] At present, user files are usually differentiated according to the frequency of access, and different storage solutions are used for each. Specifically, it is determined according to the file granularity whether the time from the last access time to the current time of the file exceeds the preset length of time (for example, 30 days). If so, the file is determined to be an "infrequently accessed" file (i.e., cold data), and the file is transferred to a storage system with a lower cost. If a file stored in a storage system with a lower cost is accessed again, it is determined to be a "frequently accessed" file (i.e., hot data), and the file is immediately migrated back to the original storage system. The above-mentioned method for tiered storage has the characteristics of being common to various users and easy to use, and can meet simple tiered storage needs. It is also based on the simplest data hot and cold judgment strategy and storage conversion strategy, i.e., file upload time and last access time.
[0030] However, in some scenarios, the tiered storage method described above cannot meet the storage needs. For example, in the network disk scenario, the network disk provides each user with a certain amount of storage space, such as providing a large storage space of more than 2 terabytes (TB). With the rapid growth of user data, the annual storage cost is huge. In order to save storage costs, user files can be divided into cold data and hot data, and then stored separately. Cold data is stored in a system or medium with lower costs. Among them, the needs of tiered storage are more complex and have higher requirements, mainly including the following three aspects: (1) The file reference relationship is more complex: The same file can belong to different users or even different businesses; (2) Data access behavior is more complex: The access behavior of files from different businesses and users is more random; (3) The cost-benefit requirements are higher: Users do not care about the storage cost of the network disk, and extreme cost optimization is an important goal of tiered storage. Therefore, the tiered storage method described above cannot meet the needs of the network disk.
[0031] In order to solve the above problems, the present invention provides a tiered storage method for a storage system including multi-level storage media. The data access performance of storage media at different levels in the multi-level storage media is different. According to the access frequency of data files in the multi-level storage media, data files are circulated and stored between storage media at different levels. In order to maximize the storage cost-benefit, the flow strategy and efficiency of data files between storage media at different levels are customized and optimized. On the premise of meeting the data file access performance requirements of product business, intelligent tiered storage with extreme cost optimization is realized to better meet storage needs.
[0032] It can be seen that the tiered storage method provided by the present disclosure can be applied to network disk storage cost optimization.
[0033] Figure 1 It is a schematic diagram of an application scenario applicable to the hierarchical storage method of the present disclosure. The application scenario may include: a server cluster 11 and a client 12. The server cluster 11 includes multiple servers 111 and a storage 112. The server 111 is deployed with a storage system including multi-level storage media, and the data access performance of different levels of storage media in the multi-level storage media is different; the client 12 may be a tablet computer, a mobile phone, a laptop computer, a desktop computer, a smart home appliance, etc. The user uploads data files to the server 111 through the client 12; the server 111 transfers and stores the data files between different levels of storage media according to the access frequency of the data files in the multi-level storage media.
[0034] It should be noted that Figure 1 This is only a schematic diagram of an application scenario provided by the embodiment of the present disclosure. Figure 1 does not limit the equipment included in Figure 1 The positional relationship between the devices is limited.
[0035] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0036] Figure 2 Schematic diagram of the first embodiment of the present disclosure. Figure 2 As shown, the hierarchical storage method provided by the first embodiment of the present disclosure is used for a storage system including multi-level storage media, in which storage media at different levels have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance. The hierarchical storage method provided by the first embodiment of the present disclosure includes:
[0037] S201. Monitor the access frequency of data files in a multi-level storage medium within a preset time period.
[0038] In the embodiment of the present disclosure, the preset duration can be set as needed, and the embodiment of the present disclosure does not limit the preset duration. The preset duration is, for example, 1 month, 6 months or 1 year. The multi-level storage medium, for example, includes four different levels of storage media: initial level storage medium (also referred to as hot storage medium), first level storage medium (also referred to as warm storage medium), second level storage medium (also referred to as cold storage medium) and third level storage medium (also referred to as extremely cold storage medium). The data access performance of the four different levels of storage media is different, and the number of copies of data files stored in storage media of different levels is positively correlated with the data access performance, that is, the better the data access performance of the storage medium, the higher the number of copies of data files stored in the storage medium, and accordingly, the access frequency of data files in storage media of different levels is also different, and the better the data access performance of the storage medium, the higher the access frequency of data files stored in the storage medium.
[0039] Specifically, the initial level storage medium can be used to store the data files just uploaded by the user, using a higher number of copies. The size of the single data block corresponding to the data file is small, such as a maximum of 4 megabytes (MB), to meet the online upload requirements of different businesses. At the same time, it has a higher data access performance, with an average delay of, for example, less than 50 milliseconds, and a single data file speed of more than 10 megabytes / second (MB / s). The first level storage medium can be responsible for storing data files that are frequently accessed. Compared with the initial level storage medium, it has the same data access performance as the initial level storage medium, but the number of storage copies is lower, and the single data block corresponding to the data file is larger, usually for example, 8MB to 16MB. The second level storage medium can be responsible for storing data files with a low access frequency, such as less than 1 access per month on average, with a data access delay of 100 milliseconds to 300 milliseconds, and a lower number of storage copies. The third level storage medium can be responsible for storing data files with extremely low access frequency, such as no more than 1 access per year on average. The third level storage medium is, for example, a heterogeneous storage medium, and the data access delay is 3 to 5 minutes. The costs of the four different levels of storage media decrease in turn.
[0040] In this step, illustratively, the access frequency of data files in each level of storage medium within a preset time period may be monitored, for example, the access frequency of data files in the first level of storage medium within 1 month may be monitored.
[0041] S202. If it is determined based on the access frequency that the data file is to be migrated from the current level storage medium to the target level storage medium, the data file is pre-processed according to the data access performance requirements of the target level storage medium, and the processed data file is transferred and stored in the target level storage medium. The pre-processing includes adjusting the number of copies.
[0042] It can be understood that the access frequency of data files in storage media of different levels is different, and it can be determined whether to migrate the data files from the current level storage medium to the target level storage medium according to the access frequency. Exemplarily, referring to the example of step S201, the access frequency of data files in the first level storage medium within 1 month is monitored. If there is a data file with a number of accesses of 0 in the first level storage medium within 1 month, that is, the data file has not been accessed within 1 month, it can be determined that the data file is migrated from the first level storage medium (i.e., the current level storage medium) to the second level storage medium (i.e., the target level storage medium). After determining to migrate the data file from the first level storage medium to the second level storage medium, the data file can be pre-processed according to the data access performance requirements of the second level storage medium, and the processed data file can be stored in the second level storage medium, wherein the pre-processing can include the adjustment of the number of copies, and can also include the aggregation storage and / or compression storage of the data file to reduce the amount of data and reduce the storage cost. It can be understood that for storage media of different levels, the storage medium with better data access performance stores more data, has a higher number of copies, and has a higher access frequency of the stored data files. For details on how to determine the migration of data files from the current level storage medium to the target level storage medium based on the access frequency, and pre-processing the data files based on the data access performance requirements of the target level storage medium, please refer to the subsequent embodiments.
[0043] This step can be understood as a hot and cold data transfer strategy for storage media of different levels, which can effectively reduce the amount of data on high-cost storage media and ensure the maximization of storage cost benefits.
[0044] The disclosed embodiment is used for a storage system including multi-level storage media, in which storage media of different levels have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance, that is, storage media with different data access performances are provided to perform multi-level hierarchical storage of data files; taking into account the flow strategy and efficiency of data files between storage media of different levels, when determining to migrate data files from a current level storage medium to a target level storage medium according to the access frequency of data files in the multi-level storage medium, the data files are pre-processed according to the data access performance requirements of the target level storage medium, and the pre-processing includes adjusting the number of copies, and the processed data files are transferred and stored in the target level storage medium. On the premise of meeting the data file access performance requirements of the product business, intelligent hierarchical storage with extreme cost optimization is realized, which better meets storage needs, greatly saves storage costs, and can meet the user's unaware experience.
[0045] Figure 3FIG. 2 is a schematic diagram of a second embodiment of the present disclosure. Based on the above embodiment, the present disclosure further describes the hierarchical storage method. Figure 3 As shown, the hierarchical storage method provided by the second embodiment of the present disclosure may include:
[0046] S301, monitoring the access frequency of data files in a multi-level storage medium within a preset time period.
[0047] The implementation principle and technical effect of S301 can be referred to the above Figure 2 The embodiment of step S201 is not described in detail.
[0048] In the present disclosure, Figure 2 The step S202 may further include the following two steps S302 and S303:
[0049] S302. If it is determined based on the access frequency that the data file is to be migrated from the current level storage medium to the target level storage medium, and the data access performance of the current level storage medium is better than the data access performance of the target level storage medium, then data size reduction processing is performed on the data file to obtain the processed data file, and the number of copies corresponding to the target level storage medium is generated, and the processed data file is transferred and stored in the target level storage medium.
[0050] Exemplarily, when determining to migrate a data file from a current-level storage medium to a target-level storage medium, and the data access performance of the current-level storage medium is better than the data access performance of the target-level storage medium, considering that the number of copies corresponding to the target-level storage medium is lower than the number of copies of the current-level storage medium, and in order to ensure the data reading and writing throughput, the data file can be processed to reduce the data volume, obtain the processed data file, and generate the number of copies corresponding to the target-level storage medium, and the processed data file can be transferred and stored in the target-level storage medium.
[0051] Optionally, the number of replicas is adjusted based on an Erasure Coding (EC) encoding strategy.
[0052] For example, Figure 4 is a schematic diagram according to the third embodiment of the present disclosure, Figure 4As shown, in the third embodiment of the present disclosure, referring to the example of step S201, assuming that the current level storage medium is the initial level storage medium, and the target level storage medium is the first level storage medium, then for the initial level storage medium, because it is necessary to meet the upload requirements of different scenarios, the size of a single data block corresponding to the data file in the initial level storage medium is relatively small, for example, the maximum is 4MB. Under the EC encoding strategy of K+N, in order to ensure a higher throughput, the K value cannot be too large, so the number of storage copies corresponding to the same N value is relatively large. Wherein, K represents the number of original data fragments; N represents the number of encoded data fragments, and the same N value corresponds to different levels of storage media; the number of copies (for example, represented by C) is: C=(K+N) / K. Specifically, for the initial level storage medium, K is, for example, 4, and N is, for example, 4, then the number of copies is: (4+4) / 4=2, that is, C is 2. When migrating data files from the initial level storage medium to the first level storage medium, K is, for example, 8, and N remains unchanged, then the number of copies is: (8+4) / 8=1.5, that is, C is 1.5. It can be seen that the number of copies corresponding to the first-level storage medium is lower than the number of copies corresponding to the initial-level storage medium.
[0053] Optionally, performing data volume reduction processing on the data file to obtain the processed data file may include: performing aggregate storage and / or compression storage on the data file to obtain the processed data file, the data file includes multiple data files in the same directory of the same user.
[0054] Exemplarily, considering that the target-level storage medium has fewer read requests, if the data file is small, such as less than 32MB, multiple data files can be merged together for storage, that is, aggregate storage. At the same time, considering that the access to data files is local, multiple data files in the same directory of the same user are merged together for storage as much as possible. Since the data access performance requirements of the target-level storage medium are not high, the data files can continue to be compressed and stored based on the file type of the data file, thereby obtaining the processed data file.
[0055] S303. If it is determined based on the access frequency that the data file is to be migrated from the current level storage medium to the target level storage medium, and the data access performance of the current level storage medium is worse than that of the target level storage medium, then the data file is processed to increase the data volume to obtain the processed data file, and the number of copies corresponding to the target level storage medium is generated, and the processed data file is transferred and stored in the target level storage medium.
[0056] Exemplarily, when it is determined to migrate a data file from a current-level storage medium to a target-level storage medium, and the data access performance of the current-level storage medium is worse than that of the target-level storage medium, the data file can be processed to increase the data volume, such as decompressing the data file for storage, storing the aggregated data file separately, or dividing the data file into multiple data blocks for storage, etc., to obtain the processed data file, and generate the number of copies corresponding to the target-level storage medium, the number of copies corresponding to the target-level storage medium is higher than the number of copies of the current-level storage medium, and the processed data file is transferred and stored to the target-level storage medium. Among them, reference can be made to Figure 4 The number of replicas is adjusted in the embodiment.
[0057] It should be noted that the embodiment of the present disclosure does not limit the execution order of S302 and S303.
[0058] In the disclosed embodiment, storage media with different data access performances are provided to perform multi-level hierarchical storage of data files. Taking into account the flow strategy and efficiency of data files between storage media of different levels, when migrating data files from current-level storage media to target-level storage media, if the data access performance of the current-level storage media is better than the data access performance of the target-level storage media, data size reduction processing is performed on the data file to obtain the processed data file, and the number of copies corresponding to the target-level storage medium is generated, and the processed data file is transferred and stored in the target-level storage medium; if the data access performance of the current-level storage medium is worse than the data access performance of the target-level storage medium, data size increase processing is performed on the data file to obtain the processed data file, and the number of copies corresponding to the target-level storage medium is generated, and the processed data file is transferred and stored in the target-level storage medium. On the premise of meeting the data file access performance requirements of the product business, intelligent hierarchical storage with extreme cost optimization is realized, storage needs are better met, storage costs are greatly saved, and the user's non-perceived experience can be satisfied.
[0059] Figure 5It is a schematic diagram according to the fourth embodiment of the present disclosure. On the basis of the above embodiments, the embodiment of the present disclosure takes the storage system including four different levels of storage media, namely, initial level storage media (hot storage media), first level storage media (warm storage media), second level storage media (cold storage media) and third level storage media (extremely cold storage media) as an example to further illustrate the layered storage method. Among them, the access performance of the initial level storage medium is the same as the access performance of the first level storage medium, and the number of copies of data files stored in the initial level storage medium is greater than the number of copies of data files stored in the first level storage medium; the data access performance of the first level storage medium is better than that of the second level storage medium, and the number of copies of data files stored in the first level storage medium is greater than the number of copies of data files stored in the second level storage medium; the data access performance of the second level storage medium is better than that of the third level storage medium, and the number of copies of data files stored in the second level storage medium is greater than the number of copies of data files stored in the third level storage medium. Figure 5 As shown, the hierarchical storage method provided by the fourth embodiment of the present disclosure may include:
[0060] S501. During the data file upload process, data blocks corresponding to the data file are stored via an initial level storage medium.
[0061] It can be understood that during the data file upload process, the data file is uploaded in the form of data blocks, and the data blocks corresponding to the data file are stored in the initial level storage medium. In order to meet the upload requirements of different scenarios, the size of a single data block corresponding to the data file in the initial level storage medium is small, and the number of copies used is high. For example, the number of copies can be determined based on the EC encoding strategy, so that the initial level storage medium stores the original data blocks and encoded data blocks corresponding to the data file, wherein the encoded data blocks are redundant data blocks to prevent data loss, which can ensure the reliability of stored data.
[0062] S502: When the data file upload is completed, the data blocks corresponding to the data file are merged to obtain merged data blocks, and the merged data blocks are migrated from the initial level storage medium to the first level storage medium.
[0063] In this step, the difference between the first-level storage medium and the initial-level storage medium lies in the size of the data block and the corresponding number of copies. Compared with the initial-level storage medium, the data blocks stored in the first-level storage medium are larger and the number of storage copies is lower. The number of copies corresponding to the first-level storage medium can be generated based on the EC encoding strategy. When the data file is uploaded, the data blocks can be merged to obtain merged data blocks, and the merged data blocks can be migrated from the initial-level storage medium to the first-level storage medium. Among them, the initial-level storage medium can also be understood as a buffer in the process of uploading data files. In order to reduce the storage space occupied by the buffer, after the data file is uploaded, it is automatically triggered to migrate the data file from the initial-level storage medium to the first-level storage medium. At the same time, the initial-level storage medium reclaims the storage space in real time.
[0064] In addition, since the first-level storage medium has the same data access performance as the initial-level storage medium and has a lower cost, data files can be migrated from the initial-level storage medium to the first-level storage medium without migrating data files from the first-level storage medium to the initial-level storage medium.
[0065] Optionally, if the size of the data block corresponding to the data file to be uploaded is greater than the data block threshold, in response to an upload request for the data block of the data file to be uploaded, the data block of the data file to be uploaded is stored in the first-level storage medium.
[0066] Exemplarily, the data block threshold is 8MB. If the size of the data block corresponding to the data file to be uploaded is greater than 8MB, that is, the single transmission data block is large, then the data block of the data file to be uploaded can be directly stored in the first-level storage medium without the need for the initial-level storage medium as a buffer.
[0067] S503: Monitor the access frequency of data files in the multi-level storage medium within a preset time period.
[0068] The implementation principle and technical effects of S503 may refer to the aforementioned embodiments and will not be described in detail.
[0069] S504. If the access frequency of the data file is less than the first frequency threshold, determine whether the data file is a private file, and mark it to obtain a marked data file, the marked data file includes a private file and a non-private file, determine to migrate the marked data file from the first-level storage medium to the second-level storage medium, and execute step S505.
[0070] Exemplarily, the first frequency threshold is, for example, the number of accesses within one month is 0. When the access frequency is less than the first frequency threshold, it can be determined whether the data file is a private file, that is, whether the data file is a file dedicated to the user. If it is a private file, the data file is marked as a private file so that the second-level storage medium can store private files and non-private files separately, with the purpose that private files can be further dumped to the third-level storage medium, while non-private files are no longer dumped to the third-level storage medium. After obtaining the marked data file, it is determined to migrate the marked data file from the first-level storage medium to the second-level storage medium.
[0071] S505: Perform data size reduction processing on the data file to obtain a processed data file, generate a number of copies corresponding to the second-level storage medium, and transfer and store the processed data file to the second-level storage medium.
[0072] Exemplarily, the second-level storage medium can use the same storage medium as the first-level storage medium, such as a large-capacity hard disk drive (HDD), but the number of copies is lower, and the single data block is larger, usually 32MB to 64MB, for example. A data compression storage with a higher compression level (i.e., a higher compression rate) and a strategy of aggregate storage of multiple small files can be adopted. Among them, for aggregate storage, if the data file is relatively small (e.g., less than 32MB), multiple data files can be merged together for storage. At the same time, considering that data access has locality, multiple data files under the same directory of the same user are merged together as much as possible. For compressed storage, since the requirements for the data access performance of the second-level storage medium are not high, the data blocks corresponding to the data files can be compressed and stored. Through aggregate storage and compressed storage, the data volume reduction processing of the data file is realized to obtain the processed data file. The number of copies corresponding to the second-level storage medium can be generated based on the EC encoding strategy, so that the processed data file is transferred and stored to the second-level storage medium.
[0073] S506. If the access frequency of the data file is greater than or equal to the second frequency threshold, determine to migrate the data file from the second-level storage medium to the first-level storage medium, and the second frequency threshold is greater than the first frequency threshold, execute step S507.
[0074] Exemplarily, the second frequency threshold is, for example, 2 accesses within 1 month. Considering that the second-level storage medium itself provides a certain real-time data access capability, therefore, for access to data files in the second-level storage medium, the corresponding data files will not be directly migrated back to the first-level storage medium, but an access mark will be added to it. If the data file is repeatedly accessed within 1 month, the data file will be migrated back from the second-level storage medium to the first-level storage medium.
[0075] Optionally, determining to migrate the data file from the second-level storage medium to the first-level storage medium may include: if the data file includes multiple data files to be migrated, determining to migrate the multiple data files to be migrated back to the first-level storage medium.
[0076] Exemplarily, because the second-level storage medium is aggregate storage, if the data block to be migrated includes multiple data files to be migrated, the multiple data files to be migrated will be migrated to the first-level storage medium at the same time, and then the data block corresponding to the second-level storage medium will be recycled.
[0077] S507: Perform data volume enlargement processing on the data file to obtain a processed data file, generate a number of copies corresponding to the first-level storage medium, and transfer and store the processed data file to the first-level storage medium.
[0078] In this step, for example, the data file can be decompressed and stored, the aggregated data file can be stored separately, or the data file can be divided into multiple data blocks for storage according to the size of a single data block corresponding to the first-level storage medium, etc., to obtain the processed data file, and generate the number of copies corresponding to the target-level storage medium, and transfer the processed data file to the first-level storage medium for storage.
[0079] S508. If the access frequency of the private file is less than the third frequency threshold, determine to migrate the private file from the second-level storage medium to the third-level storage medium, and the third frequency threshold is less than the first frequency threshold, and execute step S509.
[0080] As can be seen from the example of step S504, private files can be further transferred to the third-level storage medium, while non-private files are no longer transferred to the third-level storage medium. Exemplarily, the third frequency threshold is, for example, the number of accesses within 6 months is 0, and the third-level storage medium is, for example, a heterogeneous storage medium, which is used to store private files that users do not access for a long time (i.e., more than half a year). If the access frequency of the private file is less than the third frequency threshold, it is determined to migrate the private file from the second-level storage medium to the third-level storage medium.
[0081] S509: Perform data volume reduction processing on the private file to obtain the processed private file, generate the number of copies corresponding to the third-level storage medium, and transfer and store the processed private file to the third-level storage medium.
[0082] In this step, the single data block stored in the third-level storage medium is larger, usually greater than or equal to 1GB, so before migrating the private file from the second-level storage medium to the third-level storage medium, the smaller data blocks can be merged, that is, aggregated and / or compressed to obtain the processed private file, and the number of copies corresponding to the third-level storage medium is generated, and the processed private file is transferred and stored to the third-level storage medium. In particular, multiple data files in the same directory of the same user are merged together for storage as much as possible; the number of copies corresponding to the third-level storage medium can be determined by copying the private file, or can be obtained based on the EC encoding strategy.
[0083] S510. If the access frequency of the private file is greater than or equal to the fourth frequency threshold, determine to migrate the private file from the third-level storage medium to the first-level storage medium, and the fourth frequency threshold is greater than the second frequency threshold, execute step S511.
[0084] Exemplarily, the fourth frequency threshold is, for example, accessed twice within a week. If a private file in the third-level storage medium is accessed, the data flow logic of the migration will not be performed immediately, but the accessed private file will be stored in a buffer first. The reason is that the data file in the third-level storage medium must be the user's private file, and the probability of the same private file being repeatedly accessed by its owner in a short period of time is extremely small, so it can be considered that the access to the private file in the third-level storage medium is an occasional single behavior. If the accessed private file is accessed again before the buffer expiration time is reached, it can be determined that the private file is migrated from the third-level storage medium to the first-level storage medium, rather than migrating the private file from the third-level storage medium to the second-level storage medium. If the accessed private file is not accessed again after the buffer expiration time is reached, it can be determined that the private file in the buffer will be expired and eliminated. The buffer expiration time is set to 1 week, for example.
[0085] It should be noted that the embodiment of the present disclosure does not limit the execution order of S504, S506, S508 and S510.
[0086] S511, perform data volume enlargement processing on the private file to obtain the processed private file, generate the number of copies corresponding to the first-level storage medium, and transfer and store the processed private file to the first-level storage medium.
[0087] In this step, the data blocks in the first-level storage medium are usually 8MB to 16MB, and when migrating private files from the third-level storage medium to the first-level storage medium, each private file can be processed separately according to its size. If a private file is less than or equal to 16MB, it can be stored as one data block; if a private file is larger than 16MB, it can be divided into multiple data blocks of 16MB and then stored.
[0088] Based on the above embodiments, it can be understood that the initial level storage medium (hot storage medium) is responsible for storing the data files that the user has just uploaded, using a higher number of copies, and the size of the single data block corresponding to the data file is smaller, such as a maximum of 4MB, and has higher data access performance. The first level storage medium (warm storage medium) is responsible for storing data files that are accessed more frequently. Compared with the initial level storage medium, it has the same data access performance as the initial level storage medium, but the number of storage copies is lower, and the single data block corresponding to the data file is larger, usually for example, 8MB to 16MB. The second level storage medium (cold storage medium) is responsible for storing data files with a lower access frequency, and the number of storage copies is even lower. The third level storage medium (extremely cold storage medium) is responsible for storing data files with extremely low access frequency. The costs of the four different levels of storage medium are reduced successively to maximize cost-benefit.
[0089] In the embodiment of the present disclosure, during the data file upload process, the data blocks corresponding to the data file are stored in the initial level storage medium. When the data file upload is completed, the data blocks corresponding to the data file are merged to obtain the merged data blocks, and the merged data blocks are migrated from the initial level storage medium to the first level storage medium; the access frequency of the data file in the multi-level storage medium within a preset time period is monitored. If the access frequency of the data file is less than the first frequency threshold, the data file is pre-processed before circulation, and the processed data file is circulated and stored from the first level storage medium to the second level storage medium; if the access frequency of the data file is greater than or equal to the second frequency threshold, then the data file is circulated. Pre-process the private files and migrate the processed data files from the second-level storage medium to the first-level storage medium; if the access frequency of the private files is less than the third frequency threshold, pre-process the private files and transfer the processed private files from the second-level storage medium to the third-level storage medium; if the access frequency of the private files is greater than or equal to the fourth frequency threshold, pre-process the private files and transfer the processed private files from the third-level storage medium to the first-level storage medium. On the premise of meeting the data file access performance requirements of the product business, intelligent tiered storage with extreme cost optimization is realized, which greatly saves storage costs and can meet the user's non-perceived experience.
[0090] On the basis of the above embodiments, in the embodiments of the present disclosure, the costs of storage media at different levels in the multi-level storage media are shown in Table 1.
[0091] Table 1
[0092]
[0093] Through the tiered storage method provided by the embodiment of the present disclosure, the data distribution of the storage system can be: 1%:24%:50%:25%. Accordingly, the overall storage cost can be lower than the storage cost of the original initial level storage medium (hot storage medium): 1-1%-90%*24%-75%*50%-40%*25%=29.9%, which means an overall storage cost saving of nearly 30%.
[0094] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0095] Figure 6 is a schematic diagram according to the fifth embodiment of the present disclosure. Figure 6 As shown, the hierarchical storage device 600 provided in the fifth embodiment of the present disclosure is used in a storage system including multi-level storage media, in which different levels of storage media have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance. Figure 6 As shown, the hierarchical storage device 600 provided in the fifth embodiment of the present disclosure includes: a monitoring unit 601 and a processing unit 602. Among them:
[0096] The monitoring unit 601 is used to monitor the access frequency of data files in the multi-level storage medium within a preset time period.
[0097] Processing unit 602 is used to perform pre-processing on the data file according to the data access performance requirements of the target level storage medium if it is determined based on the access frequency that the data file is to be migrated from the current level storage medium to the target level storage medium, and to transfer and store the processed data file to the target level storage medium. The pre-processing includes adjusting the number of copies.
[0098] In some embodiments, the processing unit includes: a first processing module (not shown in the figure), which is used to reduce the data volume of the data file if the data access performance of the current level storage medium is better than the data access performance of the target level storage medium, obtain the processed data file, and generate the number of copies corresponding to the target level storage medium; a second processing module (not shown in the figure), which is used to increase the data volume of the data file if the data access performance of the current level storage medium is worse than the data access performance of the target level storage medium, obtain the processed data file, and generate the number of copies corresponding to the target level storage medium.
[0099] In some embodiments, the first processing module includes: a processing submodule (not shown in the figure) for performing aggregate storage and / or compression storage on data files to obtain processed data files, and the data files include multiple data files in the same directory of the same user.
[0100] In some embodiments, the current level storage medium is a first level storage medium, and the processing unit includes: a first determination module (not shown in the figure), which is used to determine whether the data file is a private file and mark it to obtain a marked data file if the access frequency of the data file is less than a first frequency threshold, and the marked data file includes a private file and a non-private file; and determine to migrate the marked data file from the first level storage medium to the second level storage medium, and the data access performance of the first level storage medium is better than that of the second level storage medium.
[0101] In some embodiments, the current level storage medium is a second level storage medium, and the processing unit includes: a second determination module (not shown in the figure), which is used to determine to migrate the data file from the second level storage medium to the first level storage medium if the access frequency of the data file is greater than or equal to the second frequency threshold, and the second frequency threshold is greater than the first frequency threshold.
[0102] In some embodiments, the second determination module includes: a determination submodule (not shown in the figure) for determining to migrate the multiple data files to be migrated back to the first-level storage medium if the data file includes multiple data files to be migrated back.
[0103] In some embodiments, the current level storage medium is a second level storage medium, and the processing unit includes: a third determination module (not shown in the figure), which is used to determine to migrate the private file from the second level storage medium to the third level storage medium if the access frequency of the private file is less than a third frequency threshold, and the third frequency threshold is less than the first frequency threshold, and the data access performance of the second level storage medium is better than that of the third level storage medium.
[0104] In some embodiments, the current level storage medium is a third level storage medium, and the processing unit includes: a fourth determination module (not shown in the figure), which is used to determine to migrate the private file from the third level storage medium to the first level storage medium if the access frequency of the private file is greater than or equal to a fourth frequency threshold, and the fourth frequency threshold is greater than the second frequency threshold.
[0105] In some embodiments, different levels of storage media also include an initial level storage medium, the access performance of the initial level storage medium is the same as the access performance of the first level storage medium, and the number of copies of data files stored in the initial level storage medium is greater than the number of copies of data files stored in the first level storage medium; the initial level storage medium is used to store data blocks corresponding to data files during the data file upload process, and to merge the data blocks to obtain merged data blocks when the data file upload is completed, and migrate the merged data blocks to the first level storage medium.
[0106] In some embodiments, the processing unit also includes: a storage module (not shown in the figure), which is used to store the data block of the data file to be uploaded to the first level storage medium in response to an upload request for the data block of the data file to be uploaded if the size of the data block corresponding to the data file to be uploaded is greater than the data block threshold.
[0107] In some embodiments, the number of replicas is adjusted based on the EC encoding strategy.
[0108] Figure 6 The provided tiered storage device can execute the steps in the method embodiment corresponding to the above-mentioned tiered storage method. Its implementation principle and technical effects are similar and will not be described in detail here.
[0109] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the solution provided by any of the above embodiments.
[0110] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute a solution provided by any of the above embodiments.
[0111] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0112] Figure 7 Schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0113] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can store data stored in a read-only memory (ROM) ( Figure 7 A computer program in ROM 702 is loaded from storage unit 708 to random access memory (RAM) ( Figure 7 The computer programs in the RAM 703 are used to perform various appropriate actions and processes. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. The input / output (I / O) interface ( Figure 7 An I / O interface 705 , for example, is also connected to the bus 704 .
[0114] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0115] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the hierarchical storage method. For example, in some embodiments, the hierarchical storage method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the hierarchical storage method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the tiered storage method in any other appropriate manner (eg, by means of firmware).
[0116] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0118] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0120] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN), and the Internet.
[0121] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0123] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, fusions, sub-fusions and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A tiered storage method, for use in a storage system comprising multi-level storage media, wherein different levels of storage media in the multi-level storage media have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance, the tiered storage method comprising: Monitor the access frequency of data files in multi-level storage media within a preset time period; If it is determined based on the access frequency that the data file is to be migrated from the current level storage medium to the target level storage medium, then the data file is pre-processed according to the data access performance requirements of the target level storage medium, and the processed data file is transferred and stored in the target level storage medium, and the pre-processing includes adjusting the number of copies.
2. The hierarchical storage method according to claim 1, wherein: The pre-transfer processing of the data file according to the data access performance requirement of the target-level storage medium includes: If the data access performance of the current-level storage medium is better than that of the target-level storage medium, data size reduction processing is performed on the data file to obtain a processed data file, and the number of copies corresponding to the target-level storage medium is generated; If the data access performance of the current level storage medium is worse than that of the target level storage medium, data volume enlargement processing is performed on the data file to obtain the processed data file, and the number of copies corresponding to the target level storage medium is generated.
3. The hierarchical storage method according to claim 2, wherein: The step of performing data volume reduction processing on the data file to obtain the processed data file comprises: Aggregate storage and / or compression storage are performed on the data files to obtain processed data files, where the data files include multiple data files in the same directory of the same user.
4. The hierarchical storage method according to any one of claims 1 to 3, wherein: The current level storage medium is a first level storage medium, and determining to migrate the data file from the current level storage medium to the target level storage medium according to the access frequency includes: If the access frequency of the data file is less than the first frequency threshold, determining whether the data file is a private file, and marking the data file to obtain a marked data file, wherein the marked data file includes a private file and a non-private file; It is determined to migrate the marked data file from the first-level storage medium to a second-level storage medium, and the data access performance of the first-level storage medium is better than that of the second-level storage medium.
5. The hierarchical storage method according to claim 4, wherein: The current level storage medium is the second level storage medium, and determining to migrate the data file from the current level storage medium to the target level storage medium according to the access frequency includes: If the access frequency of the data file is greater than or equal to a second frequency threshold, it is determined to migrate the data file from the second-level storage medium to the first-level storage medium, and the second frequency threshold is greater than the first frequency threshold.
6. The hierarchical storage method according to claim 5, wherein: The determining to migrate the data file from the second-level storage medium back to the first-level storage medium includes: If the data file includes a plurality of data files to be migrated back, it is determined to migrate the plurality of data files to be migrated back to the first-level storage medium.
7. The hierarchical storage method according to claim 5, wherein: The current level storage medium is a second level storage medium, and determining to migrate the data file from the current level storage medium to the target level storage medium according to the access frequency includes: If the access frequency of the private file is less than the third frequency threshold, it is determined to migrate the private file from the second-level storage medium to the third-level storage medium, the third frequency threshold is less than the first frequency threshold, and the data access performance of the second-level storage medium is better than that of the third-level storage medium.
8. The hierarchical storage method according to claim 7, wherein: The current level storage medium is the third level storage medium, and determining to migrate the data file from the current level storage medium to the target level storage medium according to the access frequency includes: If the access frequency of the private file is greater than or equal to a fourth frequency threshold, it is determined to migrate the private file from the third-level storage medium to the first-level storage medium, and the fourth frequency threshold is greater than the second frequency threshold.
9. The hierarchical storage method according to claim 8, wherein: The different levels of storage media also include an initial level storage medium, the access performance of the initial level storage medium is the same as the access performance of the first level storage medium, and the number of copies of data files stored in the initial level storage medium is greater than the number of copies of data files stored in the first level storage medium; the initial level storage medium is used to store data blocks corresponding to data files during the data file upload process, and to merge the data blocks to obtain merged data blocks when the data file upload is completed, and migrate the merged data blocks to the first level storage medium.
10. The hierarchical storage method according to claim 9, wherein: Also includes: If the size of the data block corresponding to the data file to be uploaded is greater than the data block threshold, in response to an upload request for the data block of the data file to be uploaded, the data block of the data file to be uploaded is stored in the first-level storage medium.
11. The hierarchical storage method according to any one of claims 1 to 3, wherein: The number of replicas is adjusted based on the erasure code (EC) encoding strategy.
12. A tiered storage device, for use in a storage system comprising multi-level storage media, wherein different levels of storage media in the multi-level storage media have different data access performances, and the number of copies of data files stored in the storage media is positively correlated with the data access performance, the tiered storage device comprising: A monitoring unit, used to monitor the access frequency of data files in the multi-level storage medium within a preset time period; A processing unit is used for, if it is determined based on the access frequency that the data file is to be migrated from the current level storage medium to the target level storage medium, then, according to the data access performance requirements of the target level storage medium, performing pre-flow processing on the data file, and transferring and storing the processed data file to the target level storage medium, the pre-flow processing including adjusting the number of copies.
13. The hierarchical storage device according to claim 12, wherein: The processing unit comprises: A first processing module is used for, if the data access performance of the current level storage medium is better than the data access performance of the target level storage medium, performing data volume reduction processing on the data file to obtain the processed data file, and generating the number of copies corresponding to the target level storage medium; The second processing module is used to increase the data volume of the data file if the data access performance of the current level storage medium is worse than that of the target level storage medium, obtain the processed data file, and generate the number of copies corresponding to the target level storage medium.
14. The hierarchical storage device according to claim 13, wherein: The first processing module comprises: The processing submodule is used to perform aggregate storage and / or compression storage on the data files to obtain processed data files, wherein the data files include multiple data files in the same directory of the same user.
15. The hierarchical storage device according to any one of claims 12 to 14, wherein: The current level storage medium is a first level storage medium, and the processing unit includes: The first determination module is used to determine whether the data file is a private file and mark it to obtain a marked data file if the access frequency of the data file is less than a first frequency threshold, and the marked data file includes a private file and a non-private file; and determine to migrate the marked data file from the first-level storage medium to the second-level storage medium, and the data access performance of the first-level storage medium is better than that of the second-level storage medium.
16. The hierarchical storage device according to claim 15, wherein: The current level storage medium is the second level storage medium, and the processing unit includes: The second determination module is used to determine to migrate the data file from the second-level storage medium to the first-level storage medium if the access frequency of the data file is greater than or equal to a second frequency threshold, and the second frequency threshold is greater than the first frequency threshold.
17. The hierarchical storage device according to claim 16, wherein: The second determining module comprises: The determination submodule is configured to determine whether to migrate the multiple data files to be migrated back to the first-level storage medium if the data file includes multiple data files to be migrated back.
18. The hierarchical storage device according to claim 16, wherein: The current level storage medium is a second level storage medium, and the processing unit includes: A third determination module is used to determine to migrate the private file from the second-level storage medium to the third-level storage medium if the access frequency of the private file is less than a third frequency threshold, the third frequency threshold is less than the first frequency threshold, and the data access performance of the second-level storage medium is better than that of the third-level storage medium.
19. The hierarchical storage device according to claim 18, wherein: The current level storage medium is the third level storage medium, and the processing unit includes: The fourth determination module is used to determine to migrate the private file from the third-level storage medium to the first-level storage medium if the access frequency of the private file is greater than or equal to a fourth frequency threshold, and the fourth frequency threshold is greater than the second frequency threshold.
20. The hierarchical storage device according to claim 19, wherein: The different levels of storage media also include an initial level storage medium, the access performance of the initial level storage medium is the same as the access performance of the first level storage medium, and the number of copies of data files stored in the initial level storage medium is greater than the number of copies of data files stored in the first level storage medium; the initial level storage medium is used to store data blocks corresponding to data files during the data file upload process, and to merge the data blocks to obtain merged data blocks when the data file upload is completed, and migrate the merged data blocks to the first level storage medium.
21. The hierarchical storage device according to claim 20, wherein: The processing unit also includes: The storage module is used for storing the data block of the data file to be uploaded in the first level storage medium in response to an upload request for the data block of the data file to be uploaded if the size of the data block corresponding to the data file to be uploaded is greater than the data block threshold.
22. The hierarchical storage device according to any one of claims 12 to 14, wherein: The number of replicas is adjusted based on the erasure code (EC) encoding strategy.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the tiered storage method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the hierarchical storage method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the tiered storage method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Data compression engine and method used for big data storage system
CN107463606A
Distributed data storage method and device, electronic equipment and readable medium
CN115981559A
Data hierarchical storage method and device
CN116414296A
Data processing method and device, storage system and computer readable storage medium
CN116909490A
Low-energy-consumption all-flash storage method and system
CN117806556A
Cited By
Data processing method and device, computer equipment, storage medium and program product
CN120560580A
