Data storage method and device

By generating a resource pool statistical matrix and moving cold data to an appropriate level of storage location, it solves the problem of improving data storage efficiency and security in the Internet era, achieving rational utilization of resources and reducing operation and maintenance costs.

CN113721854BActive Publication Date: 2024-10-22CHINA CONSTRUCTION BANK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111015623.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2024-10-22
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

In the Internet era, the volume of core business data and transaction data of banks and other enterprises has grown rapidly, leading to increased data storage efficiency and security requirements. If there is a large amount of cold data in the storage resource pool, it will increase data operation and maintenance costs and cause resource waste.

Method used

By obtaining information about each data in the storage system, a statistical matrix of the resource pool is generated to determine whether cold data exists, move the cold data from the high-level resource pool to the appropriate low-level resource pool, and build a mapping file to locate the new storage location. Realize reasonable storage adjustment of cold data.

Benefits of technology

It effectively avoids storing a large amount of cold data in high-level resource pools, reduces data operation and maintenance costs, optimizes resource utilization, and improves storage efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113721854B_ABST
    Figure CN113721854B_ABST
Patent Text Reader

Abstract

The present invention provides a data storage method and device, the method comprising: obtaining data information of each data in a storage system, the storage system being provided with resource pools of multiple storage levels; generating a statistical matrix corresponding to each resource pool based on each data information; judging whether there is cold data in the storage system based on the data information corresponding to each data; if there is, determining a first resource pool and its storage level currently storing the cold data; setting a mobile storage location of the cold data based on the data information of the cold data and the storage level of the first resource pool; determining a second resource pool corresponding to the mobile storage location of the cold data, and constructing a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool; saving the mapping file, and moving and storing the cold data to the second resource pool. By applying the method provided by the present invention, the storage location of the data can be reasonably adjusted to avoid storing a large amount of cold data in a high-level resource pool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In the Internet era, the amount of core business data and other transaction data of banks has increased exponentially, and the requirements for data storage efficiency and security have become increasingly higher. In order to ensure the security of stored data, many companies have divided the attributes of storage resource pools so that important data can be stored by level. Data storage is to ensure that applications can access the data again, but important data also has high requirements for the security and performance of storage resource pools. If there is a large amount of cold data in this type of storage resource pool, it will increase the data operation and maintenance costs of the enterprise and also cause a great waste of existing resources. Summary of the invention

[0003] In view of this, the present invention provides a data storage method, through which the storage location of data can be reasonably adjusted to avoid storing a large amount of cold data in a high-level resource pool.

[0004] The present invention also provides a data storage device to ensure the implementation and application of the above method in practice.

[0005] A data storage method, comprising:

[0006] Acquire data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data;

[0007] Based on each of the data information, generate a statistical matrix corresponding to each of the resource pools;

[0008] Based on the data information corresponding to each of the data, determining whether there is cold data in the storage system;

[0009] When cold data exists in the storage system, determining that a resource pool currently storing the cold data is a first resource pool, and a storage level of the first resource pool;

[0010] Based on the data information of the cold data and the storage level of the first resource pool, setting a mobile storage location of the cold data;

[0011] Determine that the resource pool corresponding to the mobile storage location of the cold data is the second resource pool, and construct a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the mobile storage location of the cold data;

[0012] The mapping file is saved, and the cold data is moved and stored to the second resource pool.

[0013] In the above method, optionally, generating a statistical matrix corresponding to each resource pool based on each piece of data information includes:

[0014] Obtaining access parameters of each data stored in each data information within a preset monitoring period;

[0015] Determine the data type and data attribute of each data stored in each of the resource pools;

[0016] Based on the access parameters corresponding to each of the data in each of the resource pools, counting the first access times corresponding to each of the data types in each of the resource pools, the second access times and the access frequency corresponding to each of the data attributes;

[0017] Based on the first access count corresponding to each data type in each resource pool, the second access count corresponding to each data attribute and the access frequency, a statistical matrix corresponding to each resource pool is constructed.

[0018] In the above method, optionally, judging whether there is cold data in the storage system based on the data information corresponding to each of the data includes:

[0019] Calculate the access frequency of each data based on the access parameter corresponding to each data;

[0020] Determine whether the access frequency of each data is lower than the frequency threshold corresponding to the resource pool to which it belongs;

[0021] If the access frequency of any data is lower than the access frequency corresponding to the resource pool to which it belongs, the data is determined to be cold data;

[0022] If the access frequency of any data is not lower than the access frequency corresponding to the resource pool to which it belongs, it is determined that the data is not cold data.

[0023] The above method, optionally, includes setting the storage level of each resource pool, including:

[0024] Determine the service business currently supported by the storage system and the target data type related to the service business;

[0025] Determine the proportion of data of the target data type contained in each resource pool in the storage system;

[0026] According to the proportion of data of the target data type contained in each resource pool in the storage system, a weight value corresponding to each resource pool is set;

[0027] The storage level of each resource pool in the storage system to which it belongs is set according to the weight value of each resource pool in the storage system to which it belongs.

[0028] The above method may optionally further include:

[0029] When receiving a data access request corresponding to the cold data sent by the server, obtaining a mapping file corresponding to the cold data;

[0030] Based on the mapping file, determining a target resource pool currently storing the cold data;

[0031] An access operation of the cold data corresponding to the data access request is performed in the target resource pool, and an operation result corresponding to the access operation is returned to the server.

[0032] A data storage device, comprising:

[0033] An acquisition unit, used for acquiring data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data;

[0034] A generating unit, configured to generate a statistical matrix corresponding to each resource pool based on each of the data information;

[0035] A judging unit, configured to judge whether there is cold data in the storage system based on data information corresponding to each of the data;

[0036] a determining unit, configured to, when cold data exists in the storage system, determine that a resource pool currently storing the cold data is a first resource pool, and a storage level of the first resource pool;

[0037] a setting unit, configured to set a mobile storage location of the cold data based on data information of the cold data and a storage level of the first resource pool;

[0038] a construction unit, configured to determine that the resource pool corresponding to the mobile storage location of the cold data is the second resource pool, and to construct a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the mobile storage location of the cold data;

[0039] The storage unit is used to save the mapping file and move the cold data to the second resource pool for storage.

[0040] In the above device, optionally, the generating unit includes:

[0041] An acquisition subunit, used for acquiring access parameters of each data stored in each data information within a preset monitoring period;

[0042] A first determining subunit, configured to determine a data type and a data attribute of each data stored in each of the resource pools;

[0043] A statistical subunit, for counting the first access times corresponding to each data type in each resource pool, the second access times corresponding to each data attribute, and the access frequency based on the access parameters corresponding to each data in each resource pool;

[0044] The construction subunit is used to construct a statistical matrix corresponding to each resource pool based on the first access number corresponding to each data type in each resource pool, the second access number corresponding to each data attribute and the access frequency.

[0045] In the above device, optionally, the judging unit includes:

[0046] A calculation subunit, configured to calculate the access frequency of each of the data based on the access parameter corresponding to each of the data;

[0047] A judging subunit, used to judge whether the access frequency of each data is lower than the frequency threshold corresponding to the resource pool to which it belongs;

[0048] A second determination subunit is used to determine that any data is cold data if the access frequency of the data is lower than the access frequency corresponding to the resource pool to which the data belongs;

[0049] The third determination subunit is used to determine that the data is not cold data if the access frequency of any data is not lower than the access frequency corresponding to the resource pool to which the data belongs.

[0050] The above device may optionally further include:

[0051] A level classification unit is used to determine the service business currently supported by the storage system and the target data type related to the service business; determine the proportion of data of the target data type contained in each resource pool in the storage system; set the weight value corresponding to each resource pool according to the proportion of data of the target data type contained in each resource pool in the storage system; and set the storage level of each resource pool in the storage system to which it belongs according to the weight value of each resource pool in the storage system to which it belongs.

[0052] The above device may optionally further include:

[0053] An access unit is used to obtain a mapping file corresponding to the cold data when receiving a data access request corresponding to the cold data sent by the server; determine a target resource pool that currently stores the cold data based on the mapping file; execute an access operation on the cold data corresponding to the data access request in the target resource pool, and return an operation result corresponding to the access operation to the server.

[0054] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned data storage method.

[0055] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above data storage method.

[0056] Compared with the prior art, the present invention has the following advantages:

[0057] The present invention provides a data storage method, comprising: obtaining data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data; generating a statistical matrix corresponding to each resource pool based on each data information; judging whether there is cold data in the storage system based on the data information corresponding to each data; when there is cold data in the storage system, determining that the resource pool currently storing the cold data is a first resource pool, and the storage level of the first resource pool; setting a mobile storage location of the cold data based on the data information of the cold data and the storage level of the first resource pool; determining that the resource pool corresponding to the mobile storage location of the cold data is a second resource pool, and constructing a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the storage location of the cold data; saving the mapping file, and moving and storing the cold data to the second resource pool. By applying the method provided by the present invention, the storage location of the data can be reasonably adjusted to avoid storing a large amount of cold data in a high-level resource pool. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0059] Figure 1A method flow chart of a data storage method provided by an embodiment of the present invention;

[0060] Figure 2 Another method flow chart of a data storage method provided by an embodiment of the present invention;

[0061] Figure 3 A flowchart of another method of a data storage method provided by an embodiment of the present invention;

[0062] Figure 4 A device structure diagram of a data storage device provided by an embodiment of the present invention;

[0063] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0066] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.

[0067] The embodiment of the present invention provides a data storage method, which can be applied to various system platforms, and the execution subject can be a processor of a computer terminal or various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0068] S101: Acquire data information of each data in the storage system.

[0069] The storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data.

[0070] In the present invention, the storage system is a SAN (Storage Area Network) system or a NAS (Network Attached Storage) system.

[0071] For the SAN system, there are production resource pools, multi-active resource pools and disaster recovery resource pools. Different types of storage resource pools are divided according to the application level and can be divided into three levels. Each level of resource pool stores at least one data.

[0072] For the NAS system, there are production resource pools, multi-active resource pools, disaster recovery resource pools, and AP storage resource pools. Different types of storage resource pools are divided according to the application level and can be divided into four levels. Each level of resource pool stores at least one data.

[0073] Specifically, the data information of the data includes the data type, the access time of each access, the number of accesses, etc.

[0074] S102: Generate a statistical matrix corresponding to each resource pool based on each piece of data information.

[0075] It should be noted that the statistical matrix of each resource pool is used to represent the access situation of each data in the resource pool. The application pre-sets the statistical matrix module to count the access habits of the accessed data in the preset time period, and extracts the data attributes and data access frequency of the accessed data, and uses the big data analysis model to establish the statistical matrix of the resource pool.

[0076] The statistical matrix corresponding to the resource pool also includes resource pool information of the resource pool, such as the number of the resource pool, the name of the resource pool, and the location in the storage system.

[0077] S103: Based on the data information corresponding to each of the data, determine whether there is cold data in the storage system.

[0078] In the present invention, the processor includes a cold data determination module, through which it is determined whether cold data exists in each resource pool of the storage system, so as to manage the data subsequently.

[0079] Specifically, when cold data exists in the storage system, S104 is executed, otherwise S108 is executed.

[0080] S104: Determine that the resource pool currently storing cold data is a first resource pool, and the storage level of the first resource pool.

[0081] In the present invention, cold data refers to data in a resource pool that has not been accessed for a long time or has a low access rate.

[0082] S105: Setting a mobile storage location of the cold data based on the data information of the cold data and a preset storage level of the first resource pool.

[0083] In the present invention, if the storage level of the resource pool currently storing cold data is not a resource pool of the minimum storage level, the access frequency of the cold data is determined according to the data information of the cold data, and the mobile storage location of the cold data is determined according to the access frequency.

[0084] It should be noted that the mobile storage location refers to replacing the resource pool location of the resource pool storing the cold data.

[0085] S106: Determine that the resource pool corresponding to the mobile storage location of the cold data is a second resource pool, and construct a mapping file corresponding to the cold data based on the data information of the cold data and a statistical matrix corresponding to the second resource pool.

[0086] The mapping file is used to locate the mobile storage location of the cold data.

[0087] In the present invention, before determining whether cold data exists, a statistical matrix corresponding to each resource pool is first constructed, and the statistical matrix is ​​used to reflect the access conditions of each data in the resource pool. In addition, the statistical matrix is ​​mainly used to provide a reference for establishing a mapping file. Providing a reference specifically refers to extracting the frequency of user access to certain data within a period of time by establishing a data access model, and using such a model to provide auxiliary information to the statistical matrix, so as to facilitate the extraction of the information with the highest user access frequency from a large amount of data information; the information required for the mapping file is established based on the information extracted from the statistical matrix, so as to determine the location of the file after transfer, that is, when the user accesses the information, the data can be accessed through the mapping file.

[0088] It should be noted that the second resource pool may be the first resource pool in the above S104. When the second resource pool is the first resource pool, there is no need to transfer the stored cold data.

[0089] S107: Save the mapping file, and move the cold data to the second resource pool for storage.

[0090] In the present invention, the mapping file is saved so that after the cold data is transferred to a storage location, the data can be accessed through the mapping file.

[0091] S108: When there is no cold data in the storage system, no operation is performed on the data in the storage system.

[0092] In the data storage method provided by the embodiment of the present invention, data information of each data in the storage system is obtained, and based on the data information of each data, a statistical matrix corresponding to each resource pool is generated. The storage system is provided with resource pools of multiple storage levels, each resource pool is used to store data, and each resource pool stores at least one data. Based on the data information corresponding to each data, it is determined whether there is cold data in the storage system. If so, the resource pool currently storing the cold data is determined as the first resource pool, the storage level of the first resource pool is determined, and the mobile storage location of the cold data is set based on the data information of the cold data and the storage level of the first resource pool. The second resource pool corresponding to the mobile storage location is determined, and based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, a mapping file corresponding to the cold data is constructed, the mapping file is saved, and the cold data is moved to the second resource pool.

[0093] Based on the method provided in the above embodiment, when the storage system is a SAN system, the process of storing cold data in the SAN system has the following specific implementation methods:

[0094] The production resource pool, multi-active resource pool and disaster recovery resource pool in the SAN system can be divided into three storage levels according to the application level, namely, SAN platinum resource pool, SAN gold resource pool and SAN silver resource pool. Among them, the storage levels of the three resource pools are: SAN platinum resource pool, SAN gold resource pool and SAN silver resource pool. Create statistical matrices corresponding to the SAN platinum resource pool, SAN gold resource pool and SAN silver resource pool respectively, and detect whether there is cold data in the SAN platinum resource pool, SAN gold resource pool and SAN silver resource pool in turn. If there is cold data in the SAN platinum resource pool, and the mobile storage location of the cold data is the location of the SAN gold resource pool, the SAN platinum resource pool is the first resource pool and the SAN gold resource pool is the second resource pool. According to the data information of the cold data and the statistical matrix of the SAN gold resource pool, generate a mapping file corresponding to the cold data, save the mapping file, and transfer the cold data to the SAN gold resource pool.

[0095] Based on the method provided in the above embodiment, when the storage system is a NAS system, the process of storing cold data in the NAS system has the following specific implementation methods:

[0096] The production resource pool, multi-active resource pool, disaster recovery resource pool, and AP storage resource pool in the NAS storage system are also divided into three types of storage resource pools according to the application level, namely, NAS platinum resource pool, NAS gold resource pool, NAS silver resource pool, and NAS bronze resource pool. Among them, the storage levels of the four resource pools are from large to small: NAS platinum resource pool, NAS gold resource pool, NAS silver resource pool, and NAS bronze resource pool. Create statistical matrices corresponding to the NAS platinum resource pool, NAS gold resource pool, NAS silver resource pool, and NAS bronze resource pool, and detect whether there is cold data in the NAS platinum resource pool, NAS gold resource pool, NAS silver resource pool, and NAS bronze resource pool in turn. If there is cold data in the NAS platinum resource pool, and the mobile storage location of the cold data is the location of the NAS silver resource pool, the NAS platinum resource pool is the first resource pool, and the NAS silver resource pool is the second resource pool. According to the data information of the cold data and the statistical matrix of the NAS silver resource pool, a mapping file corresponding to the cold data is generated, the mapping file is saved, and the cold data is transferred and stored in the NAS silver resource pool.

[0097] By applying the method provided by the embodiment of the present invention, the storage location of data can be reasonably adjusted to avoid storing a large amount of cold data in a high-level resource pool.

[0098] like Figure 2 As shown, based on the method provided in the above embodiment, generating a statistical matrix corresponding to each resource pool based on each of the data information includes:

[0099] S201: Obtain access parameters of each data stored in each data information within a preset monitoring period.

[0100] In the present invention, the access parameters include information such as access time, access times, and access device.

[0101] It should be noted that, in the present invention, for each data in the storage system, the data in the storage system is scanned in real time according to a set monitoring cycle, and a data storage method corresponding to each data in the storage system is executed.

[0102] S202: Determine the data type and data attribute of each data stored in each resource pool.

[0103] In the present invention, each resource pool contains data of multiple data types, and each data type has different attributes. The application mode of the data can be determined according to the data type and data attributes.

[0104] S203: Based on the access parameters corresponding to each data in each resource pool, count the first access times corresponding to each data type in each resource pool, the second access times and the access frequency corresponding to each data attribute.

[0105] In the present invention, by counting the first access times of each data type, the second access times and the access frequency corresponding to each data attribute, the access situation of the application to the storage resource pool is counted.

[0106] S204: Construct a statistical matrix corresponding to each of the resource pools based on the first access count corresponding to each of the data types, the second access count corresponding to each of the data attributes, and the access frequency in each of the resource pools.

[0107] In the present invention, a statistical matrix corresponding to the resource pool is established by accessing each data in the resource pool. The statistical matrix contains the resource pool number, location address, access times of each data type, access times of each data attribute, and access frequency of each data attribute of the corresponding resource pool.

[0108] Furthermore, the process of generating a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool includes:

[0109] Based on the data information of the cold data, counting the access frequency of the cold data in the current monitoring cycle;

[0110] Determine the arrangement format of the resource pool code, the first access count for each data type, the second access count and the access frequency corresponding to each data attribute in the statistical matrix corresponding to the second resource pool;

[0111] A mapping file corresponding to the cold data is generated according to the arrangement format, data information of the cold data, access frequency, and a resource pool number and position of the second resource pool.

[0112] In the method provided by the embodiment of the present invention, in the process of generating the statistical matrix corresponding to each resource pool, the access parameters of each data stored in each data information within the preset monitoring period are obtained, and the data types and data attributes of all data stored in the resource pool are determined. According to the access parameters, the number of accesses to each data type and the number of accesses to each data attribute are counted, and the access frequency of each data attribute is calculated. That is, the number of times each data type is accessed in the data of each data type stored in the resource pool, and the number of times and frequency each data attribute is accessed in the data of each data attribute stored in the resource pool are counted. Based on the first number of accesses to each data type corresponding to each resource pool, the second number of accesses to each data attribute and the access frequency, a statistical matrix corresponding to each resource pool is constructed.

[0113] By applying the method provided in the embodiment of the present invention, the access situation of data in each resource pool can be determined by establishing a statistical matrix, and a corresponding template can be provided for creating a mapping file for cold data.

[0114] like Figure 3 As shown, in the method provided by the embodiment of the present invention, judging whether there is cold data in the storage system based on the data information corresponding to each of the data includes:

[0115] S301: Calculate the access frequency of each data based on the access parameter corresponding to each data.

[0116] In the present invention, for each storage level resource pool, the higher the access frequency of the data in the resource pool, the more times the data is needed. When data with a high access frequency is continuously stored in the same resource pool, the processor does not need to establish a mapping file for the data, and the storage status of the data can be known based on the historical access situation. On the contrary, when data with a low access frequency is continuously stored in the same resource pool, the storage space of the resource pool is occupied by the data with a low access frequency for a long time, and when other data needs to be stored in the resource pool, it is easy to cause insufficient space.

[0117] S302: Determine whether the access frequency of each data is lower than the frequency threshold corresponding to the resource pool to which it belongs.

[0118] If the access frequency of any data is lower than the access frequency corresponding to the resource pool to which it belongs, S303 is executed; if the access frequency of any data is not lower than the access frequency corresponding to the resource pool to which it belongs, S304 is executed.

[0119] S303: Determine that the data is cold data.

[0120] In the present invention, cold data refers to data that has not been accessed for a long time.

[0121] S304: Determine that the data is not cold data.

[0122] In the method provided by the embodiment of the present invention, a time period such as one year, one month or one week can be used as a monitoring period for monitoring the storage system. A pre-set monitoring device is used to monitor all data in the storage system, and the access frequency of the data is checked according to the data information of the data. If the access frequency of the data is low, for example, the access frequency is less than 1%, the data is characterized as cold data, otherwise, the data is characterized as not cold data.

[0123] It should be noted that the change of the storage location of cold data usually involves transferring the cold data from a resource pool with a higher storage level to a resource pool with a lower storage level.

[0124] By applying the method provided in the embodiment of the present invention, whether the data is cold data is determined by the access frequency of the data, thereby preventing the cold data from occupying storage space in the resource pool for a long time.

[0125] In the method provided in the embodiment of the present invention, the process of setting the storage level of each resource pool includes:

[0126] Determine the service business currently supported by the storage system and the target data type related to the service business;

[0127] Determine the proportion of data of the target data type contained in each resource pool in the storage system;

[0128] According to the proportion of data of the target data type contained in each resource pool in the storage system, a weight value corresponding to each resource pool is set;

[0129] The storage level of each resource pool in the storage system to which it belongs is set according to the weight value of each resource pool in the storage system to which it belongs.

[0130] In the data storage method provided in the embodiment of the present invention, the level of each resource pool in the storage system can be changed according to the set requirements. The storage system can set the corresponding supported service business according to the service requirements. For example, if the current storage system supports the reconciliation business, the data type of the data related to the reconciliation business is the reconciliation data; if the service business supported by the storage system one year later is the withdrawal business, the data type of the data related to the withdrawal business is the withdrawal transaction data. For a storage system, not all the data it contains are data corresponding to the target data type related to the service business it supports. Therefore, in dividing the storage level of each resource pool, the storage level of each resource pool is divided according to the data type of each data stored in each resource pool.

[0131] Specifically, the proportion of data of the target data type in each resource pool is determined, and the weight value corresponding to each resource pool is determined according to the proportion of data of the target data type. The larger the weight value of the resource pool, the higher the corresponding storage level.

[0132] It should be noted that the more data of the target data type contained in the resource pool, the greater the probability of the storage system accessing each data in the resource pool during the application process, and when storing newly generated data, it is preferentially stored in the resource pool with a higher storage level. When you need to access certain data, you can query each resource pool according to the storage level whether it stores the data to be accessed. If the data type of the data to be accessed is the target data type, the greater the probability of it appearing in the resource pool with a higher storage level, and the faster the response to the data access.

[0133] The method provided in the embodiment of the present invention further includes:

[0134] When receiving a data access request corresponding to the cold data sent by the server, obtaining a mapping file corresponding to the cold data;

[0135] Based on the mapping file, determining a target resource pool currently storing the cold data;

[0136] An access operation of the cold data corresponding to the data access request is performed in the target resource pool, and an operation result corresponding to the access operation is returned to the server.

[0137] It is understandable that when a data access request is received, data information such as the data number of the data to be accessed contained in the data access request is obtained, and whether the data to be accessed is cold data can be determined through the data number and other data information. If it is cold data, the mapping file corresponding to the cold data can be queried according to the data number, and the target resource pool currently storing the cold data can be queried through the mapping file, and the access operation of the cold data, such as copying, transferring, and packaging, can be performed through the target resource pool, and the operation result can be returned.

[0138] By applying the method provided by the embodiment of the present invention, the resource pool currently storing cold data can be queried through the mapping file, so as to avoid the situation where the cold data cannot be queried after the location of the cold data is adjusted.

[0139] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0140] and Figure 1 Corresponding to the method described above, an embodiment of the present invention further provides a data storage device for storing Figure 1 In the specific implementation of the method, the data storage device provided in the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 4 As shown, specifically including:

[0141] An acquisition unit 401 is used to acquire data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data;

[0142] A generating unit 402, configured to generate a statistical matrix corresponding to each resource pool based on each of the data information;

[0143] A judging unit 403, configured to judge whether there is cold data in the storage system based on data information corresponding to each of the data;

[0144] A determining unit 404 is configured to determine, when cold data exists in the storage system, that a resource pool currently storing the cold data is a first resource pool, and a storage level of the first resource pool;

[0145] A setting unit 405, configured to set a mobile storage location of the cold data based on the data information of the cold data and the storage level of the first resource pool;

[0146] A construction unit 406 is used to determine that the resource pool corresponding to the mobile storage location of the cold data is the second resource pool, and to construct a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the mobile storage location of the cold data;

[0147] The storage unit 407 is used to save the mapping file and move the cold data to the second resource pool for storage.

[0148] In the data storage device provided by the embodiment of the present invention, data information of each data in the storage system is obtained, and based on the data information of each data, a statistical matrix corresponding to each resource pool is generated. The storage system is provided with resource pools of multiple storage levels, each resource pool is used to store data, and each resource pool stores at least one data. Based on the data information corresponding to each data, it is determined whether there is cold data in the storage system. If so, the resource pool currently storing the cold data is determined as the first resource pool, the storage level of the first resource pool is determined, and the mobile storage location of the cold data is set based on the data information of the cold data and the storage level of the first resource pool. The second resource pool corresponding to the mobile storage location is determined, and based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, a mapping file corresponding to the cold data is constructed, the mapping file is saved, and the cold data is moved to the second resource pool.

[0149] By using the device provided by the embodiment of the present invention, the storage location of data can be reasonably adjusted to avoid storing a large amount of cold data in a high-level resource pool.

[0150] The device provided by the embodiment of the present invention, the generating unit includes:

[0151] An acquisition subunit, used for acquiring access parameters of each data stored in each data information within a preset monitoring period;

[0152] A first determining subunit, configured to determine a data type and a data attribute of each data stored in each of the resource pools;

[0153] A statistical subunit, for counting the first access times corresponding to each data type in each resource pool, the second access times corresponding to each data attribute, and the access frequency based on the access parameters corresponding to each data in each resource pool;

[0154] The construction subunit is used to construct a statistical matrix corresponding to each resource pool based on the first access number corresponding to each data type in each resource pool, the second access number corresponding to each data attribute and the access frequency.

[0155] In the device provided by the embodiment of the present invention, the judging unit includes:

[0156] A calculation subunit, configured to calculate the access frequency of each of the data based on the access parameter corresponding to each of the data;

[0157] A judging subunit, used to judge whether the access frequency of each data is lower than the frequency threshold corresponding to the resource pool to which it belongs;

[0158] A second determination subunit is used to determine that any data is cold data if the access frequency of the data is lower than the access frequency corresponding to the resource pool to which the data belongs;

[0159] The third determination subunit is used to determine that the data is not cold data if the access frequency of any data is not lower than the access frequency corresponding to the resource pool to which the data belongs.

[0160] The device provided by the embodiment of the present invention further includes:

[0161] A level classification unit is used to determine the service business currently supported by the storage system and the target data type related to the service business; determine the proportion of data of the target data type contained in each resource pool in the storage system; set the weight value corresponding to each resource pool according to the proportion of data of the target data type contained in each resource pool in the storage system; and set the storage level of each resource pool in the storage system to which it belongs according to the weight value of each resource pool in the storage system to which it belongs.

[0162] The device provided by the embodiment of the present invention further includes:

[0163] An access unit is used to obtain a mapping file corresponding to the cold data when receiving a data access request corresponding to the cold data sent by the server; determine a target resource pool that currently stores the cold data based on the mapping file; execute an access operation on the cold data corresponding to the data access request in the target resource pool, and return an operation result corresponding to the access operation to the server.

[0164] The specific working process of each unit and sub-unit in the data storage device disclosed in the above embodiment of the present invention can refer to the corresponding content in the data storage method disclosed in the above embodiment of the present invention, and will not be repeated here.

[0165] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned data storage method.

[0166] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 5 As shown, it specifically includes a memory 501 and one or more instructions 502, wherein the one or more instructions 502 are stored in the memory 501 and are configured to be executed by one or more processors 503 to perform the following operations:

[0167] Acquire data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data;

[0168] Based on each of the data information, generate a statistical matrix corresponding to each of the resource pools;

[0169] Based on the data information corresponding to each of the data, determining whether there is cold data in the storage system;

[0170] When cold data exists in the storage system, determining that a resource pool currently storing the cold data is a first resource pool, and a storage level of the first resource pool;

[0171] Based on the data information of the cold data and the storage level of the first resource pool, setting a mobile storage location of the cold data;

[0172] Determine that the resource pool corresponding to the mobile storage location of the cold data is the second resource pool, and construct a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the mobile storage location of the cold data;

[0173] The mapping file is saved, and the cold data is moved and stored to the second resource pool.

[0174] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0175] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.

[0176] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0177] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data storage method, characterized in that: include: Acquire data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data; Based on each of the data information, generate a statistical matrix corresponding to each of the resource pools; Based on the data information corresponding to each of the data, determining whether there is cold data in the storage system; When cold data exists in the storage system, determining that a resource pool currently storing the cold data is a first resource pool, and a storage level of the first resource pool; Based on the data information of the cold data and the storage level of the first resource pool, setting a mobile storage location of the cold data; wherein the mobile storage location is a storage location determined based on the access frequency in the data information of the cold data; Determine that the resource pool corresponding to the mobile storage location of the cold data is the second resource pool, and construct a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the mobile storage location of the cold data; Saving the mapping file, and moving and storing the cold data to the second resource pool; When receiving a data access request corresponding to the cold data sent by the server, obtaining a mapping file corresponding to the cold data; Based on the mapping file, determining a target resource pool currently storing the cold data; Execute an access operation of cold data corresponding to the data access request in the target resource pool, and return an operation result corresponding to the access operation to the server; The generating of a statistical matrix corresponding to each resource pool based on each of the data information includes: Obtaining access parameters of each data stored in each of the data information within a preset monitoring period; Determine the data type and data attribute of each data stored in each of the resource pools; Based on the access parameters corresponding to each of the data in each of the resource pools, counting the first access times corresponding to each of the data types in each of the resource pools, the second access times and the access frequency corresponding to each of the data attributes; Based on the first access count corresponding to each data type in each resource pool, the second access count corresponding to each data attribute and the access frequency, constructing a statistical matrix corresponding to each resource pool; Correspondingly, constructing a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool includes: Based on the data information of the cold data, counting the access frequency of the cold data in the current monitoring cycle; Determine the arrangement format of the resource pool number, the first access count for each data type, the second access count for each data attribute, and the access frequency in the statistical matrix corresponding to the second resource pool; A mapping file corresponding to the cold data is generated according to the arrangement format, data information of the cold data, access frequency, and a resource pool number and position of the second resource pool.

2. The method according to claim 1, characterized in that: The determining whether there is cold data in the storage system based on the data information corresponding to each of the data includes: Calculate the access frequency of each data based on the access parameter corresponding to each data; Determine whether the access frequency of each data is lower than the frequency threshold corresponding to the resource pool to which it belongs; If the access frequency of any data is lower than the access frequency corresponding to the resource pool to which it belongs, the data is determined to be cold data; If the access frequency of any data is not lower than the access frequency corresponding to the resource pool to which it belongs, it is determined that the data is not cold data.

3. The method according to claim 1, characterized in that The process of setting the storage class for each resource pool includes: Determine the service business currently supported by the storage system and the target data type related to the service business; Determine the proportion of data of the target data type contained in each resource pool in the storage system; According to the proportion of data of the target data type contained in each resource pool in the storage system, a weight value corresponding to each resource pool is set; The storage level of each resource pool in the storage system to which it belongs is set according to the weight value of each resource pool in the storage system to which it belongs.

4. A data storage device, characterized in that: include: An acquisition unit, used for acquiring data information of each data in a storage system, wherein the storage system is provided with resource pools of multiple storage levels, and each resource pool stores at least one data; A generating unit, configured to generate a statistical matrix corresponding to each resource pool based on each of the data information; A judging unit, configured to judge whether there is cold data in the storage system based on data information corresponding to each of the data; a determining unit, configured to, when cold data exists in the storage system, determine that a resource pool currently storing the cold data is a first resource pool, and a storage level of the first resource pool; a setting unit, configured to set a mobile storage location of the cold data based on the data information of the cold data and the storage level of the first resource pool; wherein the mobile storage location is a storage location determined based on the access frequency in the data information of the cold data; a construction unit, configured to determine that the resource pool corresponding to the mobile storage location of the cold data is the second resource pool, and to construct a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool, wherein the mapping file is used to locate the mobile storage location of the cold data; A storage unit, used for storing the mapping file and moving and storing the cold data to the second resource pool; The access unit is configured to, when receiving a data access request corresponding to the cold data sent by the server, obtain a mapping file corresponding to the cold data; determine a target resource pool currently storing the cold data based on the mapping file; perform an access operation on the cold data corresponding to the data access request in the target resource pool, and return an operation result corresponding to the access operation to the server; Wherein, the generating unit comprises: An acquisition subunit, used for acquiring access parameters of each data stored in each data information within a preset monitoring period; A first determining subunit, configured to determine a data type and a data attribute of each data stored in each of the resource pools; A statistical subunit, for counting the first access times corresponding to each data type in each resource pool, the second access times corresponding to each data attribute, and the access frequency based on the access parameters corresponding to each data in each resource pool; A construction subunit, configured to construct a statistical matrix corresponding to each resource pool based on the first access count corresponding to each data type in each resource pool, the second access count corresponding to each data attribute, and the access frequency; Correspondingly, constructing a mapping file corresponding to the cold data based on the data information of the cold data and the statistical matrix corresponding to the second resource pool includes: Based on the data information of the cold data, counting the access frequency of the cold data in the current monitoring cycle; Determine the arrangement format of the resource pool number, the first access count for each data type, the second access count for each data attribute, and the access frequency in the statistical matrix corresponding to the second resource pool; A mapping file corresponding to the cold data is generated according to the arrangement format, data information of the cold data, access frequency, and a resource pool number and position of the second resource pool.

5. The device according to claim 4, characterized in that The judging unit comprises: A calculation subunit, configured to calculate the access frequency of each of the data based on the access parameter corresponding to each of the data; A judging subunit, used to judge whether the access frequency of each data is lower than the frequency threshold corresponding to the resource pool to which it belongs; A second determination subunit is used to determine that any data is cold data if the access frequency of the data is lower than the access frequency corresponding to the resource pool to which the data belongs; The third determination subunit is used to determine that the data is not cold data if the access frequency of any data is not lower than the access frequency corresponding to the resource pool to which the data belongs.

6. The device according to claim 4, characterized in that Also includes: A level classification unit, used to determine the service business currently supported by the storage system and the target data type related to the service business; Determine the proportion of data of the target data type contained in each resource pool in the storage system; set the weight value corresponding to each resource pool according to the proportion of data of the target data type contained in each resource pool in the storage system; set the storage level of each resource pool in the storage system to which it belongs according to the weight value of each resource pool in the storage system to which it belongs.

Citation Information

Patent Citations

  • Accumulating access frequency and file attributes for supporting policy based storage management

    CN101263494A

  • Block-level-data-based directional allocation method for hierarchical storage

    CN103605615A

  • Storage management method and equipment

    CN107870916A

  • Cloud storage data grading method based on user behaviors

    CN109918448A

  • Cluster resource management method and device, electronic equipment and storage medium

    CN112825023A